sun7i-a20-olimex-som-evb.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /*
  2. * Copyright 2015 - Marcus Cooper <[email protected]>
  3. * Copyright 2015 - Karsten Merker <[email protected]>
  4. *
  5. * This file is dual-licensed: you can use it either under the terms
  6. * of the GPL or the X11 license, at your option. Note that this dual
  7. * licensing only applies to this file, and not this project as a
  8. * whole.
  9. *
  10. * a) This file is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This file is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include "sun7i-a20.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/input/input.h>
  48. #include <dt-bindings/interrupt-controller/irq.h>
  49. / {
  50. model = "Olimex A20-Olimex-SOM-EVB";
  51. compatible = "olimex,a20-olimex-som-evb", "allwinner,sun7i-a20";
  52. aliases {
  53. serial0 = &uart0;
  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 = "a20-olimex-som-evb:green:usr";
  71. gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
  72. default-state = "on";
  73. };
  74. };
  75. };
  76. &ahci {
  77. target-supply = <&reg_ahci_5v>;
  78. status = "okay";
  79. };
  80. &de {
  81. status = "okay";
  82. };
  83. &ehci0 {
  84. status = "okay";
  85. };
  86. &ehci1 {
  87. status = "okay";
  88. };
  89. &cpu0 {
  90. cpu-supply = <&reg_dcdc2>;
  91. };
  92. &codec {
  93. status = "okay";
  94. };
  95. &gmac {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&gmac_rgmii_pins>;
  98. phy-handle = <&phy1>;
  99. phy-mode = "rgmii";
  100. status = "okay";
  101. };
  102. &hdmi {
  103. status = "okay";
  104. };
  105. &hdmi_out {
  106. hdmi_out_con: endpoint {
  107. remote-endpoint = <&hdmi_con_in>;
  108. };
  109. };
  110. &i2c0 {
  111. status = "okay";
  112. axp209: pmic@34 {
  113. reg = <0x34>;
  114. interrupt-parent = <&nmi_intc>;
  115. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  116. };
  117. };
  118. &i2c1 {
  119. status = "okay";
  120. };
  121. &i2c2 {
  122. status = "okay";
  123. };
  124. &lradc {
  125. vref-supply = <&reg_vcc3v0>;
  126. status = "okay";
  127. button-190 {
  128. label = "Volume Up";
  129. linux,code = <KEY_VOLUMEUP>;
  130. channel = <0>;
  131. voltage = <190000>;
  132. };
  133. button-390 {
  134. label = "Volume Down";
  135. linux,code = <KEY_VOLUMEDOWN>;
  136. channel = <0>;
  137. voltage = <390000>;
  138. };
  139. button-600 {
  140. label = "Menu";
  141. linux,code = <KEY_MENU>;
  142. channel = <0>;
  143. voltage = <600000>;
  144. };
  145. button-800 {
  146. label = "Search";
  147. linux,code = <KEY_SEARCH>;
  148. channel = <0>;
  149. voltage = <800000>;
  150. };
  151. button-980 {
  152. label = "Home";
  153. linux,code = <KEY_HOMEPAGE>;
  154. channel = <0>;
  155. voltage = <980000>;
  156. };
  157. button-1180 {
  158. label = "Esc";
  159. linux,code = <KEY_ESC>;
  160. channel = <0>;
  161. voltage = <1180000>;
  162. };
  163. button-1400 {
  164. label = "Enter";
  165. linux,code = <KEY_ENTER>;
  166. channel = <0>;
  167. voltage = <1400000>;
  168. };
  169. };
  170. &gmac_mdio {
  171. phy1: ethernet-phy@1 {
  172. reg = <1>;
  173. };
  174. };
  175. &mmc0 {
  176. vmmc-supply = <&reg_vcc3v3>;
  177. bus-width = <4>;
  178. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
  179. status = "okay";
  180. };
  181. &mmc3 {
  182. vmmc-supply = <&reg_vcc3v3>;
  183. bus-width = <4>;
  184. cd-gpios = <&pio 7 0 GPIO_ACTIVE_LOW>; /* PH0 */
  185. status = "okay";
  186. };
  187. &ohci0 {
  188. status = "okay";
  189. };
  190. &ohci1 {
  191. status = "okay";
  192. };
  193. &otg_sram {
  194. status = "okay";
  195. };
  196. &pio {
  197. led_pins_olimex_som_evb: led-pins {
  198. pins = "PH2";
  199. function = "gpio_out";
  200. drive-strength = <20>;
  201. };
  202. };
  203. &reg_ahci_5v {
  204. gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
  205. status = "okay";
  206. };
  207. #include "axp209.dtsi"
  208. &reg_dcdc2 {
  209. regulator-always-on;
  210. regulator-min-microvolt = <1000000>;
  211. regulator-max-microvolt = <1400000>;
  212. regulator-name = "vdd-cpu";
  213. };
  214. &reg_dcdc3 {
  215. regulator-always-on;
  216. regulator-min-microvolt = <1000000>;
  217. regulator-max-microvolt = <1400000>;
  218. regulator-name = "vdd-int-dll";
  219. };
  220. &reg_ldo1 {
  221. regulator-name = "vdd-rtc";
  222. };
  223. &reg_ldo2 {
  224. regulator-always-on;
  225. regulator-min-microvolt = <3000000>;
  226. regulator-max-microvolt = <3000000>;
  227. regulator-name = "avcc";
  228. };
  229. &reg_usb0_vbus {
  230. status = "okay";
  231. };
  232. &reg_usb1_vbus {
  233. status = "okay";
  234. };
  235. &reg_usb2_vbus {
  236. status = "okay";
  237. };
  238. &spi1 {
  239. pinctrl-names = "default";
  240. pinctrl-0 = <&spi1_pi_pins>,
  241. <&spi1_cs0_pi_pin>;
  242. status = "okay";
  243. };
  244. &spi2 {
  245. pinctrl-names = "default";
  246. pinctrl-0 = <&spi2_pc_pins>,
  247. <&spi2_cs0_pc_pin>;
  248. status = "okay";
  249. };
  250. &uart0 {
  251. pinctrl-names = "default";
  252. pinctrl-0 = <&uart0_pb_pins>;
  253. status = "okay";
  254. };
  255. &uart6 {
  256. pinctrl-names = "default";
  257. pinctrl-0 = <&uart6_pi_pins>;
  258. status = "okay";
  259. };
  260. &uart7 {
  261. pinctrl-names = "default";
  262. pinctrl-0 = <&uart7_pi_pins>;
  263. status = "okay";
  264. };
  265. &usb_otg {
  266. dr_mode = "otg";
  267. status = "okay";
  268. };
  269. &usbphy {
  270. usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
  271. usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
  272. usb0_vbus-supply = <&reg_usb0_vbus>;
  273. usb1_vbus-supply = <&reg_usb1_vbus>;
  274. usb2_vbus-supply = <&reg_usb2_vbus>;
  275. status = "okay";
  276. };