sun6i-a31-hummingbird.dts 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. /*
  2. * Copyright 2014 Maxime Ripard
  3. *
  4. * Maxime Ripard <[email protected]>
  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 "sun6i-a31.dtsi"
  46. #include "sunxi-common-regulators.dtsi"
  47. #include <dt-bindings/gpio/gpio.h>
  48. / {
  49. model = "Merrii A31 Hummingbird";
  50. compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
  51. aliases {
  52. rtc0 = &pcf8563;
  53. rtc1 = &rtc;
  54. serial0 = &uart0;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. hdmi-connector {
  60. compatible = "hdmi-connector";
  61. type = "a";
  62. port {
  63. hdmi_con_in: endpoint {
  64. remote-endpoint = <&hdmi_out_con>;
  65. };
  66. };
  67. };
  68. vga-connector {
  69. compatible = "vga-connector";
  70. port {
  71. vga_con_in: endpoint {
  72. remote-endpoint = <&vga_dac_out>;
  73. };
  74. };
  75. };
  76. vga-dac {
  77. compatible = "dumb-vga-dac";
  78. vdd-supply = <&reg_vga_3v3>;
  79. ports {
  80. #address-cells = <1>;
  81. #size-cells = <0>;
  82. port@0 {
  83. reg = <0>;
  84. vga_dac_in: endpoint {
  85. remote-endpoint = <&tcon0_out_vga>;
  86. };
  87. };
  88. port@1 {
  89. reg = <1>;
  90. vga_dac_out: endpoint {
  91. remote-endpoint = <&vga_con_in>;
  92. };
  93. };
  94. };
  95. };
  96. reg_vga_3v3: vga_3v3_regulator {
  97. compatible = "regulator-fixed";
  98. regulator-name = "vga-3v3";
  99. regulator-min-microvolt = <3300000>;
  100. regulator-max-microvolt = <3300000>;
  101. regulator-boot-on;
  102. enable-active-high;
  103. gpio = <&pio 7 25 GPIO_ACTIVE_HIGH>; /* PH25 */
  104. };
  105. wifi_pwrseq: wifi_pwrseq {
  106. compatible = "mmc-pwrseq-simple";
  107. reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
  108. };
  109. };
  110. &codec {
  111. allwinner,audio-routing =
  112. "Headphone", "HP",
  113. "Speaker", "LINEOUT",
  114. "LINEIN", "Line In",
  115. "MIC1", "Mic",
  116. "MIC2", "Headset Mic",
  117. "Mic", "MBIAS",
  118. "Headset Mic", "HBIAS";
  119. allwinner,pa-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
  120. status = "okay";
  121. };
  122. &cpu0 {
  123. cpu-supply = <&reg_dcdc3>;
  124. };
  125. &de {
  126. status = "okay";
  127. };
  128. &ehci0 {
  129. status = "okay";
  130. };
  131. &gmac {
  132. pinctrl-names = "default";
  133. pinctrl-0 = <&gmac_rgmii_pins>;
  134. phy-handle = <&phy1>;
  135. phy-mode = "rgmii-id";
  136. status = "okay";
  137. };
  138. &hdmi {
  139. status = "okay";
  140. };
  141. &hdmi_out {
  142. hdmi_out_con: endpoint {
  143. remote-endpoint = <&hdmi_con_in>;
  144. };
  145. };
  146. &i2c0 {
  147. /* pull-ups and devices require AXP221 DLDO3 */
  148. status = "failed";
  149. };
  150. &i2c1 {
  151. status = "okay";
  152. };
  153. &i2c2 {
  154. status = "okay";
  155. pcf8563: rtc@51 {
  156. compatible = "nxp,pcf8563";
  157. reg = <0x51>;
  158. };
  159. };
  160. &ir {
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&s_ir_rx_pin>;
  163. status = "okay";
  164. };
  165. &mdio {
  166. phy1: ethernet-phy@1 {
  167. reg = <1>;
  168. reset-gpios = <&pio 0 21 GPIO_ACTIVE_LOW>;
  169. reset-assert-us = <10000>;
  170. reset-deassert-us = <30000>;
  171. };
  172. };
  173. &mmc0 {
  174. vmmc-supply = <&reg_dcdc1>;
  175. bus-width = <4>;
  176. cd-gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
  177. status = "okay";
  178. };
  179. &mmc1 {
  180. vmmc-supply = <&reg_aldo1>;
  181. mmc-pwrseq = <&wifi_pwrseq>;
  182. bus-width = <4>;
  183. non-removable;
  184. status = "okay";
  185. };
  186. &ohci0 {
  187. status = "okay";
  188. };
  189. &p2wi {
  190. status = "okay";
  191. axp22x: pmic@68 {
  192. compatible = "x-powers,axp221";
  193. reg = <0x68>;
  194. interrupt-parent = <&r_intc>;
  195. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
  196. x-powers,drive-vbus-en;
  197. };
  198. };
  199. #include "axp22x.dtsi"
  200. &ac_power_supply {
  201. status = "okay";
  202. };
  203. &reg_aldo1 {
  204. regulator-min-microvolt = <3300000>;
  205. regulator-max-microvolt = <3300000>;
  206. regulator-name = "vcc-wifi";
  207. };
  208. &reg_aldo3 {
  209. regulator-always-on;
  210. regulator-min-microvolt = <2700000>;
  211. regulator-max-microvolt = <3300000>;
  212. regulator-name = "avcc";
  213. };
  214. &reg_dc5ldo {
  215. regulator-min-microvolt = <700000>;
  216. regulator-max-microvolt = <1320000>;
  217. regulator-name = "vdd-cpus";
  218. };
  219. &reg_dcdc1 {
  220. regulator-always-on;
  221. regulator-min-microvolt = <3000000>;
  222. regulator-max-microvolt = <3000000>;
  223. regulator-name = "vcc-3v0";
  224. };
  225. &reg_dcdc2 {
  226. regulator-min-microvolt = <700000>;
  227. regulator-max-microvolt = <1320000>;
  228. regulator-name = "vdd-gpu";
  229. };
  230. &reg_dcdc3 {
  231. regulator-always-on;
  232. regulator-min-microvolt = <700000>;
  233. regulator-max-microvolt = <1320000>;
  234. regulator-name = "vdd-cpu";
  235. };
  236. &reg_dcdc4 {
  237. regulator-always-on;
  238. regulator-min-microvolt = <700000>;
  239. regulator-max-microvolt = <1320000>;
  240. regulator-name = "vdd-sys-dll";
  241. };
  242. &reg_dcdc5 {
  243. regulator-always-on;
  244. regulator-min-microvolt = <1500000>;
  245. regulator-max-microvolt = <1500000>;
  246. regulator-name = "vcc-dram";
  247. };
  248. &reg_drivevbus {
  249. regulator-name = "usb0-vbus";
  250. status = "okay";
  251. };
  252. &reg_usb1_vbus {
  253. gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
  254. status = "okay";
  255. };
  256. &tcon0 {
  257. pinctrl-names = "default";
  258. pinctrl-0 = <&lcd0_rgb888_pins>;
  259. };
  260. &tcon0_out {
  261. tcon0_out_vga: endpoint@0 {
  262. reg = <0>;
  263. remote-endpoint = <&vga_dac_in>;
  264. };
  265. };
  266. &uart0 {
  267. pinctrl-names = "default";
  268. pinctrl-0 = <&uart0_ph_pins>;
  269. status = "okay";
  270. };
  271. &usb_otg {
  272. dr_mode = "otg";
  273. status = "okay";
  274. };
  275. &usb_power_supply {
  276. status = "okay";
  277. };
  278. &usbphy {
  279. usb0_id_det-gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
  280. usb0_vbus_det-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
  281. usb0_vbus_power-supply = <&usb_power_supply>;
  282. usb0_vbus-supply = <&reg_drivevbus>;
  283. usb1_vbus-supply = <&reg_usb1_vbus>;
  284. status = "okay";
  285. };