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