sun7i-a20-olimex-som204-evb.dts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Device Tree Source for A20-SOM204-EVB Board
  4. *
  5. * Copyright (C) 2018 Olimex Ltd.
  6. * Author: Stefan Mavrodiev <[email protected]>
  7. */
  8. /dts-v1/;
  9. #include "sun7i-a20.dtsi"
  10. #include "sunxi-common-regulators.dtsi"
  11. #include <dt-bindings/gpio/gpio.h>
  12. #include <dt-bindings/interrupt-controller/irq.h>
  13. #include <dt-bindings/pwm/pwm.h>
  14. / {
  15. model = "Olimex A20-SOM204-EVB";
  16. compatible = "olimex,a20-olimex-som204-evb", "allwinner,sun7i-a20";
  17. aliases {
  18. serial0 = &uart0;
  19. serial1 = &uart4;
  20. serial2 = &uart7;
  21. spi0 = &spi1;
  22. spi1 = &spi2;
  23. ethernet1 = &rtl8723bs;
  24. };
  25. chosen {
  26. stdout-path = "serial0:115200n8";
  27. };
  28. hdmi-connector {
  29. compatible = "hdmi-connector";
  30. type = "a";
  31. port {
  32. hdmi_con_in: endpoint {
  33. remote-endpoint = <&hdmi_out_con>;
  34. };
  35. };
  36. };
  37. leds {
  38. compatible = "gpio-leds";
  39. led-0 {
  40. label = "a20-som204-evb:green:stat";
  41. gpios = <&pio 8 0 GPIO_ACTIVE_HIGH>;
  42. default-state = "on";
  43. };
  44. led-1 {
  45. label = "a20-som204-evb:green:led1";
  46. gpios = <&pio 8 10 GPIO_ACTIVE_HIGH>;
  47. default-state = "on";
  48. };
  49. led-2 {
  50. label = "a20-som204-evb:yellow:led2";
  51. gpios = <&pio 8 11 GPIO_ACTIVE_HIGH>;
  52. default-state = "on";
  53. };
  54. };
  55. rtl_pwrseq: rtl_pwrseq {
  56. compatible = "mmc-pwrseq-simple";
  57. reset-gpios = <&pio 6 9 GPIO_ACTIVE_LOW>;
  58. };
  59. };
  60. &ahci {
  61. target-supply = <&reg_ahci_5v>;
  62. status = "okay";
  63. };
  64. &can0 {
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&can_ph_pins>;
  67. status = "okay";
  68. };
  69. &codec {
  70. status = "okay";
  71. };
  72. &cpu0 {
  73. cpu-supply = <&reg_dcdc2>;
  74. };
  75. &de {
  76. status = "okay";
  77. };
  78. &ehci0 {
  79. status = "okay";
  80. };
  81. &ehci1 {
  82. status = "okay";
  83. };
  84. &gmac {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&gmac_rgmii_pins>;
  87. phy-handle = <&phy3>;
  88. phy-mode = "rgmii";
  89. phy-supply = <&reg_vcc3v3>;
  90. status = "okay";
  91. };
  92. &hdmi {
  93. status = "okay";
  94. };
  95. &hdmi_out {
  96. hdmi_out_con: endpoint {
  97. remote-endpoint = <&hdmi_con_in>;
  98. };
  99. };
  100. &i2c0 {
  101. status = "okay";
  102. axp209: pmic@34 {
  103. reg = <0x34>;
  104. interrupt-parent = <&nmi_intc>;
  105. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  106. };
  107. };
  108. /* Exposed to UEXT1 */
  109. &i2c1 {
  110. status = "okay";
  111. eeprom: eeprom@50 {
  112. compatible = "atmel,24c16";
  113. reg = <0x50>;
  114. pagesize = <16>;
  115. };
  116. };
  117. /* Exposed to UEXT2 */
  118. &i2c2 {
  119. status = "okay";
  120. };
  121. &ir0 {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&ir0_rx_pin>;
  124. status = "okay";
  125. };
  126. &gmac_mdio {
  127. phy3: ethernet-phy@3 {
  128. reg = <3>;
  129. reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
  130. reset-assert-us = <10000>;
  131. /* wait 1s after reset, otherwise fail to read phy id */
  132. reset-deassert-us = <1000000>;
  133. };
  134. };
  135. &mmc0 {
  136. vmmc-supply = <&reg_vcc3v3>;
  137. bus-width = <4>;
  138. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>;
  139. status = "okay";
  140. };
  141. &mmc3 {
  142. vmmc-supply = <&reg_vcc3v3>;
  143. mmc-pwrseq = <&rtl_pwrseq>;
  144. bus-width = <4>;
  145. non-removable;
  146. status = "okay";
  147. rtl8723bs: sdio_wifi@1 {
  148. reg = <1>;
  149. };
  150. };
  151. &ohci0 {
  152. status = "okay";
  153. };
  154. &ohci1 {
  155. status = "okay";
  156. };
  157. &otg_sram {
  158. status = "okay";
  159. };
  160. &pio {
  161. uart3_rts_pin: uart3-rts-pin {
  162. pins = "PG8";
  163. function = "uart3";
  164. };
  165. };
  166. #include "axp209.dtsi"
  167. &ac_power_supply {
  168. status = "okay";
  169. };
  170. &battery_power_supply {
  171. status = "okay";
  172. };
  173. &reg_ahci_5v {
  174. gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
  175. status = "okay";
  176. };
  177. &reg_dcdc2 {
  178. regulator-always-on;
  179. regulator-min-microvolt = <1000000>;
  180. regulator-max-microvolt = <1400000>;
  181. regulator-name = "vdd-cpu";
  182. };
  183. &reg_dcdc3 {
  184. regulator-always-on;
  185. regulator-min-microvolt = <1000000>;
  186. regulator-max-microvolt = <1400000>;
  187. regulator-name = "vdd-int-dll";
  188. };
  189. &reg_ldo1 {
  190. regulator-always-on;
  191. regulator-min-microvolt = <1300000>;
  192. regulator-max-microvolt = <1300000>;
  193. regulator-name = "vdd-rtc";
  194. };
  195. &reg_ldo2 {
  196. regulator-always-on;
  197. regulator-min-microvolt = <3000000>;
  198. regulator-max-microvolt = <3000000>;
  199. regulator-name = "avcc";
  200. };
  201. &reg_ldo4 {
  202. regulator-min-microvolt = <3300000>;
  203. regulator-max-microvolt = <3300000>;
  204. regulator-name = "vcc-pg";
  205. };
  206. &reg_usb0_vbus {
  207. gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
  208. status = "okay";
  209. };
  210. &reg_usb1_vbus {
  211. status = "okay";
  212. };
  213. &reg_usb2_vbus {
  214. status = "okay";
  215. };
  216. /* Exposed to UEXT1 */
  217. &spi1 {
  218. pinctrl-names = "default";
  219. pinctrl-0 = <&spi1_pi_pins>,
  220. <&spi1_cs0_pi_pin>;
  221. status = "okay";
  222. };
  223. /* Exposed to UEXT2 */
  224. &spi2 {
  225. pinctrl-names = "default";
  226. pinctrl-0 = <&spi2_pc_pins>,
  227. <&spi2_cs0_pc_pin>;
  228. status = "okay";
  229. };
  230. &uart0 {
  231. pinctrl-names = "default";
  232. pinctrl-0 = <&uart0_pb_pins>;
  233. status = "okay";
  234. };
  235. /* Used for RTL8723BS bluetooth */
  236. &uart3 {
  237. pinctrl-names = "default";
  238. pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_pin>;
  239. status = "okay";
  240. };
  241. /* Exposed to UEXT1 */
  242. &uart4 {
  243. pinctrl-names = "default";
  244. pinctrl-0 = <&uart4_pg_pins>;
  245. status = "okay";
  246. };
  247. /* Exposed to UEXT2 */
  248. &uart7 {
  249. pinctrl-names = "default";
  250. pinctrl-0 = <&uart7_pi_pins>;
  251. status = "okay";
  252. };
  253. &usb_otg {
  254. dr_mode = "otg";
  255. status = "okay";
  256. };
  257. &usb_power_supply {
  258. status = "okay";
  259. };
  260. &usbphy {
  261. usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  262. usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  263. usb0_vbus_power-supply = <&usb_power_supply>;
  264. usb0_vbus-supply = <&reg_usb0_vbus>;
  265. usb1_vbus-supply = <&reg_usb1_vbus>;
  266. usb2_vbus-supply = <&reg_usb2_vbus>;
  267. status = "okay";
  268. };