Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / 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  * 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 #include <dt-bindings/gpio/gpio.h>
19 #include <dt-bindings/input/input.h>
20 #include <dt-bindings/interrupt-controller/irq.h>
21 #include <dt-bindings/pinctrl/sun4i-a10.h>
22
23 / {
24         model = "Olimex A20-Olinuxino Micro";
25         compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20";
26
27         aliases {
28                 serial0 = &uart0;
29                 serial1 = &uart6;
30                 serial2 = &uart7;
31                 spi0 = &spi1;
32                 spi1 = &spi2;
33         };
34
35         soc@01c00000 {
36                 spi1: spi@01c06000 {
37                         pinctrl-names = "default";
38                         pinctrl-0 = <&spi1_pins_a>;
39                         status = "okay";
40                 };
41
42                 mmc0: mmc@01c0f000 {
43                         pinctrl-names = "default";
44                         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
45                         vmmc-supply = <&reg_vcc3v3>;
46                         bus-width = <4>;
47                         cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
48                         cd-inverted;
49                         status = "okay";
50                 };
51
52                 mmc3: mmc@01c12000 {
53                         pinctrl-names = "default";
54                         pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
55                         vmmc-supply = <&reg_vcc3v3>;
56                         bus-width = <4>;
57                         cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
58                         cd-inverted;
59                         status = "okay";
60                 };
61
62                 usbphy: phy@01c13400 {
63                         usb1_vbus-supply = <&reg_usb1_vbus>;
64                         usb2_vbus-supply = <&reg_usb2_vbus>;
65                         status = "okay";
66                 };
67
68                 ehci0: usb@01c14000 {
69                         status = "okay";
70                 };
71
72                 ohci0: usb@01c14400 {
73                         status = "okay";
74                 };
75
76                 spi2: spi@01c17000 {
77                         pinctrl-names = "default";
78                         pinctrl-0 = <&spi2_pins_a>;
79                         status = "okay";
80                 };
81
82                 ahci: sata@01c18000 {
83                         target-supply = <&reg_ahci_5v>;
84                         status = "okay";
85                 };
86
87                 ehci1: usb@01c1c000 {
88                         status = "okay";
89                 };
90
91                 ohci1: usb@01c1c400 {
92                         status = "okay";
93                 };
94
95                 pinctrl@01c20800 {
96                         mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
97                                 allwinner,pins = "PH11";
98                                 allwinner,function = "gpio_in";
99                                 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
100                                 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
101                         };
102
103                         led_pins_olinuxino: led_pins@0 {
104                                 allwinner,pins = "PH2";
105                                 allwinner,function = "gpio_out";
106                                 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
107                                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
108                         };
109                 };
110
111                 lradc: lradc@01c22800 {
112                         vref-supply = <&reg_vcc3v0>;
113                         status = "okay";
114
115                         button@191 {
116                                 label = "Volume Up";
117                                 linux,code = <KEY_VOLUMEUP>;
118                                 channel = <0>;
119                                 voltage = <191274>;
120                         };
121
122                         button@392 {
123                                 label = "Volume Down";
124                                 linux,code = <KEY_VOLUMEDOWN>;
125                                 channel = <0>;
126                                 voltage = <392644>;
127                         };
128
129                         button@601 {
130                                 label = "Menu";
131                                 linux,code = <KEY_MENU>;
132                                 channel = <0>;
133                                 voltage = <601151>;
134                         };
135
136                         button@795 {
137                                 label = "Search";
138                                 linux,code = <KEY_SEARCH>;
139                                 channel = <0>;
140                                 voltage = <795090>;
141                         };
142
143                         button@987 {
144                                 label = "Home";
145                                 linux,code = <KEY_HOMEPAGE>;
146                                 channel = <0>;
147                                 voltage = <987387>;
148                         };
149
150                         button@1184 {
151                                 label = "Esc";
152                                 linux,code = <KEY_ESC>;
153                                 channel = <0>;
154                                 voltage = <1184678>;
155                         };
156
157                         button@1398 {
158                                 label = "Enter";
159                                 linux,code = <KEY_ENTER>;
160                                 channel = <0>;
161                                 voltage = <1398804>;
162                         };
163                 };
164
165                 uart0: serial@01c28000 {
166                         pinctrl-names = "default";
167                         pinctrl-0 = <&uart0_pins_a>;
168                         status = "okay";
169                 };
170
171                 uart6: serial@01c29800 {
172                         pinctrl-names = "default";
173                         pinctrl-0 = <&uart6_pins_a>;
174                         status = "okay";
175                 };
176
177                 uart7: serial@01c29c00 {
178                         pinctrl-names = "default";
179                         pinctrl-0 = <&uart7_pins_a>;
180                         status = "okay";
181                 };
182
183                 i2c0: i2c@01c2ac00 {
184                         pinctrl-names = "default";
185                         pinctrl-0 = <&i2c0_pins_a>;
186                         status = "okay";
187
188                         axp209: pmic@34 {
189                                 compatible = "x-powers,axp209";
190                                 reg = <0x34>;
191                                 interrupt-parent = <&nmi_intc>;
192                                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
193
194                                 interrupt-controller;
195                                 #interrupt-cells = <1>;
196                         };
197                 };
198
199                 i2c1: i2c@01c2b000 {
200                         pinctrl-names = "default";
201                         pinctrl-0 = <&i2c1_pins_a>;
202                         status = "okay";
203                 };
204
205                 i2c2: i2c@01c2b400 {
206                         pinctrl-names = "default";
207                         pinctrl-0 = <&i2c2_pins_a>;
208                         status = "okay";
209                 };
210
211                 gmac: ethernet@01c50000 {
212                         pinctrl-names = "default";
213                         pinctrl-0 = <&gmac_pins_mii_a>;
214                         phy = <&phy1>;
215                         phy-mode = "mii";
216                         status = "okay";
217
218                         phy1: ethernet-phy@1 {
219                                 reg = <1>;
220                         };
221                 };
222         };
223
224         leds {
225                 compatible = "gpio-leds";
226                 pinctrl-names = "default";
227                 pinctrl-0 = <&led_pins_olinuxino>;
228
229                 green {
230                         label = "a20-olinuxino-micro:green:usr";
231                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
232                         default-state = "on";
233                 };
234         };
235
236         reg_ahci_5v: ahci-5v {
237                 status = "okay";
238         };
239
240         reg_usb1_vbus: usb1-vbus {
241                 status = "okay";
242         };
243
244         reg_usb2_vbus: usb2-vbus {
245                 status = "okay";
246         };
247 };