blob: d0dcf72609717c8cdc52b1914d58d56784ef628d [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 *
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/;
Hans de Goedea6a2d642014-12-23 11:13:22 +010015#include "sun7i-a20.dtsi"
16#include "sunxi-common-regulators.dtsi"
Maxime Ripardbca12922014-12-16 22:59:55 +010017
18#include <dt-bindings/gpio/gpio.h>
Hans de Goedea6a2d642014-12-23 11:13:22 +010019#include <dt-bindings/input/input.h>
Maxime Riparda6bac9e2014-12-16 22:59:59 +010020#include <dt-bindings/interrupt-controller/irq.h>
Maxime Ripard092a0c32014-12-16 22:59:57 +010021#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Riparde476ac82013-07-17 10:12:16 +020022
23/ {
24 model = "Olimex A20-Olinuxino Micro";
25 compatible = "olimex,a20-olinuxino-micro", "allwinner,sun7i-a20";
26
Maxime Ripardd5cf89c2014-02-22 22:35:59 +010027 aliases {
28 spi0 = &spi1;
29 spi1 = &spi2;
30 };
31
Maxime Riparde476ac82013-07-17 10:12:16 +020032 soc@01c00000 {
Maxime Ripardd5cf89c2014-02-22 22:35:59 +010033 spi1: spi@01c06000 {
34 pinctrl-names = "default";
35 pinctrl-0 = <&spi1_pins_a>;
36 status = "okay";
37 };
38
Hans de Goedec6211832014-05-02 17:57:28 +020039 mmc0: mmc@01c0f000 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
Hans de Goede0ed9eab2014-05-11 09:46:57 +020042 vmmc-supply = <&reg_vcc3v3>;
Hans de Goedec6211832014-05-02 17:57:28 +020043 bus-width = <4>;
Maxime Ripardbca12922014-12-16 22:59:55 +010044 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
Hans de Goedec6211832014-05-02 17:57:28 +020045 cd-inverted;
46 status = "okay";
47 };
48
49 mmc3: mmc@01c12000 {
50 pinctrl-names = "default";
51 pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
Hans de Goede0ed9eab2014-05-11 09:46:57 +020052 vmmc-supply = <&reg_vcc3v3>;
Hans de Goedec6211832014-05-02 17:57:28 +020053 bus-width = <4>;
Maxime Ripardbca12922014-12-16 22:59:55 +010054 cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
Hans de Goedec6211832014-05-02 17:57:28 +020055 cd-inverted;
56 status = "okay";
57 };
58
Zalan Blenessye2f02652014-03-01 20:26:36 +010059 usbphy: phy@01c13400 {
60 usb1_vbus-supply = <&reg_usb1_vbus>;
61 usb2_vbus-supply = <&reg_usb2_vbus>;
62 status = "okay";
63 };
64
65 ehci0: usb@01c14000 {
66 status = "okay";
67 };
68
69 ohci0: usb@01c14400 {
70 status = "okay";
71 };
72
Maxime Ripardd5cf89c2014-02-22 22:35:59 +010073 spi2: spi@01c17000 {
74 pinctrl-names = "default";
75 pinctrl-0 = <&spi2_pins_a>;
76 status = "okay";
77 };
78
Hans de Goede902febf2014-03-01 20:26:22 +010079 ahci: sata@01c18000 {
80 target-supply = <&reg_ahci_5v>;
81 status = "okay";
82 };
83
Zalan Blenessye2f02652014-03-01 20:26:36 +010084 ehci1: usb@01c1c000 {
85 status = "okay";
86 };
87
88 ohci1: usb@01c1c400 {
89 status = "okay";
90 };
91
Maxime Ripard6e487da2013-07-25 00:12:45 +020092 pinctrl@01c20800 {
Hans de Goedec6211832014-05-02 17:57:28 +020093 mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
94 allwinner,pins = "PH11";
95 allwinner,function = "gpio_in";
Maxime Ripard092a0c32014-12-16 22:59:57 +010096 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
97 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
Hans de Goedec6211832014-05-02 17:57:28 +020098 };
99
Maxime Ripard6e487da2013-07-25 00:12:45 +0200100 led_pins_olinuxino: led_pins@0 {
101 allwinner,pins = "PH2";
102 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100103 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
104 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Maxime Ripard6e487da2013-07-25 00:12:45 +0200105 };
106 };
107
Hans de Goedea6a2d642014-12-23 11:13:22 +0100108 lradc: lradc@01c22800 {
109 vref-supply = <&reg_vcc3v0>;
110 status = "okay";
111
112 button@191 {
113 label = "Volume Up";
114 linux,code = <KEY_VOLUMEUP>;
115 channel = <0>;
116 voltage = <191274>;
117 };
118
119 button@392 {
120 label = "Volume Down";
121 linux,code = <KEY_VOLUMEDOWN>;
122 channel = <0>;
123 voltage = <392644>;
124 };
125
126 button@601 {
127 label = "Menu";
128 linux,code = <KEY_MENU>;
129 channel = <0>;
130 voltage = <601151>;
131 };
132
133 button@795 {
134 label = "Search";
135 linux,code = <KEY_SEARCH>;
136 channel = <0>;
137 voltage = <795090>;
138 };
139
140 button@987 {
141 label = "Home";
142 linux,code = <KEY_HOMEPAGE>;
143 channel = <0>;
144 voltage = <987387>;
145 };
146
147 button@1184 {
148 label = "Esc";
149 linux,code = <KEY_ESC>;
150 channel = <0>;
151 voltage = <1184678>;
152 };
153
154 button@1398 {
155 label = "Enter";
156 linux,code = <KEY_ENTER>;
157 channel = <0>;
158 voltage = <1398804>;
159 };
160 };
161
Maxime Riparde476ac82013-07-17 10:12:16 +0200162 uart0: serial@01c28000 {
Maxime Ripard2fff6ac2013-07-25 00:10:53 +0200163 pinctrl-names = "default";
164 pinctrl-0 = <&uart0_pins_a>;
Maxime Riparde476ac82013-07-17 10:12:16 +0200165 status = "okay";
166 };
167
168 uart6: serial@01c29800 {
Maxime Ripard2fff6ac2013-07-25 00:10:53 +0200169 pinctrl-names = "default";
170 pinctrl-0 = <&uart6_pins_a>;
Maxime Riparde476ac82013-07-17 10:12:16 +0200171 status = "okay";
172 };
173
174 uart7: serial@01c29c00 {
Maxime Ripard2fff6ac2013-07-25 00:10:53 +0200175 pinctrl-names = "default";
176 pinctrl-0 = <&uart7_pins_a>;
Maxime Riparde476ac82013-07-17 10:12:16 +0200177 status = "okay";
178 };
Maxime Ripardd6d3f9e2013-08-31 23:14:19 +0200179
180 i2c0: i2c@01c2ac00 {
181 pinctrl-names = "default";
182 pinctrl-0 = <&i2c0_pins_a>;
183 status = "okay";
Carlo Caioneec0c9332014-06-30 23:57:53 +0200184
185 axp209: pmic@34 {
186 compatible = "x-powers,axp209";
187 reg = <0x34>;
188 interrupt-parent = <&nmi_intc>;
Maxime Riparda6bac9e2014-12-16 22:59:59 +0100189 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
Carlo Caioneec0c9332014-06-30 23:57:53 +0200190
191 interrupt-controller;
192 #interrupt-cells = <1>;
193 };
Maxime Ripardd6d3f9e2013-08-31 23:14:19 +0200194 };
195
196 i2c1: i2c@01c2b000 {
197 pinctrl-names = "default";
198 pinctrl-0 = <&i2c1_pins_a>;
199 status = "okay";
200 };
201
202 i2c2: i2c@01c2b400 {
203 pinctrl-names = "default";
204 pinctrl-0 = <&i2c2_pins_a>;
205 status = "okay";
206 };
Chen-Yu Tsai71643182014-02-10 18:35:53 +0800207
208 gmac: ethernet@01c50000 {
209 pinctrl-names = "default";
210 pinctrl-0 = <&gmac_pins_mii_a>;
211 phy = <&phy1>;
212 phy-mode = "mii";
213 status = "okay";
214
215 phy1: ethernet-phy@1 {
216 reg = <1>;
217 };
218 };
Maxime Riparde476ac82013-07-17 10:12:16 +0200219 };
Maxime Ripard6e487da2013-07-25 00:12:45 +0200220
221 leds {
222 compatible = "gpio-leds";
223 pinctrl-names = "default";
224 pinctrl-0 = <&led_pins_olinuxino>;
225
226 green {
227 label = "a20-olinuxino-micro:green:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100228 gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
Maxime Ripard6e487da2013-07-25 00:12:45 +0200229 default-state = "on";
230 };
231 };
Hans de Goede902febf2014-03-01 20:26:22 +0100232
233 reg_ahci_5v: ahci-5v {
234 status = "okay";
235 };
Zalan Blenessye2f02652014-03-01 20:26:36 +0100236
237 reg_usb1_vbus: usb1-vbus {
238 status = "okay";
239 };
240
241 reg_usb2_vbus: usb2-vbus {
242 status = "okay";
243 };
Maxime Riparde476ac82013-07-17 10:12:16 +0200244};