sun50i-a64-orangepi-win.dts 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. /*
  2. * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
  3. * Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org>
  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 library 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 library 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-a64.dtsi"
  45. #include <dt-bindings/gpio/gpio.h>
  46. / {
  47. model = "OrangePi Win/Win Plus";
  48. compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
  49. aliases {
  50. ethernet0 = &emac;
  51. serial0 = &uart0;
  52. serial1 = &uart1;
  53. serial2 = &uart2;
  54. serial3 = &uart3;
  55. serial4 = &uart4;
  56. };
  57. chosen {
  58. stdout-path = "serial0:115200n8";
  59. };
  60. hdmi-connector {
  61. compatible = "hdmi-connector";
  62. type = "a";
  63. port {
  64. hdmi_con_in: endpoint {
  65. remote-endpoint = <&hdmi_out_con>;
  66. };
  67. };
  68. };
  69. leds {
  70. compatible = "gpio-leds";
  71. status {
  72. label = "orangepi:green:status";
  73. gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
  74. };
  75. };
  76. reg_gmac_3v3: gmac-3v3 {
  77. compatible = "regulator-fixed";
  78. regulator-name = "gmac-3v3";
  79. regulator-min-microvolt = <3300000>;
  80. regulator-max-microvolt = <3300000>;
  81. regulator-boot-on;
  82. enable-active-high;
  83. gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */
  84. status = "okay";
  85. };
  86. reg_usb1_vbus: usb1-vbus {
  87. compatible = "regulator-fixed";
  88. regulator-name = "usb1-vbus";
  89. regulator-min-microvolt = <5000000>;
  90. regulator-max-microvolt = <5000000>;
  91. regulator-boot-on;
  92. enable-active-high;
  93. gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */
  94. status = "okay";
  95. };
  96. wifi_pwrseq: wifi_pwrseq {
  97. compatible = "mmc-pwrseq-simple";
  98. reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
  99. };
  100. };
  101. &de {
  102. status = "okay";
  103. };
  104. &ehci0 {
  105. status = "okay";
  106. };
  107. &ehci1 {
  108. status = "okay";
  109. };
  110. &emac {
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&rgmii_pins>;
  113. phy-mode = "rgmii";
  114. phy-handle = <&ext_rgmii_phy>;
  115. phy-supply = <&reg_gmac_3v3>;
  116. status = "okay";
  117. };
  118. &hdmi {
  119. hvcc-supply = <&reg_dldo1>;
  120. status = "okay";
  121. };
  122. &hdmi_out {
  123. hdmi_out_con: endpoint {
  124. remote-endpoint = <&hdmi_con_in>;
  125. };
  126. };
  127. &mdio {
  128. ext_rgmii_phy: ethernet-phy@1 {
  129. compatible = "ethernet-phy-ieee802.3-c22";
  130. reg = <1>;
  131. };
  132. };
  133. &mmc0 {
  134. pinctrl-names = "default";
  135. pinctrl-0 = <&mmc0_pins>;
  136. vmmc-supply = <&reg_dcdc1>;
  137. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  138. disable-wp;
  139. bus-width = <4>;
  140. status = "okay";
  141. };
  142. &mmc1 {
  143. pinctrl-names = "default";
  144. pinctrl-0 = <&mmc1_pins>;
  145. vmmc-supply = <&reg_dldo2>;
  146. vqmmc-supply = <&reg_dldo4>;
  147. mmc-pwrseq = <&wifi_pwrseq>;
  148. bus-width = <4>;
  149. non-removable;
  150. status = "okay";
  151. };
  152. &ohci0 {
  153. status = "okay";
  154. };
  155. &ohci1 {
  156. status = "okay";
  157. };
  158. &r_rsb {
  159. status = "okay";
  160. axp803: pmic@3a3 {
  161. compatible = "x-powers,axp803";
  162. reg = <0x3a3>;
  163. interrupt-parent = <&r_intc>;
  164. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  165. };
  166. };
  167. #include "axp803.dtsi"
  168. &reg_aldo1 {
  169. regulator-min-microvolt = <2800000>;
  170. regulator-max-microvolt = <2800000>;
  171. regulator-name = "afvcc-csi";
  172. };
  173. &reg_aldo2 {
  174. regulator-always-on;
  175. regulator-min-microvolt = <1800000>;
  176. regulator-max-microvolt = <3300000>;
  177. regulator-name = "vcc-pl";
  178. };
  179. &reg_aldo3 {
  180. regulator-always-on;
  181. regulator-min-microvolt = <3000000>;
  182. regulator-max-microvolt = <3000000>;
  183. regulator-name = "vcc-pll-avcc";
  184. };
  185. &reg_dcdc1 {
  186. regulator-always-on;
  187. regulator-min-microvolt = <3300000>;
  188. regulator-max-microvolt = <3300000>;
  189. regulator-name = "vcc-3v3";
  190. };
  191. &reg_dcdc2 {
  192. regulator-always-on;
  193. regulator-min-microvolt = <1040000>;
  194. regulator-max-microvolt = <1300000>;
  195. regulator-name = "vdd-cpux";
  196. };
  197. /* DCDC3 is polyphased with DCDC2 */
  198. &reg_dcdc5 {
  199. regulator-always-on;
  200. regulator-min-microvolt = <1500000>;
  201. regulator-max-microvolt = <1500000>;
  202. regulator-name = "vcc-dram";
  203. };
  204. &reg_dcdc6 {
  205. regulator-always-on;
  206. regulator-min-microvolt = <1100000>;
  207. regulator-max-microvolt = <1100000>;
  208. regulator-name = "vdd-sys";
  209. };
  210. &reg_dldo1 {
  211. regulator-min-microvolt = <3300000>;
  212. regulator-max-microvolt = <3300000>;
  213. regulator-name = "vcc-hdmi-dsi";
  214. };
  215. &reg_dldo2 {
  216. regulator-min-microvolt = <3300000>;
  217. regulator-max-microvolt = <3300000>;
  218. regulator-name = "vcc-wifi";
  219. };
  220. &reg_dldo3 {
  221. regulator-min-microvolt = <3300000>;
  222. regulator-max-microvolt = <3300000>;
  223. regulator-name = "avdd-csi";
  224. };
  225. &reg_dldo4 {
  226. regulator-min-microvolt = <3300000>;
  227. regulator-max-microvolt = <3300000>;
  228. regulator-name = "vcc-wifi-io";
  229. };
  230. &reg_drivevbus {
  231. regulator-name = "usb0-vbus";
  232. status = "okay";
  233. };
  234. &reg_eldo1 {
  235. regulator-min-microvolt = <1800000>;
  236. regulator-max-microvolt = <1800000>;
  237. regulator-name = "cpvdd";
  238. };
  239. &reg_eldo3 {
  240. regulator-min-microvolt = <1500000>;
  241. regulator-max-microvolt = <1800000>;
  242. regulator-name = "dvdd-csi";
  243. };
  244. &reg_fldo1 {
  245. regulator-min-microvolt = <1200000>;
  246. regulator-max-microvolt = <1200000>;
  247. regulator-name = "vcc-1v2-hsic";
  248. };
  249. /*
  250. * The A64 chip cannot work without this regulator off, although
  251. * it seems to be only driving the AR100 core.
  252. * Maybe we don't still know well about CPUs domain.
  253. */
  254. &reg_fldo2 {
  255. regulator-always-on;
  256. regulator-min-microvolt = <1100000>;
  257. regulator-max-microvolt = <1100000>;
  258. regulator-name = "vdd-cpus";
  259. };
  260. &reg_rtc_ldo {
  261. regulator-name = "vcc-rtc";
  262. };
  263. &simplefb_hdmi {
  264. vcc-hdmi-supply = <&reg_dldo1>;
  265. };
  266. &spi0 {
  267. status = "okay";
  268. spi-flash@0 {
  269. compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
  270. reg = <0>;
  271. spi-max-frequency = <80000000>;
  272. m25p,fast-read;
  273. status = "okay";
  274. };
  275. };
  276. /* On debug connector */
  277. &uart0 {
  278. pinctrl-names = "default";
  279. pinctrl-0 = <&uart0_pb_pins>;
  280. status = "okay";
  281. };
  282. /* Bluetooth */
  283. &uart1 {
  284. pinctrl-names = "default";
  285. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  286. status = "okay";
  287. };
  288. /* On Pi-2 connector, RTS/CTS optional */
  289. &uart2 {
  290. pinctrl-names = "default";
  291. pinctrl-0 = <&uart2_pins>;
  292. status = "disabled";
  293. };
  294. /* On Pi-2 connector, RTS/CTS optional */
  295. &uart3 {
  296. pinctrl-names = "default";
  297. pinctrl-0 = <&uart3_pins>;
  298. status = "disabled";
  299. };
  300. /* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
  301. &uart4 {
  302. pinctrl-names = "default";
  303. pinctrl-0 = <&uart4_pins>;
  304. status = "disabled";
  305. };
  306. &usb_otg {
  307. dr_mode = "otg";
  308. status = "okay";
  309. };
  310. &usbphy {
  311. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  312. usb0_vbus-supply = <&reg_drivevbus>;
  313. usb1_vbus-supply = <&reg_usb1_vbus>;
  314. status = "okay";
  315. };