sun7i-a20-olinuxino-lime2.dts 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. /*
  2. * Copyright 2014 - Iain Paton <ipaton0@gmail.com>
  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. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. / {
  49. model = "Olimex A20-OLinuXino-LIME2";
  50. compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20";
  51. aliases {
  52. serial0 = &uart0;
  53. };
  54. chosen {
  55. stdout-path = "serial0:115200n8";
  56. };
  57. leds {
  58. compatible = "gpio-leds";
  59. pinctrl-names = "default";
  60. pinctrl-0 = <&led_pins_olinuxinolime>;
  61. green {
  62. label = "a20-olinuxino-lime2:green:usr";
  63. gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
  64. default-state = "on";
  65. };
  66. };
  67. reg_axp_ipsout: axp_ipsout {
  68. compatible = "regulator-fixed";
  69. regulator-name = "axp-ipsout";
  70. regulator-min-microvolt = <5000000>;
  71. regulator-max-microvolt = <5000000>;
  72. regulator-always-on;
  73. };
  74. };
  75. &ahci {
  76. target-supply = <&reg_ahci_5v>;
  77. status = "okay";
  78. };
  79. &ehci0 {
  80. status = "okay";
  81. };
  82. &ehci1 {
  83. status = "okay";
  84. };
  85. &gmac {
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&gmac_pins_rgmii_a>;
  88. phy = <&phy1>;
  89. phy-mode = "rgmii";
  90. status = "okay";
  91. phy1: ethernet-phy@1 {
  92. reg = <1>;
  93. };
  94. };
  95. &i2c0 {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&i2c0_pins_a>;
  98. status = "okay";
  99. axp209: pmic@34 {
  100. compatible = "x-powers,axp209";
  101. reg = <0x34>;
  102. interrupt-parent = <&nmi_intc>;
  103. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  104. interrupt-controller;
  105. #interrupt-cells = <1>;
  106. acin-supply = <&reg_axp_ipsout>;
  107. vin2-supply = <&reg_axp_ipsout>;
  108. vin3-supply = <&reg_axp_ipsout>;
  109. ldo24in-supply = <&reg_axp_ipsout>;
  110. ldo3in-supply = <&reg_axp_ipsout>;
  111. regulators {
  112. vdd_rtc: ldo1 {
  113. regulator-min-microvolt = <1300000>;
  114. regulator-max-microvolt = <1300000>;
  115. regulator-always-on;
  116. };
  117. avcc: ldo2 {
  118. regulator-min-microvolt = <1800000>;
  119. regulator-max-microvolt = <3300000>;
  120. regulator-always-on;
  121. };
  122. vcc_csi0: ldo3 {
  123. regulator-min-microvolt = <700000>;
  124. regulator-max-microvolt = <3500000>;
  125. regulator-always-on;
  126. };
  127. vcc_csi1: ldo4 {
  128. regulator-min-microvolt = <1250000>;
  129. regulator-max-microvolt = <3300000>;
  130. regulator-always-on;
  131. };
  132. vdd_cpu: dcdc2 {
  133. regulator-min-microvolt = <700000>;
  134. regulator-max-microvolt = <2275000>;
  135. regulator-always-on;
  136. };
  137. vdd_int: dcdc3 {
  138. regulator-min-microvolt = <700000>;
  139. regulator-max-microvolt = <3500000>;
  140. regulator-always-on;
  141. };
  142. };
  143. };
  144. };
  145. &i2c1 {
  146. pinctrl-names = "default";
  147. pinctrl-0 = <&i2c1_pins_a>;
  148. status = "okay";
  149. eeprom: eeprom@50 {
  150. compatible = "atmel,24c16";
  151. reg = <0x50>;
  152. pagesize = <16>;
  153. };
  154. };
  155. &mmc0 {
  156. pinctrl-names = "default";
  157. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  158. vmmc-supply = <&reg_vcc3v3>;
  159. bus-width = <4>;
  160. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  161. cd-inverted;
  162. status = "okay";
  163. };
  164. &ohci0 {
  165. status = "okay";
  166. };
  167. &ohci1 {
  168. status = "okay";
  169. };
  170. &otg_sram {
  171. status = "okay";
  172. };
  173. &pio {
  174. ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
  175. allwinner,pins = "PC3";
  176. allwinner,function = "gpio_out";
  177. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  178. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  179. };
  180. led_pins_olinuxinolime: led_pins@0 {
  181. allwinner,pins = "PH2";
  182. allwinner,function = "gpio_out";
  183. allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  184. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  185. };
  186. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  187. allwinner,pins = "PH4";
  188. allwinner,function = "gpio_in";
  189. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  190. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  191. };
  192. usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
  193. allwinner,pins = "PH5";
  194. allwinner,function = "gpio_in";
  195. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  196. allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
  197. };
  198. usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
  199. allwinner,pins = "PC17";
  200. allwinner,function = "gpio_out";
  201. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  202. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  203. };
  204. };
  205. &reg_ahci_5v {
  206. pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
  207. gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
  208. status = "okay";
  209. };
  210. &reg_usb0_vbus {
  211. pinctrl-0 = <&usb0_vbus_pin_lime2>;
  212. gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
  213. status = "okay";
  214. };
  215. &reg_usb1_vbus {
  216. status = "okay";
  217. };
  218. &reg_usb2_vbus {
  219. status = "okay";
  220. };
  221. &uart0 {
  222. pinctrl-names = "default";
  223. pinctrl-0 = <&uart0_pins_a>;
  224. status = "okay";
  225. };
  226. &usb_otg {
  227. dr_mode = "otg";
  228. status = "okay";
  229. };
  230. &usbphy {
  231. pinctrl-names = "default";
  232. pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
  233. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  234. usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  235. usb0_vbus-supply = <&reg_usb0_vbus>;
  236. usb1_vbus-supply = <&reg_usb1_vbus>;
  237. usb2_vbus-supply = <&reg_usb2_vbus>;
  238. status = "okay";
  239. };