sun8i-h3-nanopi-duo2.dts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2019 Karl Palsson <karlp@tweak.net.au>
  4. */
  5. /dts-v1/;
  6. #include "sun8i-h3.dtsi"
  7. #include "sunxi-common-regulators.dtsi"
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/input/input.h>
  10. / {
  11. model = "FriendlyARM NanoPi Duo2";
  12. compatible = "friendlyarm,nanopi-duo2", "allwinner,sun8i-h3";
  13. aliases {
  14. serial0 = &uart0;
  15. };
  16. chosen {
  17. stdout-path = "serial0:115200n8";
  18. };
  19. leds {
  20. compatible = "gpio-leds";
  21. pwr {
  22. label = "nanopi:red:pwr";
  23. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
  24. default-state = "on";
  25. };
  26. status {
  27. label = "nanopi:green:status";
  28. gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
  29. };
  30. };
  31. r_gpio_keys {
  32. compatible = "gpio-keys";
  33. k1 {
  34. label = "k1";
  35. linux,code = <BTN_0>;
  36. gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */
  37. };
  38. };
  39. reg_vdd_cpux: vdd-cpux-regulator {
  40. compatible = "regulator-gpio";
  41. regulator-name = "vdd-cpux";
  42. regulator-min-microvolt = <1100000>;
  43. regulator-max-microvolt = <1300000>;
  44. regulator-always-on;
  45. regulator-boot-on;
  46. regulator-ramp-delay = <50>; /* 4ms */
  47. enable-active-high;
  48. enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  49. gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
  50. gpios-states = <0x1>;
  51. states = <1100000 0>, <1300000 1>;
  52. };
  53. reg_vcc_dram: vcc-dram {
  54. compatible = "regulator-fixed";
  55. regulator-name = "vcc-dram";
  56. regulator-min-microvolt = <1500000>;
  57. regulator-max-microvolt = <1500000>;
  58. regulator-always-on;
  59. regulator-boot-on;
  60. enable-active-high;
  61. gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
  62. vin-supply = <&reg_vcc5v0>;
  63. };
  64. reg_vdd_sys: vdd-sys {
  65. compatible = "regulator-fixed";
  66. regulator-name = "vdd-sys";
  67. regulator-min-microvolt = <1200000>;
  68. regulator-max-microvolt = <1200000>;
  69. regulator-always-on;
  70. regulator-boot-on;
  71. enable-active-high;
  72. gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
  73. vin-supply = <&reg_vcc5v0>;
  74. };
  75. wifi_pwrseq: wifi_pwrseq {
  76. compatible = "mmc-pwrseq-simple";
  77. reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
  78. clocks = <&rtc 1>;
  79. clock-names = "ext_clock";
  80. };
  81. };
  82. &cpu0 {
  83. cpu-supply = <&reg_vdd_cpux>;
  84. };
  85. &ehci0 {
  86. status = "okay";
  87. };
  88. &mmc0 {
  89. bus-width = <4>;
  90. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  91. status = "okay";
  92. vmmc-supply = <&reg_vcc3v3>;
  93. };
  94. &mmc1 {
  95. vmmc-supply = <&reg_vcc3v3>;
  96. vqmmc-supply = <&reg_vcc3v3>;
  97. mmc-pwrseq = <&wifi_pwrseq>;
  98. bus-width = <4>;
  99. non-removable;
  100. status = "okay";
  101. sdio_wifi: sdio_wifi@1 {
  102. reg = <1>;
  103. compatible = "brcm,bcm4329-fmac";
  104. interrupt-parent = <&pio>;
  105. interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
  106. interrupt-names = "host-wake";
  107. };
  108. };
  109. &ohci0 {
  110. status = "okay";
  111. };
  112. &reg_usb0_vbus {
  113. gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
  114. status = "okay";
  115. };
  116. &uart0 {
  117. pinctrl-names = "default";
  118. pinctrl-0 = <&uart0_pa_pins>;
  119. status = "okay";
  120. };
  121. &uart2 {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>;
  124. uart-has-rtscts;
  125. status = "okay";
  126. bluetooth {
  127. compatible = "brcm,bcm43438-bt";
  128. clocks = <&rtc 1>;
  129. clock-names = "lpo";
  130. vbat-supply = <&reg_vcc3v3>;
  131. vddio-supply = <&reg_vcc3v3>;
  132. device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
  133. host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
  134. shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
  135. };
  136. };
  137. &usb_otg {
  138. status = "okay";
  139. dr_mode = "otg";
  140. };
  141. &usbphy {
  142. usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
  143. usb0_vbus-supply = <&reg_usb0_vbus>;
  144. status = "okay";
  145. };