sun50i-h5-nanopi-neo-plus2.dts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*
  2. * Copyright (C) 2017 Antony Antony <antony@phenome.org>
  3. * Copyright (C) 2016 ARM Ltd.
  4. *
  5. * This file is dual-licensed: you can use it either under the terms
  6. * of the GPL or the X11 license, at your option. Note that this dual
  7. * licensing only applies to this file, and not this project as a
  8. * whole.
  9. *
  10. * a) This file is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This file is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include "sun50i-h5.dtsi"
  45. #include <dt-bindings/gpio/gpio.h>
  46. #include <dt-bindings/input/input.h>
  47. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. / {
  49. model = "FriendlyARM NanoPi NEO Plus2";
  50. compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5";
  51. aliases {
  52. ethernet0 = &emac;
  53. serial0 = &uart0;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. leds {
  59. compatible = "gpio-leds";
  60. pwr {
  61. label = "nanopi:green:pwr";
  62. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
  63. default-state = "on";
  64. };
  65. status {
  66. label = "nanopi:red:status";
  67. gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
  68. };
  69. };
  70. reg_gmac_3v3: gmac-3v3 {
  71. compatible = "regulator-fixed";
  72. pinctrl-names = "default";
  73. regulator-name = "gmac-3v3";
  74. regulator-min-microvolt = <3300000>;
  75. regulator-max-microvolt = <3300000>;
  76. startup-delay-us = <100000>;
  77. enable-active-high;
  78. gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
  79. };
  80. reg_vcc3v3: vcc3v3 {
  81. compatible = "regulator-fixed";
  82. regulator-name = "vcc3v3";
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. };
  86. vdd_cpux: gpio-regulator {
  87. compatible = "regulator-gpio";
  88. pinctrl-names = "default";
  89. regulator-name = "vdd-cpux";
  90. regulator-type = "voltage";
  91. regulator-boot-on;
  92. regulator-always-on;
  93. regulator-min-microvolt = <1100000>;
  94. regulator-max-microvolt = <1300000>;
  95. regulator-ramp-delay = <50>; /* 4ms */
  96. gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
  97. gpios-states = <0x1>;
  98. states = <1100000 0x0
  99. 1300000 0x1>;
  100. };
  101. wifi_pwrseq: wifi_pwrseq {
  102. compatible = "mmc-pwrseq-simple";
  103. pinctrl-names = "default";
  104. reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
  105. post-power-on-delay-ms = <200>;
  106. };
  107. };
  108. &codec {
  109. allwinner,audio-routing =
  110. "Line Out", "LINEOUT",
  111. "MIC1", "Mic",
  112. "Mic", "MBIAS";
  113. status = "okay";
  114. };
  115. &ehci0 {
  116. status = "okay";
  117. };
  118. &ehci3 {
  119. status = "okay";
  120. };
  121. &emac {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&emac_rgmii_pins>;
  124. phy-supply = <&reg_gmac_3v3>;
  125. phy-handle = <&ext_rgmii_phy>;
  126. phy-mode = "rgmii";
  127. status = "okay";
  128. };
  129. &external_mdio {
  130. ext_rgmii_phy: ethernet-phy@7 {
  131. compatible = "ethernet-phy-ieee802.3-c22";
  132. reg = <7>;
  133. };
  134. };
  135. &mmc0 {
  136. vmmc-supply = <&reg_vcc3v3>;
  137. bus-width = <4>;
  138. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  139. status = "okay";
  140. };
  141. &mmc1 {
  142. vmmc-supply = <&reg_vcc3v3>;
  143. vqmmc-supply = <&reg_vcc3v3>;
  144. mmc-pwrseq = <&wifi_pwrseq>;
  145. bus-width = <4>;
  146. non-removable;
  147. status = "okay";
  148. brcmf: wifi@1 {
  149. reg = <1>;
  150. compatible = "brcm,bcm4329-fmac";
  151. };
  152. };
  153. &mmc2 {
  154. pinctrl-names = "default";
  155. pinctrl-0 = <&mmc2_8bit_pins>;
  156. vmmc-supply = <&reg_vcc3v3>;
  157. bus-width = <8>;
  158. non-removable;
  159. cap-mmc-hw-reset;
  160. status = "okay";
  161. };
  162. &ohci0 {
  163. status = "okay";
  164. };
  165. &ohci3 {
  166. status = "okay";
  167. };
  168. &uart0 {
  169. pinctrl-names = "default";
  170. pinctrl-0 = <&uart0_pins_a>;
  171. status = "okay";
  172. };
  173. &usb_otg {
  174. dr_mode = "host";
  175. status = "okay";
  176. };
  177. &usbphy {
  178. /* USB Type-A ports' VBUS is always on */
  179. status = "okay";
  180. };