sun8i-h3-nanopi-r1.dts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2019 Igor Pecovnik <[email protected]>
  4. * Copyright (C) 2020 Jayantajit Gogoi <[email protected]>
  5. * Copyright (C) 2020 Yu-Tung Chang <[email protected]>
  6. */
  7. #include "sun8i-h3-nanopi.dtsi"
  8. #include <dt-bindings/leds/common.h>
  9. / {
  10. model = "FriendlyARM NanoPi R1";
  11. compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3";
  12. aliases {
  13. serial1 = &uart1;
  14. ethernet0 = &emac;
  15. ethernet1 = &wifi;
  16. };
  17. reg_gmac_3v3: gmac-3v3 {
  18. compatible = "regulator-fixed";
  19. regulator-name = "gmac-3v3";
  20. regulator-min-microvolt = <3300000>;
  21. regulator-max-microvolt = <3300000>;
  22. startup-delay-us = <100000>;
  23. enable-active-high;
  24. gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
  25. };
  26. reg_vdd_cpux: gpio-regulator {
  27. compatible = "regulator-gpio";
  28. regulator-name = "vdd-cpux";
  29. regulator-type = "voltage";
  30. regulator-boot-on;
  31. regulator-always-on;
  32. regulator-min-microvolt = <1100000>;
  33. regulator-max-microvolt = <1300000>;
  34. regulator-ramp-delay = <50>;
  35. gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
  36. gpios-states = <0x1>;
  37. states = <1100000 0x0>,
  38. <1300000 0x1>;
  39. };
  40. wifi_pwrseq: wifi_pwrseq {
  41. compatible = "mmc-pwrseq-simple";
  42. reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
  43. clocks = <&rtc CLK_OSC32K_FANOUT>;
  44. clock-names = "ext_clock";
  45. };
  46. leds {
  47. led-2 {
  48. function = LED_FUNCTION_WAN;
  49. color = <LED_COLOR_ID_GREEN>;
  50. gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
  51. };
  52. led-3 {
  53. function = LED_FUNCTION_LAN;
  54. color = <LED_COLOR_ID_GREEN>;
  55. gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; /* PA9 */
  56. };
  57. };
  58. };
  59. &cpu0 {
  60. cpu-supply = <&reg_vdd_cpux>;
  61. };
  62. &ehci1 {
  63. status = "okay";
  64. };
  65. &ehci2 {
  66. status = "okay";
  67. };
  68. &emac {
  69. pinctrl-names = "default";
  70. pinctrl-0 = <&emac_rgmii_pins>;
  71. phy-supply = <&reg_gmac_3v3>;
  72. phy-handle = <&ext_rgmii_phy>;
  73. phy-mode = "rgmii-id";
  74. status = "okay";
  75. };
  76. &external_mdio {
  77. ext_rgmii_phy: ethernet-phy@7 {
  78. compatible = "ethernet-phy-ieee802.3-c22";
  79. reg = <7>;
  80. };
  81. };
  82. &mmc1 {
  83. vmmc-supply = <&reg_vcc3v3>;
  84. vqmmc-supply = <&reg_vcc3v3>;
  85. mmc-pwrseq = <&wifi_pwrseq>;
  86. bus-width = <4>;
  87. non-removable;
  88. status = "okay";
  89. wifi: wifi@1 {
  90. reg = <1>;
  91. compatible = "brcm,bcm4329-fmac";
  92. interrupt-parent = <&pio>;
  93. interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
  94. interrupt-names = "host-wake";
  95. };
  96. };
  97. &mmc2 {
  98. pinctrl-names = "default";
  99. pinctrl-0 = <&mmc2_8bit_pins>;
  100. vmmc-supply = <&reg_vcc3v3>;
  101. vqmmc-supply = <&reg_vcc3v3>;
  102. bus-width = <8>;
  103. non-removable;
  104. status = "okay";
  105. };
  106. &ohci1 {
  107. status = "okay";
  108. };
  109. &ohci2 {
  110. status = "okay";
  111. };
  112. &reg_usb0_vbus {
  113. gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
  114. status = "okay";
  115. };
  116. &uart1 {
  117. pinctrl-names = "default";
  118. pinctrl-0 = <&uart1_pins>;
  119. status = "okay";
  120. };
  121. &uart3 {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
  124. uart-has-rtscts;
  125. status = "okay";
  126. bluetooth {
  127. compatible = "brcm,bcm43438-bt";
  128. clocks = <&rtc CLK_OSC32K_FANOUT>;
  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. };