sun50i-a64-nanopi-a64.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. /*
  2. * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * Or, alternatively,
  20. *
  21. * b) Permission is hereby granted, free of charge, to any person
  22. * obtaining a copy of this software and associated documentation
  23. * files (the "Software"), to deal in the Software without
  24. * restriction, including without limitation the rights to use,
  25. * copy, modify, merge, publish, distribute, sublicense, and/or
  26. * sell copies of the Software, and to permit persons to whom the
  27. * Software is furnished to do so, subject to the following
  28. * conditions:
  29. *
  30. * The above copyright notice and this permission notice shall be
  31. * included in all copies or substantial portions of the Software.
  32. *
  33. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. * OTHER DEALINGS IN THE SOFTWARE.
  41. */
  42. /dts-v1/;
  43. #include "sun50i-a64.dtsi"
  44. #include <dt-bindings/gpio/gpio.h>
  45. / {
  46. model = "FriendlyARM NanoPi A64";
  47. compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
  48. aliases {
  49. ethernet0 = &emac;
  50. serial0 = &uart0;
  51. };
  52. chosen {
  53. stdout-path = "serial0:115200n8";
  54. };
  55. hdmi-connector {
  56. compatible = "hdmi-connector";
  57. type = "a";
  58. port {
  59. hdmi_con_in: endpoint {
  60. remote-endpoint = <&hdmi_out_con>;
  61. };
  62. };
  63. };
  64. leds {
  65. compatible = "gpio-leds";
  66. blue {
  67. label = "nanopi-a64:blue:status";
  68. gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
  69. };
  70. };
  71. wifi_pwrseq: wifi_pwrseq {
  72. compatible = "mmc-pwrseq-simple";
  73. clocks = <&rtc 1>;
  74. clock-names = "ext_clock";
  75. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  76. };
  77. };
  78. &de {
  79. status = "okay";
  80. };
  81. &ehci0 {
  82. status = "okay";
  83. };
  84. &ehci1 {
  85. status = "okay";
  86. };
  87. &emac {
  88. pinctrl-names = "default";
  89. pinctrl-0 = <&rgmii_pins>;
  90. phy-mode = "rgmii";
  91. phy-handle = <&ext_rgmii_phy>;
  92. phy-supply = <&reg_dcdc1>;
  93. status = "okay";
  94. };
  95. &hdmi {
  96. hvcc-supply = <&reg_dldo1>;
  97. status = "okay";
  98. };
  99. &hdmi_out {
  100. hdmi_out_con: endpoint {
  101. remote-endpoint = <&hdmi_con_in>;
  102. };
  103. };
  104. /* i2c1 connected with gpio headers like pine64, bananapi */
  105. &i2c1 {
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&i2c1_pins>;
  108. status = "disabled";
  109. };
  110. &i2c1_pins {
  111. bias-pull-up;
  112. };
  113. &mdio {
  114. ext_rgmii_phy: ethernet-phy@1 {
  115. compatible = "ethernet-phy-ieee802.3-c22";
  116. reg = <7>;
  117. };
  118. };
  119. &mmc0 {
  120. pinctrl-names = "default";
  121. pinctrl-0 = <&mmc0_pins>;
  122. vmmc-supply = <&reg_dcdc1>;
  123. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  124. disable-wp;
  125. bus-width = <4>;
  126. status = "okay";
  127. };
  128. &mmc1 {
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&mmc1_pins>;
  131. vmmc-supply = <&reg_dcdc1>;
  132. vqmmc-supply = <&reg_dldo4>;
  133. mmc-pwrseq = <&wifi_pwrseq>;
  134. bus-width = <4>;
  135. non-removable;
  136. status = "okay";
  137. rtl8189etv: wifi@1 {
  138. reg = <1>;
  139. interrupt-parent = <&r_pio>;
  140. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  141. interrupt-names = "host-wake";
  142. };
  143. };
  144. &ohci0 {
  145. status = "okay";
  146. };
  147. &ohci1 {
  148. status = "okay";
  149. };
  150. &r_rsb {
  151. status = "okay";
  152. axp803: pmic@3a3 {
  153. compatible = "x-powers,axp803";
  154. reg = <0x3a3>;
  155. interrupt-parent = <&r_intc>;
  156. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  157. };
  158. };
  159. #include "axp803.dtsi"
  160. &reg_aldo2 {
  161. regulator-always-on;
  162. regulator-min-microvolt = <1800000>;
  163. regulator-max-microvolt = <3300000>;
  164. regulator-name = "vcc-pl";
  165. };
  166. &reg_aldo3 {
  167. regulator-always-on;
  168. regulator-min-microvolt = <3000000>;
  169. regulator-max-microvolt = <3000000>;
  170. regulator-name = "vcc-pll-avcc";
  171. };
  172. &reg_dcdc1 {
  173. regulator-always-on;
  174. regulator-min-microvolt = <3300000>;
  175. regulator-max-microvolt = <3300000>;
  176. regulator-name = "vcc-3v3";
  177. };
  178. &reg_dcdc2 {
  179. regulator-always-on;
  180. regulator-min-microvolt = <1040000>;
  181. regulator-max-microvolt = <1300000>;
  182. regulator-name = "vdd-cpux";
  183. };
  184. /* DCDC3 is polyphased with DCDC2 */
  185. &reg_dcdc5 {
  186. regulator-always-on;
  187. regulator-min-microvolt = <1500000>;
  188. regulator-max-microvolt = <1500000>;
  189. regulator-name = "vcc-dram";
  190. };
  191. &reg_dcdc6 {
  192. regulator-always-on;
  193. regulator-min-microvolt = <1100000>;
  194. regulator-max-microvolt = <1100000>;
  195. regulator-name = "vdd-sys";
  196. };
  197. &reg_dldo1 {
  198. regulator-always-on;
  199. regulator-min-microvolt = <3300000>;
  200. regulator-max-microvolt = <3300000>;
  201. regulator-name = "vcc-hdmi-dsi";
  202. };
  203. &reg_dldo4 {
  204. regulator-always-on;
  205. regulator-min-microvolt = <3000000>;
  206. regulator-max-microvolt = <3000000>;
  207. regulator-name = "vcc-pg-wifi-io";
  208. };
  209. &reg_eldo1 {
  210. regulator-min-microvolt = <1800000>;
  211. regulator-max-microvolt = <1800000>;
  212. regulator-name = "cpvdd";
  213. };
  214. &reg_fldo1 {
  215. regulator-min-microvolt = <1200000>;
  216. regulator-max-microvolt = <1200000>;
  217. regulator-name = "vcc-1v2-hsic";
  218. };
  219. /*
  220. * The A64 chip cannot work without this regulator off, although
  221. * it seems to be only driving the AR100 core.
  222. * Maybe we don't still know well about CPUs domain.
  223. */
  224. &reg_fldo2 {
  225. regulator-always-on;
  226. regulator-min-microvolt = <1100000>;
  227. regulator-max-microvolt = <1100000>;
  228. regulator-name = "vdd-cpus";
  229. };
  230. &reg_rtc_ldo {
  231. regulator-name = "vcc-rtc";
  232. };
  233. &simplefb_hdmi {
  234. vcc-hdmi-supply = <&reg_dldo1>;
  235. };
  236. &uart0 {
  237. pinctrl-names = "default";
  238. pinctrl-0 = <&uart0_pb_pins>;
  239. status = "okay";
  240. };
  241. &usbphy {
  242. status = "okay";
  243. };