sun7i-a20-lamobo-r1.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. /*
  2. * Copyright 2015 Jelle de Jong <[email protected]>
  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 file 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 file 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 "sun7i-a20.dtsi"
  44. #include "sunxi-common-regulators.dtsi"
  45. #include <dt-bindings/gpio/gpio.h>
  46. #include <dt-bindings/interrupt-controller/irq.h>
  47. / {
  48. model = "Lamobo R1";
  49. compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
  50. aliases {
  51. serial0 = &uart0;
  52. serial1 = &uart3;
  53. serial2 = &uart7;
  54. };
  55. chosen {
  56. stdout-path = "serial0:115200n8";
  57. };
  58. hdmi-connector {
  59. compatible = "hdmi-connector";
  60. type = "a";
  61. port {
  62. hdmi_con_in: endpoint {
  63. remote-endpoint = <&hdmi_out_con>;
  64. };
  65. };
  66. };
  67. leds {
  68. compatible = "gpio-leds";
  69. led {
  70. label = "lamobo_r1:green:usr";
  71. gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
  72. };
  73. };
  74. reg_gmac_3v3: gmac-3v3 {
  75. compatible = "regulator-fixed";
  76. regulator-name = "gmac-3v3";
  77. regulator-min-microvolt = <3300000>;
  78. regulator-max-microvolt = <3300000>;
  79. startup-delay-us = <100000>;
  80. enable-active-high;
  81. gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
  82. };
  83. };
  84. &ahci {
  85. target-supply = <&reg_ahci_5v>;
  86. status = "okay";
  87. };
  88. &codec {
  89. status = "okay";
  90. };
  91. &cpu0 {
  92. cpu-supply = <&reg_dcdc2>;
  93. };
  94. &de {
  95. status = "okay";
  96. };
  97. &ehci0 {
  98. status = "okay";
  99. };
  100. &ehci1 {
  101. status = "okay";
  102. };
  103. &gmac {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&gmac_rgmii_pins>;
  106. phy-mode = "rgmii";
  107. phy-supply = <&reg_gmac_3v3>;
  108. status = "okay";
  109. fixed-link {
  110. speed = <1000>;
  111. full-duplex;
  112. };
  113. mdio {
  114. compatible = "snps,dwmac-mdio";
  115. #address-cells = <1>;
  116. #size-cells = <0>;
  117. switch: ethernet-switch@1e {
  118. compatible = "brcm,bcm53125";
  119. reg = <30>;
  120. ports {
  121. #address-cells = <1>;
  122. #size-cells = <0>;
  123. port0: port@0 {
  124. reg = <0>;
  125. label = "lan2";
  126. };
  127. port1: port@1 {
  128. reg = <1>;
  129. label = "lan3";
  130. };
  131. port2: port@2 {
  132. reg = <2>;
  133. label = "lan4";
  134. };
  135. port3: port@3 {
  136. reg = <3>;
  137. label = "wan";
  138. };
  139. port4: port@4 {
  140. reg = <4>;
  141. label = "lan1";
  142. };
  143. port8: port@8 {
  144. reg = <8>;
  145. label = "cpu";
  146. ethernet = <&gmac>;
  147. phy-mode = "rgmii-txid";
  148. fixed-link {
  149. speed = <1000>;
  150. full-duplex;
  151. };
  152. };
  153. };
  154. };
  155. };
  156. };
  157. &hdmi {
  158. status = "okay";
  159. };
  160. &hdmi_out {
  161. hdmi_out_con: endpoint {
  162. remote-endpoint = <&hdmi_con_in>;
  163. };
  164. };
  165. &i2c0 {
  166. status = "okay";
  167. axp209: pmic@34 {
  168. reg = <0x34>;
  169. interrupt-parent = <&nmi_intc>;
  170. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  171. };
  172. };
  173. &i2c2 {
  174. status = "okay";
  175. };
  176. &ir0 {
  177. pinctrl-names = "default";
  178. pinctrl-0 = <&ir0_rx_pin>;
  179. status = "okay";
  180. };
  181. &mmc0 {
  182. vmmc-supply = <&reg_vcc3v3>;
  183. bus-width = <4>;
  184. cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
  185. status = "okay";
  186. };
  187. &ohci0 {
  188. status = "okay";
  189. };
  190. &otg_sram {
  191. status = "okay";
  192. };
  193. #include "axp209.dtsi"
  194. &ac_power_supply {
  195. status = "okay";
  196. };
  197. &battery_power_supply {
  198. status = "okay";
  199. };
  200. &reg_ahci_5v {
  201. gpio = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
  202. status = "okay";
  203. };
  204. &reg_dcdc2 {
  205. regulator-always-on;
  206. regulator-min-microvolt = <1000000>;
  207. regulator-max-microvolt = <1400000>;
  208. regulator-name = "vdd-cpu";
  209. };
  210. &reg_dcdc3 {
  211. regulator-always-on;
  212. regulator-min-microvolt = <1000000>;
  213. regulator-max-microvolt = <1400000>;
  214. regulator-name = "vdd-int-dll";
  215. };
  216. &reg_ldo1 {
  217. regulator-name = "vdd-rtc";
  218. };
  219. &reg_ldo2 {
  220. regulator-always-on;
  221. regulator-min-microvolt = <3000000>;
  222. regulator-max-microvolt = <3000000>;
  223. regulator-name = "avcc";
  224. };
  225. &reg_usb0_vbus {
  226. status = "okay";
  227. };
  228. &reg_usb2_vbus {
  229. gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
  230. status = "okay";
  231. };
  232. &spi0 {
  233. pinctrl-names = "default";
  234. pinctrl-0 = <&spi0_pi_pins>,
  235. <&spi0_cs0_pi_pin>,
  236. <&spi0_cs1_pi_pin>;
  237. status = "okay";
  238. };
  239. &uart0 {
  240. pinctrl-names = "default";
  241. pinctrl-0 = <&uart0_pb_pins>;
  242. status = "okay";
  243. };
  244. &uart3 {
  245. pinctrl-names = "default";
  246. pinctrl-0 = <&uart3_ph_pins>;
  247. status = "okay";
  248. };
  249. &uart7 {
  250. pinctrl-names = "default";
  251. pinctrl-0 = <&uart7_pi_pins>;
  252. status = "okay";
  253. };
  254. &usb_otg {
  255. dr_mode = "otg";
  256. status = "okay";
  257. };
  258. &usb_power_supply {
  259. status = "okay";
  260. };
  261. &usbphy {
  262. usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
  263. usb0_vbus_power-supply = <&usb_power_supply>;
  264. usb0_vbus-supply = <&reg_usb0_vbus>;
  265. usb2_vbus-supply = <&reg_usb2_vbus>;
  266. status = "okay";
  267. };