sun50i-a64-olinuxino.dts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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 = "Olimex A64-Olinuxino";
  47. compatible = "olimex,a64-olinuxino", "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. reg_usb1_vbus: usb1-vbus {
  65. compatible = "regulator-fixed";
  66. regulator-name = "usb1-vbus";
  67. regulator-min-microvolt = <5000000>;
  68. regulator-max-microvolt = <5000000>;
  69. regulator-boot-on;
  70. enable-active-high;
  71. gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
  72. status = "okay";
  73. };
  74. wifi_pwrseq: wifi_pwrseq {
  75. compatible = "mmc-pwrseq-simple";
  76. reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
  77. };
  78. };
  79. &de {
  80. status = "okay";
  81. };
  82. &ehci0 {
  83. status = "okay";
  84. };
  85. &ehci1 {
  86. status = "okay";
  87. };
  88. &emac {
  89. pinctrl-names = "default";
  90. pinctrl-0 = <&rgmii_pins>;
  91. phy-mode = "rgmii";
  92. phy-handle = <&ext_rgmii_phy>;
  93. phy-supply = <&reg_dcdc1>;
  94. allwinner,tx-delay-ps = <600>;
  95. status = "okay";
  96. };
  97. &hdmi {
  98. hvcc-supply = <&reg_dldo1>;
  99. status = "okay";
  100. };
  101. &hdmi_out {
  102. hdmi_out_con: endpoint {
  103. remote-endpoint = <&hdmi_con_in>;
  104. };
  105. };
  106. &mdio {
  107. ext_rgmii_phy: ethernet-phy@1 {
  108. compatible = "ethernet-phy-ieee802.3-c22";
  109. reg = <1>;
  110. };
  111. };
  112. &mmc0 {
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&mmc0_pins>;
  115. vmmc-supply = <&reg_dcdc1>;
  116. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  117. disable-wp;
  118. bus-width = <4>;
  119. status = "okay";
  120. };
  121. &mmc1 {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&mmc1_pins>;
  124. vmmc-supply = <&reg_aldo2>;
  125. vqmmc-supply = <&reg_dldo4>;
  126. mmc-pwrseq = <&wifi_pwrseq>;
  127. bus-width = <4>;
  128. non-removable;
  129. status = "okay";
  130. rtl8723bs: wifi@1 {
  131. reg = <1>;
  132. interrupt-parent = <&r_pio>;
  133. interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
  134. interrupt-names = "host-wake";
  135. };
  136. };
  137. &ohci0 {
  138. status = "okay";
  139. };
  140. &ohci1 {
  141. status = "okay";
  142. };
  143. &r_rsb {
  144. status = "okay";
  145. axp803: pmic@3a3 {
  146. compatible = "x-powers,axp803";
  147. reg = <0x3a3>;
  148. interrupt-parent = <&r_intc>;
  149. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  150. x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
  151. };
  152. };
  153. #include "axp803.dtsi"
  154. &reg_aldo1 {
  155. regulator-always-on;
  156. regulator-min-microvolt = <2800000>;
  157. regulator-max-microvolt = <2800000>;
  158. regulator-name = "vcc-pe";
  159. };
  160. &reg_aldo2 {
  161. regulator-always-on;
  162. regulator-min-microvolt = <3300000>;
  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. /*
  186. * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
  187. * 1.35V that the PMIC can drive.
  188. */
  189. &reg_dcdc5 {
  190. regulator-always-on;
  191. regulator-min-microvolt = <1360000>;
  192. regulator-max-microvolt = <1360000>;
  193. regulator-name = "vcc-ddr3";
  194. };
  195. &reg_dcdc6 {
  196. regulator-always-on;
  197. regulator-min-microvolt = <1100000>;
  198. regulator-max-microvolt = <1100000>;
  199. regulator-name = "vdd-sys";
  200. };
  201. &reg_dldo1 {
  202. regulator-min-microvolt = <3300000>;
  203. regulator-max-microvolt = <3300000>;
  204. regulator-name = "vcc-hdmi";
  205. };
  206. &reg_dldo2 {
  207. regulator-min-microvolt = <3300000>;
  208. regulator-max-microvolt = <3300000>;
  209. regulator-name = "vcc-mipi";
  210. };
  211. &reg_dldo3 {
  212. regulator-min-microvolt = <2800000>;
  213. regulator-max-microvolt = <2800000>;
  214. regulator-name = "vcc-avdd-csi";
  215. };
  216. &reg_dldo4 {
  217. regulator-min-microvolt = <3300000>;
  218. regulator-max-microvolt = <3300000>;
  219. regulator-name = "vcc-wifi-io";
  220. };
  221. &reg_drivevbus {
  222. regulator-name = "usb0-vbus";
  223. status = "okay";
  224. };
  225. &reg_eldo1 {
  226. regulator-min-microvolt = <1800000>;
  227. regulator-max-microvolt = <1800000>;
  228. regulator-name = "cpvdd";
  229. };
  230. &reg_eldo2 {
  231. regulator-min-microvolt = <1800000>;
  232. regulator-max-microvolt = <1800000>;
  233. regulator-name = "vcc-dvdd-csi";
  234. };
  235. &reg_fldo1 {
  236. regulator-min-microvolt = <1200000>;
  237. regulator-max-microvolt = <1200000>;
  238. regulator-name = "vcc-1v2-hsic";
  239. };
  240. /*
  241. * The A64 chip cannot work without this regulator off, although
  242. * it seems to be only driving the AR100 core.
  243. * Maybe we don't still know well about CPUs domain.
  244. */
  245. &reg_fldo2 {
  246. regulator-always-on;
  247. regulator-min-microvolt = <1100000>;
  248. regulator-max-microvolt = <1100000>;
  249. regulator-name = "vdd-cpus";
  250. };
  251. &reg_rtc_ldo {
  252. regulator-name = "vcc-rtc";
  253. };
  254. &simplefb_hdmi {
  255. vcc-hdmi-supply = <&reg_dldo1>;
  256. };
  257. &uart0 {
  258. pinctrl-names = "default";
  259. pinctrl-0 = <&uart0_pb_pins>;
  260. status = "okay";
  261. };
  262. &usb_otg {
  263. dr_mode = "otg";
  264. status = "okay";
  265. };
  266. &usbphy {
  267. status = "okay";
  268. usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
  269. usb0_vbus-supply = <&reg_drivevbus>;
  270. usb1_vbus-supply = <&reg_usb1_vbus>;
  271. };