]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - arch/arm/boot/dts/sun9i-a80-optimus.dts
Merge tag 'renesas-dt-bindings-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-hirsute-kernel.git] / arch / arm / boot / dts / sun9i-a80-optimus.dts
1 /*
2 * Copyright 2014 Chen-Yu Tsai
3 *
4 * Chen-Yu Tsai <wens@csie.org>
5 *
6 * 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.
10 *
11 * 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 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 */
44
45 /dts-v1/;
46 #include "sun9i-a80.dtsi"
47
48 #include <dt-bindings/gpio/gpio.h>
49
50 / {
51 model = "Merrii A80 Optimus Board";
52 compatible = "merrii,a80-optimus", "allwinner,sun9i-a80";
53
54 aliases {
55 serial0 = &uart0;
56 serial1 = &uart4;
57 };
58
59 chosen {
60 stdout-path = "serial0:115200n8";
61 };
62
63 leds {
64 compatible = "gpio-leds";
65
66 /* The LED names match those found on the board */
67 led2 {
68 label = "optimus:led2:usr";
69 gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
70 };
71
72 led3 {
73 label = "optimus:led3:usr";
74 gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
75 };
76
77 led4 {
78 label = "optimus:led4:usr";
79 gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>;
80 };
81 };
82
83 reg_usb1_vbus: usb1-vbus {
84 compatible = "regulator-fixed";
85 pinctrl-names = "default";
86 regulator-min-microvolt = <5000000>;
87 regulator-max-microvolt = <5000000>;
88 enable-active-high;
89 gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
90 };
91
92 reg_usb3_vbus: usb3-vbus {
93 compatible = "regulator-fixed";
94 pinctrl-names = "default";
95 regulator-min-microvolt = <5000000>;
96 regulator-max-microvolt = <5000000>;
97 enable-active-high;
98 gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
99 };
100
101 wifi_pwrseq: wifi-pwrseq {
102 compatible = "mmc-pwrseq-simple";
103 clocks = <&ac100_rtc 1>;
104 clock-names = "ext_clock";
105 /* enables internal regulator and de-asserts reset */
106 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
107 };
108 };
109
110 &ehci0 {
111 status = "okay";
112 };
113
114 &ehci1 {
115 /* Enable if HSIC peripheral is connected */
116 status = "disabled";
117 };
118
119 &ehci2 {
120 status = "okay";
121 };
122
123 &gmac {
124 pinctrl-names = "default";
125 pinctrl-0 = <&gmac_rgmii_pins>;
126 phy = <&phy1>;
127 phy-mode = "rgmii";
128 phy-supply = <&reg_cldo1>;
129 status = "okay";
130
131 phy1: ethernet-phy@1 {
132 reg = <1>;
133 };
134 };
135
136 &mmc0 {
137 pinctrl-names = "default";
138 pinctrl-0 = <&mmc0_pins>;
139 vmmc-supply = <&reg_dcdc1>;
140 bus-width = <4>;
141 cd-gpios = <&pio 7 18 GPIO_ACTIVE_LOW>; /* PH8 */
142 status = "okay";
143 };
144
145 &mmc1 {
146 pinctrl-names = "default";
147 pinctrl-0 = <&mmc1_pins>;
148 vmmc-supply = <&reg_dldo1>;
149 vqmmc-supply = <&reg_cldo3>;
150 mmc-pwrseq = <&wifi_pwrseq>;
151 bus-width = <4>;
152 non-removable;
153 status = "okay";
154 };
155
156 &mmc1_pins {
157 bias-pull-up;
158 };
159
160 &mmc2 {
161 pinctrl-names = "default";
162 pinctrl-0 = <&mmc2_8bit_pins>;
163 vmmc-supply = <&reg_dcdc1>;
164 bus-width = <8>;
165 non-removable;
166 cap-mmc-hw-reset;
167 status = "okay";
168 };
169
170 &mmc2_8bit_pins {
171 /* Increase drive strength for DDR modes */
172 drive-strength = <40>;
173 };
174
175 &ohci0 {
176 status = "okay";
177 };
178
179 &ohci2 {
180 status = "okay";
181 };
182
183 &osc32k {
184 /* osc32k input is from AC100 */
185 clocks = <&ac100_rtc 0>;
186 };
187
188 &pio {
189 vcc-pa-supply = <&reg_ldo_io1>;
190 vcc-pb-supply = <&reg_aldo2>;
191 vcc-pc-supply = <&reg_dcdc1>;
192 vcc-pd-supply = <&reg_dcdc1>;
193 vcc-pe-supply = <&reg_eldo2>;
194 vcc-pf-supply = <&reg_dcdc1>;
195 vcc-pg-supply = <&reg_ldo_io0>;
196 vcc-ph-supply = <&reg_dcdc1>;
197 };
198
199 &r_ir {
200 status = "okay";
201 };
202
203 &r_pio {
204 vcc-pl-supply = <&reg_dldo2>;
205 vcc-pm-supply = <&reg_eldo3>;
206 };
207
208 &r_rsb {
209 status = "okay";
210
211 axp809: pmic@3a3 {
212 reg = <0x3a3>;
213 interrupt-parent = <&nmi_intc>;
214 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
215
216 regulators {
217 reg_aldo1: aldo1 {
218 /*
219 * TODO: This should be handled by the
220 * USB PHY driver.
221 */
222 regulator-always-on;
223 regulator-min-microvolt = <3000000>;
224 regulator-max-microvolt = <3000000>;
225 regulator-name = "vcc33-usbh";
226 };
227
228 reg_aldo2: aldo2 {
229 regulator-min-microvolt = <1800000>;
230 regulator-max-microvolt = <1800000>;
231 regulator-name = "vcc-pb-io-cam";
232 };
233
234 aldo3 {
235 /* unused */
236 };
237
238 reg_dc5ldo: dc5ldo {
239 regulator-always-on;
240 regulator-min-microvolt = <800000>;
241 regulator-max-microvolt = <1100000>;
242 regulator-name = "vdd-cpus-09-usbh";
243 };
244
245 dc1sw {
246 /* unused */
247 };
248
249 reg_dcdc1: dcdc1 {
250 regulator-always-on;
251 regulator-min-microvolt = <3000000>;
252 regulator-max-microvolt = <3000000>;
253 regulator-name = "vcc-3v";
254 };
255
256 reg_dcdc2: dcdc2 {
257 regulator-min-microvolt = <800000>;
258 regulator-max-microvolt = <1100000>;
259 regulator-name = "vdd-gpu";
260 };
261
262 reg_dcdc3: dcdc3 {
263 regulator-always-on;
264 regulator-min-microvolt = <800000>;
265 regulator-max-microvolt = <1100000>;
266 regulator-name = "vdd-cpua";
267 };
268
269 reg_dcdc4: dcdc4 {
270 regulator-always-on;
271 regulator-min-microvolt = <800000>;
272 regulator-max-microvolt = <1100000>;
273 regulator-name = "vdd-sys-usb0-hdmi";
274 };
275
276 reg_dcdc5: dcdc5 {
277 regulator-always-on;
278 regulator-min-microvolt = <1425000>;
279 regulator-max-microvolt = <1575000>;
280 regulator-name = "vcc-dram";
281 };
282
283 reg_dldo1: dldo1 {
284 /*
285 * The WiFi chip supports a wide range
286 * (3.0 ~ 4.8V) of voltages, and so does
287 * this regulator (3.0 ~ 4.2V), but
288 * Allwinner SDK always sets it to 3.3V.
289 */
290 regulator-min-microvolt = <3300000>;
291 regulator-max-microvolt = <3300000>;
292 regulator-name = "vcc-wifi";
293 };
294
295 reg_dldo2: dldo2 {
296 regulator-min-microvolt = <3000000>;
297 regulator-max-microvolt = <3000000>;
298 regulator-name = "vcc-pl";
299 };
300
301 reg_eldo1: eldo1 {
302 regulator-min-microvolt = <1200000>;
303 regulator-max-microvolt = <1200000>;
304 regulator-name = "vcc-dvdd-cam";
305 };
306
307 reg_eldo2: eldo2 {
308 regulator-min-microvolt = <1800000>;
309 regulator-max-microvolt = <1800000>;
310 regulator-name = "vcc-pe";
311 };
312
313 reg_eldo3: eldo3 {
314 regulator-min-microvolt = <3000000>;
315 regulator-max-microvolt = <3000000>;
316 regulator-name = "vcc-pm-codec-io1";
317 };
318
319 reg_ldo_io0: ldo_io0 {
320 regulator-min-microvolt = <3000000>;
321 regulator-max-microvolt = <3000000>;
322 regulator-name = "vcc-pg";
323 };
324
325 reg_ldo_io1: ldo_io1 {
326 regulator-min-microvolt = <2500000>;
327 regulator-max-microvolt = <2500000>;
328 regulator-name = "vcc-pa-gmac-2v5";
329 };
330
331 reg_rtc_ldo: rtc_ldo {
332 regulator-name = "vcc-rtc-vdd1v8-io";
333 };
334
335 sw {
336 /* unused */
337 };
338 };
339 };
340
341 axp806: pmic@745 {
342 compatible = "x-powers,axp806";
343 reg = <0x745>;
344 interrupt-parent = <&nmi_intc>;
345 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
346 interrupt-controller;
347 #interrupt-cells = <1>;
348 bldoin-supply = <&reg_dcdce>;
349
350 regulators {
351 reg_s_aldo1: aldo1 {
352 regulator-always-on;
353 regulator-min-microvolt = <3000000>;
354 regulator-max-microvolt = <3000000>;
355 regulator-name = "avcc";
356 };
357
358 aldo2 {
359 /*
360 * unused, but use a different name to
361 * avoid name clash with axp809's aldo's
362 */
363 regulator-name = "s_aldo2";
364 };
365
366 aldo3 {
367 /*
368 * unused, but use a different name to
369 * avoid name clash with axp809's aldo's
370 */
371 regulator-name = "s_aldo3";
372 };
373
374 reg_bldo1: bldo1 {
375 regulator-always-on;
376 regulator-min-microvolt = <1700000>;
377 regulator-max-microvolt = <1900000>;
378 regulator-name = "vcc18-efuse-adc-display-csi";
379 };
380
381 reg_bldo2: bldo2 {
382 regulator-always-on;
383 regulator-min-microvolt = <1700000>;
384 regulator-max-microvolt = <1900000>;
385 regulator-name =
386 "vdd18-drampll-vcc18-pll-cpvdd";
387 };
388
389 bldo3 {
390 /* unused */
391 };
392
393 reg_bldo4: bldo4 {
394 regulator-min-microvolt = <1100000>;
395 regulator-max-microvolt = <1300000>;
396 regulator-name = "vcc12-hsic";
397 };
398
399 reg_cldo1: cldo1 {
400 /*
401 * This was 3V in the original design, but
402 * 3.3V is the recommended supply voltage
403 * for the Ethernet PHY.
404 */
405 regulator-min-microvolt = <3300000>;
406 regulator-max-microvolt = <3300000>;
407 /*
408 * The PHY requires 20ms after all voltages
409 * are applied until core logic is ready and
410 * 30ms after the reset pin is de-asserted.
411 * Set a 100ms delay to account for PMIC
412 * ramp time and board traces.
413 */
414 regulator-enable-ramp-delay = <100000>;
415 regulator-name = "vcc-gmac-phy";
416 };
417
418 reg_cldo2: cldo2 {
419 regulator-min-microvolt = <2800000>;
420 regulator-max-microvolt = <2800000>;
421 regulator-name = "afvcc-cam";
422 };
423
424 reg_cldo3: cldo3 {
425 regulator-min-microvolt = <3000000>;
426 regulator-max-microvolt = <3000000>;
427 regulator-name = "vcc-io-wifi-codec-io2";
428 };
429
430 reg_dcdca: dcdca {
431 regulator-always-on;
432 regulator-min-microvolt = <800000>;
433 regulator-max-microvolt = <1100000>;
434 regulator-name = "vdd-cpub";
435 };
436
437 reg_dcdcd: dcdcd {
438 regulator-always-on;
439 regulator-min-microvolt = <800000>;
440 regulator-max-microvolt = <1100000>;
441 regulator-name = "vdd-vpu";
442 };
443
444 reg_dcdce: dcdce {
445 regulator-always-on;
446 regulator-min-microvolt = <2100000>;
447 regulator-max-microvolt = <2100000>;
448 regulator-name = "vcc-bldo-codec-ldoin";
449 };
450
451 sw {
452 /*
453 * unused, but use a different name to
454 * avoid name clash with axp809's sw
455 */
456 regulator-name = "s_sw";
457 };
458 };
459 };
460
461 ac100: codec@e89 {
462 compatible = "x-powers,ac100";
463 reg = <0xe89>;
464
465 ac100_codec: codec {
466 compatible = "x-powers,ac100-codec";
467 interrupt-parent = <&r_pio>;
468 interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
469 #clock-cells = <0>;
470 clock-output-names = "4M_adda";
471 };
472
473 ac100_rtc: rtc {
474 compatible = "x-powers,ac100-rtc";
475 interrupt-parent = <&nmi_intc>;
476 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
477 clocks = <&ac100_codec>;
478 #clock-cells = <1>;
479 clock-output-names = "cko1_rtc",
480 "cko2_rtc",
481 "cko3_rtc";
482 };
483 };
484 };
485
486 #include "axp809.dtsi"
487
488 &uart0 {
489 pinctrl-names = "default";
490 pinctrl-0 = <&uart0_ph_pins>;
491 status = "okay";
492 };
493
494 &usbphy1 {
495 phy-supply = <&reg_usb1_vbus>;
496 status = "okay";
497 };
498
499 &usbphy2 {
500 phy-supply = <&reg_bldo4>;
501 /* Enable if HSIC peripheral is connected */
502 status = "disabled";
503 };
504
505 &usbphy3 {
506 phy-supply = <&reg_usb3_vbus>;
507 status = "okay";
508 };