blob: f6f06311e25b09aa49324980b489dd3a510ee2bf [file] [log] [blame]
Maxime Riparde476ac82013-07-17 10:12:16 +02001/*
2 * Copyright 2013 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
Maxime Ripardc0188c42014-09-02 19:25:26 +02006 * 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.
Maxime Riparde476ac82013-07-17 10:12:16 +020010 *
Maxime Ripardc0188c42014-09-02 19:25:26 +020011 * 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.
Maxime Riparde476ac82013-07-17 10:12:16 +020048 */
49
50/dts-v1/;
Hans de Goedea6a2d642014-12-23 11:13:22 +010051#include "sun7i-a20.dtsi"
52#include "sunxi-common-regulators.dtsi"
Maxime Ripardbca12922014-12-16 22:59:55 +010053
54#include <dt-bindings/gpio/gpio.h>
Hans de Goedea6a2d642014-12-23 11:13:22 +010055#include <dt-bindings/input/input.h>
Maxime Riparda6bac9e2014-12-16 22:59:59 +010056#include <dt-bindings/interrupt-controller/irq.h>
Maxime Ripard092a0c32014-12-16 22:59:57 +010057#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Riparde476ac82013-07-17 10:12:16 +020058
59/ {
60 model = "Olimex A20-Olinuxino Micro";
61 compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20";
62
Maxime Ripardd5cf89c2014-02-22 22:35:59 +010063 aliases {
Maxime Ripard117a2cc2015-01-22 22:10:54 +010064 serial0 = &uart0;
65 serial1 = &uart6;
66 serial2 = &uart7;
Maxime Ripardd5cf89c2014-02-22 22:35:59 +010067 spi0 = &spi1;
68 spi1 = &spi2;
69 };
70
Maxime Ripard6e487da2013-07-25 00:12:45 +020071 leds {
72 compatible = "gpio-leds";
73 pinctrl-names = "default";
74 pinctrl-0 = <&led_pins_olinuxino>;
75
76 green {
77 label = "a20-olinuxino-micro:green:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +010078 gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
Maxime Ripard6e487da2013-07-25 00:12:45 +020079 default-state = "on";
80 };
81 };
Maxime Ripard581b19e2015-01-31 12:11:54 +010082};
Hans de Goede902febf2014-03-01 20:26:22 +010083
Maxime Ripard581b19e2015-01-31 12:11:54 +010084&ahci {
85 target-supply = <&reg_ahci_5v>;
86 status = "okay";
87};
88
89&ehci0 {
90 status = "okay";
91};
92
93&ehci1 {
94 status = "okay";
95};
96
97&gmac {
98 pinctrl-names = "default";
99 pinctrl-0 = <&gmac_pins_mii_a>;
100 phy = <&phy1>;
101 phy-mode = "mii";
102 status = "okay";
103
104 phy1: ethernet-phy@1 {
105 reg = <1>;
106 };
107};
108
109&i2c0 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&i2c0_pins_a>;
112 status = "okay";
113
114 axp209: pmic@34 {
115 compatible = "x-powers,axp209";
116 reg = <0x34>;
117 interrupt-parent = <&nmi_intc>;
118 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
119
120 interrupt-controller;
121 #interrupt-cells = <1>;
122 };
123};
124
125&i2c1 {
126 pinctrl-names = "default";
127 pinctrl-0 = <&i2c1_pins_a>;
128 status = "okay";
129};
130
131&i2c2 {
132 pinctrl-names = "default";
133 pinctrl-0 = <&i2c2_pins_a>;
134 status = "okay";
135};
136
137&lradc {
138 vref-supply = <&reg_vcc3v0>;
139 status = "okay";
140
141 button@191 {
142 label = "Volume Up";
143 linux,code = <KEY_VOLUMEUP>;
144 channel = <0>;
145 voltage = <191274>;
Hans de Goede902febf2014-03-01 20:26:22 +0100146 };
Zalan Blenessye2f02652014-03-01 20:26:36 +0100147
Maxime Ripard581b19e2015-01-31 12:11:54 +0100148 button@392 {
149 label = "Volume Down";
150 linux,code = <KEY_VOLUMEDOWN>;
151 channel = <0>;
152 voltage = <392644>;
Zalan Blenessye2f02652014-03-01 20:26:36 +0100153 };
154
Maxime Ripard581b19e2015-01-31 12:11:54 +0100155 button@601 {
156 label = "Menu";
157 linux,code = <KEY_MENU>;
158 channel = <0>;
159 voltage = <601151>;
Zalan Blenessye2f02652014-03-01 20:26:36 +0100160 };
Maxime Ripard581b19e2015-01-31 12:11:54 +0100161
162 button@795 {
163 label = "Search";
164 linux,code = <KEY_SEARCH>;
165 channel = <0>;
166 voltage = <795090>;
167 };
168
169 button@987 {
170 label = "Home";
171 linux,code = <KEY_HOMEPAGE>;
172 channel = <0>;
173 voltage = <987387>;
174 };
175
176 button@1184 {
177 label = "Esc";
178 linux,code = <KEY_ESC>;
179 channel = <0>;
180 voltage = <1184678>;
181 };
182
183 button@1398 {
184 label = "Enter";
185 linux,code = <KEY_ENTER>;
186 channel = <0>;
187 voltage = <1398804>;
188 };
189};
190
191&mmc0 {
192 pinctrl-names = "default";
193 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
194 vmmc-supply = <&reg_vcc3v3>;
195 bus-width = <4>;
196 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
197 cd-inverted;
198 status = "okay";
199};
200
201&mmc3 {
202 pinctrl-names = "default";
203 pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
204 vmmc-supply = <&reg_vcc3v3>;
205 bus-width = <4>;
206 cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
207 cd-inverted;
208 status = "okay";
209};
210
211&ohci0 {
212 status = "okay";
213};
214
215&ohci1 {
216 status = "okay";
217};
218
219&pio {
220 mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
221 allwinner,pins = "PH11";
222 allwinner,function = "gpio_in";
223 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
224 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
225 };
226
227 led_pins_olinuxino: led_pins@0 {
228 allwinner,pins = "PH2";
229 allwinner,function = "gpio_out";
230 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
231 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
232 };
233};
234
235&reg_ahci_5v {
236 status = "okay";
237};
238
239&reg_usb1_vbus {
240 status = "okay";
241};
242
243&reg_usb2_vbus {
244 status = "okay";
245};
246
247&spi1 {
248 pinctrl-names = "default";
249 pinctrl-0 = <&spi1_pins_a>;
250 status = "okay";
251};
252
253&spi2 {
254 pinctrl-names = "default";
255 pinctrl-0 = <&spi2_pins_a>;
256 status = "okay";
257};
258
259&uart0 {
260 pinctrl-names = "default";
261 pinctrl-0 = <&uart0_pins_a>;
262 status = "okay";
263};
264
265&uart6 {
266 pinctrl-names = "default";
267 pinctrl-0 = <&uart6_pins_a>;
268 status = "okay";
269};
270
271&uart7 {
272 pinctrl-names = "default";
273 pinctrl-0 = <&uart7_pins_a>;
274 status = "okay";
275};
276
277&usbphy {
278 usb1_vbus-supply = <&reg_usb1_vbus>;
279 usb2_vbus-supply = <&reg_usb2_vbus>;
280 status = "okay";
Maxime Riparde476ac82013-07-17 10:12:16 +0200281};