ARM: dts: sun7i: Change pinctrl nodes to avoid warning
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun7i-a20-olimex-som-evb.dts
1 /*
2  * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
3  * Copyright 2015 - Karsten Merker <merker@debian.org>
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
44 /dts-v1/;
45 #include "sun7i-a20.dtsi"
46 #include "sunxi-common-regulators.dtsi"
47
48 #include <dt-bindings/gpio/gpio.h>
49 #include <dt-bindings/input/input.h>
50 #include <dt-bindings/interrupt-controller/irq.h>
51
52 / {
53         model = "Olimex A20-Olimex-SOM-EVB";
54         compatible = "olimex,a20-olimex-som-evb", "allwinner,sun7i-a20";
55
56         aliases {
57                 serial0 = &uart0;
58         };
59
60         chosen {
61                 stdout-path = "serial0:115200n8";
62         };
63
64         hdmi-connector {
65                 compatible = "hdmi-connector";
66                 type = "a";
67
68                 port {
69                         hdmi_con_in: endpoint {
70                                 remote-endpoint = <&hdmi_out_con>;
71                         };
72                 };
73         };
74
75         leds {
76                 compatible = "gpio-leds";
77
78                 green {
79                         label = "a20-olimex-som-evb:green:usr";
80                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
81                         default-state = "on";
82                 };
83         };
84 };
85
86 &ahci {
87         target-supply = <&reg_ahci_5v>;
88         status = "okay";
89 };
90
91 &de {
92         status = "okay";
93 };
94
95 &ehci0 {
96         status = "okay";
97 };
98
99 &ehci1 {
100         status = "okay";
101 };
102
103 &cpu0 {
104         cpu-supply = <&reg_dcdc2>;
105 };
106
107 &codec {
108         status = "okay";
109 };
110
111 &gmac {
112         pinctrl-names = "default";
113         pinctrl-0 = <&gmac_rgmii_pins>;
114         phy = <&phy1>;
115         phy-mode = "rgmii";
116         status = "okay";
117
118         phy1: ethernet-phy@1 {
119                 reg = <1>;
120         };
121 };
122
123 &hdmi {
124         status = "okay";
125 };
126
127 &hdmi_out {
128         hdmi_out_con: endpoint {
129                 remote-endpoint = <&hdmi_con_in>;
130         };
131 };
132
133 &i2c0 {
134         pinctrl-names = "default";
135         pinctrl-0 = <&i2c0_pins>;
136         status = "okay";
137
138         axp209: pmic@34 {
139                 reg = <0x34>;
140                 interrupt-parent = <&nmi_intc>;
141                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
142         };
143 };
144
145 &i2c1 {
146         pinctrl-names = "default";
147         pinctrl-0 = <&i2c1_pins>;
148         status = "okay";
149 };
150
151 &i2c2 {
152         pinctrl-names = "default";
153         pinctrl-0 = <&i2c2_pins>;
154         status = "okay";
155 };
156
157 &lradc {
158         vref-supply = <&reg_vcc3v0>;
159         status = "okay";
160
161         button-190 {
162                 label = "Volume Up";
163                 linux,code = <KEY_VOLUMEUP>;
164                 channel = <0>;
165                 voltage = <190000>;
166         };
167
168         button-390 {
169                 label = "Volume Down";
170                 linux,code = <KEY_VOLUMEDOWN>;
171                 channel = <0>;
172                 voltage = <390000>;
173         };
174
175         button-600 {
176                 label = "Menu";
177                 linux,code = <KEY_MENU>;
178                 channel = <0>;
179                 voltage = <600000>;
180         };
181
182         button-800 {
183                 label = "Search";
184                 linux,code = <KEY_SEARCH>;
185                 channel = <0>;
186                 voltage = <800000>;
187         };
188
189         button-980 {
190                 label = "Home";
191                 linux,code = <KEY_HOMEPAGE>;
192                 channel = <0>;
193                 voltage = <980000>;
194         };
195
196         button-1180 {
197                 label = "Esc";
198                 linux,code = <KEY_ESC>;
199                 channel = <0>;
200                 voltage = <1180000>;
201         };
202
203         button-1400 {
204                 label = "Enter";
205                 linux,code = <KEY_ENTER>;
206                 channel = <0>;
207                 voltage = <1400000>;
208         };
209 };
210
211 &mmc0 {
212         pinctrl-names = "default";
213         pinctrl-0 = <&mmc0_pins>;
214         vmmc-supply = <&reg_vcc3v3>;
215         bus-width = <4>;
216         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
217         status = "okay";
218 };
219
220 &mmc3 {
221         pinctrl-names = "default";
222         pinctrl-0 = <&mmc3_pins>;
223         vmmc-supply = <&reg_vcc3v3>;
224         bus-width = <4>;
225         cd-gpios = <&pio 7 0 GPIO_ACTIVE_LOW>; /* PH0 */
226         status = "okay";
227 };
228
229 &ohci0 {
230         status = "okay";
231 };
232
233 &ohci1 {
234         status = "okay";
235 };
236
237 &otg_sram {
238         status = "okay";
239 };
240
241 &pio {
242         led_pins_olimex_som_evb: led_pins@0 {
243                 pins = "PH2";
244                 function = "gpio_out";
245                 drive-strength = <20>;
246         };
247 };
248
249 &reg_ahci_5v {
250         gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
251         status = "okay";
252 };
253
254 #include "axp209.dtsi"
255
256 &reg_dcdc2 {
257         regulator-always-on;
258         regulator-min-microvolt = <1000000>;
259         regulator-max-microvolt = <1400000>;
260         regulator-name = "vdd-cpu";
261 };
262
263 &reg_dcdc3 {
264         regulator-always-on;
265         regulator-min-microvolt = <1000000>;
266         regulator-max-microvolt = <1400000>;
267         regulator-name = "vdd-int-dll";
268 };
269
270 &reg_ldo1 {
271         regulator-name = "vdd-rtc";
272 };
273
274 &reg_ldo2 {
275         regulator-always-on;
276         regulator-min-microvolt = <3000000>;
277         regulator-max-microvolt = <3000000>;
278         regulator-name = "avcc";
279 };
280
281 &reg_usb0_vbus {
282         status = "okay";
283 };
284
285 &reg_usb1_vbus {
286         status = "okay";
287 };
288
289 &reg_usb2_vbus {
290         status = "okay";
291 };
292
293 &spi1 {
294         pinctrl-names = "default";
295         pinctrl-0 = <&spi1_pi_pins>,
296                     <&spi1_cs0_pi_pin>;
297         status = "okay";
298 };
299
300 &spi2 {
301         pinctrl-names = "default";
302         pinctrl-0 = <&spi2_pc_pins>,
303                     <&spi2_cs0_pc_pin>;
304         status = "okay";
305 };
306
307 &uart0 {
308         pinctrl-names = "default";
309         pinctrl-0 = <&uart0_pb_pins>;
310         status = "okay";
311 };
312
313 &uart6 {
314         pinctrl-names = "default";
315         pinctrl-0 = <&uart6_pi_pins>;
316         status = "okay";
317 };
318
319 &uart7 {
320         pinctrl-names = "default";
321         pinctrl-0 = <&uart7_pi_pins>;
322         status = "okay";
323 };
324
325 &usb_otg {
326         dr_mode = "otg";
327         status = "okay";
328 };
329
330 &usbphy {
331         usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
332         usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
333         usb0_vbus-supply = <&reg_usb0_vbus>;
334         usb1_vbus-supply = <&reg_usb1_vbus>;
335         usb2_vbus-supply = <&reg_usb2_vbus>;
336         status = "okay";
337 };