]> git.ipfire.org Git - people/arne_f/kernel.git/blob - arch/arm/boot/dts/sun7i-a20-bananapro.dts
sun7i: dts: add bananapro.
[people/arne_f/kernel.git] / arch / arm / boot / dts / sun7i-a20-bananapro.dts
1 /*
2 * Copyright 2015 Arne Fitzenreiter
3 * Arne Fitzenreiter <arne_f@ipfire.org>
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13 /dts-v1/;
14 /include/ "sun7i-a20.dtsi"
15 /include/ "sunxi-common-regulators.dtsi"
16 #include <dt-bindings/input/input.h>
17
18 / {
19 model = "LeMaker Banana Pro";
20 compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
21
22 aliases {
23 spi0 = &spi1;
24 spi1 = &spi2;
25 };
26
27 soc@01c00000 {
28 spi1: spi@01c06000 {
29 pinctrl-names = "default";
30 pinctrl-0 = <&spi1_pins_a>;
31 status = "okay";
32 };
33
34 spi2: spi@01c17000 {
35 pinctrl-names = "default";
36 pinctrl-0 = <&spi2_pins_a>;
37 status = "okay";
38 };
39
40 mmc0: mmc@01c0f000 {
41 pinctrl-names = "default", "default";
42 pinctrl-0 = <&mmc0_pins_a>;
43 pinctrl-1 = <&mmc0_cd_pin_bananapi>;
44 cd-gpios = <&pio 7 10 0>; /* PH10 */
45 status = "okay";
46 };
47
48 mmc3: mmc@01c12000 {
49 #address-cells = <1>;
50 #size-cells = <0>;
51
52 pinctrl-names = "default";
53 pinctrl-0 = <&mmc3_pins_a>;
54 vmmc-supply = <&reg_vmmc3>;
55 bus-width = <4>;
56 non-removable;
57 status = "okay";
58
59 brcmf: brcmf@1 {
60 reg = <1>;
61 compatible = "brcm,dcm4329-fmac";
62 interrupt-parent = <&pio>;
63 interrupts = <15 8>; /* PH15/EINT15 */
64 interrupt-names = "host-wake";
65 };
66 };
67
68 usbphy: phy@01c13400 {
69 usb1_vbus-supply = <&reg_usb1_vbus>;
70 usb2_vbus-supply = <&reg_usb2_vbus>;
71 status = "okay";
72 };
73
74 ehci0: usb@01c14000 {
75 status = "okay";
76 };
77
78 ohci0: usb@01c14400 {
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 usb1_vbus_pin_bananapro: usb1_vbus_pin@0 {
97 allwinner,pins = "PH0";
98 allwinner,function = "gpio_out";
99 allwinner,drive = <0>;
100 allwinner,pull = <0>;
101 };
102
103 usb2_vbus_pin_bananapro: usb2_vbus_pin@0 {
104 allwinner,pins = "PH1";
105 allwinner,function = "gpio_out";
106 allwinner,drive = <0>;
107 allwinner,pull = <0>;
108 };
109
110 led_pins_bananapi: led_pins@0 {
111 allwinner,pins = "PH24", "PG2";
112 allwinner,function = "gpio_out";
113 allwinner,drive = <0>;
114 allwinner,pull = <0>;
115 };
116
117 mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
118 allwinner,pins = "PH10";
119 allwinner,function = "gpio_in";
120 allwinner,drive = <0>;
121 allwinner,pull = <1>;
122 };
123
124 vmmc3_pin_bananapro: vmmc3_pin@0 {
125 allwinner,pins = "PH22";
126 allwinner,function = "gpio_out";
127 allwinner,drive = <0>;
128 allwinner,pull = <0>;
129 };
130
131 gmac_power_pin_bananapi: gmac_power_pin@0 {
132 allwinner,pins = "PH23";
133 allwinner,function = "gpio_out";
134 allwinner,drive = <0>;
135 allwinner,pull = <0>;
136 };
137 };
138
139 lradc: lradc@01c22800 {
140 allwinner,chan0-step = <200>;
141 linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
142 KEY_MENU KEY_SEARCH KEY_HOME
143 KEY_ESC KEY_ENTER>;
144 status = "okay";
145 };
146
147 ir0: ir@01c21800 {
148 pinctrl-names = "default";
149 pinctrl-0 = <&ir0_pins_a>;
150 status = "okay";
151 };
152
153 uart0: serial@01c28000 {
154 pinctrl-names = "default";
155 pinctrl-0 = <&uart0_pins_a>;
156 status = "okay";
157 };
158
159 uart2: serial@01c28800 {
160 pinctrl-names = "default";
161 pinctrl-0 = <&uart2_pins_a>;
162 status = "okay";
163 };
164
165 uart6: serial@01c29800 {
166 pinctrl-names = "default";
167 pinctrl-0 = <&uart6_pins_a>;
168 status = "okay";
169 };
170
171 uart7: serial@01c29c00 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&uart7_pins_a>;
174 status = "okay";
175 };
176
177 i2c0: i2c@01c2ac00 {
178 pinctrl-names = "default";
179 pinctrl-0 = <&i2c0_pins_a>;
180 status = "okay";
181
182 axp: axp20x@34 {
183 reg = <0x34>;
184 interrupt-parent = <&nmi_intc>;
185 interrupts = <0 8>;
186 axp,system-power-controller;
187 /include/ "x-powers-axp209.dtsi"
188 };
189 };
190
191 i2c1: i2c@01c2b000 {
192 pinctrl-names = "default";
193 pinctrl-0 = <&i2c1_pins_a>;
194 status = "okay";
195 };
196
197 i2c2: i2c@01c2b400 {
198 pinctrl-names = "default";
199 pinctrl-0 = <&i2c2_pins_a>;
200 status = "okay";
201 };
202
203 gmac: ethernet@01c50000 {
204 pinctrl-names = "default";
205 pinctrl-0 = <&gmac_pins_rgmii_a>;
206 phy = <&phy1>;
207 phy-mode = "rgmii";
208 phy-supply = <&reg_gmac_3v3>;
209 status = "okay";
210
211 phy1: ethernet-phy@1 {
212 reg = <1>;
213 };
214 };
215 };
216
217 leds {
218 compatible = "gpio-leds";
219 pinctrl-names = "default";
220 pinctrl-0 = <&led_pins_bananapi>;
221
222 green {
223 label = "bananapi:green:usr";
224 gpios = <&pio 7 24 0>;
225 linux,default-trigger = "heartbeat";
226 };
227 blue {
228 label = "bananapi:blue:usr";
229 gpios = <&pio 6 2 0>;
230 linux,default-trigger = "mmc0";
231 };
232 };
233
234 reg_ahci_5v: ahci-5v {
235 status = "okay";
236 };
237
238 reg_usb1_vbus: usb1-vbus {
239 pinctrl-0 = <&usb1_vbus_pin_bananapro>;
240 gpio = <&pio 7 0 0>; /* PH0 */
241 status = "okay";
242 };
243
244 reg_usb2_vbus: usb2-vbus {
245 pinctrl-0 = <&usb2_vbus_pin_bananapro>;
246 gpio = <&pio 7 1 0>; /* PH1 */
247 status = "okay";
248 };
249
250 reg_gmac_3v3: gmac-3v3 {
251 compatible = "regulator-fixed";
252 pinctrl-names = "default";
253 pinctrl-0 = <&gmac_power_pin_bananapi>;
254 regulator-name = "gmac-3v3";
255 regulator-min-microvolt = <3300000>;
256 regulator-max-microvolt = <3300000>;
257 startup-delay-us = <100000>;
258 enable-active-high;
259 gpio = <&pio 7 23 0>;
260 status = "okay";
261 };
262
263 reg_vmmc3: vmmc3 {
264 compatible = "regulator-fixed";
265 pinctrl-names = "default";
266 pinctrl-0 = <&vmmc3_pin_bananapro>;
267 regulator-name = "vmmc3";
268 regulator-min-microvolt = <3300000>;
269 regulator-max-microvolt = <3300000>;
270 enable-active-high;
271 gpio = <&pio 7 22 0>;
272 };
273 };