]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[karo-tx-linux.git] / arch / arm / boot / dts / sun7i-a20-olinuxino-micro.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  * Or, alternatively,
22  *
23  *  b) Permission is hereby granted, free of charge, to any person
24  *     obtaining a copy of this software and associated documentation
25  *     files (the "Software"), to deal in the Software without
26  *     restriction, including without limitation the rights to use,
27  *     copy, modify, merge, publish, distribute, sublicense, and/or
28  *     sell copies of the Software, and to permit persons to whom the
29  *     Software is furnished to do so, subject to the following
30  *     conditions:
31  *
32  *     The above copyright notice and this permission notice shall be
33  *     included in all copies or substantial portions of the Software.
34  *
35  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42  *     OTHER DEALINGS IN THE SOFTWARE.
43  */
44
45 /dts-v1/;
46 #include "sun7i-a20.dtsi"
47 #include "sunxi-common-regulators.dtsi"
48
49 #include <dt-bindings/gpio/gpio.h>
50 #include <dt-bindings/input/input.h>
51 #include <dt-bindings/interrupt-controller/irq.h>
52
53 / {
54         model = "Olimex A20-Olinuxino Micro";
55         compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20";
56
57         aliases {
58                 serial0 = &uart0;
59                 serial1 = &uart6;
60                 serial2 = &uart7;
61                 spi0 = &spi1;
62                 spi1 = &spi2;
63         };
64
65         chosen {
66                 stdout-path = "serial0:115200n8";
67         };
68
69         leds {
70                 compatible = "gpio-leds";
71                 pinctrl-names = "default";
72                 pinctrl-0 = <&led_pins_olinuxino>;
73
74                 green {
75                         label = "a20-olinuxino-micro:green:usr";
76                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
77                         default-state = "on";
78                 };
79         };
80 };
81
82 &ahci {
83         target-supply = <&reg_ahci_5v>;
84         status = "okay";
85 };
86
87 &codec {
88         status = "okay";
89 };
90
91 &cpu0 {
92         cpu-supply = <&reg_dcdc2>;
93 };
94
95 &ehci0 {
96         status = "okay";
97 };
98
99 &ehci1 {
100         status = "okay";
101 };
102
103 &gmac {
104         pinctrl-names = "default";
105         pinctrl-0 = <&gmac_pins_mii_a>;
106         phy = <&phy1>;
107         phy-mode = "mii";
108         status = "okay";
109
110         phy1: ethernet-phy@1 {
111                 reg = <1>;
112         };
113 };
114
115 &i2c0 {
116         pinctrl-names = "default";
117         pinctrl-0 = <&i2c0_pins_a>;
118         status = "okay";
119
120         axp209: pmic@34 {
121                 reg = <0x34>;
122                 interrupt-parent = <&nmi_intc>;
123                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
124         };
125 };
126
127 &i2c1 {
128         pinctrl-names = "default";
129         pinctrl-0 = <&i2c1_pins_a>;
130         status = "okay";
131
132         eeprom: eeprom@50 {
133                 compatible = "atmel,24c16";
134                 reg = <0x50>;
135                 pagesize = <16>;
136         };
137 };
138
139 &i2c2 {
140         pinctrl-names = "default";
141         pinctrl-0 = <&i2c2_pins_a>;
142         status = "okay";
143 };
144
145 &lradc {
146         vref-supply = <&reg_vcc3v0>;
147         status = "okay";
148
149         button@191 {
150                 label = "Volume Up";
151                 linux,code = <KEY_VOLUMEUP>;
152                 channel = <0>;
153                 voltage = <191274>;
154         };
155
156         button@392 {
157                 label = "Volume Down";
158                 linux,code = <KEY_VOLUMEDOWN>;
159                 channel = <0>;
160                 voltage = <392644>;
161         };
162
163         button@601 {
164                 label = "Menu";
165                 linux,code = <KEY_MENU>;
166                 channel = <0>;
167                 voltage = <601151>;
168         };
169
170         button@795 {
171                 label = "Search";
172                 linux,code = <KEY_SEARCH>;
173                 channel = <0>;
174                 voltage = <795090>;
175         };
176
177         button@987 {
178                 label = "Home";
179                 linux,code = <KEY_HOMEPAGE>;
180                 channel = <0>;
181                 voltage = <987387>;
182         };
183
184         button@1184 {
185                 label = "Esc";
186                 linux,code = <KEY_ESC>;
187                 channel = <0>;
188                 voltage = <1184678>;
189         };
190
191         button@1398 {
192                 label = "Enter";
193                 linux,code = <KEY_ENTER>;
194                 channel = <0>;
195                 voltage = <1398804>;
196         };
197 };
198
199 &mmc0 {
200         pinctrl-names = "default";
201         pinctrl-0 = <&mmc0_pins_a>;
202         vmmc-supply = <&reg_vcc3v3>;
203         bus-width = <4>;
204         cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
205         cd-inverted;
206         status = "okay";
207 };
208
209 &mmc3 {
210         pinctrl-names = "default";
211         pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
212         vmmc-supply = <&reg_vcc3v3>;
213         bus-width = <4>;
214         cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
215         cd-inverted;
216         status = "okay";
217 };
218
219 &ohci0 {
220         status = "okay";
221 };
222
223 &ohci1 {
224         status = "okay";
225 };
226
227 &otg_sram {
228         status = "okay";
229 };
230
231 &pio {
232         mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
233                 pins = "PH11";
234                 function = "gpio_in";
235                 bias-pull-up;
236         };
237
238         led_pins_olinuxino: led_pins@0 {
239                 pins = "PH2";
240                 function = "gpio_out";
241                 drive-strength = <20>;
242         };
243
244         usb0_id_detect_pin: usb0_id_detect_pin@0 {
245                 pins = "PH4";
246                 function = "gpio_in";
247                 bias-pull-up;
248         };
249
250         usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
251                 pins = "PH5";
252                 function = "gpio_in";
253                 bias-pull-down;
254         };
255 };
256
257 #include "axp209.dtsi"
258
259 &reg_dcdc2 {
260         regulator-always-on;
261         regulator-min-microvolt = <1000000>;
262         regulator-max-microvolt = <1400000>;
263         regulator-name = "vdd-cpu";
264 };
265
266 &reg_dcdc3 {
267         regulator-always-on;
268         regulator-min-microvolt = <1000000>;
269         regulator-max-microvolt = <1400000>;
270         regulator-name = "vdd-int-dll";
271 };
272
273 &reg_ldo2 {
274         regulator-always-on;
275         regulator-min-microvolt = <3000000>;
276         regulator-max-microvolt = <3000000>;
277         regulator-name = "avcc";
278 };
279
280 &reg_ahci_5v {
281         status = "okay";
282 };
283
284 &reg_usb0_vbus {
285         status = "okay";
286 };
287
288 &reg_usb1_vbus {
289         status = "okay";
290 };
291
292 &reg_usb2_vbus {
293         status = "okay";
294 };
295
296 &spi1 {
297         pinctrl-names = "default";
298         pinctrl-0 = <&spi1_pins_a>,
299                     <&spi1_cs0_pins_a>;
300         status = "okay";
301 };
302
303 &spi2 {
304         pinctrl-names = "default";
305         pinctrl-0 = <&spi2_pins_a>,
306                     <&spi2_cs0_pins_a>;
307         status = "okay";
308 };
309
310 &uart0 {
311         pinctrl-names = "default";
312         pinctrl-0 = <&uart0_pins_a>;
313         status = "okay";
314 };
315
316 &uart6 {
317         pinctrl-names = "default";
318         pinctrl-0 = <&uart6_pins_a>;
319         status = "okay";
320 };
321
322 &uart7 {
323         pinctrl-names = "default";
324         pinctrl-0 = <&uart7_pins_a>;
325         status = "okay";
326 };
327
328 &usb_otg {
329         dr_mode = "otg";
330         status = "okay";
331 };
332
333 &usbphy {
334         pinctrl-names = "default";
335         pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
336         usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
337         usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
338         usb0_vbus-supply = <&reg_usb0_vbus>;
339         usb1_vbus-supply = <&reg_usb1_vbus>;
340         usb2_vbus-supply = <&reg_usb2_vbus>;
341         status = "okay";
342 };