sunxi: add support for pcDuino board
[openwrt/openwrt.git] / target / linux / sunxi / files / arch / arm / boot / dts / sun4i-a10-pcduino.dts
1 /*
2 * Copyright 2012 Stefan Roese
3 * Stefan Roese <sr@denx.de>
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13 /dts-v1/;
14 /include/ "sun4i-a10.dtsi"
15
16 / {
17 model = "pcDuino";
18 compatible = "pcduino,a10-pcduino", "allwinner,sun4i-a10";
19
20 aliases {
21 serial0 = &uart0;
22 serial1 = &uart1;
23 };
24
25 chosen {
26 bootargs = "earlyprintk console=ttyS0,115200";
27 };
28
29 soc@01c00000 {
30 emac: ethernet@01c0b000 {
31 pinctrl-names = "default";
32 pinctrl-0 = <&emac_pins_a>;
33 phy = <&phy1>;
34 status = "okay";
35 };
36
37 mdio@01c0b080 {
38 status = "okay";
39
40 phy1: ethernet-phy@1 {
41 reg = <1>;
42 };
43 };
44
45 sdc0: sdc@01c0f000 {
46 pinctrl-names = "default";
47 pinctrl-0 = <&sdc0_pins_a>;
48 pinctrl-1 = <&mmc0_cd_pin_pcduino>;
49 cd-gpios = <&pio 7 1 0>; /* PH1 */
50 cd-mode = <1>;
51 status = "okay";
52 };
53
54 pinctrl@01c20800 {
55 mmc0_cd_pin_pcduino: mmc0_cd_pin@0 {
56 allwinner,pins = "PH1";
57 allwinner,function = "gpio_in";
58 allwinner,drive = <0>;
59 allwinner,pull = <0>;
60 };
61
62 led_pins_pcduino: led_pins@0 {
63 allwinner,pins = "PH20", "PH21";
64 allwinner,function = "gpio_out";
65 allwinner,drive = <1>;
66 allwinner,pull = <0>;
67 };
68
69 usb1_vbus_pin: usb1_vbus_pin@0 {
70 allwinner,pins = "PH6";
71 allwinner,function = "gpio_out";
72 allwinner,drive = <0>;
73 allwinner,pull = <2>;
74 };
75
76 usb2_vbus_pin: usb2_vbus_pin@0 {
77 allwinner,pins = "PH3";
78 allwinner,function = "gpio_out";
79 allwinner,drive = <0>;
80 allwinner,pull = <2>;
81 };
82 };
83
84 uart0: serial@01c28000 {
85 pinctrl-names = "default";
86 pinctrl-0 = <&uart0_pins_a>;
87 status = "okay";
88 };
89
90 i2c0: i2c@01c2ac00 {
91 pinctrl-names = "default";
92 pinctrl-0 = <&i2c0_pins_a>;
93 status = "okay";
94 };
95
96 i2c1: i2c@01c2b000 {
97 pinctrl-names = "default";
98 pinctrl-0 = <&i2c1_pins_a>;
99 status = "okay";
100 };
101
102 ehci0: ehci0@0x01c14000 {
103 vbus-supply = <&reg_usb1_vbus>;
104 status = "okay";
105 };
106
107 ehci1: ehci1@0x01c1c000 {
108 vbus-supply = <&reg_usb2_vbus>;
109 status = "okay";
110 };
111 };
112
113 leds {
114 compatible = "gpio-leds";
115 pinctrl-names = "default";
116 pinctrl-0 = <&led_pins_pcduino>;
117
118 blue {
119 label = "pcduino:blue:usr";
120 gpios = <&pio 7 21 0>; /* LED1 */
121 };
122
123 green {
124 label = "pcduino:green:usr";
125 gpios = <&pio 7 20 0>; /* LED2 */
126 linux,default-trigger = "heartbeat";
127 };
128 };
129
130 regulators {
131 compatible = "simple-bus";
132
133 reg_usb1_vbus: usb1-vbus {
134 compatible = "regulator-fixed";
135 pinctrl-names = "default";
136 pinctrl-0 = <&usb1_vbus_pin>;
137 regulator-name = "usb1-vbus";
138 regulator-min-microvolt = <3300000>;
139 regulator-max-microvolt = <3300000>;
140 enable-active-high;
141 gpio = <&pio 7 6 0>;
142 };
143
144 reg_usb2_vbus: usb2-vbus {
145 compatible = "regulator-fixed";
146 pinctrl-names = "default";
147 pinctrl-0 = <&usb2_vbus_pin>;
148 regulator-name = "usb2-vbus";
149 regulator-min-microvolt = <3300000>;
150 regulator-max-microvolt = <3300000>;
151 enable-active-high;
152 gpio = <&pio 7 3 0>;
153 };
154 };
155
156 regulators {
157 compatible = "simple-bus";
158 pinctrl-names = "default";
159
160 vcc_3v3_reg: regulator@0 {
161 compatible = "regulator-fixed";
162 regulator-name = "vcc_3v3";
163 regulator-min-microvolt = <3300000>;
164 regulator-max-microvolt = <3300000>;
165 regulator-always-on;
166 };
167 };
168 };