b7e79d0bf4a7e89dd13e25982e57bf8d22b65577
[cascardo/linux.git] / arch / arm / boot / dts / sun7i-a20-cubietruck.dts
1 /*
2  * Copyright 2013 Oliver Schinagl
3  *
4  * Oliver Schinagl <oliver@schinagl.nl>
5  *
6  * The code contained herein is licensed under the GNU General Public
7  * License. You may obtain a copy of the GNU General Public License
8  * Version 2 or later at the following locations:
9  *
10  * http://www.opensource.org/licenses/gpl-license.html
11  * http://www.gnu.org/copyleft/gpl.html
12  */
13
14 /dts-v1/;
15 /include/ "sun7i-a20.dtsi"
16 /include/ "sunxi-common-regulators.dtsi"
17
18 / {
19         model = "Cubietech Cubietruck";
20         compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
21
22         soc@01c00000 {
23                 mmc0: mmc@01c0f000 {
24                         pinctrl-names = "default";
25                         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
26                         vmmc-supply = <&reg_vcc3v3>;
27                         bus-width = <4>;
28                         cd-gpios = <&pio 7 1 0>; /* PH1 */
29                         cd-inverted;
30                         status = "okay";
31                 };
32
33                 mmc3: mmc@01c12000 {
34                         pinctrl-names = "default";
35                         pinctrl-0 = <&mmc3_pins_a>;
36                         vmmc-supply = <&reg_vmmc3>;
37                         non-removable;
38                         status = "okay";
39                 };
40
41                 usbphy: phy@01c13400 {
42                         usb1_vbus-supply = <&reg_usb1_vbus>;
43                         usb2_vbus-supply = <&reg_usb2_vbus>;
44                         status = "okay";
45                 };
46
47                 ehci0: usb@01c14000 {
48                         status = "okay";
49                 };
50
51                 ohci0: usb@01c14400 {
52                         status = "okay";
53                 };
54
55                 ahci: sata@01c18000 {
56                         target-supply = <&reg_ahci_5v>;
57                         status = "okay";
58                 };
59
60                 ehci1: usb@01c1c000 {
61                         status = "okay";
62                 };
63
64                 ohci1: usb@01c1c400 {
65                         status = "okay";
66                 };
67
68                 pinctrl@01c20800 {
69                         mmc3_pins_a: mmc3@0 {
70                                 /* AP6210 requires pull-up */
71                                 allwinner,pull = <1>;
72                         };
73
74                         vmmc3_pin_cubietruck: vmmc3_pin@0 {
75                                 allwinner,pins = "PH9";
76                                 allwinner,function = "gpio_out";
77                                 allwinner,drive = <0>;
78                                 allwinner,pull = <0>;
79                         };
80
81                         ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
82                                 allwinner,pins = "PH12";
83                                 allwinner,function = "gpio_out";
84                                 allwinner,drive = <0>;
85                                 allwinner,pull = <0>;
86                         };
87
88                         led_pins_cubietruck: led_pins@0 {
89                                 allwinner,pins = "PH7", "PH11", "PH20", "PH21";
90                                 allwinner,function = "gpio_out";
91                                 allwinner,drive = <0>;
92                                 allwinner,pull = <0>;
93                         };
94                 };
95
96                 pwm: pwm@01c20e00 {
97                         pinctrl-names = "default";
98                         pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
99                         status = "okay";
100                 };
101
102                 uart0: serial@01c28000 {
103                         pinctrl-names = "default";
104                         pinctrl-0 = <&uart0_pins_a>;
105                         status = "okay";
106                 };
107
108                 i2c0: i2c@01c2ac00 {
109                         pinctrl-names = "default";
110                         pinctrl-0 = <&i2c0_pins_a>;
111                         status = "okay";
112                 };
113
114                 i2c1: i2c@01c2b000 {
115                         pinctrl-names = "default";
116                         pinctrl-0 = <&i2c1_pins_a>;
117                         status = "okay";
118                 };
119
120                 i2c2: i2c@01c2b400 {
121                         pinctrl-names = "default";
122                         pinctrl-0 = <&i2c2_pins_a>;
123                         status = "okay";
124                 };
125
126                 gmac: ethernet@01c50000 {
127                         pinctrl-names = "default";
128                         pinctrl-0 = <&gmac_pins_rgmii_a>;
129                         phy = <&phy1>;
130                         phy-mode = "rgmii";
131                         status = "okay";
132
133                         phy1: ethernet-phy@1 {
134                                 reg = <1>;
135                         };
136                 };
137         };
138
139         leds {
140                 compatible = "gpio-leds";
141                 pinctrl-names = "default";
142                 pinctrl-0 = <&led_pins_cubietruck>;
143
144                 blue {
145                         label = "cubietruck:blue:usr";
146                         gpios = <&pio 7 21 0>;
147                 };
148
149                 orange {
150                         label = "cubietruck:orange:usr";
151                         gpios = <&pio 7 20 0>;
152                 };
153
154                 white {
155                         label = "cubietruck:white:usr";
156                         gpios = <&pio 7 11 0>;
157                 };
158
159                 green {
160                         label = "cubietruck:green:usr";
161                         gpios = <&pio 7 7 0>;
162                 };
163         };
164
165         reg_ahci_5v: ahci-5v {
166                 pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
167                 gpio = <&pio 7 12 0>;
168                 status = "okay";
169         };
170
171         reg_usb1_vbus: usb1-vbus {
172                 status = "okay";
173         };
174
175         reg_usb2_vbus: usb2-vbus {
176                 status = "okay";
177         };
178
179         reg_vmmc3: vmmc3 {
180                 compatible = "regulator-fixed";
181                 pinctrl-names = "default";
182                 pinctrl-0 = <&vmmc3_pin_cubietruck>;
183                 regulator-name = "vmmc3";
184                 regulator-min-microvolt = <3300000>;
185                 regulator-max-microvolt = <3300000>;
186                 enable-active-high;
187                 gpio = <&pio 7 9 0>;
188         };
189 };