sun8i-h2-plus-bananapi-m2-zero.dts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
  4. *
  5. * Based on sun8i-h3-bananapi-m2-plus.dts, which is:
  6. * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
  7. */
  8. /dts-v1/;
  9. #include "sun8i-h3.dtsi"
  10. #include "sunxi-common-regulators.dtsi"
  11. #include <dt-bindings/gpio/gpio.h>
  12. #include <dt-bindings/input/input.h>
  13. / {
  14. model = "Banana Pi BPI-M2-Zero";
  15. compatible = "sinovoip,bpi-m2-zero", "allwinner,sun8i-h2-plus";
  16. aliases {
  17. serial0 = &uart0;
  18. serial1 = &uart1;
  19. };
  20. chosen {
  21. stdout-path = "serial0:115200n8";
  22. };
  23. leds {
  24. compatible = "gpio-leds";
  25. pwr_led {
  26. label = "bananapi-m2-zero:red:pwr";
  27. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
  28. default-state = "on";
  29. };
  30. };
  31. gpio_keys {
  32. compatible = "gpio-keys";
  33. sw4 {
  34. label = "power";
  35. linux,code = <BTN_0>;
  36. gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  37. };
  38. };
  39. reg_vdd_cpux: vdd-cpux-regulator {
  40. compatible = "regulator-gpio";
  41. regulator-name = "vdd-cpux";
  42. regulator-type = "voltage";
  43. regulator-boot-on;
  44. regulator-always-on;
  45. regulator-min-microvolt = <1100000>;
  46. regulator-max-microvolt = <1300000>;
  47. regulator-ramp-delay = <50>; /* 4ms */
  48. gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
  49. enable-active-high;
  50. gpios-states = <0x1>;
  51. states = <1100000 0>, <1300000 1>;
  52. };
  53. wifi_pwrseq: wifi_pwrseq {
  54. compatible = "mmc-pwrseq-simple";
  55. reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
  56. clocks = <&rtc 1>;
  57. clock-names = "ext_clock";
  58. };
  59. };
  60. &cpu0 {
  61. cpu-supply = <&reg_vdd_cpux>;
  62. };
  63. &ehci0 {
  64. status = "okay";
  65. };
  66. &mmc0 {
  67. vmmc-supply = <&reg_vcc3v3>;
  68. bus-width = <4>;
  69. /*
  70. * On the production batch of this board the card detect GPIO is
  71. * high active (card inserted), although on the early samples it's
  72. * low active.
  73. */
  74. cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
  75. status = "okay";
  76. };
  77. &mmc1 {
  78. vmmc-supply = <&reg_vcc3v3>;
  79. vqmmc-supply = <&reg_vcc3v3>;
  80. mmc-pwrseq = <&wifi_pwrseq>;
  81. bus-width = <4>;
  82. non-removable;
  83. status = "okay";
  84. brcmf: wifi@1 {
  85. reg = <1>;
  86. compatible = "brcm,bcm4329-fmac";
  87. interrupt-parent = <&pio>;
  88. interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
  89. interrupt-names = "host-wake";
  90. };
  91. };
  92. &ohci0 {
  93. status = "okay";
  94. };
  95. &uart0 {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&uart0_pa_pins>;
  98. status = "okay";
  99. };
  100. &uart1 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  103. uart-has-rtscts;
  104. status = "okay";
  105. bluetooth {
  106. compatible = "brcm,bcm43438-bt";
  107. clocks = <&rtc 1>;
  108. clock-names = "lpo";
  109. vbat-supply = <&reg_vcc3v3>;
  110. vddio-supply = <&reg_vcc3v3>;
  111. device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
  112. host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
  113. shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
  114. };
  115. };
  116. &usb_otg {
  117. dr_mode = "otg";
  118. status = "okay";
  119. };
  120. &usbphy {
  121. usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
  122. /*
  123. * There're two micro-USB connectors, one is power-only and another is
  124. * OTG. The Vbus of these two connectors are connected together, so
  125. * the external USB device will be powered just by the power input
  126. * from the power-only USB port.
  127. */
  128. status = "okay";
  129. };