sun7i-a20-pcduino3.dts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /*
  2. * Copyright 2014 Zoltan HERPAI
  3. * Zoltan HERPAI <wigyori@uid0.hu>
  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. #include <dt-bindings/pinctrl/sun4i-a10.h>
  50. / {
  51. model = "LinkSprite pcDuino3";
  52. compatible = "linksprite,pcduino3", "allwinner,sun7i-a20";
  53. aliases {
  54. serial0 = &uart0;
  55. };
  56. chosen {
  57. stdout-path = "serial0:115200n8";
  58. };
  59. leds {
  60. compatible = "gpio-leds";
  61. pinctrl-names = "default";
  62. pinctrl-0 = <&led_pins_pcduino3>;
  63. tx {
  64. label = "pcduino3:green:tx";
  65. gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
  66. };
  67. rx {
  68. label = "pcduino3:green:rx";
  69. gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
  70. };
  71. };
  72. gpio_keys {
  73. compatible = "gpio-keys";
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&key_pins_pcduino3>;
  76. #address-cells = <1>;
  77. #size-cells = <0>;
  78. button@0 {
  79. label = "Key Back";
  80. linux,code = <KEY_BACK>;
  81. gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
  82. };
  83. button@1 {
  84. label = "Key Home";
  85. linux,code = <KEY_HOME>;
  86. gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
  87. };
  88. button@2 {
  89. label = "Key Menu";
  90. linux,code = <KEY_MENU>;
  91. gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
  92. };
  93. };
  94. };
  95. &ahci {
  96. target-supply = <&reg_ahci_5v>;
  97. status = "okay";
  98. };
  99. &ahci_pwr_pin_a {
  100. allwinner,pins = "PH2";
  101. };
  102. &codec {
  103. status = "okay";
  104. };
  105. &cpu0 {
  106. cpu-supply = <&reg_dcdc2>;
  107. };
  108. &ehci0 {
  109. status = "okay";
  110. };
  111. &ehci1 {
  112. status = "okay";
  113. };
  114. &gmac {
  115. pinctrl-names = "default";
  116. pinctrl-0 = <&gmac_pins_mii_a>;
  117. phy = <&phy1>;
  118. phy-mode = "mii";
  119. status = "okay";
  120. phy1: ethernet-phy@1 {
  121. reg = <1>;
  122. };
  123. };
  124. &i2c0 {
  125. pinctrl-names = "default";
  126. pinctrl-0 = <&i2c0_pins_a>;
  127. status = "okay";
  128. axp209: pmic@34 {
  129. reg = <0x34>;
  130. interrupt-parent = <&nmi_intc>;
  131. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  132. };
  133. };
  134. #include "axp209.dtsi"
  135. &ir0 {
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&ir0_rx_pins_a>;
  138. status = "okay";
  139. };
  140. &mmc0 {
  141. pinctrl-names = "default";
  142. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  143. vmmc-supply = <&reg_vcc3v3>;
  144. bus-width = <4>;
  145. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  146. cd-inverted;
  147. status = "okay";
  148. };
  149. &ohci0 {
  150. status = "okay";
  151. };
  152. &ohci1 {
  153. status = "okay";
  154. };
  155. &otg_sram {
  156. status = "okay";
  157. };
  158. &pio {
  159. led_pins_pcduino3: led_pins@0 {
  160. allwinner,pins = "PH15", "PH16";
  161. allwinner,function = "gpio_out";
  162. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  163. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  164. };
  165. key_pins_pcduino3: key_pins@0 {
  166. allwinner,pins = "PH17", "PH18", "PH19";
  167. allwinner,function = "gpio_in";
  168. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  169. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  170. };
  171. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  172. allwinner,pins = "PH4";
  173. allwinner,function = "gpio_in";
  174. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  175. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  176. };
  177. };
  178. &reg_ahci_5v {
  179. gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
  180. status = "okay";
  181. };
  182. &reg_dcdc2 {
  183. regulator-always-on;
  184. regulator-min-microvolt = <1000000>;
  185. regulator-max-microvolt = <1400000>;
  186. regulator-name = "vdd-cpu";
  187. };
  188. &reg_dcdc3 {
  189. regulator-always-on;
  190. regulator-min-microvolt = <1000000>;
  191. regulator-max-microvolt = <1400000>;
  192. regulator-name = "vdd-int-pll";
  193. };
  194. &reg_ldo1 {
  195. regulator-name = "vdd-rtc";
  196. };
  197. &reg_ldo2 {
  198. regulator-always-on;
  199. regulator-min-microvolt = <3000000>;
  200. regulator-max-microvolt = <3000000>;
  201. regulator-name = "avcc";
  202. };
  203. &reg_usb1_vbus {
  204. status = "okay";
  205. };
  206. &reg_usb2_vbus {
  207. status = "okay";
  208. };
  209. &uart0 {
  210. pinctrl-names = "default";
  211. pinctrl-0 = <&uart0_pins_a>;
  212. status = "okay";
  213. };
  214. &usb_otg {
  215. dr_mode = "otg";
  216. status = "okay";
  217. };
  218. &usbphy {
  219. pinctrl-names = "default";
  220. pinctrl-0 = <&usb0_id_detect_pin>;
  221. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  222. usb1_vbus-supply = <&reg_usb1_vbus>;
  223. usb2_vbus-supply = <&reg_usb2_vbus>;
  224. status = "okay";
  225. };