ARM: sun7i: cubieboard2: Convert to DT label based syntax
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun7i-a20-cubieboard2.dts
1 /*
2  * Copyright 2013 Maxime Ripard
3  *
4  * Maxime Ripard <maxime.ripard@free-electrons.com>
5  *
6  * This file is dual-licensed: you can use it either under the terms
7  * of the GPL or the X11 license, at your option. Note that this dual
8  * licensing only applies to this file, and not this project as a
9  * whole.
10  *
11  *  a) This file is free software; you can redistribute it and/or
12  *     modify it under the terms of the GNU General Public License as
13  *     published by the Free Software Foundation; either version 2 of the
14  *     License, or (at your option) any later version.
15  *
16  *     This file is distributed in the hope that it will be useful,
17  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *     GNU General Public License for more details.
20  *
21  *     You should have received a copy of the GNU General Public
22  *     License along with this file; if not, write to the Free
23  *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
24  *     MA 02110-1301 USA
25  *
26  * Or, alternatively,
27  *
28  *  b) Permission is hereby granted, free of charge, to any person
29  *     obtaining a copy of this software and associated documentation
30  *     files (the "Software"), to deal in the Software without
31  *     restriction, including without limitation the rights to use,
32  *     copy, modify, merge, publish, distribute, sublicense, and/or
33  *     sell copies of the Software, and to permit persons to whom the
34  *     Software is furnished to do so, subject to the following
35  *     conditions:
36  *
37  *     The above copyright notice and this permission notice shall be
38  *     included in all copies or substantial portions of the Software.
39  *
40  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47  *     OTHER DEALINGS IN THE SOFTWARE.
48  */
49
50 /dts-v1/;
51 #include "sun7i-a20.dtsi"
52 #include "sunxi-common-regulators.dtsi"
53
54 #include <dt-bindings/gpio/gpio.h>
55 #include <dt-bindings/interrupt-controller/irq.h>
56 #include <dt-bindings/pinctrl/sun4i-a10.h>
57
58 / {
59         model = "Cubietech Cubieboard2";
60         compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
61
62         leds {
63                 compatible = "gpio-leds";
64                 pinctrl-names = "default";
65                 pinctrl-0 = <&led_pins_cubieboard2>;
66
67                 blue {
68                         label = "cubieboard2:blue:usr";
69                         gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
70                 };
71
72                 green {
73                         label = "cubieboard2:green:usr";
74                         gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
75                 };
76         };
77 };
78
79 &ahci {
80         target-supply = <&reg_ahci_5v>;
81         status = "okay";
82 };
83
84 &cpu0 {
85         cpu-supply = <&reg_dcdc2>;
86 };
87
88 &ehci0 {
89         status = "okay";
90 };
91
92 &ehci1 {
93         status = "okay";
94 };
95
96 &gmac {
97         pinctrl-names = "default";
98         pinctrl-0 = <&gmac_pins_mii_a>;
99         phy = <&phy1>;
100         phy-mode = "mii";
101         status = "okay";
102
103         phy1: ethernet-phy@1 {
104                 reg = <1>;
105         };
106 };
107
108 &i2c0 {
109         pinctrl-names = "default";
110         pinctrl-0 = <&i2c0_pins_a>;
111         status = "okay";
112
113         axp209: pmic@34 {
114                 reg = <0x34>;
115                 interrupt-parent = <&nmi_intc>;
116                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
117         };
118 };
119
120 &i2c1 {
121         pinctrl-names = "default";
122         pinctrl-0 = <&i2c1_pins_a>;
123         status = "okay";
124 };
125
126 &ir0 {
127         pinctrl-names = "default";
128         pinctrl-0 = <&ir0_pins_a>;
129         status = "okay";
130 };
131
132 &mmc0 {
133         pinctrl-names = "default";
134         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
135         vmmc-supply = <&reg_vcc3v3>;
136         bus-width = <4>;
137         cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
138         cd-inverted;
139         status = "okay";
140 };
141
142 &ohci0 {
143         status = "okay";
144 };
145
146 &ohci1 {
147         status = "okay";
148 };
149
150 &pio {
151         led_pins_cubieboard2: led_pins@0 {
152                 allwinner,pins = "PH20", "PH21";
153                 allwinner,function = "gpio_out";
154                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
155                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
156         };
157 };
158
159 &reg_ahci_5v {
160         status = "okay";
161 };
162
163 #include "axp209.dtsi"
164
165 &reg_dcdc2 {
166         regulator-always-on;
167         regulator-min-microvolt = <1000000>;
168         regulator-max-microvolt = <1450000>;
169         regulator-name = "vdd-cpu";
170 };
171
172 &reg_dcdc3 {
173         regulator-always-on;
174         regulator-min-microvolt = <1000000>;
175         regulator-max-microvolt = <1400000>;
176         regulator-name = "vdd-int-dll";
177 };
178
179 &reg_ldo1 {
180         regulator-name = "vdd-rtc";
181 };
182
183 &reg_ldo2 {
184         regulator-always-on;
185         regulator-min-microvolt = <3000000>;
186         regulator-max-microvolt = <3000000>;
187         regulator-name = "avcc";
188 };
189
190 &reg_usb1_vbus {
191         status = "okay";
192 };
193
194 &reg_usb2_vbus {
195         status = "okay";
196 };
197
198 &uart0 {
199         pinctrl-names = "default";
200         pinctrl-0 = <&uart0_pins_a>;
201         status = "okay";
202 };
203
204 &usbphy {
205         usb1_vbus-supply = <&reg_usb1_vbus>;
206         usb2_vbus-supply = <&reg_usb2_vbus>;
207         status = "okay";
208 };