]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - arch/arm/boot/dts/sun9i-a80-optimus.dts
ARM: dts: sun9i: a80-optimus: Add node for AXP809's unused dc1sw regulator
[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 &mmc0 {
124 pinctrl-names = "default";
125 pinctrl-0 = <&mmc0_pins>;
126 vmmc-supply = <&reg_dcdc1>;
127 bus-width = <4>;
128 cd-gpios = <&pio 7 18 GPIO_ACTIVE_LOW>; /* PH8 */
129 status = "okay";
130 };
131
132 &mmc1 {
133 pinctrl-names = "default";
134 pinctrl-0 = <&mmc1_pins>;
135 vmmc-supply = <&reg_dldo1>;
136 vqmmc-supply = <&reg_cldo3>;
137 mmc-pwrseq = <&wifi_pwrseq>;
138 bus-width = <4>;
139 non-removable;
140 status = "okay";
141 };
142
143 &mmc1_pins {
144 bias-pull-up;
145 };
146
147 &mmc2 {
148 pinctrl-names = "default";
149 pinctrl-0 = <&mmc2_8bit_pins>;
150 vmmc-supply = <&reg_dcdc1>;
151 bus-width = <8>;
152 non-removable;
153 cap-mmc-hw-reset;
154 status = "okay";
155 };
156
157 &mmc2_8bit_pins {
158 /* Increase drive strength for DDR modes */
159 drive-strength = <40>;
160 };
161
162 &ohci0 {
163 status = "okay";
164 };
165
166 &ohci2 {
167 status = "okay";
168 };
169
170 &osc32k {
171 /* osc32k input is from AC100 */
172 clocks = <&ac100_rtc 0>;
173 };
174
175 &r_ir {
176 status = "okay";
177 };
178
179 &r_rsb {
180 status = "okay";
181
182 axp809: pmic@3a3 {
183 reg = <0x3a3>;
184 interrupt-parent = <&nmi_intc>;
185 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
186
187 regulators {
188 reg_aldo1: aldo1 {
189 /*
190 * TODO: This should be handled by the
191 * USB PHY driver.
192 */
193 regulator-always-on;
194 regulator-min-microvolt = <3000000>;
195 regulator-max-microvolt = <3000000>;
196 regulator-name = "vcc33-usbh";
197 };
198
199 reg_aldo2: aldo2 {
200 regulator-min-microvolt = <1800000>;
201 regulator-max-microvolt = <1800000>;
202 regulator-name = "vcc-pb-io-cam";
203 };
204
205 aldo3 {
206 /* unused */
207 };
208
209 reg_dc5ldo: dc5ldo {
210 regulator-always-on;
211 regulator-min-microvolt = <800000>;
212 regulator-max-microvolt = <1100000>;
213 regulator-name = "vdd-cpus-09-usbh";
214 };
215
216 dc1sw {
217 /* unused */
218 };
219
220 reg_dcdc1: dcdc1 {
221 regulator-always-on;
222 regulator-min-microvolt = <3000000>;
223 regulator-max-microvolt = <3000000>;
224 regulator-name = "vcc-3v";
225 };
226
227 reg_dcdc2: dcdc2 {
228 regulator-min-microvolt = <800000>;
229 regulator-max-microvolt = <1100000>;
230 regulator-name = "vdd-gpu";
231 };
232
233 reg_dcdc3: dcdc3 {
234 regulator-always-on;
235 regulator-min-microvolt = <800000>;
236 regulator-max-microvolt = <1100000>;
237 regulator-name = "vdd-cpua";
238 };
239
240 reg_dcdc4: dcdc4 {
241 regulator-always-on;
242 regulator-min-microvolt = <800000>;
243 regulator-max-microvolt = <1100000>;
244 regulator-name = "vdd-sys-usb0-hdmi";
245 };
246
247 reg_dcdc5: dcdc5 {
248 regulator-always-on;
249 regulator-min-microvolt = <1425000>;
250 regulator-max-microvolt = <1575000>;
251 regulator-name = "vcc-dram";
252 };
253
254 reg_dldo1: dldo1 {
255 /*
256 * The WiFi chip supports a wide range
257 * (3.0 ~ 4.8V) of voltages, and so does
258 * this regulator (3.0 ~ 4.2V), but
259 * Allwinner SDK always sets it to 3.3V.
260 */
261 regulator-min-microvolt = <3300000>;
262 regulator-max-microvolt = <3300000>;
263 regulator-name = "vcc-wifi";
264 };
265
266 reg_dldo2: dldo2 {
267 regulator-always-on;
268 regulator-min-microvolt = <3000000>;
269 regulator-max-microvolt = <3000000>;
270 regulator-name = "vcc-pl";
271 };
272
273 reg_eldo1: eldo1 {
274 regulator-min-microvolt = <1200000>;
275 regulator-max-microvolt = <1200000>;
276 regulator-name = "vcc-dvdd-cam";
277 };
278
279 reg_eldo2: eldo2 {
280 regulator-min-microvolt = <1800000>;
281 regulator-max-microvolt = <1800000>;
282 regulator-name = "vcc-pe";
283 };
284
285 reg_eldo3: eldo3 {
286 regulator-always-on;
287 regulator-min-microvolt = <3000000>;
288 regulator-max-microvolt = <3000000>;
289 regulator-name = "vcc-pm-codec-io1";
290 };
291
292 reg_ldo_io0: ldo_io0 {
293 regulator-always-on;
294 regulator-min-microvolt = <3000000>;
295 regulator-max-microvolt = <3000000>;
296 regulator-name = "vcc-pg";
297 };
298
299 reg_ldo_io1: ldo_io1 {
300 regulator-min-microvolt = <2500000>;
301 regulator-max-microvolt = <2500000>;
302 regulator-name = "vcc-pa-gmac-2v5";
303 };
304
305 reg_rtc_ldo: rtc_ldo {
306 regulator-name = "vcc-rtc-vdd1v8-io";
307 };
308
309 sw {
310 /* unused */
311 };
312 };
313 };
314
315 axp806: pmic@745 {
316 compatible = "x-powers,axp806";
317 reg = <0x745>;
318 interrupt-parent = <&nmi_intc>;
319 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
320 interrupt-controller;
321 #interrupt-cells = <1>;
322 bldoin-supply = <&reg_dcdce>;
323
324 regulators {
325 reg_s_aldo1: aldo1 {
326 regulator-always-on;
327 regulator-min-microvolt = <3000000>;
328 regulator-max-microvolt = <3000000>;
329 regulator-name = "avcc";
330 };
331
332 aldo2 {
333 /*
334 * unused, but use a different name to
335 * avoid name clash with axp809's aldo's
336 */
337 regulator-name = "s_aldo2";
338 };
339
340 aldo3 {
341 /*
342 * unused, but use a different name to
343 * avoid name clash with axp809's aldo's
344 */
345 regulator-name = "s_aldo3";
346 };
347
348 reg_bldo1: bldo1 {
349 regulator-always-on;
350 regulator-min-microvolt = <1700000>;
351 regulator-max-microvolt = <1900000>;
352 regulator-name = "vcc18-efuse-adc-display-csi";
353 };
354
355 reg_bldo2: bldo2 {
356 regulator-always-on;
357 regulator-min-microvolt = <1700000>;
358 regulator-max-microvolt = <1900000>;
359 regulator-name =
360 "vdd18-drampll-vcc18-pll-cpvdd";
361 };
362
363 bldo3 {
364 /* unused */
365 };
366
367 reg_bldo4: bldo4 {
368 regulator-min-microvolt = <1100000>;
369 regulator-max-microvolt = <1300000>;
370 regulator-name = "vcc12-hsic";
371 };
372
373 reg_cldo1: cldo1 {
374 /*
375 * This was 3V in the original design, but
376 * 3.3V is the recommended supply voltage
377 * for the Ethernet PHY.
378 */
379 regulator-min-microvolt = <3300000>;
380 regulator-max-microvolt = <3300000>;
381 regulator-name = "vcc-gmac-phy";
382 };
383
384 reg_cldo2: cldo2 {
385 regulator-min-microvolt = <2800000>;
386 regulator-max-microvolt = <2800000>;
387 regulator-name = "afvcc-cam";
388 };
389
390 reg_cldo3: cldo3 {
391 regulator-min-microvolt = <3000000>;
392 regulator-max-microvolt = <3000000>;
393 regulator-name = "vcc-io-wifi-codec-io2";
394 };
395
396 reg_dcdca: dcdca {
397 regulator-always-on;
398 regulator-min-microvolt = <800000>;
399 regulator-max-microvolt = <1100000>;
400 regulator-name = "vdd-cpub";
401 };
402
403 reg_dcdcd: dcdcd {
404 regulator-always-on;
405 regulator-min-microvolt = <800000>;
406 regulator-max-microvolt = <1100000>;
407 regulator-name = "vdd-vpu";
408 };
409
410 reg_dcdce: dcdce {
411 regulator-always-on;
412 regulator-min-microvolt = <2100000>;
413 regulator-max-microvolt = <2100000>;
414 regulator-name = "vcc-bldo-codec-ldoin";
415 };
416
417 sw {
418 /*
419 * unused, but use a different name to
420 * avoid name clash with axp809's sw
421 */
422 regulator-name = "s_sw";
423 };
424 };
425 };
426
427 ac100: codec@e89 {
428 compatible = "x-powers,ac100";
429 reg = <0xe89>;
430
431 ac100_codec: codec {
432 compatible = "x-powers,ac100-codec";
433 interrupt-parent = <&r_pio>;
434 interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
435 #clock-cells = <0>;
436 clock-output-names = "4M_adda";
437 };
438
439 ac100_rtc: rtc {
440 compatible = "x-powers,ac100-rtc";
441 interrupt-parent = <&nmi_intc>;
442 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
443 clocks = <&ac100_codec>;
444 #clock-cells = <1>;
445 clock-output-names = "cko1_rtc",
446 "cko2_rtc",
447 "cko3_rtc";
448 };
449 };
450 };
451
452 #include "axp809.dtsi"
453
454 &uart0 {
455 pinctrl-names = "default";
456 pinctrl-0 = <&uart0_ph_pins>;
457 status = "okay";
458 };
459
460 &usbphy1 {
461 phy-supply = <&reg_usb1_vbus>;
462 status = "okay";
463 };
464
465 &usbphy2 {
466 phy-supply = <&reg_bldo4>;
467 /* Enable if HSIC peripheral is connected */
468 status = "disabled";
469 };
470
471 &usbphy3 {
472 phy-supply = <&reg_usb3_vbus>;
473 status = "okay";
474 };