sun9i-a80-optimus.dts 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. /*
  2. * Copyright 2014 Chen-Yu Tsai
  3. *
  4. * Chen-Yu Tsai <wens@csie.org>
  5. *
  6. * This file is dual-licensed: you can use it either under the terms
  7. * of the GPL or the X11 license, at your option. Note that this dual
  8. * licensing only applies to this file, and not this project as a
  9. * whole.
  10. *
  11. * a) This file is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This file is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * Or, alternatively,
  22. *
  23. * b) Permission is hereby granted, free of charge, to any person
  24. * obtaining a copy of this software and associated documentation
  25. * files (the "Software"), to deal in the Software without
  26. * restriction, including without limitation the rights to use,
  27. * copy, modify, merge, publish, distribute, sublicense, and/or
  28. * sell copies of the Software, and to permit persons to whom the
  29. * Software is furnished to do so, subject to the following
  30. * conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be
  33. * included in all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  36. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  37. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  38. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  39. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  40. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  41. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. * OTHER DEALINGS IN THE SOFTWARE.
  43. */
  44. /dts-v1/;
  45. #include "sun9i-a80.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. / {
  49. model = "Merrii A80 Optimus Board";
  50. compatible = "merrii,a80-optimus", "allwinner,sun9i-a80";
  51. aliases {
  52. serial0 = &uart0;
  53. serial1 = &uart4;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. leds {
  59. compatible = "gpio-leds";
  60. pinctrl-names = "default";
  61. pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
  62. /* The LED names match those found on the board */
  63. led2 {
  64. label = "optimus:led2:usr";
  65. gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
  66. };
  67. led3 {
  68. label = "optimus:led3:usr";
  69. gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
  70. };
  71. led4 {
  72. label = "optimus:led4:usr";
  73. gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>;
  74. };
  75. };
  76. reg_usb1_vbus: usb1-vbus {
  77. compatible = "regulator-fixed";
  78. pinctrl-names = "default";
  79. pinctrl-0 = <&usb1_vbus_pin_optimus>;
  80. regulator-name = "usb1-vbus";
  81. regulator-min-microvolt = <5000000>;
  82. regulator-max-microvolt = <5000000>;
  83. enable-active-high;
  84. gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  85. };
  86. reg_usb3_vbus: usb3-vbus {
  87. compatible = "regulator-fixed";
  88. pinctrl-names = "default";
  89. pinctrl-0 = <&usb3_vbus_pin_optimus>;
  90. regulator-name = "usb3-vbus";
  91. regulator-min-microvolt = <5000000>;
  92. regulator-max-microvolt = <5000000>;
  93. enable-active-high;
  94. gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  95. };
  96. };
  97. &ehci0 {
  98. status = "okay";
  99. };
  100. &ehci1 {
  101. status = "okay";
  102. };
  103. &ehci2 {
  104. status = "okay";
  105. };
  106. &mmc0 {
  107. pinctrl-names = "default";
  108. pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_optimus>;
  109. vmmc-supply = <&reg_dcdc1>;
  110. bus-width = <4>;
  111. cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH8 */
  112. cd-inverted;
  113. status = "okay";
  114. };
  115. &mmc2 {
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&mmc2_8bit_pins>;
  118. vmmc-supply = <&reg_dcdc1>;
  119. bus-width = <8>;
  120. non-removable;
  121. cap-mmc-hw-reset;
  122. status = "okay";
  123. };
  124. &mmc2_8bit_pins {
  125. /* Increase drive strength for DDR modes */
  126. allwinner,drive = <SUN4I_PINCTRL_40_MA>;
  127. };
  128. &ohci0 {
  129. status = "okay";
  130. };
  131. &ohci2 {
  132. status = "okay";
  133. };
  134. &pio {
  135. led_pins_optimus: led-pins@0 {
  136. allwinner,pins = "PH0", "PH1";
  137. allwinner,function = "gpio_out";
  138. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  139. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  140. };
  141. mmc0_cd_pin_optimus: mmc0_cd_pin@0 {
  142. allwinner,pins = "PH18";
  143. allwinner,function = "gpio_in";
  144. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  145. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  146. };
  147. usb1_vbus_pin_optimus: usb1_vbus_pin@1 {
  148. allwinner,pins = "PH4";
  149. allwinner,function = "gpio_out";
  150. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  151. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  152. };
  153. usb3_vbus_pin_optimus: usb3_vbus_pin@1 {
  154. allwinner,pins = "PH5";
  155. allwinner,function = "gpio_out";
  156. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  157. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  158. };
  159. };
  160. &r_ir {
  161. status = "okay";
  162. };
  163. &r_pio {
  164. led_r_pins_optimus: led-pins@1 {
  165. allwinner,pins = "PM15";
  166. allwinner,function = "gpio_out";
  167. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  168. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  169. };
  170. };
  171. &r_rsb {
  172. status = "okay";
  173. axp809: pmic@3a3 {
  174. reg = <0x3a3>;
  175. interrupt-parent = <&nmi_intc>;
  176. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  177. regulators {
  178. reg_aldo1: aldo1 {
  179. /*
  180. * TODO: This should be handled by the
  181. * USB PHY driver.
  182. */
  183. regulator-always-on;
  184. regulator-min-microvolt = <3000000>;
  185. regulator-max-microvolt = <3000000>;
  186. regulator-name = "vcc33-usbh";
  187. };
  188. reg_aldo2: aldo2 {
  189. regulator-min-microvolt = <1800000>;
  190. regulator-max-microvolt = <1800000>;
  191. regulator-name = "vcc-pb-io-cam";
  192. };
  193. aldo3 {
  194. /* unused */
  195. };
  196. reg_dc5ldo: dc5ldo {
  197. regulator-always-on;
  198. regulator-min-microvolt = <800000>;
  199. regulator-max-microvolt = <1100000>;
  200. regulator-name = "vdd-cpus-09-usbh";
  201. };
  202. reg_dcdc1: dcdc1 {
  203. regulator-always-on;
  204. regulator-min-microvolt = <3000000>;
  205. regulator-max-microvolt = <3000000>;
  206. regulator-name = "vcc-3v";
  207. };
  208. reg_dcdc2: dcdc2 {
  209. regulator-min-microvolt = <800000>;
  210. regulator-max-microvolt = <1100000>;
  211. regulator-name = "vdd-gpu";
  212. };
  213. reg_dcdc3: dcdc3 {
  214. regulator-always-on;
  215. regulator-min-microvolt = <800000>;
  216. regulator-max-microvolt = <1100000>;
  217. regulator-name = "vdd-cpua";
  218. };
  219. reg_dcdc4: dcdc4 {
  220. regulator-always-on;
  221. regulator-min-microvolt = <800000>;
  222. regulator-max-microvolt = <1100000>;
  223. regulator-name = "vdd-sys-usb0-hdmi";
  224. };
  225. reg_dcdc5: dcdc5 {
  226. regulator-always-on;
  227. regulator-min-microvolt = <1425000>;
  228. regulator-max-microvolt = <1575000>;
  229. regulator-name = "vcc-dram";
  230. };
  231. reg_dldo1: dldo1 {
  232. /*
  233. * The WiFi chip supports a wide range
  234. * (3.0 ~ 4.8V) of voltages, and so does
  235. * this regulator (3.0 ~ 4.2V), but
  236. * Allwinner SDK always sets it to 3.3V.
  237. */
  238. regulator-min-microvolt = <3300000>;
  239. regulator-max-microvolt = <3300000>;
  240. regulator-name = "vcc-wifi";
  241. };
  242. reg_dldo2: dldo2 {
  243. regulator-always-on;
  244. regulator-min-microvolt = <3000000>;
  245. regulator-max-microvolt = <3000000>;
  246. regulator-name = "vcc-pl";
  247. };
  248. reg_eldo1: eldo1 {
  249. regulator-min-microvolt = <1200000>;
  250. regulator-max-microvolt = <1200000>;
  251. regulator-name = "vcc-dvdd-cam";
  252. };
  253. reg_eldo2: eldo2 {
  254. regulator-min-microvolt = <1800000>;
  255. regulator-max-microvolt = <1800000>;
  256. regulator-name = "vcc-pe";
  257. };
  258. reg_eldo3: eldo3 {
  259. regulator-always-on;
  260. regulator-min-microvolt = <3000000>;
  261. regulator-max-microvolt = <3000000>;
  262. regulator-name = "vcc-pm-codec-io1";
  263. };
  264. reg_ldo_io0: ldo_io0 {
  265. regulator-always-on;
  266. regulator-min-microvolt = <3000000>;
  267. regulator-max-microvolt = <3000000>;
  268. regulator-name = "vcc-pg";
  269. };
  270. reg_ldo_io1: ldo_io1 {
  271. regulator-min-microvolt = <2500000>;
  272. regulator-max-microvolt = <2500000>;
  273. regulator-name = "vcc-pa-gmac-2v5";
  274. };
  275. reg_rtc_ldo: rtc_ldo {
  276. regulator-name = "vcc-rtc-vdd1v8-io";
  277. };
  278. };
  279. };
  280. };
  281. #include "axp809.dtsi"
  282. &uart0 {
  283. pinctrl-names = "default";
  284. pinctrl-0 = <&uart0_pins_a>;
  285. status = "okay";
  286. };
  287. &usbphy1 {
  288. phy-supply = <&reg_usb1_vbus>;
  289. status = "okay";
  290. };
  291. &usbphy2 {
  292. status = "okay";
  293. };
  294. &usbphy3 {
  295. phy-supply = <&reg_usb3_vbus>;
  296. status = "okay";
  297. };