1 From 80e5f83c0fc4bf42110cc55ce671ad7ddc7b08a4 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Mon, 14 Mar 2016 17:37:09 +0100
4 Subject: [PATCH] sunxi: Sync dts files with the upstream kernel
6 Sync dts files with the upstream kernel including
7 changes queued for 4.6:
9 https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6
11 Note this adds a number of new unused board dts files. I've asked the
12 authors of the kernel commits adding these to submit a matching defconfig
15 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
16 Acked-by: Ian Campbell <ijc@hellion.org.uk>
18 arch/arm/dts/Makefile | 8 +-
19 arch/arm/dts/axp22x.dtsi | 145 ++++++++++++
20 arch/arm/dts/sun4i-a10-a1000.dts | 4 +
21 arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts | 22 ++
22 arch/arm/dts/sun4i-a10-cubieboard.dts | 4 +
23 arch/arm/dts/sun4i-a10-gemei-g9.dts | 63 +++++-
24 arch/arm/dts/sun4i-a10-inet1.dts | 48 ++++
25 arch/arm/dts/sun4i-a10-inet97fv2.dts | 127 ++++++++++-
26 arch/arm/dts/sun4i-a10-inet9f-rev03.dts | 181 +++++++++++++++
27 arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts | 86 +------
28 arch/arm/dts/sun4i-a10-jesurun-q5.dts | 15 ++
29 arch/arm/dts/sun4i-a10-marsboard.dts | 23 ++
30 arch/arm/dts/sun4i-a10-mk802.dts | 37 +++
31 arch/arm/dts/sun4i-a10-olinuxino-lime.dts | 12 +
32 arch/arm/dts/sun4i-a10-pcduino.dts | 58 ++++-
33 arch/arm/dts/sun4i-a10-pcduino2.dts | 78 +++++++
34 arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts | 69 ++++++
35 arch/arm/dts/sun4i-a10.dtsi | 153 +++++++++++--
36 arch/arm/dts/sun5i-a10s-auxtek-t004.dts | 14 ++
37 arch/arm/dts/sun5i-a10s-olinuxino-micro.dts | 2 +-
38 arch/arm/dts/sun5i-a13-empire-electronix-d709.dts | 19 +-
39 arch/arm/dts/sun5i-a13-inet-98v-rev2.dts | 26 +--
40 arch/arm/dts/sun5i-a13-utoo-p66.dts | 30 +++
41 arch/arm/dts/sun5i-q8-common.dtsi | 10 +
42 arch/arm/dts/sun5i-r8-chip.dts | 47 +++-
43 arch/arm/dts/sun5i.dtsi | 31 +++
44 arch/arm/dts/sun6i-a31-colombus.dts | 24 ++
45 arch/arm/dts/sun6i-a31-hummingbird.dts | 132 ++++++-----
46 arch/arm/dts/sun6i-a31.dtsi | 65 +++++-
47 arch/arm/dts/sun6i-a31s-primo81.dts | 247 ++++++++++++++++++++-
48 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi | 142 ++++++++++++
49 arch/arm/dts/sun6i-a31s-sina31s.dts | 153 +++++++++++++
50 .../arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 205 +++++++++++++++++
51 arch/arm/dts/sun7i-a20-bananapi.dts | 78 ++++++-
52 arch/arm/dts/sun7i-a20-cubieboard2.dts | 23 ++
53 arch/arm/dts/sun7i-a20-cubietruck.dts | 4 +
54 arch/arm/dts/sun7i-a20-icnova-swac.dts | 169 ++++++++++++++
55 arch/arm/dts/sun7i-a20-itead-ibox.dts | 125 +++++++++++
56 arch/arm/dts/sun7i-a20-lamobo-r1.dts | 10 -
57 arch/arm/dts/sun7i-a20-mk808c.dts | 39 ++++
58 arch/arm/dts/sun7i-a20-olimex-som-evb.dts | 95 ++++++--
59 arch/arm/dts/sun7i-a20-olinuxino-lime.dts | 12 +
60 arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 47 ++++
61 arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 6 +
62 arch/arm/dts/sun7i-a20-orangepi-mini.dts | 33 +++
63 arch/arm/dts/sun7i-a20-orangepi.dts | 29 +++
64 arch/arm/dts/sun7i-a20-pcduino3-nano.dts | 69 +++++-
65 arch/arm/dts/sun7i-a20-pcduino3.dts | 58 ++++-
66 arch/arm/dts/sun7i-a20-wexler-tab7200.dts | 90 +++++++-
67 arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 187 +++++++++++++++-
68 arch/arm/dts/sun7i-a20.dtsi | 113 +++++++++-
69 arch/arm/dts/sun8i-a23-a33.dtsi | 71 ++++--
70 arch/arm/dts/sun8i-a23-gt90h-v4.dts | 120 +++++++++-
71 arch/arm/dts/sun8i-a23.dtsi | 25 +++
72 arch/arm/dts/sun8i-a33-sinlinx-sina33.dts | 83 ++++++-
73 arch/arm/dts/sun8i-a33.dtsi | 45 ++++
74 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts | 65 ++++++
75 arch/arm/dts/sun8i-a83t.dtsi | 125 +++++------
76 arch/arm/dts/sun8i-h3-orangepi-pc.dts | 69 ++++++
77 arch/arm/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++
78 arch/arm/dts/sun8i-h3.dtsi | 189 +++++++++++-----
79 arch/arm/dts/sun8i-q8-common.dtsi | 96 +++++++-
80 arch/arm/dts/sun9i-a80-cubieboard4.dts | 36 +++
81 arch/arm/dts/sun9i-a80-optimus.dts | 48 ++--
82 arch/arm/dts/sun9i-a80.dtsi | 204 +++++++++++++++--
83 arch/arm/dts/sunxi-itead-core-common.dtsi | 136 ++++++++++++
84 arch/arm/dts/sunxi-q8-common.dtsi | 6 +
85 67 files changed, 4351 insertions(+), 497 deletions(-)
86 create mode 100644 arch/arm/dts/axp22x.dtsi
87 create mode 100644 arch/arm/dts/sun4i-a10-pcduino2.dts
88 create mode 100644 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
89 create mode 100644 arch/arm/dts/sun6i-a31s-sina31s.dts
90 create mode 100644 arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
91 create mode 100644 arch/arm/dts/sun7i-a20-icnova-swac.dts
92 create mode 100644 arch/arm/dts/sun7i-a20-itead-ibox.dts
93 create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
94 create mode 100644 arch/arm/dts/sunxi-itead-core-common.dtsi
96 diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
97 index 578038b..0cea4b4 100644
98 --- a/arch/arm/dts/Makefile
99 +++ b/arch/arm/dts/Makefile
100 @@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
101 sun4i-a10-mk802ii.dtb \
102 sun4i-a10-olinuxino-lime.dtb \
103 sun4i-a10-pcduino.dtb \
104 + sun4i-a10-pcduino2.dtb \
105 sun4i-a10-pov-protab2-ips9.dtb
106 dtb-$(CONFIG_MACH_SUN5I) += \
107 sun5i-a10s-auxtek-t003.dtb \
108 @@ -154,7 +155,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \
109 sun6i-a31-mixtile-loftq.dtb \
110 sun6i-a31s-cs908.dtb \
111 sun6i-a31s-primo81.dtb \
112 - sun6i-a31s-sinovoip-bpi-m2.dtb
113 + sun6i-a31s-sina31s.dtb \
114 + sun6i-a31s-sinovoip-bpi-m2.dtb \
115 + sun6i-a31s-yones-toptech-bs1078-v2.dtb
116 dtb-$(CONFIG_MACH_SUN7I) += \
117 sun7i-a20-ainol-aw1.dtb \
118 sun7i-a20-bananapi.dtb \
119 @@ -163,6 +166,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
120 sun7i-a20-cubietruck.dtb \
121 sun7i-a20-hummingbird.dtb \
122 sun7i-a20-i12-tvbox.dtb \
123 + sun7i-a20-icnova-swac.dtb \
124 + sun7i-a20-itead-ibox.dtb \
125 sun7i-a20-lamobo-r1.dtb \
128 @@ -189,6 +194,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
129 sun8i-a33-sinlinx-sina33.dtb
130 dtb-$(CONFIG_MACH_SUN8I_A83T) += \
131 sun8i-a83t-allwinner-h8homlet-v2.dtb \
132 + sun8i-a83t-cubietruck-plus.dtb \
133 sun8i-a83t-sinovoip-bpi-m3.dtb
134 dtb-$(CONFIG_MACH_SUN8I_H3) += \
135 sun8i-h3-orangepi-pc.dtb \
136 diff --git a/arch/arm/dts/axp22x.dtsi b/arch/arm/dts/axp22x.dtsi
138 index 0000000..0cfec50
140 +++ b/arch/arm/dts/axp22x.dtsi
143 + * Copyright 2015 Chen-Yu Tsai
145 + * Chen-Yu Tsai <wens@csie.org>
147 + * This file is dual-licensed: you can use it either under the terms
148 + * of the GPL or the X11 license, at your option. Note that this dual
149 + * licensing only applies to this file, and not this project as a
152 + * a) This file is free software; you can redistribute it and/or
153 + * modify it under the terms of the GNU General Public License as
154 + * published by the Free Software Foundation; either version 2 of the
155 + * License, or (at your option) any later version.
157 + * This file is distributed in the hope that it will be useful,
158 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
159 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
160 + * GNU General Public License for more details.
162 + * Or, alternatively,
164 + * b) Permission is hereby granted, free of charge, to any person
165 + * obtaining a copy of this software and associated documentation
166 + * files (the "Software"), to deal in the Software without
167 + * restriction, including without limitation the rights to use,
168 + * copy, modify, merge, publish, distribute, sublicense, and/or
169 + * sell copies of the Software, and to permit persons to whom the
170 + * Software is furnished to do so, subject to the following
173 + * The above copyright notice and this permission notice shall be
174 + * included in all copies or substantial portions of the Software.
176 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
177 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
178 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
179 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
180 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
181 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
182 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
183 + * OTHER DEALINGS IN THE SOFTWARE.
187 + * AXP221/221s/223 Integrated Power Management Chip
188 + * http://www.x-powers.com/product/AXP22X.php
189 + * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
193 + interrupt-controller;
194 + #interrupt-cells = <1>;
197 + /* Default work frequency for buck regulators */
198 + x-powers,dcdc-freq = <3000>;
201 + regulator-name = "dcdc1";
205 + regulator-name = "dcdc2";
209 + regulator-name = "dcdc3";
213 + regulator-name = "dcdc4";
217 + regulator-name = "dcdc5";
221 + regulator-name = "dc1sw";
224 + reg_dc5ldo: dc5ldo {
225 + regulator-name = "dc5ldo";
229 + regulator-name = "aldo1";
233 + regulator-name = "aldo2";
237 + regulator-name = "aldo3";
241 + regulator-name = "dldo1";
245 + regulator-name = "dldo2";
249 + regulator-name = "dldo3";
253 + regulator-name = "dldo4";
257 + regulator-name = "eldo1";
261 + regulator-name = "eldo2";
265 + regulator-name = "eldo3";
268 + reg_ldo_io0: ldo_io0 {
269 + regulator-name = "ldo_io0";
270 + status = "disabled";
273 + reg_ldo_io1: ldo_io1 {
274 + regulator-name = "ldo_io1";
275 + status = "disabled";
278 + reg_rtc_ldo: rtc_ldo {
279 + /* RTC_LDO is a fixed, always-on regulator */
280 + regulator-always-on;
281 + regulator-min-microvolt = <3000000>;
282 + regulator-max-microvolt = <3000000>;
283 + regulator-name = "rtc_ldo";
287 diff --git a/arch/arm/dts/sun4i-a10-a1000.dts b/arch/arm/dts/sun4i-a10-a1000.dts
288 index 2630d78..97570cb 100644
289 --- a/arch/arm/dts/sun4i-a10-a1000.dts
290 +++ b/arch/arm/dts/sun4i-a10-a1000.dts
302 diff --git a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
303 index 1430568..023b03e 100644
304 --- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
305 +++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
307 #include "sunxi-common-regulators.dtsi"
308 #include <dt-bindings/gpio/gpio.h>
309 #include <dt-bindings/input/input.h>
310 +#include <dt-bindings/interrupt-controller/irq.h>
313 model = "Chuwi V7 CW0825";
319 + pinctrl-names = "default";
320 + pinctrl-0 = <&i2c1_pins_a>;
325 + pinctrl-names = "default";
326 + pinctrl-0 = <&i2c2_pins_a>;
329 + ft5306de4: touchscreen@38 {
330 + compatible = "edt,edt-ft5406";
332 + interrupt-parent = <&pio>;
333 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
334 + touchscreen-size-x = <1024>;
335 + touchscreen-size-y = <768>;
340 vref-supply = <®_vcc3v0>;
342 diff --git a/arch/arm/dts/sun4i-a10-cubieboard.dts b/arch/arm/dts/sun4i-a10-cubieboard.dts
343 index 046a84d..710e2ef 100644
344 --- a/arch/arm/dts/sun4i-a10-cubieboard.dts
345 +++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
355 cpu-supply = <®_dcdc2>;
357 diff --git a/arch/arm/dts/sun4i-a10-gemei-g9.dts b/arch/arm/dts/sun4i-a10-gemei-g9.dts
358 index 570754d..ac64781 100644
359 --- a/arch/arm/dts/sun4i-a10-gemei-g9.dts
360 +++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts
362 #include "sunxi-common-regulators.dtsi"
363 #include <dt-bindings/gpio/gpio.h>
364 #include <dt-bindings/input/input.h>
365 +#include <dt-bindings/interrupt-controller/irq.h>
368 model = "Gemei G9 Tablet";
374 * AXP battery management
377 * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
380 + /* PH15 controls power to external amplifier (ft2012q) */
381 + pinctrl-names = "default";
382 + pinctrl-0 = <&codec_pa_pin>;
383 + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
388 + cpu-supply = <®_dcdc2>;
397 - compatible = "x-powers,axp209";
401 - interrupt-controller;
402 - #interrupt-cells = <1>;
406 +#include "axp209.dtsi"
409 pinctrl-names = "default";
410 pinctrl-0 = <&i2c1_pins_a>;
411 @@ -103,17 +112,13 @@
413 compatible = "bosch,bma250";
417 - * TODO: interrupt pins:
421 + interrupt-parent = <&pio>;
422 + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
427 - vref-supply = <®_vcc3v0>;
428 + vref-supply = <®_ldo2>;
437 + codec_pa_pin: codec_pa_pin@0 {
438 + allwinner,pins = "PH15";
439 + allwinner,function = "gpio_out";
440 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
441 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
446 + regulator-always-on;
447 + regulator-min-microvolt = <1000000>;
448 + regulator-max-microvolt = <1400000>;
449 + regulator-name = "vdd-cpu";
453 + regulator-always-on;
454 + regulator-min-microvolt = <1250000>;
455 + regulator-max-microvolt = <1250000>;
456 + regulator-name = "vdd-int-dll";
460 + regulator-name = "vdd-rtc";
464 + regulator-always-on;
465 + regulator-min-microvolt = <3000000>;
466 + regulator-max-microvolt = <3000000>;
467 + regulator-name = "avcc";
473 diff --git a/arch/arm/dts/sun4i-a10-inet1.dts b/arch/arm/dts/sun4i-a10-inet1.dts
474 index 487ce63..e09053b 100644
475 --- a/arch/arm/dts/sun4i-a10-inet1.dts
476 +++ b/arch/arm/dts/sun4i-a10-inet1.dts
478 #include <dt-bindings/input/input.h>
479 #include <dt-bindings/interrupt-controller/irq.h>
480 #include <dt-bindings/pinctrl/sun4i-a10.h>
481 +#include <dt-bindings/pwm/pwm.h>
489 + backlight: backlight {
490 + compatible = "pwm-backlight";
491 + pinctrl-names = "default";
492 + pinctrl-0 = <&bl_en_pin_inet>;
493 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
494 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
495 + default-brightness-level = <8>;
496 + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
500 stdout-path = "serial0:115200n8";
509 cpu-supply = <®_dcdc2>;
512 pinctrl-names = "default";
513 pinctrl-0 = <&i2c2_pins_a>;
516 + ft5x: touchscreen@38 {
517 + compatible = "edt,edt-ft5406";
519 + interrupt-parent = <&pio>;
520 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
521 + pinctrl-names = "default";
522 + pinctrl-0 = <&touchscreen_wake_pin>;
523 + wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
524 + touchscreen-size-x = <600>;
525 + touchscreen-size-y = <1024>;
526 + touchscreen-swapped-x-y;
535 + bl_en_pin_inet: bl_en_pin@0 {
536 + allwinner,pins = "PH7";
537 + allwinner,function = "gpio_out";
538 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
539 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
542 + touchscreen_wake_pin: touchscreen_wake_pin@0 {
543 + allwinner,pins = "PB13";
544 + allwinner,function = "gpio_out";
545 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
546 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
549 usb0_id_detect_pin: usb0_id_detect_pin@0 {
550 allwinner,pins = "PH4";
551 allwinner,function = "gpio_in";
557 + pinctrl-names = "default";
558 + pinctrl-0 = <&pwm0_pins_a>;
564 regulator-min-microvolt = <1000000>;
565 diff --git a/arch/arm/dts/sun4i-a10-inet97fv2.dts b/arch/arm/dts/sun4i-a10-inet97fv2.dts
566 index 6c927a8..04b0d2d 100644
567 --- a/arch/arm/dts/sun4i-a10-inet97fv2.dts
568 +++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts
570 #include "sunxi-common-regulators.dtsi"
572 #include <dt-bindings/gpio/gpio.h>
573 +#include <dt-bindings/input/input.h>
574 +#include <dt-bindings/interrupt-controller/irq.h>
577 model = "INet-97F Rev 02";
585 + cpu-supply = <®_dcdc2>;
593 - compatible = "x-powers,axp209";
599 +#include "axp209.dtsi"
602 + pinctrl-names = "default";
603 + pinctrl-0 = <&i2c1_pins_a>;
608 + pinctrl-names = "default";
609 + pinctrl-0 = <&i2c2_pins_a>;
612 + ft5406ee8: touchscreen@38 {
613 + compatible = "edt,edt-ft5406";
615 + interrupt-parent = <&pio>;
616 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
617 + touchscreen-size-x = <800>;
618 + touchscreen-size-y = <480>;
623 + vref-supply = <®_ldo2>;
628 + linux,code = <KEY_MENU>;
630 + voltage = <200000>;
634 + label = "Volume Up";
635 + linux,code = <KEY_VOLUMEUP>;
637 + voltage = <600000>;
640 - interrupt-controller;
641 - #interrupt-cells = <1>;
643 + label = "Volume Down";
644 + linux,code = <KEY_VOLUMEDOWN>;
646 + voltage = <800000>;
651 + linux,code = <KEY_HOMEPAGE>;
653 + voltage = <1000000>;
658 + linux,code = <KEY_ESC>;
660 + voltage = <1200000>;
676 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
677 + allwinner,pins = "PH4";
678 + allwinner,function = "gpio_in";
679 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
680 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
683 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
684 + allwinner,pins = "PH5";
685 + allwinner,function = "gpio_in";
686 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
687 + allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
692 + regulator-always-on;
693 + regulator-min-microvolt = <1000000>;
694 + regulator-max-microvolt = <1400000>;
695 + regulator-name = "vdd-cpu";
700 + regulator-always-on;
701 + regulator-min-microvolt = <1250000>;
702 + regulator-max-microvolt = <1250000>;
703 + regulator-name = "vdd-int-dll";
707 + regulator-name = "vdd-rtc";
711 + regulator-always-on;
712 + regulator-min-microvolt = <3000000>;
713 + regulator-max-microvolt = <3000000>;
714 + regulator-name = "avcc";
731 - usb1_vbus-supply = <®_usb1_vbus>;
732 + pinctrl-names = "default";
733 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
734 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
735 + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
736 + usb0_vbus-supply = <®_usb0_vbus>;
737 usb2_vbus-supply = <®_usb2_vbus>;
740 diff --git a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
741 index 8446465..bba4f9c 100644
742 --- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
743 +++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
746 stdout-path = "serial0:115200n8";
750 + compatible = "gpio-keys-polled";
751 + pinctrl-names = "default";
752 + pinctrl-0 = <&key_pins_inet9f>;
753 + #address-cells = <1>;
755 + poll-interval = <20>;
758 + label = "Left Joystick Left";
759 + linux,code = <ABS_X>;
760 + linux,input-type = <EV_ABS>;
761 + linux,input-value = <0xffffffff>; /* -1 */
762 + gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
766 + label = "Left Joystick Right";
767 + linux,code = <ABS_X>;
768 + linux,input-type = <EV_ABS>;
769 + linux,input-value = <1>;
770 + gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
774 + label = "Left Joystick Up";
775 + linux,code = <ABS_Y>;
776 + linux,input-type = <EV_ABS>;
777 + linux,input-value = <0xffffffff>; /* -1 */
778 + gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
782 + label = "Left Joystick Down";
783 + linux,code = <ABS_Y>;
784 + linux,input-type = <EV_ABS>;
785 + linux,input-value = <1>;
786 + gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
790 + label = "Right Joystick Left";
791 + linux,code = <ABS_Z>;
792 + linux,input-type = <EV_ABS>;
793 + linux,input-value = <0xffffffff>; /* -1 */
794 + gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
798 + label = "Right Joystick Right";
799 + linux,code = <ABS_Z>;
800 + linux,input-type = <EV_ABS>;
801 + linux,input-value = <1>;
802 + gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
806 + label = "Right Joystick Up";
807 + linux,code = <ABS_RZ>;
808 + linux,input-type = <EV_ABS>;
809 + linux,input-value = <0xffffffff>; /* -1 */
810 + gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
814 + label = "Right Joystick Down";
815 + linux,code = <ABS_RZ>;
816 + linux,input-type = <EV_ABS>;
817 + linux,input-value = <1>;
818 + gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
822 + label = "DPad Left";
823 + linux,code = <ABS_HAT0X>;
824 + linux,input-type = <EV_ABS>;
825 + linux,input-value = <0xffffffff>; /* -1 */
826 + gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
830 + label = "DPad Right";
831 + linux,code = <ABS_HAT0X>;
832 + linux,input-type = <EV_ABS>;
833 + linux,input-value = <1>;
834 + gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
839 + linux,code = <ABS_HAT0Y>;
840 + linux,input-type = <EV_ABS>;
841 + linux,input-value = <0xffffffff>; /* -1 */
842 + gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
846 + label = "DPad Down";
847 + linux,code = <ABS_HAT0Y>;
848 + linux,input-type = <EV_ABS>;
849 + linux,input-value = <1>;
850 + gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
854 + label = "Button X";
855 + linux,code = <BTN_X>;
856 + gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
860 + label = "Button Y";
861 + linux,code = <BTN_Y>;
862 + gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
866 + label = "Button A";
867 + linux,code = <BTN_A>;
868 + gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
872 + label = "Button B";
873 + linux,code = <BTN_B>;
874 + gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
878 + label = "Select Button";
879 + linux,code = <BTN_SELECT>;
880 + gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
884 + label = "Start Button";
885 + linux,code = <BTN_START>;
886 + gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
890 + label = "Top Left Button";
891 + linux,code = <BTN_TL>;
892 + gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
896 + label = "Top Right Button";
897 + linux,code = <BTN_TR>;
898 + gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
905 pinctrl-names = "default";
906 pinctrl-0 = <&i2c1_pins_a>;
909 + /* Accelerometer */
911 + compatible = "bosch,bma250";
913 + interrupt-parent = <&pio>;
914 + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
919 pinctrl-names = "default";
920 pinctrl-0 = <&i2c2_pins_a>;
923 + ft5406ee8: touchscreen@38 {
924 + compatible = "edt,edt-ft5406";
926 + interrupt-parent = <&pio>;
927 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
928 + touchscreen-size-x = <800>;
929 + touchscreen-size-y = <480>;
938 + key_pins_inet9f: key_pins@0 {
939 + allwinner,pins = "PA0", "PA1", "PA3", "PA4",
940 + "PA5", "PA6", "PA8", "PA9",
941 + "PA11", "PA12", "PA13",
942 + "PA14", "PA15", "PA16", "PA17",
943 + "PH22", "PH23", "PH24", "PH25", "PH26";
944 + allwinner,function = "gpio_in";
945 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
946 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
949 usb0_id_detect_pin: usb0_id_detect_pin@0 {
950 allwinner,pins = "PH4";
951 allwinner,function = "gpio_in";
952 diff --git a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
953 index 985e155..4e798f0 100644
954 --- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
955 +++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
958 * Copyright 2015 Josef Gajdusek <atx@atx.name>
959 + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
961 * This file is dual-licensed: you can use it either under the terms
962 * of the GPL or the X11 license, at your option. Note that this dual
966 #include "sun4i-a10.dtsi"
967 -#include "sunxi-common-regulators.dtsi"
969 -#include <dt-bindings/gpio/gpio.h>
970 -#include <dt-bindings/pinctrl/sun4i-a10.h>
971 +#include "sunxi-itead-core-common.dtsi"
974 model = "Iteaduino Plus A10";
975 compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
982 - stdout-path = "serial0:115200n8";
992 - cpu-supply = <®_dcdc2>;
1004 pinctrl-names = "default";
1005 pinctrl-0 = <&emac_pins_a>;
1010 - pinctrl-names = "default";
1011 - pinctrl-0 = <&i2c0_pins_a>;
1019 @@ -135,68 +108,13 @@
1035 -#include "axp209.dtsi"
1038 - regulator-always-on;
1039 - regulator-min-microvolt = <1000000>;
1040 - regulator-max-microvolt = <1450000>;
1041 - regulator-name = "vdd-cpu";
1045 - regulator-always-on;
1046 - regulator-min-microvolt = <1000000>;
1047 - regulator-max-microvolt = <1400000>;
1048 - regulator-name = "vdd-int-dll";
1052 - regulator-name = "vdd-rtc";
1056 - regulator-always-on;
1057 - regulator-min-microvolt = <3000000>;
1058 - regulator-max-microvolt = <3000000>;
1059 - regulator-name = "avcc";
1071 pinctrl-names = "default";
1072 pinctrl-0 = <&spi0_pins_a>,
1078 - pinctrl-names = "default";
1079 - pinctrl-0 = <&uart0_pins_a>;
1084 - usb1_vbus-supply = <®_usb1_vbus>;
1085 - usb2_vbus-supply = <®_usb2_vbus>;
1088 diff --git a/arch/arm/dts/sun4i-a10-jesurun-q5.dts b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
1089 index dc2f2ae..7afc7a6 100644
1090 --- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
1091 +++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
1092 @@ -156,6 +156,10 @@
1101 emac_power_pin_q5: emac_power_pin@0 {
1102 allwinner,pins = "PH19";
1103 @@ -172,6 +176,11 @@
1108 + regulator-boot-on;
1115 @@ -186,7 +195,13 @@
1125 + usb0_vbus-supply = <®_usb0_vbus>;
1126 usb1_vbus-supply = <®_usb1_vbus>;
1127 usb2_vbus-supply = <®_usb2_vbus>;
1129 diff --git a/arch/arm/dts/sun4i-a10-marsboard.dts b/arch/arm/dts/sun4i-a10-marsboard.dts
1130 index 02158bc..8e50723 100644
1131 --- a/arch/arm/dts/sun4i-a10-marsboard.dts
1132 +++ b/arch/arm/dts/sun4i-a10-marsboard.dts
1144 @@ -154,6 +158,10 @@
1153 led_pins_marsboard: led_pins@0 {
1154 allwinner,pins = "PB5", "PB6", "PB7", "PB8";
1155 @@ -161,6 +169,13 @@
1156 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1157 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1160 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
1161 + allwinner,pins = "PH4";
1162 + allwinner,function = "gpio_in";
1163 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1164 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
1169 @@ -184,7 +199,15 @@
1179 + pinctrl-names = "default";
1180 + pinctrl-0 = <&usb0_id_detect_pin>;
1181 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
1182 usb1_vbus-supply = <®_usb1_vbus>;
1183 usb2_vbus-supply = <®_usb2_vbus>;
1185 diff --git a/arch/arm/dts/sun4i-a10-mk802.dts b/arch/arm/dts/sun4i-a10-mk802.dts
1186 index 3c7eebe..ee46ea8 100644
1187 --- a/arch/arm/dts/sun4i-a10-mk802.dts
1188 +++ b/arch/arm/dts/sun4i-a10-mk802.dts
1190 #include "sun4i-a10.dtsi"
1191 #include "sunxi-common-regulators.dtsi"
1192 #include <dt-bindings/gpio/gpio.h>
1193 +#include <dt-bindings/pinctrl/sun4i-a10.h>
1217 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
1218 + allwinner,pins = "PH4";
1219 + allwinner,function = "gpio_in";
1220 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1221 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1224 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
1225 + allwinner,pins = "PH5";
1226 + allwinner,function = "gpio_in";
1227 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1228 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1231 usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
1232 allwinner,pins = "PH12";
1233 allwinner,function = "gpio_out";
1245 @@ -105,7 +132,17 @@
1255 + pinctrl-names = "default";
1256 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
1257 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
1258 + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
1259 + usb0_vbus-supply = <®_usb0_vbus>;
1260 usb1_vbus-supply = <®_usb1_vbus>;
1261 usb2_vbus-supply = <®_usb2_vbus>;
1263 diff --git a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
1264 index 28e32ad..b350448 100644
1265 --- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
1266 +++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
1267 @@ -124,6 +124,18 @@
1272 + pinctrl-names = "default";
1273 + pinctrl-0 = <&i2c1_pins_a>;
1276 + eeprom: eeprom@50 {
1277 + compatible = "atmel,24c16";
1286 diff --git a/arch/arm/dts/sun4i-a10-pcduino.dts b/arch/arm/dts/sun4i-a10-pcduino.dts
1287 index 4e3e1b9..39034aa 100644
1288 --- a/arch/arm/dts/sun4i-a10-pcduino.dts
1289 +++ b/arch/arm/dts/sun4i-a10-pcduino.dts
1290 @@ -104,6 +104,10 @@
1295 + cpu-supply = <®_dcdc2>;
1301 @@ -129,12 +133,8 @@
1305 - compatible = "x-powers,axp209";
1309 - interrupt-controller;
1310 - #interrupt-cells = <1>;
1314 @@ -164,6 +164,10 @@
1323 led_pins_pcduino: led_pins@0 {
1324 allwinner,pins = "PH15", "PH16";
1325 @@ -178,14 +182,40 @@
1326 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1327 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1330 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
1331 + allwinner,pins = "PH4";
1332 + allwinner,function = "gpio_in";
1333 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1334 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
1340 +#include "axp209.dtsi"
1343 + regulator-always-on;
1344 + regulator-min-microvolt = <1000000>;
1345 + regulator-max-microvolt = <1400000>;
1346 + regulator-name = "vdd-cpu";
1352 + regulator-always-on;
1353 + regulator-min-microvolt = <1000000>;
1354 + regulator-max-microvolt = <1400000>;
1355 + regulator-name = "vdd-int-dll";
1359 + regulator-name = "vdd-rtc";
1363 + regulator-always-on;
1364 + regulator-min-microvolt = <3000000>;
1365 + regulator-max-microvolt = <3000000>;
1366 + regulator-name = "avcc";
1370 @@ -194,8 +224,16 @@
1380 - usb1_vbus-supply = <®_usb1_vbus>;
1381 - usb2_vbus-supply = <®_usb2_vbus>;
1382 + pinctrl-names = "default";
1383 + pinctrl-0 = <&usb0_id_detect_pin>;
1384 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
1385 + usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */
1386 + usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */
1389 diff --git a/arch/arm/dts/sun4i-a10-pcduino2.dts b/arch/arm/dts/sun4i-a10-pcduino2.dts
1390 new file mode 100644
1391 index 0000000..de483a1
1393 +++ b/arch/arm/dts/sun4i-a10-pcduino2.dts
1396 + * Copyright 2015 Siarhei Siamashka <siarhei.siamashka@gmail.com>
1398 + * This file is dual-licensed: you can use it either under the terms
1399 + * of the GPL or the X11 license, at your option. Note that this dual
1400 + * licensing only applies to this file, and not this project as a
1403 + * a) This file is free software; you can redistribute it and/or
1404 + * modify it under the terms of the GNU General Public License as
1405 + * published by the Free Software Foundation; either version 2 of the
1406 + * License, or (at your option) any later version.
1408 + * This file is distributed in the hope that it will be useful,
1409 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1410 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1411 + * GNU General Public License for more details.
1413 + * Or, alternatively,
1415 + * b) Permission is hereby granted, free of charge, to any person
1416 + * obtaining a copy of this software and associated documentation
1417 + * files (the "Software"), to deal in the Software without
1418 + * restriction, including without limitation the rights to use,
1419 + * copy, modify, merge, publish, distribute, sublicense, and/or
1420 + * sell copies of the Software, and to permit persons to whom the
1421 + * Software is furnished to do so, subject to the following
1424 + * The above copyright notice and this permission notice shall be
1425 + * included in all copies or substantial portions of the Software.
1427 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1428 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
1429 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1430 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
1431 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1432 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1433 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1434 + * OTHER DEALINGS IN THE SOFTWARE.
1438 + * The LinkSprite pcDuino2 board is almost identical to the older
1439 + * LinkSprite pcDuino1 board. The only software visible difference
1440 + * is that the pcDuino2 board got a USB VBUS voltage regulator, which
1441 + * is controlled by the PD2 pin (pulled-up by default). Also one of
1442 + * the USB host ports has been replaced with a USB WIFI chip.
1445 +#include "sun4i-a10-pcduino.dts"
1448 + model = "LinkSprite pcDuino2";
1449 + compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10";
1453 + usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 {
1454 + allwinner,pins = "PD2";
1455 + allwinner,function = "gpio_out";
1456 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1457 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1462 + pinctrl-names = "default";
1463 + pinctrl-0 = <&usb2_vbus_pin_pcduino2>;
1464 + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>;
1469 + usb1_vbus-supply = <®_vcc3v3>; /* USB WIFI is always on */
1470 + usb2_vbus-supply = <®_usb2_vbus>;
1473 diff --git a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
1474 index 223515e..ea90634 100644
1475 --- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
1476 +++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
1478 #include <dt-bindings/input/input.h>
1479 #include <dt-bindings/interrupt-controller/irq.h>
1480 #include <dt-bindings/pinctrl/sun4i-a10.h>
1481 +#include <dt-bindings/pwm/pwm.h>
1484 model = "Point of View Protab2-IPS9";
1489 + backlight: backlight {
1490 + compatible = "pwm-backlight";
1491 + pinctrl-names = "default";
1492 + pinctrl-0 = <&bl_en_pin_protab>;
1493 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
1494 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
1495 + default-brightness-level = <8>;
1496 + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
1500 stdout-path = "serial0:115200n8";
1505 + pinctrl-names = "default";
1506 + pinctrl-0 = <&codec_pa_pin>;
1507 + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
1512 cpu-supply = <®_dcdc2>;
1514 @@ -86,12 +104,36 @@
1515 pinctrl-names = "default";
1516 pinctrl-0 = <&i2c1_pins_a>;
1519 + /* Accelerometer */
1521 + compatible = "bosch,bma250";
1523 + interrupt-parent = <&pio>;
1524 + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
1529 pinctrl-names = "default";
1530 pinctrl-0 = <&i2c2_pins_a>;
1534 + pinctrl-names = "default";
1535 + pinctrl-0 = <&touchscreen_pins>;
1536 + compatible = "pixcir,pixcir_tangoc";
1538 + interrupt-parent = <&pio>;
1539 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
1540 + attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
1541 + enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
1542 + wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
1543 + touchscreen-size-x = <1024>;
1544 + touchscreen-size-y = <768>;
1545 + touchscreen-inverted-x;
1546 + touchscreen-inverted-y;
1551 @@ -128,6 +170,27 @@
1555 + bl_en_pin_protab: bl_en_pin@0 {
1556 + allwinner,pins = "PH7";
1557 + allwinner,function = "gpio_out";
1558 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1559 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1562 + codec_pa_pin: codec_pa_pin@0 {
1563 + allwinner,pins = "PH15";
1564 + allwinner,function = "gpio_out";
1565 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1566 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1569 + touchscreen_pins: touchscreen_pins@0 {
1570 + allwinner,pins = "PA5", "PB13";
1571 + allwinner,function = "gpio_out";
1572 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1573 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1576 usb0_id_detect_pin: usb0_id_detect_pin@0 {
1577 allwinner,pins = "PH4";
1578 allwinner,function = "gpio_in";
1579 @@ -143,6 +206,12 @@
1584 + pinctrl-names = "default";
1585 + pinctrl-0 = <&pwm0_pins_a>;
1590 regulator-always-on;
1591 regulator-min-microvolt = <1000000>;
1592 diff --git a/arch/arm/dts/sun4i-a10.dtsi b/arch/arm/dts/sun4i-a10.dtsi
1593 index 463bacd..2c8f5e6 100644
1594 --- a/arch/arm/dts/sun4i-a10.dtsi
1595 +++ b/arch/arm/dts/sun4i-a10.dtsi
1598 #include <dt-bindings/thermal/thermal.h>
1600 +#include <dt-bindings/clock/sun4i-a10-pll2.h>
1601 #include <dt-bindings/dma/sun4i-a10.h>
1602 #include <dt-bindings/pinctrl/sun4i-a10.h>
1605 "simple-framebuffer";
1606 allwinner,pipeline = "de_be0-lcd0-hdmi";
1607 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
1609 + <&ahb_gates 44>, <&dram_gates 26>;
1610 status = "disabled";
1614 "simple-framebuffer";
1615 allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
1616 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
1617 - <&ahb_gates 44>, <&ahb_gates 46>;
1618 + <&ahb_gates 44>, <&ahb_gates 46>,
1619 + <&dram_gates 25>, <&dram_gates 26>;
1620 status = "disabled";
1624 "simple-framebuffer";
1625 allwinner,pipeline = "de_fe0-de_be0-lcd0";
1626 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
1628 + <&ahb_gates 46>, <&dram_gates 25>,
1630 status = "disabled";
1634 "simple-framebuffer";
1635 allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
1636 clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
1637 - <&ahb_gates 44>, <&ahb_gates 46>;
1638 + <&ahb_gates 44>, <&ahb_gates 46>,
1639 + <&dram_gates 25>, <&dram_gates 26>;
1640 status = "disabled";
1643 @@ -195,6 +199,15 @@
1644 clock-output-names = "pll1";
1647 + pll2: clk@01c20008 {
1648 + #clock-cells = <1>;
1649 + compatible = "allwinner,sun4i-a10-pll2-clk";
1650 + reg = <0x01c20008 0x8>;
1651 + clocks = <&osc24M>;
1652 + clock-output-names = "pll2-1x", "pll2-2x",
1653 + "pll2-4x", "pll2-8x";
1656 pll4: clk@01c20018 {
1658 compatible = "allwinner,sun4i-a10-pll1-clk";
1660 compatible = "allwinner,sun4i-a10-axi-gates-clk";
1661 reg = <0x01c2005c 0x4>;
1663 + clock-indices = <0>;
1664 clock-output-names = "axi_dram";
1667 @@ -257,17 +271,36 @@
1668 compatible = "allwinner,sun4i-a10-ahb-gates-clk";
1669 reg = <0x01c20060 0x8>;
1671 + clock-indices = <0>, <1>,
1686 clock-output-names = "ahb_usb0", "ahb_ehci0",
1687 - "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
1688 - "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
1689 - "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
1690 - "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts",
1691 - "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
1692 - "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
1693 - "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
1694 - "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
1695 - "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
1696 - "ahb_de_fe1", "ahb_mp", "ahb_mali400";
1697 + "ahb_ohci0", "ahb_ehci1",
1698 + "ahb_ohci1", "ahb_ss", "ahb_dma",
1699 + "ahb_bist", "ahb_mmc0", "ahb_mmc1",
1700 + "ahb_mmc2", "ahb_mmc3", "ahb_ms",
1701 + "ahb_nand", "ahb_sdram", "ahb_ace",
1702 + "ahb_emac", "ahb_ts", "ahb_spi0",
1703 + "ahb_spi1", "ahb_spi2", "ahb_spi3",
1704 + "ahb_pata", "ahb_sata", "ahb_gps",
1705 + "ahb_ve", "ahb_tvd", "ahb_tve0",
1706 + "ahb_tve1", "ahb_lcd0", "ahb_lcd1",
1707 + "ahb_csi0", "ahb_csi1", "ahb_hdmi",
1708 + "ahb_de_be0", "ahb_de_be1",
1709 + "ahb_de_fe0", "ahb_de_fe1",
1710 + "ahb_mp", "ahb_mali400";
1713 apb0: apb0@01c20054 {
1714 @@ -283,9 +316,14 @@
1715 compatible = "allwinner,sun4i-a10-apb0-gates-clk";
1716 reg = <0x01c20068 0x4>;
1718 + clock-indices = <0>, <1>,
1722 clock-output-names = "apb0_codec", "apb0_spdif",
1723 - "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
1724 - "apb0_ir1", "apb0_keypad";
1725 + "apb0_ac97", "apb0_iis",
1726 + "apb0_pio", "apb0_ir0",
1727 + "apb0_ir1", "apb0_keypad";
1730 apb1: clk@01c20058 {
1731 @@ -301,12 +339,22 @@
1732 compatible = "allwinner,sun4i-a10-apb1-gates-clk";
1733 reg = <0x01c2006c 0x4>;
1735 + clock-indices = <0>, <1>,
1743 clock-output-names = "apb1_i2c0", "apb1_i2c1",
1744 - "apb1_i2c2", "apb1_can", "apb1_scr",
1745 - "apb1_ps20", "apb1_ps21", "apb1_uart0",
1746 - "apb1_uart1", "apb1_uart2", "apb1_uart3",
1747 - "apb1_uart4", "apb1_uart5", "apb1_uart6",
1749 + "apb1_i2c2", "apb1_can",
1750 + "apb1_scr", "apb1_ps20",
1751 + "apb1_ps21", "apb1_uart0",
1752 + "apb1_uart1", "apb1_uart2",
1753 + "apb1_uart3", "apb1_uart4",
1754 + "apb1_uart5", "apb1_uart6",
1758 nand_clk: clk@01c20080 {
1759 @@ -446,6 +494,48 @@
1760 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
1761 clock-output-names = "spi3";
1764 + dram_gates: clk@01c20100 {
1765 + #clock-cells = <1>;
1766 + compatible = "allwinner,sun4i-a10-dram-gates-clk";
1767 + reg = <0x01c20100 0x4>;
1768 + clocks = <&pll5 0>;
1769 + clock-indices = <0>,
1778 + clock-output-names = "dram_ve",
1779 + "dram_csi0", "dram_csi1",
1782 + "dram_tve0", "dram_tve1",
1784 + "dram_de_fe1", "dram_de_fe0",
1785 + "dram_de_be0", "dram_de_be1",
1786 + "dram_de_mp", "dram_ace";
1789 + ve_clk: clk@01c2013c {
1790 + #clock-cells = <0>;
1791 + #reset-cells = <0>;
1792 + compatible = "allwinner,sun4i-a10-ve-clk";
1793 + reg = <0x01c2013c 0x4>;
1795 + clock-output-names = "ve";
1798 + codec_clk: clk@01c20140 {
1799 + #clock-cells = <0>;
1800 + compatible = "allwinner,sun4i-a10-codec-clk";
1801 + reg = <0x01c20140 0x4>;
1802 + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
1803 + clock-output-names = "codec";
1808 @@ -656,6 +746,14 @@
1809 status = "disabled";
1812 + crypto: crypto-engine@01c15000 {
1813 + compatible = "allwinner,sun4i-a10-crypto";
1814 + reg = <0x01c15000 0x1000>;
1815 + interrupts = <86>;
1816 + clocks = <&ahb_gates 5>, <&ss_clk>;
1817 + clock-names = "ahb", "mod";
1820 spi2: spi@01c17000 {
1821 compatible = "allwinner,sun4i-a10-spi";
1822 reg = <0x01c17000 0x1000>;
1823 @@ -961,6 +1059,19 @@
1824 status = "disabled";
1827 + codec: codec@01c22c00 {
1828 + #sound-dai-cells = <0>;
1829 + compatible = "allwinner,sun4i-a10-codec";
1830 + reg = <0x01c22c00 0x40>;
1831 + interrupts = <30>;
1832 + clocks = <&apb0_gates 0>, <&codec_clk>;
1833 + clock-names = "apb", "codec";
1834 + dmas = <&dma SUN4I_DMA_NORMAL 19>,
1835 + <&dma SUN4I_DMA_NORMAL 19>;
1836 + dma-names = "rx", "tx";
1837 + status = "disabled";
1840 sid: eeprom@01c23800 {
1841 compatible = "allwinner,sun4i-a10-sid";
1842 reg = <0x01c23800 0x10>;
1843 diff --git a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
1844 index 2b3511e..a790ec8 100644
1845 --- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
1846 +++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
1852 + pinctrl-names = "default";
1853 + pinctrl-0 = <&i2c0_pins_a>;
1857 + compatible = "x-powers,axp152";
1860 + interrupt-controller;
1861 + #interrupt-cells = <1>;
1866 pinctrl-names = "default";
1867 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
1868 diff --git a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
1869 index 5a422c1..86d046a 100644
1870 --- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
1871 +++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
1876 - compatible = "at,24c16";
1877 + compatible = "atmel,24c16";
1881 diff --git a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
1882 index 7fbb0b0..6efbba6 100644
1883 --- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
1884 +++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
1888 pinctrl-names = "default";
1889 - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
1890 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
1891 vmmc-supply = <®_vcc3v3>;
1893 cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
1894 @@ -131,27 +131,12 @@
1899 - pinctrl-names = "default";
1900 - pinctrl-0 = <&mmc2_pins_a>;
1901 - vmmc-supply = <®_vcc3v3>;
1906 - mmccard: mmccard@0 {
1908 - compatible = "mmc-card";
1918 - mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
1919 + mmc0_cd_pin_d709: mmc0_cd_pin@0 {
1920 allwinner,pins = "PG0";
1921 allwinner,function = "gpio_in";
1922 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1923 diff --git a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
1924 index 6d466a2..1b11ec9 100644
1925 --- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
1926 +++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
1927 @@ -123,21 +123,6 @@
1932 - pinctrl-names = "default";
1933 - pinctrl-0 = <&mmc2_pins_a>;
1934 - vmmc-supply = <®_vcc3v3>;
1939 - mmccard: mmccard@0 {
1941 - compatible = "mmc-card";
1949 @@ -201,11 +186,6 @@
1954 - gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
1959 pinctrl-names = "default";
1960 pinctrl-0 = <&uart1_pins_b>;
1961 @@ -221,16 +201,12 @@
1962 allwinner,pins = "PG12";
1966 - allwinner,pins = "PG11";
1970 pinctrl-names = "default";
1971 pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
1972 usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
1973 usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
1974 usb0_vbus-supply = <®_usb0_vbus>;
1975 - usb1_vbus-supply = <®_usb1_vbus>;
1976 + usb1_vbus-supply = <®_ldo3>;
1979 diff --git a/arch/arm/dts/sun5i-a13-utoo-p66.dts b/arch/arm/dts/sun5i-a13-utoo-p66.dts
1980 index eb793d5..fa9ddfd 100644
1981 --- a/arch/arm/dts/sun5i-a13-utoo-p66.dts
1982 +++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts
1984 #include <dt-bindings/input/input.h>
1985 #include <dt-bindings/interrupt-controller/irq.h>
1986 #include <dt-bindings/pinctrl/sun4i-a10.h>
1987 +#include <dt-bindings/pwm/pwm.h>
1991 compatible = "utoo,p66", "allwinner,sun5i-a13";
1993 + backlight: backlight {
1994 + compatible = "pwm-backlight";
1995 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
1996 + /* Note levels of 10 / 20% result in backlight off */
1997 + brightness-levels = <0 30 40 50 60 70 80 90 100>;
1998 + default-brightness-level = <6>;
1999 + /* TODO: backlight uses axp gpio1 as enable pin */
2003 /* The lcd panel i2c interface is hooked up via gpios */
2004 compatible = "i2c-gpio";
2010 + pinctrl-names = "default";
2011 + pinctrl-0 = <&codec_pa_pin>;
2012 + allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
2017 cpu-supply = <®_dcdc2>;
2019 @@ -158,6 +175,13 @@
2023 + codec_pa_pin: codec_pa_pin@0 {
2024 + allwinner,pins = "PG3";
2025 + allwinner,function = "gpio_out";
2026 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2027 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2030 mmc0_cd_pin_p66: mmc0_cd_pin@0 {
2031 allwinner,pins = "PG0";
2032 allwinner,function = "gpio_in";
2033 @@ -201,6 +225,12 @@
2038 + pinctrl-names = "default";
2039 + pinctrl-0 = <&pwm0_pins>;
2044 regulator-always-on;
2045 regulator-min-microvolt = <1000000>;
2046 diff --git a/arch/arm/dts/sun5i-q8-common.dtsi b/arch/arm/dts/sun5i-q8-common.dtsi
2047 index 0641d68..a78e189 100644
2048 --- a/arch/arm/dts/sun5i-q8-common.dtsi
2049 +++ b/arch/arm/dts/sun5i-q8-common.dtsi
2052 #include "sunxi-q8-common.dtsi"
2054 +#include <dt-bindings/pwm/pwm.h>
2061 + backlight: backlight {
2062 + compatible = "pwm-backlight";
2063 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
2064 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
2065 + default-brightness-level = <8>;
2066 + /* TODO: backlight uses axp gpio1 as enable pin */
2070 stdout-path = "serial0:115200n8";
2072 diff --git a/arch/arm/dts/sun5i-r8-chip.dts b/arch/arm/dts/sun5i-r8-chip.dts
2073 index abf3ccb..6ad19e2 100644
2074 --- a/arch/arm/dts/sun5i-r8-chip.dts
2075 +++ b/arch/arm/dts/sun5i-r8-chip.dts
2078 stdout-path = "serial0:115200n8";
2081 + wifi_reg_on: wifi_reg_on {
2082 + compatible = "regulator-fixed";
2083 + pinctrl-names = "default";
2084 + pinctrl-0 = <&chip_wifi_reg_on_pin>;
2086 + regulator-name = "wifi-reg-on";
2087 + regulator-min-microvolt = <3300000>;
2088 + regulator-max-microvolt = <3300000>;
2089 + gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
2090 + enable-active-high;
2099 + cpu-supply = <®_dcdc2>;
2103 @@ -109,10 +129,14 @@
2108 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2112 pinctrl-names = "default";
2113 pinctrl-0 = <&mmc0_pins_a>;
2114 - vmmc-supply = <®_vcc3v3>;
2115 + vmmc-supply = <&wifi_reg_on>;
2119 @@ -134,6 +158,13 @@
2120 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2123 + chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
2124 + allwinner,pins = "PC19";
2125 + allwinner,function = "gpio_out";
2126 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2127 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2130 chip_id_det_pin: chip_id_det_pin@0 {
2131 allwinner,pins = "PG2";
2132 allwinner,function = "gpio_in";
2133 @@ -167,6 +198,20 @@
2134 regulator-always-on;
2138 + regulator-min-microvolt = <3300000>;
2139 + regulator-max-microvolt = <3300000>;
2140 + regulator-name = "vdd-wifi1";
2141 + regulator-always-on;
2145 + regulator-min-microvolt = <3300000>;
2146 + regulator-max-microvolt = <3300000>;
2147 + regulator-name = "vdd-wifi2";
2148 + regulator-always-on;
2152 regulator-min-microvolt = <1800000>;
2153 regulator-max-microvolt = <1800000>;
2154 diff --git a/arch/arm/dts/sun5i.dtsi b/arch/arm/dts/sun5i.dtsi
2155 index 9ffee9b..59a9426 100644
2156 --- a/arch/arm/dts/sun5i.dtsi
2157 +++ b/arch/arm/dts/sun5i.dtsi
2160 #include "skeleton.dtsi"
2162 +#include <dt-bindings/clock/sun4i-a10-pll2.h>
2163 #include <dt-bindings/dma/sun4i-a10.h>
2164 #include <dt-bindings/pinctrl/sun4i-a10.h>
2166 @@ -102,6 +103,15 @@
2167 clock-output-names = "pll1";
2170 + pll2: clk@01c20008 {
2171 + #clock-cells = <1>;
2172 + compatible = "allwinner,sun5i-a13-pll2-clk";
2173 + reg = <0x01c20008 0x8>;
2174 + clocks = <&osc24M>;
2175 + clock-output-names = "pll2-1x", "pll2-2x",
2176 + "pll2-4x", "pll2-8x";
2179 pll4: clk@01c20018 {
2181 compatible = "allwinner,sun4i-a10-pll1-clk";
2182 @@ -285,6 +295,14 @@
2183 clock-output-names = "usb_ohci0", "usb_phy";
2186 + codec_clk: clk@01c20140 {
2187 + #clock-cells = <0>;
2188 + compatible = "allwinner,sun4i-a10-codec-clk";
2189 + reg = <0x01c20140 0x4>;
2190 + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
2191 + clock-output-names = "codec";
2194 mbus_clk: clk@01c2015c {
2196 compatible = "allwinner,sun5i-a13-mbus-clk";
2197 @@ -571,6 +589,19 @@
2198 status = "disabled";
2201 + codec: codec@01c22c00 {
2202 + #sound-dai-cells = <0>;
2203 + compatible = "allwinner,sun4i-a10-codec";
2204 + reg = <0x01c22c00 0x40>;
2205 + interrupts = <30>;
2206 + clocks = <&apb0_gates 0>, <&codec_clk>;
2207 + clock-names = "apb", "codec";
2208 + dmas = <&dma SUN4I_DMA_NORMAL 19>,
2209 + <&dma SUN4I_DMA_NORMAL 19>;
2210 + dma-names = "rx", "tx";
2211 + status = "disabled";
2214 sid: eeprom@01c23800 {
2215 compatible = "allwinner,sun4i-a10-sid";
2216 reg = <0x01c23800 0x10>;
2217 diff --git a/arch/arm/dts/sun6i-a31-colombus.dts b/arch/arm/dts/sun6i-a31-colombus.dts
2218 index 0d0b6f2..f9cf368 100644
2219 --- a/arch/arm/dts/sun6i-a31-colombus.dts
2220 +++ b/arch/arm/dts/sun6i-a31-colombus.dts
2223 stdout-path = "serial0:115200n8";
2227 + /* The lcd panel i2c interface is hooked up via gpios */
2228 + compatible = "i2c-gpio";
2229 + pinctrl-names = "default";
2230 + pinctrl-0 = <&i2c_lcd_pins>;
2231 + gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
2232 + <&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
2233 + i2c-gpio,delay-us = <5>;
2239 pinctrl-names = "default";
2240 pinctrl-0 = <&i2c2_pins_a>;
2243 + mma8452: mma8452@1d {
2244 + compatible = "fsl,mma8452";
2246 + interrupt-parent = <&pio>;
2247 + interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
2252 @@ -124,6 +141,13 @@
2253 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2254 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2257 + i2c_lcd_pins: i2c_lcd_pin@0 {
2258 + allwinner,pins = "PA23", "PA24";
2259 + allwinner,function = "gpio_out";
2260 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2261 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2266 diff --git a/arch/arm/dts/sun6i-a31-hummingbird.dts b/arch/arm/dts/sun6i-a31-hummingbird.dts
2267 index d0cfada..9a74637 100644
2268 --- a/arch/arm/dts/sun6i-a31-hummingbird.dts
2269 +++ b/arch/arm/dts/sun6i-a31-hummingbird.dts
2271 compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
2284 + cpu-supply = <®_dcdc3>;
2292 pinctrl-names = "default";
2293 - pinctrl-0 = <&gmac_pins_rgmii_a>;
2294 + pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
2297 snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
2300 pinctrl-names = "default";
2301 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
2302 - vmmc-supply = <&vcc_3v0>;
2303 + vmmc-supply = <®_dcdc1>;
2305 cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
2309 pinctrl-names = "default";
2310 pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
2311 - vmmc-supply = <&vcc_wifi>;
2312 + vmmc-supply = <®_aldo1>;
2313 mmc-pwrseq = <&wifi_pwrseq>;
2316 @@ -146,6 +152,13 @@
2320 + gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 {
2321 + allwinner,pins = "PA21";
2322 + allwinner,function = "gpio_out";
2323 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2324 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2327 mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
2328 allwinner,pins = "PA8";
2329 allwinner,function = "gpio_in";
2330 @@ -164,70 +177,69 @@
2336 compatible = "x-powers,axp221";
2338 interrupt-parent = <&nmi_intc>;
2339 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2340 - interrupt-controller;
2341 - #interrupt-cells = <1>;
2342 - dcdc1-supply = <&vcc_3v0>;
2343 - dcdc5-supply = <&vcc_dram>;
2346 - x-powers,dcdc-freq = <3000>;
2349 - regulator-always-on;
2350 - regulator-min-microvolt = <3000000>;
2351 - regulator-max-microvolt = <3000000>;
2352 - regulator-name = "vcc-3v0";
2356 - regulator-always-on;
2357 - regulator-min-microvolt = <700000>;
2358 - regulator-max-microvolt = <1320000>;
2359 - regulator-name = "vdd-cpu";
2363 - regulator-always-on;
2364 - regulator-min-microvolt = <700000>;
2365 - regulator-max-microvolt = <1320000>;
2366 - regulator-name = "vdd-gpu";
2369 - vdd_sys_dll: dcdc4 {
2370 - regulator-always-on;
2371 - regulator-min-microvolt = <1100000>;
2372 - regulator-max-microvolt = <1100000>;
2373 - regulator-name = "vdd-sys-dll";
2377 - regulator-always-on;
2378 - regulator-min-microvolt = <1500000>;
2379 - regulator-max-microvolt = <1500000>;
2380 - regulator-name = "vcc-dram";
2384 - regulator-min-microvolt = <3300000>;
2385 - regulator-max-microvolt = <3300000>;
2386 - regulator-name = "vcc_wifi";
2390 - regulator-always-on;
2391 - regulator-min-microvolt = <3000000>;
2392 - regulator-max-microvolt = <3000000>;
2393 - regulator-name = "avcc";
2399 +#include "axp22x.dtsi"
2402 + regulator-min-microvolt = <3300000>;
2403 + regulator-max-microvolt = <3300000>;
2404 + regulator-name = "vcc-wifi";
2408 + regulator-always-on;
2409 + regulator-min-microvolt = <2700000>;
2410 + regulator-max-microvolt = <3300000>;
2411 + regulator-name = "avcc";
2415 + regulator-min-microvolt = <700000>;
2416 + regulator-max-microvolt = <1320000>;
2417 + regulator-name = "vdd-cpus";
2421 + regulator-always-on;
2422 + regulator-min-microvolt = <3000000>;
2423 + regulator-max-microvolt = <3000000>;
2424 + regulator-name = "vcc-3v0";
2428 + regulator-min-microvolt = <700000>;
2429 + regulator-max-microvolt = <1320000>;
2430 + regulator-name = "vdd-gpu";
2434 + regulator-always-on;
2435 + regulator-min-microvolt = <700000>;
2436 + regulator-max-microvolt = <1320000>;
2437 + regulator-name = "vdd-cpu";
2441 + regulator-always-on;
2442 + regulator-min-microvolt = <700000>;
2443 + regulator-max-microvolt = <1320000>;
2444 + regulator-name = "vdd-sys-dll";
2448 + regulator-always-on;
2449 + regulator-min-microvolt = <1500000>;
2450 + regulator-max-microvolt = <1500000>;
2451 + regulator-name = "vcc-dram";
2455 gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
2457 diff --git a/arch/arm/dts/sun6i-a31.dtsi b/arch/arm/dts/sun6i-a31.dtsi
2458 index 44f889f..1867af2 100644
2459 --- a/arch/arm/dts/sun6i-a31.dtsi
2460 +++ b/arch/arm/dts/sun6i-a31.dtsi
2466 + simplefb_hdmi: framebuffer@0 {
2467 compatible = "allwinner,simple-framebuffer",
2468 "simple-framebuffer";
2469 allwinner,pipeline = "de_be0-lcd0-hdmi";
2471 status = "disabled";
2475 + simplefb_lcd: framebuffer@1 {
2476 compatible = "allwinner,simple-framebuffer",
2477 "simple-framebuffer";
2478 allwinner,pipeline = "de_be0-lcd0";
2479 @@ -252,6 +252,20 @@
2480 compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
2481 reg = <0x01c20060 0x8>;
2483 + clock-indices = <1>, <5>,
2497 clock-output-names = "ahb1_mipidsi", "ahb1_ss",
2498 "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
2499 "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
2501 compatible = "allwinner,sun6i-a31-apb1-gates-clk";
2502 reg = <0x01c20068 0x4>;
2504 + clock-indices = <0>, <4>,
2507 clock-output-names = "apb1_codec", "apb1_digital_mic",
2508 "apb1_pio", "apb1_daudio0",
2510 @@ -299,6 +316,10 @@
2511 compatible = "allwinner,sun6i-a31-apb2-gates-clk";
2512 reg = <0x01c2006c 0x4>;
2514 + clock-indices = <0>, <1>,
2518 clock-output-names = "apb2_i2c0", "apb2_i2c1",
2519 "apb2_i2c2", "apb2_i2c3",
2520 "apb2_uart0", "apb2_uart1",
2521 @@ -346,6 +367,14 @@
2525 + ss_clk: clk@01c2009c {
2526 + #clock-cells = <0>;
2527 + compatible = "allwinner,sun4i-a10-mod0-clk";
2528 + reg = <0x01c2009c 0x4>;
2529 + clocks = <&osc24M>, <&pll6 0>;
2530 + clock-output-names = "ss";
2533 spi0_clk: clk@01c200a0 {
2535 compatible = "allwinner,sun4i-a10-mod0-clk";
2537 compatible = "allwinner,sun6i-a31-usb-clk";
2538 reg = <0x01c200cc 0x4>;
2540 + clock-indices = <8>, <9>, <10>,
2543 clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
2544 "usb_ohci0", "usb_ohci1",
2546 @@ -677,6 +709,16 @@
2547 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2550 + mmc3_8bit_emmc_pins: mmc3@1 {
2551 + allwinner,pins = "PC6", "PC7", "PC8", "PC9",
2552 + "PC10", "PC11", "PC12",
2553 + "PC13", "PC14", "PC15",
2555 + allwinner,function = "mmc3";
2556 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
2557 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2560 gmac_pins_mii_a: gmac_mii@0 {
2561 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
2562 "PA8", "PA9", "PA11",
2563 @@ -754,6 +796,13 @@
2564 reg = <0x01c20ca0 0x20>;
2567 + lradc: lradc@01c22800 {
2568 + compatible = "allwinner,sun4i-a10-lradc-keys";
2569 + reg = <0x01c22800 0x100>;
2570 + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
2571 + status = "disabled";
2575 compatible = "allwinner,sun6i-a31-ts";
2576 reg = <0x01c25000 0x100>;
2577 @@ -900,6 +949,16 @@
2581 + crypto: crypto-engine@01c15000 {
2582 + compatible = "allwinner,sun4i-a10-crypto";
2583 + reg = <0x01c15000 0x1000>;
2584 + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
2585 + clocks = <&ahb1_gates 5>, <&ss_clk>;
2586 + clock-names = "ahb", "mod";
2587 + resets = <&ahb1_rst 5>;
2588 + reset-names = "ahb";
2592 compatible = "allwinner,sun6i-a31-hstimer",
2593 "allwinner,sun7i-a20-hstimer";
2594 @@ -1061,7 +1120,7 @@
2595 resets = <&apb0_rst 0>;
2597 interrupt-controller;
2598 - #interrupt-cells = <2>;
2599 + #interrupt-cells = <3>;
2603 diff --git a/arch/arm/dts/sun6i-a31s-primo81.dts b/arch/arm/dts/sun6i-a31s-primo81.dts
2604 index cfdc03e..379746a 100644
2605 --- a/arch/arm/dts/sun6i-a31s-primo81.dts
2606 +++ b/arch/arm/dts/sun6i-a31s-primo81.dts
2609 - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
2610 + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
2611 + * Copyright 2015 Karsten Merker <merker@debian.org>
2612 + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
2614 - * Minimal dts file for the MSI Primo81 for u-boot only
2615 + * This file is dual-licensed: you can use it either under the terms
2616 + * of the GPL or the X11 license, at your option. Note that this dual
2617 + * licensing only applies to this file, and not this project as a
2620 - * SPDX-License-Identifier: GPL-2.0+ or X11
2621 + * a) This file is free software; you can redistribute it and/or
2622 + * modify it under the terms of the GNU General Public License as
2623 + * published by the Free Software Foundation; either version 2 of the
2624 + * License, or (at your option) any later version.
2626 + * This file is distributed in the hope that it will be useful,
2627 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2628 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2629 + * GNU General Public License for more details.
2631 + * Or, alternatively,
2633 + * b) Permission is hereby granted, free of charge, to any person
2634 + * obtaining a copy of this software and associated documentation
2635 + * files (the "Software"), to deal in the Software without
2636 + * restriction, including without limitation the rights to use,
2637 + * copy, modify, merge, publish, distribute, sublicense, and/or
2638 + * sell copies of the Software, and to permit persons to whom the
2639 + * Software is furnished to do so, subject to the following
2642 + * The above copyright notice and this permission notice shall be
2643 + * included in all copies or substantial portions of the Software.
2645 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2646 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
2647 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2648 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
2649 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2650 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2651 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2652 + * OTHER DEALINGS IN THE SOFTWARE.
2656 #include "sun6i-a31s.dtsi"
2657 +#include "sunxi-common-regulators.dtsi"
2659 +#include <dt-bindings/gpio/gpio.h>
2660 +#include <dt-bindings/input/input.h>
2661 +#include <dt-bindings/pinctrl/sun4i-a10.h>
2664 - model = "MSI Primo81";
2665 + model = "MSI Primo81 tablet";
2666 compatible = "msi,primo81", "allwinner,sun6i-a31s";
2675 + cpu-supply = <®_dcdc3>;
2679 + /* rtl8188etv wifi is connected here */
2684 + /* pull-ups and device VDDIO use AXP221 DLDO3 */
2685 + pinctrl-names = "default";
2686 + pinctrl-0 = <&i2c0_pins_a>;
2687 + status = "failed";
2691 + pinctrl-names = "default";
2692 + pinctrl-0 = <&i2c1_pins_a>;
2696 + pinctrl-names = "default";
2697 + pinctrl-0 = <>911_int_primo81>;
2698 + compatible = "goodix,gt911";
2700 + interrupt-parent = <&pio>;
2701 + interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
2702 + touchscreen-swapped-x-y;
2707 pinctrl-names = "default";
2708 - pinctrl-0 = <&uart0_pins_a>;
2709 + pinctrl-0 = <&i2c2_pins_a>;
2712 + accelerometer@1c {
2713 + pinctrl-names = "default";
2714 + pinctrl-0 = <&mma8452_int_primo81>;
2715 + compatible = "fsl,mma8452";
2717 + interrupt-parent = <&pio>;
2718 + interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
2719 + #io-channel-cells = <1>;
2724 + vref-supply = <®_aldo3>;
2728 + label = "Volume Up";
2729 + linux,code = <KEY_VOLUMEUP>;
2731 + voltage = <158730>;
2735 + label = "Volume Down";
2736 + linux,code = <KEY_VOLUMEDOWN>;
2738 + voltage = <349206>;
2743 + pinctrl-names = "default";
2744 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
2745 + vmmc-supply = <®_dcdc1>;
2747 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
2753 + gt911_int_primo81: gt911_int_pin@0 {
2754 + allwinner,pins = "PA3";
2755 + allwinner,function = "gpio_in";
2756 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2757 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2760 + mma8452_int_primo81: mma8452_int_pin@0 {
2761 + allwinner,pins = "PA9";
2762 + allwinner,function = "gpio_in";
2763 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2764 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2767 + mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
2768 + allwinner,pins = "PA8";
2769 + allwinner,function = "gpio_in";
2770 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2771 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2779 + compatible = "x-powers,axp221";
2781 + interrupt-parent = <&nmi_intc>;
2782 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2786 +#include "axp22x.dtsi"
2789 + regulator-always-on;
2790 + regulator-min-microvolt = <2700000>;
2791 + regulator-max-microvolt = <3300000>;
2792 + regulator-name = "avcc";
2796 + regulator-min-microvolt = <3000000>;
2797 + regulator-max-microvolt = <3000000>;
2798 + regulator-name = "vcc-lcd";
2802 + regulator-min-microvolt = <700000>;
2803 + regulator-max-microvolt = <1320000>;
2804 + regulator-name = "vdd-cpus"; /* This is an educated guess */
2808 + regulator-always-on;
2809 + regulator-min-microvolt = <3000000>;
2810 + regulator-max-microvolt = <3000000>;
2811 + regulator-name = "vcc-3v0";
2815 + regulator-min-microvolt = <700000>;
2816 + regulator-max-microvolt = <1320000>;
2817 + regulator-name = "vdd-gpu";
2821 + regulator-always-on;
2822 + regulator-min-microvolt = <700000>;
2823 + regulator-max-microvolt = <1320000>;
2824 + regulator-name = "vdd-cpu";
2828 + regulator-always-on;
2829 + regulator-min-microvolt = <700000>;
2830 + regulator-max-microvolt = <1320000>;
2831 + regulator-name = "vdd-sys-dll";
2835 + regulator-always-on;
2836 + regulator-min-microvolt = <1500000>;
2837 + regulator-max-microvolt = <1500000>;
2838 + regulator-name = "vcc-dram";
2842 + regulator-min-microvolt = <3300000>;
2843 + regulator-max-microvolt = <3300000>;
2844 + regulator-name = "vcc-wifi";
2848 + regulator-min-microvolt = <2800000>;
2849 + regulator-max-microvolt = <2800000>;
2850 + regulator-name = "vddio-csi";
2854 + regulator-min-microvolt = <1080000>;
2855 + regulator-max-microvolt = <1320000>;
2856 + regulator-name = "vdd-mipi-bridge";
2860 + vcc-lcd-supply = <®_dc1sw>;
2861 + vdd-mipi-bridge-supply = <®_eldo3>;
2865 + /* otg support requires support for AXP221 usb-power-supply and GPIO */
2871 + usb1_vbus-supply = <®_dldo1>;
2874 diff --git a/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
2875 new file mode 100644
2876 index 0000000..4ec0c86
2878 +++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
2881 + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
2883 + * This file is dual-licensed: you can use it either under the terms
2884 + * of the GPL or the X11 license, at your option. Note that this dual
2885 + * licensing only applies to this file, and not this project as a
2888 + * a) This file is free software; you can redistribute it and/or
2889 + * modify it under the terms of the GNU General Public License as
2890 + * published by the Free Software Foundation; either version 2 of the
2891 + * License, or (at your option) any later version.
2893 + * This file is distributed in the hope that it will be useful,
2894 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2895 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2896 + * GNU General Public License for more details.
2898 + * Or, alternatively,
2900 + * b) Permission is hereby granted, free of charge, to any person
2901 + * obtaining a copy of this software and associated documentation
2902 + * files (the "Software"), to deal in the Software without
2903 + * restriction, including without limitation the rights to use,
2904 + * copy, modify, merge, publish, distribute, sublicense, and/or
2905 + * sell copies of the Software, and to permit persons to whom the
2906 + * Software is furnished to do so, subject to the following
2909 + * The above copyright notice and this permission notice shall be
2910 + * included in all copies or substantial portions of the Software.
2912 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2913 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
2914 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2915 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
2916 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2917 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2918 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2919 + * OTHER DEALINGS IN THE SOFTWARE.
2923 +#include "sun6i-a31s.dtsi"
2924 +#include "sunxi-common-regulators.dtsi"
2926 +#include <dt-bindings/gpio/gpio.h>
2927 +#include <dt-bindings/pinctrl/sun4i-a10.h>
2930 + model = "Sinlinx SinA31s Core Board";
2931 + compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
2939 + cpu-supply = <®_dcdc3>;
2942 +/* eMMC on core board */
2944 + pinctrl-names = "default";
2945 + pinctrl-0 = <&mmc3_8bit_emmc_pins>;
2946 + vmmc-supply = <®_dcdc1>;
2947 + vqmmc-supply = <®_dcdc1>;
2954 +/* AXP221s PMIC on core board */
2959 + compatible = "x-powers,axp221";
2961 + interrupt-parent = <&nmi_intc>;
2962 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2966 +#include "axp22x.dtsi"
2969 + regulator-always-on;
2970 + regulator-min-microvolt = <2700000>;
2971 + regulator-max-microvolt = <3300000>;
2972 + regulator-name = "avcc";
2976 + regulator-min-microvolt = <700000>;
2977 + regulator-max-microvolt = <1320000>;
2978 + regulator-name = "vdd-cpus";
2982 + regulator-always-on;
2983 + regulator-min-microvolt = <3000000>;
2984 + regulator-max-microvolt = <3000000>;
2985 + regulator-name = "vcc-3v0";
2989 + regulator-min-microvolt = <700000>;
2990 + regulator-max-microvolt = <1320000>;
2991 + regulator-name = "vdd-gpu";
2995 + regulator-always-on;
2996 + regulator-min-microvolt = <700000>;
2997 + regulator-max-microvolt = <1320000>;
2998 + regulator-name = "vdd-cpu";
3002 + regulator-always-on;
3003 + regulator-min-microvolt = <700000>;
3004 + regulator-max-microvolt = <1320000>;
3005 + regulator-name = "vdd-sys-dll";
3009 + regulator-always-on;
3010 + regulator-min-microvolt = <1500000>;
3011 + regulator-max-microvolt = <1500000>;
3012 + regulator-name = "vcc-dram";
3015 +/* UART0 pads available on core board */
3017 + pinctrl-names = "default";
3018 + pinctrl-0 = <&uart0_pins_a>;
3022 diff --git a/arch/arm/dts/sun6i-a31s-sina31s.dts b/arch/arm/dts/sun6i-a31s-sina31s.dts
3023 new file mode 100644
3024 index 0000000..6ead2f5
3026 +++ b/arch/arm/dts/sun6i-a31s-sina31s.dts
3029 + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
3031 + * This file is dual-licensed: you can use it either under the terms
3032 + * of the GPL or the X11 license, at your option. Note that this dual
3033 + * licensing only applies to this file, and not this project as a
3036 + * a) This file is free software; you can redistribute it and/or
3037 + * modify it under the terms of the GNU General Public License as
3038 + * published by the Free Software Foundation; either version 2 of the
3039 + * License, or (at your option) any later version.
3041 + * This file is distributed in the hope that it will be useful,
3042 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3043 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3044 + * GNU General Public License for more details.
3046 + * Or, alternatively,
3048 + * b) Permission is hereby granted, free of charge, to any person
3049 + * obtaining a copy of this software and associated documentation
3050 + * files (the "Software"), to deal in the Software without
3051 + * restriction, including without limitation the rights to use,
3052 + * copy, modify, merge, publish, distribute, sublicense, and/or
3053 + * sell copies of the Software, and to permit persons to whom the
3054 + * Software is furnished to do so, subject to the following
3057 + * The above copyright notice and this permission notice shall be
3058 + * included in all copies or substantial portions of the Software.
3060 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3061 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3062 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3063 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3064 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3065 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3066 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3067 + * OTHER DEALINGS IN THE SOFTWARE.
3070 +/* The SinA31s development board has the SinA31s core board soldered on */
3071 +#include "sun6i-a31s-sina31s-core.dtsi"
3073 +#include <dt-bindings/input/input.h>
3076 + model = "Sinlinx SinA31s Development Board";
3077 + compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
3080 + stdout-path = "serial0:115200n8";
3084 + compatible = "gpio-leds";
3085 + pinctrl-names = "default";
3086 + pinctrl-0 = <&led_pin_sina31s>;
3089 + label = "sina31s:status:usr";
3090 + gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
3096 + /* USB 2.0 4 port hub IC */
3105 + pinctrl-names = "default";
3106 + pinctrl-0 = <&gmac_pins_mii_a>;
3109 + phy-supply = <®_dldo1>;
3112 + phy1: ethernet-phy@1 {
3118 + pinctrl-names = "default";
3119 + pinctrl-0 = <&ir_pins_a>;
3124 + vref-supply = <®_aldo3>;
3128 + label = "Volume Up";
3129 + linux,code = <KEY_VOLUMEUP>;
3131 + voltage = <158730>;
3135 + label = "Volume Down";
3136 + linux,code = <KEY_VOLUMEDOWN>;
3138 + voltage = <349206>;
3143 + pinctrl-names = "default";
3144 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
3145 + vmmc-supply = <®_dcdc1>;
3147 + cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
3157 + led_pin_sina31s: led_pin@0 {
3158 + allwinner,pins = "PH13";
3159 + allwinner,function = "gpio_out";
3160 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3161 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3164 + mmc0_cd_pin_sina31s: mmc0_cd_pin@0 {
3165 + allwinner,pins = "PA4";
3166 + allwinner,function = "gpio_in";
3167 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3168 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3173 + regulator-min-microvolt = <3300000>;
3174 + regulator-max-microvolt = <3300000>;
3175 + regulator-name = "vcc-gmac-phy";
3181 diff --git a/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
3182 new file mode 100644
3183 index 0000000..360adfb
3185 +++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
3188 + * Copyright 2015 Lawrence Yu <lyu@micile.com>
3190 + * This file is dual-licensed: you can use it either under the terms
3191 + * of the GPL or the X11 license, at your option. Note that this dual
3192 + * licensing only applies to this file, and not this project as a
3195 + * a) This file is free software; you can redistribute it and/or
3196 + * modify it under the terms of the GNU General Public License as
3197 + * published by the Free Software Foundation; either version 2 of the
3198 + * License, or (at your option) any later version.
3200 + * This file is distributed in the hope that it will be useful,
3201 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3202 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3203 + * GNU General Public License for more details.
3205 + * Or, alternatively,
3207 + * b) Permission is hereby granted, free of charge, to any person
3208 + * obtaining a copy of this software and associated documentation
3209 + * files (the "Software"), to deal in the Software without
3210 + * restriction, including without limitation the rights to use,
3211 + * copy, modify, merge, publish, distribute, sublicense, and/or
3212 + * sell copies of the Software, and to permit persons to whom the
3213 + * Software is furnished to do so, subject to the following
3216 + * The above copyright notice and this permission notice shall be
3217 + * included in all copies or substantial portions of the Software.
3219 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3220 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3221 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3222 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3223 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3224 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3225 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3226 + * OTHER DEALINGS IN THE SOFTWARE.
3230 +#include "sun6i-a31s.dtsi"
3231 +#include "sunxi-common-regulators.dtsi"
3233 +#include <dt-bindings/gpio/gpio.h>
3234 +#include <dt-bindings/pinctrl/sun4i-a10.h>
3237 + model = "Yones TopTech BS1078 v2 Tablet";
3238 + compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
3247 + stdout-path = "serial0:115200n8";
3252 + pinctrl-names = "default";
3253 + pinctrl-0 = <&i2c1_pins_a>;
3258 + pinctrl-names = "default";
3259 + pinctrl-0 = <&i2c2_pins_a>;
3280 + mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 {
3281 + allwinner,pins = "PA8";
3282 + allwinner,function = "gpio_in";
3283 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3284 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3289 + pinctrl-names = "default";
3290 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
3291 + vmmc-supply = <®_vcc3v0>;
3293 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
3299 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3306 + compatible = "x-powers,axp221";
3308 + interrupt-parent = <&nmi_intc>;
3309 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3313 +#include "axp22x.dtsi"
3316 + regulator-always-on;
3317 + regulator-min-microvolt = <2700000>;
3318 + regulator-max-microvolt = <3300000>;
3319 + regulator-name = "avcc";
3323 + regulator-name = "vcc-lcd-usb2";
3324 + regulator-min-microvolt = <3000000>;
3325 + regulator-max-microvolt = <3000000>;
3329 + regulator-min-microvolt = <700000>;
3330 + regulator-max-microvolt = <1320000>;
3331 + regulator-name = "vdd-cpus";
3335 + regulator-always-on;
3336 + regulator-min-microvolt = <3000000>;
3337 + regulator-max-microvolt = <3000000>;
3338 + regulator-name = "vcc-3v0";
3342 + regulator-min-microvolt = <700000>;
3343 + regulator-max-microvolt = <1320000>;
3344 + regulator-name = "vdd-gpu";
3348 + regulator-always-on;
3349 + regulator-min-microvolt = <700000>;
3350 + regulator-max-microvolt = <1320000>;
3351 + regulator-name = "vdd-cpu";
3355 + regulator-always-on;
3356 + regulator-min-microvolt = <700000>;
3357 + regulator-max-microvolt = <1320000>;
3358 + regulator-name = "vdd-sys-dll";
3362 + regulator-always-on;
3363 + regulator-min-microvolt = <1500000>;
3364 + regulator-max-microvolt = <1500000>;
3365 + regulator-name = "vcc-dram";
3369 + regulator-min-microvolt = <3300000>;
3370 + regulator-max-microvolt = <3300000>;
3371 + regulator-name = "vcc-wifi";
3374 +/* Voltage source for I2C pullup resistors for I2C Bus 0 */
3376 + regulator-min-microvolt = <2800000>;
3377 + regulator-max-microvolt = <2800000>;
3378 + regulator-name = "vddio-csi";
3382 + pinctrl-names = "default";
3383 + pinctrl-0 = <&uart0_pins_a>;
3388 + usb1_vbus-supply = <®_dldo1>;
3389 + usb2_vbus-supply = <®_dc1sw>;
3392 diff --git a/arch/arm/dts/sun7i-a20-bananapi.dts b/arch/arm/dts/sun7i-a20-bananapi.dts
3393 index 9f7b472..67c8a76 100644
3394 --- a/arch/arm/dts/sun7i-a20-bananapi.dts
3395 +++ b/arch/arm/dts/sun7i-a20-bananapi.dts
3405 + cpu-supply = <®_dcdc2>;
3406 + operating-points = <
3421 @@ -119,13 +137,9 @@
3425 - compatible = "x-powers,axp209";
3427 interrupt-parent = <&nmi_intc>;
3428 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3430 - interrupt-controller;
3431 - #interrupt-cells = <1>;
3435 @@ -159,7 +173,18 @@
3444 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
3445 + allwinner,pins = "PH4";
3446 + allwinner,function = "gpio_in";
3447 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3448 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3451 mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
3452 allwinner,pins = "PH10";
3453 allwinner,function = "gpio_in";
3454 @@ -182,6 +207,37 @@
3458 +#include "axp209.dtsi"
3461 + regulator-always-on;
3462 + regulator-min-microvolt = <1000000>;
3463 + regulator-max-microvolt = <1400000>;
3464 + regulator-name = "vdd-cpu";
3468 + regulator-always-on;
3469 + regulator-min-microvolt = <1000000>;
3470 + regulator-max-microvolt = <1400000>;
3471 + regulator-name = "vdd-int-dll";
3475 + regulator-name = "vdd-rtc";
3479 + regulator-always-on;
3480 + regulator-min-microvolt = <3000000>;
3481 + regulator-max-microvolt = <3000000>;
3482 + regulator-name = "avcc";
3492 @@ -216,7 +272,21 @@
3501 +&usb_power_supply {
3506 + pinctrl-names = "default";
3507 + pinctrl-0 = <&usb0_id_detect_pin>;
3508 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
3509 + usb0_vbus_power-supply = <&usb_power_supply>;
3510 + usb0_vbus-supply = <®_usb0_vbus>;
3511 usb1_vbus-supply = <®_usb1_vbus>;
3512 usb2_vbus-supply = <®_usb2_vbus>;
3514 diff --git a/arch/arm/dts/sun7i-a20-cubieboard2.dts b/arch/arm/dts/sun7i-a20-cubieboard2.dts
3515 index 39a51d5..1fa832d 100644
3516 --- a/arch/arm/dts/sun7i-a20-cubieboard2.dts
3517 +++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts
3527 cpu-supply = <®_dcdc2>;
3529 @@ -150,6 +154,10 @@
3538 led_pins_cubieboard2: led_pins@0 {
3539 allwinner,pins = "PH20", "PH21";
3540 @@ -157,12 +165,24 @@
3541 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3542 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3545 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
3546 + allwinner,pins = "PH4";
3547 + allwinner,function = "gpio_in";
3548 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3549 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3562 #include "axp209.dtsi"
3569 + pinctrl-names = "default";
3570 + pinctrl-0 = <&usb0_id_detect_pin>;
3571 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
3572 usb1_vbus-supply = <®_usb1_vbus>;
3573 usb2_vbus-supply = <®_usb2_vbus>;
3575 diff --git a/arch/arm/dts/sun7i-a20-cubietruck.dts b/arch/arm/dts/sun7i-a20-cubietruck.dts
3576 index e6b0192..8da939a 100644
3577 --- a/arch/arm/dts/sun7i-a20-cubietruck.dts
3578 +++ b/arch/arm/dts/sun7i-a20-cubietruck.dts
3579 @@ -101,6 +101,10 @@
3588 cpu-supply = <®_dcdc2>;
3590 diff --git a/arch/arm/dts/sun7i-a20-icnova-swac.dts b/arch/arm/dts/sun7i-a20-icnova-swac.dts
3591 new file mode 100644
3592 index 0000000..f5b5325
3594 +++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts
3597 + * Copyright 2015 Stefan Roese <sr@denx.de>
3599 + * This file is dual-licensed: you can use it either under the terms
3600 + * of the GPL or the X11 license, at your option. Note that this dual
3601 + * licensing only applies to this file, and not this project as a
3604 + * a) This file is free software; you can redistribute it and/or
3605 + * modify it under the terms of the GNU General Public License as
3606 + * published by the Free Software Foundation; either version 2 of the
3607 + * License, or (at your option) any later version.
3609 + * This file is distributed in the hope that it will be useful,
3610 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3611 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3612 + * GNU General Public License for more details.
3614 + * Or, alternatively,
3616 + * b) Permission is hereby granted, free of charge, to any person
3617 + * obtaining a copy of this software and associated documentation
3618 + * files (the "Software"), to deal in the Software without
3619 + * restriction, including without limitation the rights to use,
3620 + * copy, modify, merge, publish, distribute, sublicense, and/or
3621 + * sell copies of the Software, and to permit persons to whom the
3622 + * Software is furnished to do so, subject to the following
3625 + * The above copyright notice and this permission notice shall be
3626 + * included in all copies or substantial portions of the Software.
3628 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3629 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3630 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3631 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3632 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3633 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3634 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3635 + * OTHER DEALINGS IN THE SOFTWARE.
3639 +#include "sun7i-a20.dtsi"
3640 +#include "sunxi-common-regulators.dtsi"
3642 +#include <dt-bindings/gpio/gpio.h>
3643 +#include <dt-bindings/interrupt-controller/irq.h>
3644 +#include <dt-bindings/pinctrl/sun4i-a10.h>
3647 + model = "ICnova-A20 SWAC";
3648 + compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
3655 + stdout-path = "serial0:115200n8";
3660 + cpu-supply = <®_dcdc2>;
3672 + pinctrl-names = "default";
3673 + pinctrl-0 = <&gmac_pins_mii_a>;
3678 + phy1: ethernet-phy@1 {
3684 + pinctrl-names = "default";
3685 + pinctrl-0 = <&i2c0_pins_a>;
3690 + interrupt-parent = <&nmi_intc>;
3691 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3696 + pinctrl-names = "default";
3697 + pinctrl-0 = <&i2c1_pins_a>;
3702 + pinctrl-names = "default";
3703 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
3704 + vmmc-supply = <®_vcc3v3>;
3706 + cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
3719 +#include "axp209.dtsi"
3722 + regulator-always-on;
3723 + regulator-min-microvolt = <1000000>;
3724 + regulator-max-microvolt = <1400000>;
3725 + regulator-name = "vdd-cpu";
3729 + regulator-always-on;
3730 + regulator-min-microvolt = <1000000>;
3731 + regulator-max-microvolt = <1400000>;
3732 + regulator-name = "vdd-int-dll";
3736 + regulator-name = "vdd-rtc";
3740 + regulator-always-on;
3741 + regulator-min-microvolt = <3000000>;
3742 + regulator-max-microvolt = <3000000>;
3743 + regulator-name = "avcc";
3755 + pinctrl-names = "default";
3756 + pinctrl-0 = <&uart0_pins_a>;
3761 + usb1_vbus-supply = <®_usb1_vbus>;
3762 + usb2_vbus-supply = <®_usb2_vbus>;
3765 diff --git a/arch/arm/dts/sun7i-a20-itead-ibox.dts b/arch/arm/dts/sun7i-a20-itead-ibox.dts
3766 new file mode 100644
3767 index 0000000..661c21d
3769 +++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts
3772 + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
3774 + * This file is dual-licensed: you can use it either under the terms
3775 + * of the GPL or the X11 license, at your option. Note that this dual
3776 + * licensing only applies to this file, and not this project as a
3779 + * a) This file is free software; you can redistribute it and/or
3780 + * modify it under the terms of the GNU General Public License as
3781 + * published by the Free Software Foundation; either version 2 of the
3782 + * License, or (at your option) any later version.
3784 + * This file is distributed in the hope that it will be useful,
3785 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3786 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3787 + * GNU General Public License for more details.
3789 + * Or, alternatively,
3791 + * b) Permission is hereby granted, free of charge, to any person
3792 + * obtaining a copy of this software and associated documentation
3793 + * files (the "Software"), to deal in the Software without
3794 + * restriction, including without limitation the rights to use,
3795 + * copy, modify, merge, publish, distribute, sublicense, and/or
3796 + * sell copies of the Software, and to permit persons to whom the
3797 + * Software is furnished to do so, subject to the following
3800 + * The above copyright notice and this permission notice shall be
3801 + * included in all copies or substantial portions of the Software.
3803 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3804 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3805 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3806 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3807 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3808 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3809 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3810 + * OTHER DEALINGS IN THE SOFTWARE.
3814 +#include "sun7i-a20.dtsi"
3815 +#include "sunxi-itead-core-common.dtsi"
3818 + model = "Itead Ibox A20";
3819 + compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
3822 + compatible = "gpio-leds";
3823 + pinctrl-names = "default";
3824 + pinctrl-0 = <&led_pins_itead_core>;
3827 + label = "itead_core:green:usr";
3828 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
3829 + default-state = "on";
3833 + label = "itead_core:blue:usr";
3834 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
3835 + default-state = "on";
3841 + target-supply = <®_ahci_5v>;
3850 + pinctrl-names = "default";
3851 + pinctrl-0 = <&gmac_pins_mii_a>;
3856 + phy1: ethernet-phy@1 {
3863 + interrupt-parent = <&nmi_intc>;
3864 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3869 + pinctrl-names = "default";
3870 + pinctrl-0 = <&ir0_rx_pins_a>;
3875 + pinctrl-names = "default";
3876 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
3877 + vmmc-supply = <®_vcc3v3>;
3879 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
3885 + led_pins_itead_core: led_pins@0 {
3886 + allwinner,pins = "PH20","PH21";
3887 + allwinner,function = "gpio_out";
3888 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
3889 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3896 diff --git a/arch/arm/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
3897 index 975b0b2..5ee43d8 100644
3898 --- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts
3899 +++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
3903 cpu-supply = <®_dcdc2>;
3904 - operating-points = <
3917 diff --git a/arch/arm/dts/sun7i-a20-mk808c.dts b/arch/arm/dts/sun7i-a20-mk808c.dts
3918 index 4f432f8..90ff4a2 100644
3919 --- a/arch/arm/dts/sun7i-a20-mk808c.dts
3920 +++ b/arch/arm/dts/sun7i-a20-mk808c.dts
3923 #include <dt-bindings/gpio/gpio.h>
3924 #include <dt-bindings/interrupt-controller/irq.h>
3925 +#include <dt-bindings/pinctrl/sun4i-a10.h>
3940 @@ -121,6 +126,30 @@
3949 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
3950 + allwinner,pins = "PH4";
3951 + allwinner,function = "gpio_in";
3952 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3953 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3956 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
3957 + allwinner,pins = "PH5";
3958 + allwinner,function = "gpio_in";
3959 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3960 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3971 @@ -141,7 +170,17 @@
3981 + pinctrl-names = "default";
3982 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
3983 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
3984 + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
3985 + usb0_vbus-supply = <®_usb0_vbus>;
3986 usb1_vbus-supply = <®_usb1_vbus>;
3987 usb2_vbus-supply = <®_usb2_vbus>;
3989 diff --git a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
3990 index 6904dbd..23aacce 100644
3991 --- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
3992 +++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
3995 * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
3996 + * Copyright 2015 - Karsten Merker <merker@debian.org>
3998 * This file is dual-licensed: you can use it either under the terms
3999 * of the GPL or the X11 license, at your option. Note that this dual
4001 #include "sunxi-common-regulators.dtsi"
4003 #include <dt-bindings/gpio/gpio.h>
4004 +#include <dt-bindings/input/input.h>
4005 #include <dt-bindings/interrupt-controller/irq.h>
4006 #include <dt-bindings/pinctrl/sun4i-a10.h>
4009 default-state = "on";
4013 - reg_axp_ipsout: axp_ipsout {
4014 - compatible = "regulator-fixed";
4015 - regulator-name = "axp-ipsout";
4016 - regulator-min-microvolt = <5000000>;
4017 - regulator-max-microvolt = <5000000>;
4018 - regulator-always-on;
4032 pinctrl-names = "default";
4033 pinctrl-0 = <&gmac_pins_rgmii_a>;
4034 @@ -118,10 +116,58 @@
4039 - pinctrl-names = "default";
4040 - pinctrl-0 = <&i2c1_pins_a>;
4042 + vref-supply = <®_vcc3v0>;
4046 + label = "Volume Up";
4047 + linux,code = <KEY_VOLUMEUP>;
4049 + voltage = <190000>;
4053 + label = "Volume Down";
4054 + linux,code = <KEY_VOLUMEDOWN>;
4056 + voltage = <390000>;
4061 + linux,code = <KEY_MENU>;
4063 + voltage = <600000>;
4068 + linux,code = <KEY_SEARCH>;
4070 + voltage = <800000>;
4075 + linux,code = <KEY_HOMEPAGE>;
4077 + voltage = <980000>;
4082 + linux,code = <KEY_ESC>;
4084 + voltage = <1180000>;
4089 + linux,code = <KEY_ENTER>;
4091 + voltage = <1400000>;
4096 @@ -134,6 +180,16 @@
4101 + pinctrl-names = "default";
4102 + pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
4103 + vmmc-supply = <®_vcc3v3>;
4105 + cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
4113 @@ -161,15 +217,22 @@
4114 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4117 + mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
4118 + allwinner,pins = "PH0";
4119 + allwinner,function = "gpio_in";
4120 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4121 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4124 usb0_id_detect_pin: usb0_id_detect_pin@0 {
4125 - allwinner,pins = "PH04";
4126 + allwinner,pins = "PH4";
4127 allwinner,function = "gpio_in";
4128 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4129 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4132 usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
4133 - allwinner,pins = "PH05";
4134 + allwinner,pins = "PH5";
4135 allwinner,function = "gpio_in";
4136 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4137 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4140 regulator-always-on;
4141 regulator-min-microvolt = <1000000>;
4142 - regulator-max-microvolt = <1425000>;
4143 + regulator-max-microvolt = <1400000>;
4144 regulator-name = "vdd-cpu";
4149 pinctrl-names = "default";
4150 pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
4151 - usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */
4152 - usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */
4153 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
4154 + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
4155 usb0_vbus-supply = <®_usb0_vbus>;
4156 usb1_vbus-supply = <®_usb1_vbus>;
4157 usb2_vbus-supply = <®_usb2_vbus>;
4158 diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
4159 index 0423708..35ad700 100644
4160 --- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
4161 +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
4162 @@ -117,6 +117,18 @@
4167 + pinctrl-names = "default";
4168 + pinctrl-0 = <&i2c1_pins_a>;
4171 + eeprom: eeprom@50 {
4172 + compatible = "atmel,24c16";
4179 pinctrl-names = "default";
4180 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
4181 diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
4182 index 8acff78..d5c796c 100644
4183 --- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
4184 +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
4185 @@ -170,6 +170,12 @@
4186 pinctrl-names = "default";
4187 pinctrl-0 = <&i2c1_pins_a>;
4190 + eeprom: eeprom@50 {
4191 + compatible = "atmel,24c16";
4198 @@ -190,6 +196,10 @@
4207 ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
4208 allwinner,pins = "PC3";
4209 @@ -204,6 +214,27 @@
4210 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
4211 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4214 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4215 + allwinner,pins = "PH4";
4216 + allwinner,function = "gpio_in";
4217 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4218 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4221 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
4222 + allwinner,pins = "PH5";
4223 + allwinner,function = "gpio_in";
4224 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4225 + allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
4228 + usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
4229 + allwinner,pins = "PC17";
4230 + allwinner,function = "gpio_out";
4231 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4232 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4237 @@ -212,6 +243,12 @@
4242 + pinctrl-0 = <&usb0_vbus_pin_lime2>;
4243 + gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
4250 @@ -226,7 +263,17 @@
4260 + pinctrl-names = "default";
4261 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
4262 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4263 + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
4264 + usb0_vbus-supply = <®_usb0_vbus>;
4265 usb1_vbus-supply = <®_usb1_vbus>;
4266 usb2_vbus-supply = <®_usb2_vbus>;
4268 diff --git a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
4269 index c5d70ca..7e3006f 100644
4270 --- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
4271 +++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
4272 @@ -125,6 +125,12 @@
4273 pinctrl-names = "default";
4274 pinctrl-0 = <&i2c1_pins_a>;
4277 + eeprom: eeprom@50 {
4278 + compatible = "atmel,24c16";
4285 diff --git a/arch/arm/dts/sun7i-a20-orangepi-mini.dts b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
4286 index 73cd81e..2be04c4 100644
4287 --- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts
4288 +++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
4300 @@ -156,7 +160,18 @@
4309 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4310 + allwinner,pins = "PH4";
4311 + allwinner,function = "gpio_in";
4312 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4313 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4316 mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
4317 allwinner,pins = "PH10";
4318 allwinner,function = "gpio_in";
4319 @@ -225,6 +240,10 @@
4320 regulator-name = "avcc";
4328 pinctrl-0 = <&usb1_vbus_pin_bananapro>;
4329 gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
4330 @@ -243,7 +262,21 @@
4339 +&usb_power_supply {
4344 + pinctrl-names = "default";
4345 + pinctrl-0 = <&usb0_id_detect_pin>;
4346 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4347 + usb0_vbus_power-supply = <&usb_power_supply>;
4348 + usb0_vbus-supply = <®_usb0_vbus>;
4349 usb1_vbus-supply = <®_usb1_vbus>;
4350 usb2_vbus-supply = <®_usb2_vbus>;
4352 diff --git a/arch/arm/dts/sun7i-a20-orangepi.dts b/arch/arm/dts/sun7i-a20-orangepi.dts
4353 index 55a06ce..71125bf 100644
4354 --- a/arch/arm/dts/sun7i-a20-orangepi.dts
4355 +++ b/arch/arm/dts/sun7i-a20-orangepi.dts
4356 @@ -141,7 +141,18 @@
4365 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4366 + allwinner,pins = "PH4";
4367 + allwinner,function = "gpio_in";
4368 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4369 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4372 mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
4373 allwinner,pins = "PH10";
4374 allwinner,function = "gpio_in";
4375 @@ -203,6 +214,10 @@
4376 regulator-name = "avcc";
4384 pinctrl-0 = <&usb1_vbus_pin_bananapro>;
4385 gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
4386 @@ -221,7 +236,21 @@
4395 +&usb_power_supply {
4400 + pinctrl-names = "default";
4401 + pinctrl-0 = <&usb0_id_detect_pin>;
4402 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4403 + usb0_vbus_power-supply = <&usb_power_supply>;
4404 + usb0_vbus-supply = <®_usb0_vbus>;
4405 usb1_vbus-supply = <®_usb1_vbus>;
4406 usb2_vbus-supply = <®_usb2_vbus>;
4408 diff --git a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
4409 index 5361fce..ddac732 100644
4410 --- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
4411 +++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
4421 + cpu-supply = <®_dcdc2>;
4427 @@ -108,13 +116,9 @@
4431 - compatible = "x-powers,axp209";
4433 interrupt-parent = <&nmi_intc>;
4434 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
4436 - interrupt-controller;
4437 - #interrupt-cells = <1>;
4441 @@ -142,6 +146,10 @@
4450 ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 {
4451 allwinner,pins = "PH2";
4452 @@ -157,8 +165,15 @@
4453 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4456 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4457 + allwinner,pins = "PH4";
4458 + allwinner,function = "gpio_in";
4459 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4460 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4463 usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 {
4464 - allwinner,pins = "PH11";
4465 + allwinner,pins = "PD2";
4466 allwinner,function = "gpio_out";
4467 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4468 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4469 @@ -171,13 +186,37 @@
4474 - pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
4475 - gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
4477 +#include "axp209.dtsi"
4480 + regulator-always-on;
4481 + regulator-min-microvolt = <1000000>;
4482 + regulator-max-microvolt = <1400000>;
4483 + regulator-name = "vdd-cpu";
4487 + regulator-always-on;
4488 + regulator-min-microvolt = <1000000>;
4489 + regulator-max-microvolt = <1400000>;
4490 + regulator-name = "vdd-int-pll";
4494 + regulator-name = "vdd-rtc";
4498 + regulator-always-on;
4499 + regulator-min-microvolt = <3000000>;
4500 + regulator-max-microvolt = <3000000>;
4501 + regulator-name = "avcc";
4505 +/* A single regulator (U24) powers both USB host ports. */
4507 + pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
4508 + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
4512 @@ -187,8 +226,16 @@
4522 + pinctrl-names = "default";
4523 + pinctrl-0 = <&usb0_id_detect_pin>;
4524 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4525 usb1_vbus-supply = <®_usb1_vbus>;
4526 - usb2_vbus-supply = <®_usb2_vbus>;
4527 + usb2_vbus-supply = <®_usb1_vbus>;
4530 diff --git a/arch/arm/dts/sun7i-a20-pcduino3.dts b/arch/arm/dts/sun7i-a20-pcduino3.dts
4531 index afc9ece..1a8b39b 100644
4532 --- a/arch/arm/dts/sun7i-a20-pcduino3.dts
4533 +++ b/arch/arm/dts/sun7i-a20-pcduino3.dts
4534 @@ -111,6 +111,14 @@
4535 allwinner,pins = "PH2";
4543 + cpu-supply = <®_dcdc2>;
4549 @@ -137,16 +145,14 @@
4553 - compatible = "x-powers,axp209";
4555 interrupt-parent = <&nmi_intc>;
4556 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
4558 - interrupt-controller;
4559 - #interrupt-cells = <1>;
4563 +#include "axp209.dtsi"
4566 pinctrl-names = "default";
4567 pinctrl-0 = <&ir0_rx_pins_a>;
4568 @@ -171,6 +177,10 @@
4577 led_pins_pcduino3: led_pins@0 {
4578 allwinner,pins = "PH15", "PH16";
4579 @@ -185,6 +195,13 @@
4580 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4581 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4584 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4585 + allwinner,pins = "PH4";
4586 + allwinner,function = "gpio_in";
4587 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4588 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4593 @@ -192,6 +209,31 @@
4598 + regulator-always-on;
4599 + regulator-min-microvolt = <1000000>;
4600 + regulator-max-microvolt = <1400000>;
4601 + regulator-name = "vdd-cpu";
4605 + regulator-always-on;
4606 + regulator-min-microvolt = <1000000>;
4607 + regulator-max-microvolt = <1400000>;
4608 + regulator-name = "vdd-int-pll";
4612 + regulator-name = "vdd-rtc";
4616 + regulator-always-on;
4617 + regulator-min-microvolt = <3000000>;
4618 + regulator-max-microvolt = <3000000>;
4619 + regulator-name = "avcc";
4625 @@ -206,7 +248,15 @@
4635 + pinctrl-names = "default";
4636 + pinctrl-0 = <&usb0_id_detect_pin>;
4637 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4638 usb1_vbus-supply = <®_usb1_vbus>;
4639 usb2_vbus-supply = <®_usb2_vbus>;
4641 diff --git a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
4642 index 83c6d3f..2f6b21a 100644
4643 --- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
4644 +++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
4646 #include <dt-bindings/gpio/gpio.h>
4647 #include <dt-bindings/input/input.h>
4648 #include <dt-bindings/interrupt-controller/irq.h>
4649 +#include <dt-bindings/pwm/pwm.h>
4652 model = "Wexler TAB7200";
4658 + compatible = "pwm-backlight";
4659 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
4660 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
4661 + default-brightness-level = <8>;
4662 + pinctrl-names = "default";
4663 + pinctrl-0 = <&bl_enable_pin>;
4664 + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
4668 stdout-path = "serial0:115200n8";
4673 + pinctrl-names = "default";
4674 + pinctrl-0 = <&codec_pa_pin>;
4675 + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
4680 cpu-supply = <®_dcdc2>;
4686 +#include "axp209.dtsi"
4689 pinctrl-names = "default";
4690 pinctrl-0 = <&i2c1_pins_a>;
4692 pinctrl-names = "default";
4693 pinctrl-0 = <&i2c2_pins_a>;
4696 + gt911: touchscreen@5d {
4697 + compatible = "goodix,gt911";
4699 + interrupt-parent = <&pio>;
4700 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
4701 + pinctrl-names = "default";
4702 + pinctrl-0 = <&ts_reset_pin>;
4703 + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
4704 + reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
4705 + touchscreen-swapped-x-y;
4710 @@ -135,7 +167,45 @@
4714 -#include "axp209.dtsi"
4720 + bl_enable_pin: bl_enable_pin@0 {
4721 + allwinner,pins = "PH7";
4722 + allwinner,function = "gpio_out";
4723 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4724 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4727 + codec_pa_pin: codec_pa_pin@0 {
4728 + allwinner,pins = "PH15";
4729 + allwinner,function = "gpio_out";
4730 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4731 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4734 + ts_reset_pin: ts_reset_pin@0 {
4735 + allwinner,pins = "PB13";
4736 + allwinner,function = "gpio_out";
4737 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4738 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4741 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4742 + allwinner,pins = "PH4";
4743 + allwinner,function = "gpio_in";
4744 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4745 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4750 + pinctrl-names = "default";
4751 + pinctrl-0 = <&pwm0_pins_a>;
4756 regulator-always-on;
4757 @@ -162,6 +232,10 @@
4758 regulator-name = "avcc";
4768 @@ -176,7 +250,21 @@
4777 +&usb_power_supply {
4782 + pinctrl-names = "default";
4783 + pinctrl-0 = <&usb0_id_detect_pin>;
4784 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4785 + usb0_vbus_power-supply = <&usb_power_supply>;
4786 + usb0_vbus-supply = <®_usb0_vbus>;
4787 usb1_vbus-supply = <®_usb1_vbus>;
4788 usb2_vbus-supply = <®_usb2_vbus>;
4790 diff --git a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
4791 index e7d84fe..dc31d47 100644
4792 --- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
4793 +++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
4796 - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
4797 + * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
4799 - * Minimal dts file for the Wits Pro A20 DKT for u-boot only
4800 + * This file is dual-licensed: you can use it either under the terms
4801 + * of the GPL or the X11 license, at your option. Note that this dual
4802 + * licensing only applies to this file, and not this project as a
4805 - * SPDX-License-Identifier: GPL-2.0+ or X11
4806 + * a) This file is free software; you can redistribute it and/or
4807 + * modify it under the terms of the GNU General Public License as
4808 + * published by the Free Software Foundation; either version 2 of the
4809 + * License, or (at your option) any later version.
4811 + * This file is distributed in the hope that it will be useful,
4812 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4813 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4814 + * GNU General Public License for more details.
4816 + * Or, alternatively,
4818 + * b) Permission is hereby granted, free of charge, to any person
4819 + * obtaining a copy of this software and associated documentation
4820 + * files (the "Software"), to deal in the Software without
4821 + * restriction, including without limitation the rights to use,
4822 + * copy, modify, merge, publish, distribute, sublicense, and/or
4823 + * sell copies of the Software, and to permit persons to whom the
4824 + * Software is furnished to do so, subject to the following
4827 + * The above copyright notice and this permission notice shall be
4828 + * included in all copies or substantial portions of the Software.
4830 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4831 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4832 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4833 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4834 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4835 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4836 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4837 + * OTHER DEALINGS IN THE SOFTWARE.
4841 #include "sun7i-a20.dtsi"
4842 +#include "sunxi-common-regulators.dtsi"
4844 +#include <dt-bindings/gpio/gpio.h>
4845 +#include <dt-bindings/input/input.h>
4846 +#include <dt-bindings/interrupt-controller/irq.h>
4849 model = "Wits Pro A20 DKT";
4852 stdout-path = "serial0:115200n8";
4855 + mmc3_pwrseq: mmc3_pwrseq {
4856 + compatible = "mmc-pwrseq-simple";
4857 + pinctrl-names = "default";
4858 + pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
4859 + reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
4864 + cpu-supply = <®_dcdc2>;
4873 + pinctrl-names = "default";
4874 + pinctrl-0 = <&i2c0_pins_a>;
4879 + interrupt-parent = <&nmi_intc>;
4880 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
4885 + pinctrl-names = "default";
4886 + pinctrl-0 = <&i2c1_pins_a>;
4891 + pinctrl-names = "default";
4892 + pinctrl-0 = <&i2c2_pins_a>;
4896 +#include "axp209.dtsi"
4899 + pinctrl-names = "default";
4900 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
4901 + vmmc-supply = <®_vcc3v3>;
4903 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
4909 + pinctrl-names = "default";
4910 + pinctrl-0 = <&mmc3_pins_a>;
4911 + vmmc-supply = <®_vcc3v3>;
4912 + mmc-pwrseq = <&mmc3_pwrseq>;
4919 + compatible = "brcm,bcm4329-fmac";
4920 + interrupt-parent = <&pio>;
4921 + interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
4922 + interrupt-names = "host-wake";
4938 + vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin@0 {
4939 + allwinner,pins = "PH9";
4940 + allwinner,function = "gpio_out";
4941 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4942 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4945 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4946 + allwinner,pins = "PH4";
4947 + allwinner,function = "gpio_in";
4948 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4949 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4954 + regulator-always-on;
4955 + regulator-min-microvolt = <1000000>;
4956 + regulator-max-microvolt = <1450000>;
4957 + regulator-name = "vdd-cpu";
4961 + regulator-always-on;
4962 + regulator-min-microvolt = <1000000>;
4963 + regulator-max-microvolt = <1400000>;
4964 + regulator-name = "vdd-int-dll";
4968 + regulator-name = "vdd-rtc";
4972 + regulator-always-on;
4973 + regulator-min-microvolt = <3000000>;
4974 + regulator-max-microvolt = <3000000>;
4975 + regulator-name = "avcc";
4991 pinctrl-names = "default";
4992 pinctrl-0 = <&uart0_pins_a>;
5001 +&usb_power_supply {
5006 + pinctrl-names = "default";
5007 + pinctrl-0 = <&usb0_id_detect_pin>;
5008 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
5009 + usb0_vbus_power-supply = <&usb_power_supply>;
5010 + usb0_vbus-supply = <®_usb0_vbus>;
5011 + usb1_vbus-supply = <®_usb1_vbus>;
5012 + usb2_vbus-supply = <®_usb2_vbus>;
5015 diff --git a/arch/arm/dts/sun7i-a20.dtsi b/arch/arm/dts/sun7i-a20.dtsi
5016 index 71ab6b8..0940a78 100644
5017 --- a/arch/arm/dts/sun7i-a20.dtsi
5018 +++ b/arch/arm/dts/sun7i-a20.dtsi
5020 #include <dt-bindings/interrupt-controller/arm-gic.h>
5021 #include <dt-bindings/thermal/thermal.h>
5023 +#include <dt-bindings/clock/sun4i-a10-pll2.h>
5024 #include <dt-bindings/dma/sun4i-a10.h>
5025 #include <dt-bindings/pinctrl/sun4i-a10.h>
5028 "simple-framebuffer";
5029 allwinner,pipeline = "de_be0-lcd0-hdmi";
5030 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
5032 + <&ahb_gates 44>, <&dram_gates 26>;
5033 status = "disabled";
5037 compatible = "allwinner,simple-framebuffer",
5038 "simple-framebuffer";
5039 allwinner,pipeline = "de_be0-lcd0";
5040 - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
5041 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
5043 status = "disabled";
5047 "simple-framebuffer";
5048 allwinner,pipeline = "de_be0-lcd0-tve0";
5049 clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
5051 + <&ahb_gates 44>, <&dram_gates 26>;
5052 status = "disabled";
5062 #cooling-cells = <2>;
5063 cooling-min-level = <0>;
5064 @@ -199,6 +201,15 @@
5065 clock-output-names = "pll1";
5068 + pll2: clk@01c20008 {
5069 + #clock-cells = <1>;
5070 + compatible = "allwinner,sun4i-a10-pll2-clk";
5071 + reg = <0x01c20008 0x8>;
5072 + clocks = <&osc24M>;
5073 + clock-output-names = "pll2-1x", "pll2-2x",
5074 + "pll2-4x", "pll2-8x";
5077 pll4: clk@01c20018 {
5079 compatible = "allwinner,sun7i-a20-pll4-clk";
5080 @@ -267,6 +278,19 @@
5081 compatible = "allwinner,sun7i-a20-ahb-gates-clk";
5082 reg = <0x01c20060 0x8>;
5084 + clock-indices = <0>, <1>,
5086 + <5>, <6>, <7>, <8>,
5087 + <9>, <10>, <11>, <12>,
5089 + <17>, <18>, <20>, <21>,
5091 + <28>, <32>, <33>, <34>,
5092 + <35>, <36>, <37>, <40>,
5097 clock-output-names = "ahb_usb0", "ahb_ehci0",
5098 "ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
5099 "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
5100 @@ -295,6 +319,10 @@
5101 compatible = "allwinner,sun7i-a20-apb0-gates-clk";
5102 reg = <0x01c20068 0x4>;
5104 + clock-indices = <0>, <1>,
5108 clock-output-names = "apb0_codec", "apb0_spdif",
5109 "apb0_ac97", "apb0_iis0", "apb0_iis1",
5110 "apb0_pio", "apb0_ir0", "apb0_ir1",
5111 @@ -314,6 +342,12 @@
5112 compatible = "allwinner,sun7i-a20-apb1-gates-clk";
5113 reg = <0x01c2006c 0x4>;
5115 + clock-indices = <0>, <1>,
5121 clock-output-names = "apb1_i2c0", "apb1_i2c1",
5122 "apb1_i2c2", "apb1_i2c3", "apb1_can",
5123 "apb1_scr", "apb1_ps20", "apb1_ps21",
5124 @@ -442,6 +476,14 @@
5125 clock-output-names = "ir1";
5128 + keypad_clk: clk@01c200c4 {
5129 + #clock-cells = <0>;
5130 + compatible = "allwinner,sun4i-a10-mod0-clk";
5131 + reg = <0x01c200c4 0x4>;
5132 + clocks = <&osc24M>;
5133 + clock-output-names = "keypad";
5136 usb_clk: clk@01c200cc {
5139 @@ -460,6 +502,48 @@
5140 clock-output-names = "spi3";
5143 + dram_gates: clk@01c20100 {
5144 + #clock-cells = <1>;
5145 + compatible = "allwinner,sun4i-a10-dram-gates-clk";
5146 + reg = <0x01c20100 0x4>;
5147 + clocks = <&pll5 0>;
5148 + clock-indices = <0>,
5157 + clock-output-names = "dram_ve",
5158 + "dram_csi0", "dram_csi1",
5161 + "dram_tve0", "dram_tve1",
5163 + "dram_de_fe1", "dram_de_fe0",
5164 + "dram_de_be0", "dram_de_be1",
5165 + "dram_de_mp", "dram_ace";
5168 + ve_clk: clk@01c2013c {
5169 + #clock-cells = <0>;
5170 + #reset-cells = <0>;
5171 + compatible = "allwinner,sun4i-a10-ve-clk";
5172 + reg = <0x01c2013c 0x4>;
5174 + clock-output-names = "ve";
5177 + codec_clk: clk@01c20140 {
5178 + #clock-cells = <0>;
5179 + compatible = "allwinner,sun4i-a10-codec-clk";
5180 + reg = <0x01c20140 0x4>;
5181 + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
5182 + clock-output-names = "codec";
5185 mbus_clk: clk@01c2015c {
5187 compatible = "allwinner,sun5i-a13-mbus-clk";
5188 @@ -744,6 +828,14 @@
5189 status = "disabled";
5192 + crypto: crypto-engine@01c15000 {
5193 + compatible = "allwinner,sun4i-a10-crypto";
5194 + reg = <0x01c15000 0x1000>;
5195 + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
5196 + clocks = <&ahb_gates 5>, <&ss_clk>;
5197 + clock-names = "ahb", "mod";
5200 spi2: spi@01c17000 {
5201 compatible = "allwinner,sun4i-a10-spi";
5202 reg = <0x01c17000 0x1000>;
5203 @@ -1159,6 +1251,19 @@
5204 status = "disabled";
5207 + codec: codec@01c22c00 {
5208 + #sound-dai-cells = <0>;
5209 + compatible = "allwinner,sun7i-a20-codec";
5210 + reg = <0x01c22c00 0x40>;
5211 + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
5212 + clocks = <&apb0_gates 0>, <&codec_clk>;
5213 + clock-names = "apb", "codec";
5214 + dmas = <&dma SUN4I_DMA_NORMAL 19>,
5215 + <&dma SUN4I_DMA_NORMAL 19>;
5216 + dma-names = "rx", "tx";
5217 + status = "disabled";
5220 sid: eeprom@01c23800 {
5221 compatible = "allwinner,sun7i-a20-sid";
5222 reg = <0x01c23800 0x200>;
5223 diff --git a/arch/arm/dts/sun8i-a23-a33.dtsi b/arch/arm/dts/sun8i-a23-a33.dtsi
5224 index 9c4a55c..7e05e09 100644
5225 --- a/arch/arm/dts/sun8i-a23-a33.dtsi
5226 +++ b/arch/arm/dts/sun8i-a23-a33.dtsi
5232 + simplefb_lcd: framebuffer@0 {
5233 compatible = "allwinner,simple-framebuffer",
5234 "simple-framebuffer";
5235 allwinner,pipeline = "de_be0-lcd0";
5236 @@ -175,27 +175,13 @@
5237 clock-output-names = "apb1";
5240 - ahb1_gates: clk@01c20060 {
5241 - #clock-cells = <1>;
5242 - compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
5243 - reg = <0x01c20060 0x8>;
5245 - clock-output-names = "ahb1_mipidsi", "ahb1_dma",
5246 - "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
5247 - "ahb1_nand", "ahb1_sdram",
5248 - "ahb1_hstimer", "ahb1_spi0",
5249 - "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
5250 - "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
5251 - "ahb1_csi", "ahb1_be", "ahb1_fe",
5252 - "ahb1_gpu", "ahb1_spinlock",
5256 apb1_gates: clk@01c20068 {
5258 compatible = "allwinner,sun8i-a23-apb1-gates-clk";
5259 reg = <0x01c20068 0x4>;
5261 + clock-indices = <0>, <5>,
5263 clock-output-names = "apb1_codec", "apb1_pio",
5264 "apb1_daudio0", "apb1_daudio1";
5266 @@ -213,6 +199,10 @@
5267 compatible = "allwinner,sun8i-a23-apb2-gates-clk";
5268 reg = <0x01c2006c 0x4>;
5270 + clock-indices = <0>, <1>,
5274 clock-output-names = "apb2_i2c0", "apb2_i2c1",
5275 "apb2_i2c2", "apb2_uart0",
5276 "apb2_uart1", "apb2_uart2",
5277 @@ -391,12 +381,19 @@
5278 allwinner,pins = "PC5", "PC6", "PC8",
5279 "PC9", "PC10", "PC11",
5280 "PC12", "PC13", "PC14",
5283 allwinner,function = "mmc2";
5284 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
5285 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5289 + allwinner,pins = "PH0";
5290 + allwinner,function = "pwm0";
5291 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5292 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5295 i2c0_pins_a: i2c0@0 {
5296 allwinner,pins = "PH2", "PH3";
5297 allwinner,function = "i2c0";
5298 @@ -451,6 +448,14 @@
5299 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
5302 + pwm: pwm@01c21400 {
5303 + compatible = "allwinner,sun7i-a20-pwm";
5304 + reg = <0x01c21400 0xc>;
5305 + clocks = <&osc24M>;
5307 + status = "disabled";
5310 lradc: lradc@01c22800 {
5311 compatible = "allwinner,sun4i-a10-lradc-keys";
5312 reg = <0x01c22800 0x100>;
5313 @@ -574,6 +579,14 @@
5314 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
5317 + nmi_intc: interrupt-controller@01f00c0c {
5318 + compatible = "allwinner,sun6i-a31-sc-nmi";
5319 + interrupt-controller;
5320 + #interrupt-cells = <2>;
5321 + reg = <0x01f00c0c 0x38>;
5322 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
5326 compatible = "allwinner,sun8i-a23-prcm";
5327 reg = <0x01f01400 0x200>;
5328 @@ -642,10 +655,18 @@
5329 resets = <&apb0_rst 0>;
5331 interrupt-controller;
5332 + #interrupt-cells = <3>;
5333 #address-cells = <1>;
5337 + r_rsb_pins: r_rsb {
5338 + allwinner,pins = "PL0", "PL1";
5339 + allwinner,function = "s_rsb";
5340 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
5341 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
5344 r_uart_pins_a: r_uart@0 {
5345 allwinner,pins = "PL2", "PL3";
5346 allwinner,function = "s_uart";
5347 @@ -653,5 +674,19 @@
5348 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5352 + r_rsb: rsb@01f03400 {
5353 + compatible = "allwinner,sun8i-a23-rsb";
5354 + reg = <0x01f03400 0x400>;
5355 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
5356 + clocks = <&apb0_gates 3>;
5357 + clock-frequency = <3000000>;
5358 + resets = <&apb0_rst 3>;
5359 + pinctrl-names = "default";
5360 + pinctrl-0 = <&r_rsb_pins>;
5361 + status = "disabled";
5362 + #address-cells = <1>;
5363 + #size-cells = <0>;
5367 diff --git a/arch/arm/dts/sun8i-a23-gt90h-v4.dts b/arch/arm/dts/sun8i-a23-gt90h-v4.dts
5368 index 1aeb06c..b2ce284 100644
5369 --- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts
5370 +++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts
5372 #include <dt-bindings/gpio/gpio.h>
5373 #include <dt-bindings/input/input.h>
5374 #include <dt-bindings/pinctrl/sun4i-a10.h>
5375 +#include <dt-bindings/pwm/pwm.h>
5378 - model = "Allwinner GT90H Quad Core Tablet (v4)";
5379 - compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
5380 + model = "Allwinner GT90H Dual Core Tablet (v4)";
5381 + compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
5387 + backlight: backlight {
5388 + compatible = "pwm-backlight";
5389 + pinctrl-names = "default";
5390 + pinctrl-0 = <&bl_en_pin_gt90h>;
5391 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
5392 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
5393 + default-brightness-level = <8>;
5394 + enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
5398 stdout-path = "serial0:115200n8";
5402 pinctrl-names = "default";
5403 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
5404 - /* FIXME this really is aldo1, correct once we've pmic support */
5405 - vmmc-supply = <®_vcc3v0>;
5406 + vmmc-supply = <®_aldo1>;
5408 cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
5410 @@ -115,6 +125,13 @@
5414 + bl_en_pin_gt90h: bl_en_pin@0 {
5415 + allwinner,pins = "PH6";
5416 + allwinner,function = "gpio_in";
5417 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5418 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5421 mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
5422 allwinner,pins = "PB4";
5423 allwinner,function = "gpio_in";
5424 @@ -123,12 +140,106 @@
5429 + pinctrl-names = "default";
5430 + pinctrl-0 = <&pwm0_pins>;
5437 + axp22x: pmic@3a3 {
5438 + compatible = "x-powers,axp223";
5440 + interrupt-parent = <&nmi_intc>;
5441 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
5442 + eldoin-supply = <®_dcdc1>;
5447 pinctrl-names = "default";
5448 pinctrl-0 = <&r_uart_pins_a>;
5452 +#include "axp22x.dtsi"
5455 + regulator-always-on;
5456 + regulator-min-microvolt = <3000000>;
5457 + regulator-max-microvolt = <3000000>;
5458 + regulator-name = "vcc-io";
5462 + regulator-always-on;
5463 + regulator-min-microvolt = <2350000>;
5464 + regulator-max-microvolt = <2650000>;
5465 + regulator-name = "vdd-dll";
5469 + regulator-always-on;
5470 + regulator-min-microvolt = <2700000>;
5471 + regulator-max-microvolt = <3300000>;
5472 + regulator-name = "vcc-pll-avcc";
5476 + regulator-name = "vcc-lcd";
5480 + regulator-always-on;
5481 + regulator-min-microvolt = <900000>;
5482 + regulator-max-microvolt = <1400000>;
5483 + regulator-name = "vdd-cpus";
5487 + regulator-always-on;
5488 + regulator-min-microvolt = <3000000>;
5489 + regulator-max-microvolt = <3000000>;
5490 + regulator-name = "vcc-3v0";
5494 + regulator-always-on;
5495 + regulator-min-microvolt = <900000>;
5496 + regulator-max-microvolt = <1400000>;
5497 + regulator-name = "vdd-sys";
5501 + regulator-always-on;
5502 + regulator-min-microvolt = <900000>;
5503 + regulator-max-microvolt = <1400000>;
5504 + regulator-name = "vdd-cpu";
5508 + regulator-always-on;
5509 + regulator-min-microvolt = <1500000>;
5510 + regulator-max-microvolt = <1500000>;
5511 + regulator-name = "vcc-dram";
5515 + regulator-min-microvolt = <3300000>;
5516 + regulator-max-microvolt = <3300000>;
5517 + regulator-name = "vcc-wifi";
5521 + regulator-name = "vcc-rtc";
5525 + vcc-lcd-supply = <®_dc1sw>;
5529 * FIXME for now we only support host mode and rely on u-boot to have
5530 * turned on Vbus which is controlled by the axp223 pmic on the board.
5535 + usb1_vbus-supply = <®_dldo1>;
5538 diff --git a/arch/arm/dts/sun8i-a23.dtsi b/arch/arm/dts/sun8i-a23.dtsi
5539 index 2cc27c7..92e6616 100644
5540 --- a/arch/arm/dts/sun8i-a23.dtsi
5541 +++ b/arch/arm/dts/sun8i-a23.dtsi
5546 + ahb1_gates: clk@01c20060 {
5547 + #clock-cells = <1>;
5548 + compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
5549 + reg = <0x01c20060 0x8>;
5551 + clock-indices = <1>, <6>,
5560 + clock-output-names = "ahb1_mipidsi", "ahb1_dma",
5561 + "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
5562 + "ahb1_nand", "ahb1_sdram",
5563 + "ahb1_hstimer", "ahb1_spi0",
5564 + "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
5565 + "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
5566 + "ahb1_csi", "ahb1_be", "ahb1_fe",
5567 + "ahb1_gpu", "ahb1_msgbox",
5568 + "ahb1_spinlock", "ahb1_drc";
5571 mbus_clk: clk@01c2015c {
5573 compatible = "allwinner,sun8i-a23-mbus-clk";
5574 diff --git a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
5575 index 1d5390d..fef6abc 100644
5576 --- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
5577 +++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
5582 - vref-supply = <®_vcc3v0>;
5583 + vref-supply = <®_dcdc1>;
5589 pinctrl-names = "default";
5590 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
5591 - vmmc-supply = <®_vcc3v0>;
5592 + vmmc-supply = <®_dcdc1>;
5594 cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
5596 @@ -106,13 +106,16 @@
5598 pinctrl-names = "default";
5599 pinctrl-0 = <&mmc2_8bit_pins>;
5600 - vmmc-supply = <®_vcc3v0>;
5601 + vmmc-supply = <®_dcdc1>;
5609 + /* Increase drive strength for DDR modes */
5610 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
5611 /* eMMC is missing pull-ups */
5612 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
5614 @@ -130,6 +133,80 @@
5621 + axp22x: pmic@3a3 {
5622 + compatible = "x-powers,axp223";
5624 + interrupt-parent = <&nmi_intc>;
5625 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
5626 + eldoin-supply = <®_dcdc1>;
5630 +#include "axp22x.dtsi"
5633 + regulator-always-on;
5634 + regulator-min-microvolt = <3000000>;
5635 + regulator-max-microvolt = <3000000>;
5636 + regulator-name = "vcc-io";
5640 + regulator-always-on;
5641 + regulator-min-microvolt = <2350000>;
5642 + regulator-max-microvolt = <2650000>;
5643 + regulator-name = "vdd-dll";
5647 + regulator-always-on;
5648 + regulator-min-microvolt = <2700000>;
5649 + regulator-max-microvolt = <3300000>;
5650 + regulator-name = "vcc-pll-avcc";
5654 + regulator-always-on;
5655 + regulator-min-microvolt = <900000>;
5656 + regulator-max-microvolt = <1400000>;
5657 + regulator-name = "vdd-cpus";
5661 + regulator-always-on;
5662 + regulator-min-microvolt = <3000000>;
5663 + regulator-max-microvolt = <3000000>;
5664 + regulator-name = "vcc-3v0";
5668 + regulator-always-on;
5669 + regulator-min-microvolt = <900000>;
5670 + regulator-max-microvolt = <1400000>;
5671 + regulator-name = "vdd-sys";
5675 + regulator-always-on;
5676 + regulator-min-microvolt = <900000>;
5677 + regulator-max-microvolt = <1400000>;
5678 + regulator-name = "vdd-cpu";
5682 + regulator-always-on;
5683 + regulator-min-microvolt = <1500000>;
5684 + regulator-max-microvolt = <1500000>;
5685 + regulator-name = "vcc-dram";
5689 + regulator-name = "vcc-rtc";
5693 pinctrl-names = "default";
5694 pinctrl-0 = <&uart0_pins_b>;
5695 diff --git a/arch/arm/dts/sun8i-a33.dtsi b/arch/arm/dts/sun8i-a33.dtsi
5696 index faa7d3c..001d840 100644
5697 --- a/arch/arm/dts/sun8i-a33.dtsi
5698 +++ b/arch/arm/dts/sun8i-a33.dtsi
5700 clock-output-names = "pll11";
5703 + ahb1_gates: clk@01c20060 {
5704 + #clock-cells = <1>;
5705 + compatible = "allwinner,sun8i-a33-ahb1-gates-clk";
5706 + reg = <0x01c20060 0x8>;
5708 + clock-indices = <1>, <5>,
5718 + clock-output-names = "ahb1_mipidsi", "ahb1_ss",
5719 + "ahb1_dma","ahb1_mmc0", "ahb1_mmc1",
5720 + "ahb1_mmc2", "ahb1_nand", "ahb1_sdram",
5721 + "ahb1_hstimer", "ahb1_spi0",
5722 + "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
5723 + "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
5724 + "ahb1_csi", "ahb1_be", "ahb1_fe",
5725 + "ahb1_gpu", "ahb1_msgbox",
5726 + "ahb1_spinlock", "ahb1_drc",
5730 + ss_clk: clk@01c2009c {
5731 + #clock-cells = <0>;
5732 + compatible = "allwinner,sun4i-a10-mod0-clk";
5733 + reg = <0x01c2009c 0x4>;
5734 + clocks = <&osc24M>, <&pll6 0>;
5735 + clock-output-names = "ss";
5738 mbus_clk: clk@01c2015c {
5740 compatible = "allwinner,sun8i-a23-mbus-clk";
5745 + crypto: crypto-engine@01c15000 {
5746 + compatible = "allwinner,sun4i-a10-crypto";
5747 + reg = <0x01c15000 0x1000>;
5748 + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
5749 + clocks = <&ahb1_gates 5>, <&ss_clk>;
5750 + clock-names = "ahb", "mod";
5751 + resets = <&ahb1_rst 5>;
5752 + reset-names = "ahb";
5755 usb_otg: usb@01c19000 {
5756 compatible = "allwinner,sun8i-a33-musb";
5757 reg = <0x01c19000 0x0400>;
5758 diff --git a/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
5759 new file mode 100644
5760 index 0000000..88b1e09
5762 +++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
5765 + * Copyright 2015 Chen-Yu Tsai
5767 + * Chen-Yu Tsai <wens@csie.org>
5769 + * This file is dual-licensed: you can use it either under the terms
5770 + * of the GPL or the X11 license, at your option. Note that this dual
5771 + * licensing only applies to this file, and not this project as a
5774 + * a) This file is free software; you can redistribute it and/or
5775 + * modify it under the terms of the GNU General Public License as
5776 + * published by the Free Software Foundation; either version 2 of the
5777 + * License, or (at your option) any later version.
5779 + * This file is distributed in the hope that it will be useful,
5780 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5781 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5782 + * GNU General Public License for more details.
5784 + * Or, alternatively,
5786 + * b) Permission is hereby granted, free of charge, to any person
5787 + * obtaining a copy of this software and associated documentation
5788 + * files (the "Software"), to deal in the Software without
5789 + * restriction, including without limitation the rights to use,
5790 + * copy, modify, merge, publish, distribute, sublicense, and/or
5791 + * sell copies of the Software, and to permit persons to whom the
5792 + * Software is furnished to do so, subject to the following
5795 + * The above copyright notice and this permission notice shall be
5796 + * included in all copies or substantial portions of the Software.
5798 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5799 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
5800 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5801 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
5802 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
5803 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5804 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5805 + * OTHER DEALINGS IN THE SOFTWARE.
5809 +#include "sun8i-a83t.dtsi"
5812 + model = "Cubietech Cubietruck Plus";
5813 + compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
5820 + stdout-path = "serial0:115200n8";
5825 + pinctrl-names = "default";
5826 + pinctrl-0 = <&uart0_pins_b>;
5829 diff --git a/arch/arm/dts/sun8i-a83t.dtsi b/arch/arm/dts/sun8i-a83t.dtsi
5830 index 245b819..d3473f8 100644
5831 --- a/arch/arm/dts/sun8i-a83t.dtsi
5832 +++ b/arch/arm/dts/sun8i-a83t.dtsi
5835 interrupt-parent = <&gic>;
5838 - #address-cells = <1>;
5839 - #size-cells = <1>;
5844 #address-cells = <1>;
5847 device_type = "cpu";
5852 compatible = "arm,cortex-a7";
5853 device_type = "cpu";
5855 device_type = "cpu";
5860 compatible = "arm,cortex-a7";
5861 device_type = "cpu";
5862 @@ -109,18 +105,12 @@
5867 - reg = <0x40000000 0x80000000>;
5871 compatible = "arm,armv7-timer";
5872 - interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
5873 - <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
5874 - <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
5875 - <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
5876 - clock-frequency = <24000000>;
5877 - arm,cpu-registers-not-fw-configured;
5878 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
5879 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
5880 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
5881 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
5889 + /* TODO: PRCM block has a mux for this. */
5890 osc24M: osc24M_clk {
5892 compatible = "fixed-clock";
5893 @@ -135,36 +126,39 @@
5894 clock-output-names = "osc24M";
5897 - osc32k: osc32k_clk {
5899 + * This is called "internal OSC" in some places.
5900 + * It is an internal RC-based oscillator.
5901 + * TODO: Its controls are in the PRCM block.
5903 + osc16M: osc16M_clk {
5905 compatible = "fixed-clock";
5906 - clock-frequency = <32768>;
5907 - clock-output-names = "osc32k";
5908 + clock-frequency = <16000000>;
5909 + clock-output-names = "osc16M";
5912 + osc16Md512: osc16Md512_clk {
5913 + #clock-cells = <0>;
5914 + compatible = "fixed-factor-clock";
5915 + clock-div = <512>;
5917 + clocks = <&osc16M>;
5918 + clock-output-names = "osc16M-d512";
5924 compatible = "simple-bus";
5925 #address-cells = <1>;
5929 - gic: interrupt-controller@01c81000 {
5930 - compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
5931 - reg = <0x01c81000 0x1000>,
5932 - <0x01c82000 0x1000>,
5933 - <0x01c84000 0x2000>,
5934 - <0x01c86000 0x2000>;
5935 - interrupt-controller;
5936 - #interrupt-cells = <3>;
5937 - interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
5940 pio: pinctrl@01c20800 {
5941 compatible = "allwinner,sun8i-a83t-pinctrl";
5942 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
5943 - <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
5944 - <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
5945 + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
5946 + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
5947 reg = <0x01c20800 0x400>;
5950 @@ -172,27 +166,6 @@
5951 #interrupt-cells = <3>;
5954 - i2c0_pins_a: i2c0@0 {
5955 - allwinner,pins = "PH0", "PH1";
5956 - allwinner,function = "i2c0";
5957 - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5958 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5961 - i2c1_pins_a: i2c1@0 {
5962 - allwinner,pins = "PH2", "PH3";
5963 - allwinner,function = "i2c1";
5964 - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5965 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5968 - i2c2_pins_a: i2c2@0 {
5969 - allwinner,pins = "PH4", "PH5";
5970 - allwinner,function = "i2c2";
5971 - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5972 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5975 mmc0_pins_a: mmc0@0 {
5976 allwinner,pins = "PF0", "PF1", "PF2",
5977 "PF3", "PF4", "PF5";
5978 @@ -201,24 +174,6 @@
5979 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5982 - mmc1_pins_a: mmc1@0 {
5983 - allwinner,pins = "PG0", "PG1", "PG2",
5984 - "PG3", "PG4", "PG5";
5985 - allwinner,function = "mmc1";
5986 - allwinner,drive = <SUN4I_PINCTRL_30_MA>;
5987 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5990 - mmc2_8bit_pins: mmc2_8bit {
5991 - allwinner,pins = "PC5", "PC6", "PC8",
5992 - "PC9", "PC10", "PC11",
5993 - "PC12", "PC13", "PC14",
5995 - allwinner,function = "mmc2";
5996 - allwinner,drive = <SUN4I_PINCTRL_30_MA>;
5997 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6000 uart0_pins_a: uart0@0 {
6001 allwinner,pins = "PF2", "PF4";
6002 allwinner,function = "uart0";
6003 @@ -234,6 +189,21 @@
6008 + compatible = "allwinner,sun4i-a10-timer";
6009 + reg = <0x01c20c00 0xa0>;
6010 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
6011 + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
6012 + clocks = <&osc24M>;
6015 + watchdog@01c20ca0 {
6016 + compatible = "allwinner,sun6i-a31-wdt";
6017 + reg = <0x01c20ca0 0x20>;
6018 + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
6019 + clocks = <&osc24M>;
6022 uart0: serial@01c28000 {
6023 compatible = "snps,dw-apb-uart";
6024 reg = <0x01c28000 0x400>;
6025 @@ -243,5 +213,16 @@
6027 status = "disabled";
6030 + gic: interrupt-controller@01c81000 {
6031 + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
6032 + reg = <0x01c81000 0x1000>,
6033 + <0x01c82000 0x1000>,
6034 + <0x01c84000 0x2000>,
6035 + <0x01c86000 0x2000>;
6036 + interrupt-controller;
6037 + #interrupt-cells = <3>;
6038 + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
6042 diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
6043 index 4b25dcc..30ccca0 100644
6044 --- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts
6045 +++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
6047 #include "sunxi-common-regulators.dtsi"
6049 #include <dt-bindings/gpio/gpio.h>
6050 +#include <dt-bindings/input/input.h>
6051 #include <dt-bindings/pinctrl/sun4i-a10.h>
6056 stdout-path = "serial0:115200n8";
6060 + compatible = "gpio-leds";
6061 + pinctrl-names = "default";
6062 + pinctrl-0 = <&leds_opc>;
6065 + label = "status:red:user";
6066 + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
6071 + compatible = "gpio-leds";
6072 + pinctrl-names = "default";
6073 + pinctrl-0 = <&leds_r_opc>;
6076 + label = "pwr:green:user";
6077 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
6078 + default-state = "on";
6083 + compatible = "gpio-keys";
6084 + input-name = "sw4";
6086 + pinctrl-names = "default";
6087 + pinctrl-0 = <&sw_r_opc>;
6091 + linux,code = <BTN_0>;
6092 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
6103 + pinctrl-names = "default";
6104 + pinctrl-0 = <&ir_pins_a>;
6109 pinctrl-names = "default";
6110 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
6116 + leds_opc: led_pins@0 {
6117 + allwinner,pins = "PA15";
6118 + allwinner,function = "gpio_out";
6119 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6120 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6125 + leds_r_opc: led_pins@0 {
6126 + allwinner,pins = "PL10";
6127 + allwinner,function = "gpio_out";
6128 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6129 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6132 + sw_r_opc: key_pins@0 {
6133 + allwinner,pins = "PL03";
6134 + allwinner,function = "gpio_in";
6135 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6136 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6141 pinctrl-names = "default";
6142 pinctrl-0 = <&uart0_pins_a>;
6143 diff --git a/arch/arm/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
6144 index 1cb6c66..900ec4f 100644
6145 --- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
6146 +++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
6148 #include "sunxi-common-regulators.dtsi"
6150 #include <dt-bindings/gpio/gpio.h>
6151 +#include <dt-bindings/input/input.h>
6152 #include <dt-bindings/pinctrl/sun4i-a10.h>
6157 gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
6161 + compatible = "gpio-leds";
6162 + pinctrl-names = "default";
6163 + pinctrl-0 = <&leds_opc>;
6166 + label = "status:red:user";
6167 + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
6172 + compatible = "gpio-leds";
6173 + pinctrl-names = "default";
6174 + pinctrl-0 = <&leds_r_opc>;
6177 + label = "pwr:green:user";
6178 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
6179 + default-state = "on";
6184 + compatible = "gpio-keys";
6185 + input-name = "sw4";
6187 + pinctrl-names = "default";
6188 + pinctrl-0 = <&sw_r_opc>;
6192 + linux,code = <BTN_0>;
6193 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
6199 + leds_opc: led_pins@0 {
6200 + allwinner,pins = "PA15";
6201 + allwinner,function = "gpio_out";
6202 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6203 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6208 + leds_r_opc: led_pins@0 {
6209 + allwinner,pins = "PL10";
6210 + allwinner,function = "gpio_out";
6211 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6212 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6215 + sw_r_opc: key_pins@0 {
6216 + allwinner,pins = "PL03";
6217 + allwinner,function = "gpio_in";
6218 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6219 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6224 diff --git a/arch/arm/dts/sun8i-h3.dtsi b/arch/arm/dts/sun8i-h3.dtsi
6225 index 0faa38a..c2f63c5 100644
6226 --- a/arch/arm/dts/sun8i-h3.dtsi
6227 +++ b/arch/arm/dts/sun8i-h3.dtsi
6229 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
6230 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
6231 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
6232 - clock-frequency = <24000000>;
6233 - arm,cpu-registers-not-fw-configured;
6237 - reg = <0x40000000 0x80000000>;
6241 @@ -131,15 +125,24 @@
6242 compatible = "allwinner,sun6i-a31-pll6-clk";
6243 reg = <0x01c20028 0x4>;
6245 - clock-output-names = "pll6", "pll6x2", "pll6d2";
6246 + clock-output-names = "pll6", "pll6x2";
6249 - pll8: clk@01c20044 {
6250 - #clock-cells = <1>;
6251 - compatible = "allwinner,sun6i-a31-pll6-clk";
6252 - reg = <0x01c20044 0x4>;
6253 - clocks = <&osc24M>;
6254 - clock-output-names = "pll8", "pll8x2";
6255 + pll6d2: pll6d2_clk {
6256 + #clock-cells = <0>;
6257 + compatible = "fixed-factor-clock";
6260 + clocks = <&pll6 0>;
6261 + clock-output-names = "pll6d2";
6264 + /* dummy clock until pll6 can be reused */
6266 + #clock-cells = <0>;
6267 + compatible = "fixed-clock";
6268 + clock-frequency = <1>;
6269 + clock-output-names = "pll8";
6272 cpu: cpu_clk@01c20050 {
6275 compatible = "allwinner,sun8i-h3-ahb2-clk";
6276 reg = <0x01c2005c 0x4>;
6277 - clocks = <&ahb1>, <&pll6 2>;
6278 + clocks = <&ahb1>, <&pll6d2>;
6279 clock-output-names = "ahb2";
6282 @@ -213,34 +216,34 @@
6286 - <114>, <115>, <116>,
6288 - clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
6289 - "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
6290 - "ahb1_sdram", "ahb2_gmac", "ahb1_ts",
6291 - "ahb1_hstimer", "ahb1_spi0",
6292 - "ahb1_spi1", "ahb1_otg",
6293 - "ahb1_otg_ehci0", "ahb1_ehic1",
6294 - "ahb1_ehic2", "ahb1_ehic3",
6295 - "ahb1_otg_ohci0", "ahb2_ohic1",
6296 - "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
6297 - "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
6298 - "ahb1_csi", "ahb1_tve", "ahb1_hdmi",
6299 - "ahb1_de", "ahb1_gpu", "ahb1_msgbox",
6300 - "ahb1_spinlock", "apb1_codec",
6301 - "apb1_spdif", "apb1_pio", "apb1_ths",
6302 - "apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
6303 - "apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
6304 - "apb2_uart0", "apb2_uart1",
6305 - "apb2_uart2", "apb2_uart3", "apb2_scr",
6306 - "ahb1_ephy", "ahb1_dbg";
6308 + <116>, <128>, <135>;
6309 + clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
6310 + "bus_mmc1", "bus_mmc2", "bus_nand",
6311 + "bus_sdram", "bus_gmac", "bus_ts",
6312 + "bus_hstimer", "bus_spi0",
6313 + "bus_spi1", "bus_otg",
6314 + "bus_otg_ehci0", "bus_ehci1",
6315 + "bus_ehci2", "bus_ehci3",
6316 + "bus_otg_ohci0", "bus_ohci1",
6317 + "bus_ohci2", "bus_ohci3", "bus_ve",
6318 + "bus_lcd0", "bus_lcd1", "bus_deint",
6319 + "bus_csi", "bus_tve", "bus_hdmi",
6320 + "bus_de", "bus_gpu", "bus_msgbox",
6321 + "bus_spinlock", "bus_codec",
6322 + "bus_spdif", "bus_pio", "bus_ths",
6323 + "bus_i2s0", "bus_i2s1", "bus_i2s2",
6324 + "bus_i2c0", "bus_i2c1", "bus_i2c2",
6325 + "bus_uart0", "bus_uart1",
6326 + "bus_uart2", "bus_uart3",
6327 + "bus_scr", "bus_ephy", "bus_dbg";
6330 mmc0_clk: clk@01c20088 {
6332 compatible = "allwinner,sun4i-a10-mmc-clk";
6333 reg = <0x01c20088 0x4>;
6334 - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
6335 + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
6336 clock-output-names = "mmc0",
6341 compatible = "allwinner,sun4i-a10-mmc-clk";
6342 reg = <0x01c2008c 0x4>;
6343 - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
6344 + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
6345 clock-output-names = "mmc1",
6350 compatible = "allwinner,sun4i-a10-mmc-clk";
6351 reg = <0x01c20090 0x4>;
6352 - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
6353 + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
6354 clock-output-names = "mmc2",
6357 @@ -285,6 +288,33 @@
6358 clocks = <&osc24M>, <&pll6 1>, <&pll5>;
6359 clock-output-names = "mbus";
6363 + compatible = "fixed-factor-clock";
6364 + #clock-cells = <0>;
6367 + clocks = <&osc24M>;
6368 + clock-output-names = "apb0";
6371 + apb0_gates: clk@01f01428 {
6372 + compatible = "allwinner,sun8i-h3-apb0-gates-clk",
6373 + "allwinner,sun4i-a10-gates-clk";
6374 + reg = <0x01f01428 0x4>;
6375 + #clock-cells = <1>;
6377 + clock-indices = <0>, <1>;
6378 + clock-output-names = "apb0_pio", "apb0_ir";
6381 + ir_clk: ir_clk@01f01454 {
6382 + compatible = "allwinner,sun4i-a10-mod0-clk";
6383 + reg = <0x01f01454 0x4>;
6384 + #clock-cells = <0>;
6385 + clocks = <&osc32k>, <&osc24M>;
6386 + clock-output-names = "ir";
6392 reg = <0x01c02000 0x1000>;
6393 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
6394 clocks = <&bus_gates 6>;
6395 - resets = <&bus_rst 6>;
6396 + resets = <&ahb_rst 6>;
6404 - resets = <&bus_rst 8>;
6405 + resets = <&ahb_rst 8>;
6406 reset-names = "ahb";
6407 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
6408 status = "disabled";
6413 - resets = <&bus_rst 9>;
6414 + resets = <&ahb_rst 9>;
6415 reset-names = "ahb";
6416 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
6417 status = "disabled";
6422 - resets = <&bus_rst 10>;
6423 + resets = <&ahb_rst 10>;
6424 reset-names = "ahb";
6425 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
6426 status = "disabled";
6428 reg = <0x01c1b000 0x100>;
6429 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
6430 clocks = <&bus_gates 25>, <&bus_gates 29>;
6431 - resets = <&bus_rst 25>, <&bus_rst 29>;
6432 + resets = <&ahb_rst 25>, <&ahb_rst 29>;
6435 status = "disabled";
6437 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
6438 clocks = <&bus_gates 29>, <&bus_gates 25>,
6440 - resets = <&bus_rst 29>, <&bus_rst 25>;
6441 + resets = <&ahb_rst 29>, <&ahb_rst 25>;
6444 status = "disabled";
6446 reg = <0x01c1c000 0x100>;
6447 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
6448 clocks = <&bus_gates 26>, <&bus_gates 30>;
6449 - resets = <&bus_rst 26>, <&bus_rst 30>;
6450 + resets = <&ahb_rst 26>, <&ahb_rst 30>;
6453 status = "disabled";
6455 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
6456 clocks = <&bus_gates 30>, <&bus_gates 26>,
6458 - resets = <&bus_rst 30>, <&bus_rst 26>;
6459 + resets = <&ahb_rst 30>, <&ahb_rst 26>;
6462 status = "disabled";
6464 reg = <0x01c1d000 0x100>;
6465 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
6466 clocks = <&bus_gates 27>, <&bus_gates 31>;
6467 - resets = <&bus_rst 27>, <&bus_rst 31>;
6468 + resets = <&ahb_rst 27>, <&ahb_rst 31>;
6471 status = "disabled";
6473 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
6474 clocks = <&bus_gates 31>, <&bus_gates 27>,
6476 - resets = <&bus_rst 31>, <&bus_rst 27>;
6477 + resets = <&ahb_rst 31>, <&ahb_rst 27>;
6480 status = "disabled";
6484 interrupt-controller;
6485 - #interrupt-cells = <2>;
6486 + #interrupt-cells = <3>;
6488 uart0_pins_a: uart0@0 {
6489 allwinner,pins = "PA4", "PA5";
6490 @@ -502,10 +532,22 @@
6494 - bus_rst: reset@01c202c0 {
6495 + ahb_rst: reset@01c202c0 {
6497 - compatible = "allwinner,sun8i-h3-bus-reset";
6498 - reg = <0x01c202c0 0x1c>;
6499 + compatible = "allwinner,sun6i-a31-ahb1-reset";
6500 + reg = <0x01c202c0 0xc>;
6503 + apb1_rst: reset@01c202d0 {
6504 + #reset-cells = <1>;
6505 + compatible = "allwinner,sun6i-a31-clock-reset";
6506 + reg = <0x01c202d0 0x4>;
6509 + apb2_rst: reset@01c202d8 {
6510 + #reset-cells = <1>;
6511 + compatible = "allwinner,sun6i-a31-clock-reset";
6512 + reg = <0x01c202d8 0x4>;
6519 clocks = <&bus_gates 112>;
6520 - resets = <&bus_rst 144>;
6521 + resets = <&apb2_rst 16>;
6522 dmas = <&dma 6>, <&dma 6>;
6523 dma-names = "rx", "tx";
6524 status = "disabled";
6528 clocks = <&bus_gates 113>;
6529 - resets = <&bus_rst 145>;
6530 + resets = <&apb2_rst 17>;
6531 dmas = <&dma 7>, <&dma 7>;
6532 dma-names = "rx", "tx";
6533 status = "disabled";
6537 clocks = <&bus_gates 114>;
6538 - resets = <&bus_rst 146>;
6539 + resets = <&apb2_rst 18>;
6540 dmas = <&dma 8>, <&dma 8>;
6541 dma-names = "rx", "tx";
6542 status = "disabled";
6546 clocks = <&bus_gates 115>;
6547 - resets = <&bus_rst 147>;
6548 + resets = <&apb2_rst 19>;
6549 dmas = <&dma 9>, <&dma 9>;
6550 dma-names = "rx", "tx";
6551 status = "disabled";
6552 @@ -591,5 +633,40 @@
6553 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
6554 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
6557 + apb0_reset: reset@01f014b0 {
6558 + reg = <0x01f014b0 0x4>;
6559 + compatible = "allwinner,sun6i-a31-clock-reset";
6560 + #reset-cells = <1>;
6564 + compatible = "allwinner,sun5i-a13-ir";
6565 + clocks = <&apb0_gates 1>, <&ir_clk>;
6566 + clock-names = "apb", "ir";
6567 + resets = <&apb0_reset 1>;
6568 + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
6569 + reg = <0x01f02000 0x40>;
6570 + status = "disabled";
6573 + r_pio: pinctrl@01f02c00 {
6574 + compatible = "allwinner,sun8i-h3-r-pinctrl";
6575 + reg = <0x01f02c00 0x400>;
6576 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
6577 + clocks = <&apb0_gates 0>;
6578 + resets = <&apb0_reset 0>;
6580 + #gpio-cells = <3>;
6581 + interrupt-controller;
6582 + #interrupt-cells = <3>;
6585 + allwinner,pins = "PL11";
6586 + allwinner,function = "s_cir_rx";
6587 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6588 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6593 diff --git a/arch/arm/dts/sun8i-q8-common.dtsi b/arch/arm/dts/sun8i-q8-common.dtsi
6594 index 07cd268..346a49d 100644
6595 --- a/arch/arm/dts/sun8i-q8-common.dtsi
6596 +++ b/arch/arm/dts/sun8i-q8-common.dtsi
6599 #include "sunxi-q8-common.dtsi"
6601 +#include <dt-bindings/pwm/pwm.h>
6608 + backlight: backlight {
6609 + compatible = "pwm-backlight";
6610 + pinctrl-names = "default";
6611 + pinctrl-0 = <&bl_en_pin_q8>;
6612 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
6613 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
6614 + default-brightness-level = <8>;
6615 + enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
6619 stdout-path = "serial0:115200n8";
6623 pinctrl-names = "default";
6624 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
6625 - vmmc-supply = <®_vcc3v0>;
6626 + vmmc-supply = <®_dcdc1>;
6628 cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
6637 + axp22x: pmic@3a3 {
6638 + compatible = "x-powers,axp223";
6640 + interrupt-parent = <&nmi_intc>;
6641 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
6642 + eldoin-supply = <®_dcdc1>;
6646 +#include "axp22x.dtsi"
6649 + regulator-always-on;
6650 + regulator-min-microvolt = <3000000>;
6651 + regulator-max-microvolt = <3000000>;
6652 + regulator-name = "vcc-io";
6656 + regulator-always-on;
6657 + regulator-min-microvolt = <2350000>;
6658 + regulator-max-microvolt = <2650000>;
6659 + regulator-name = "vdd-dll";
6663 + regulator-always-on;
6664 + regulator-min-microvolt = <2700000>;
6665 + regulator-max-microvolt = <3300000>;
6666 + regulator-name = "vcc-pll-avcc";
6670 + regulator-name = "vcc-lcd";
6674 + regulator-always-on;
6675 + regulator-min-microvolt = <900000>;
6676 + regulator-max-microvolt = <1400000>;
6677 + regulator-name = "vdd-cpus";
6681 + regulator-always-on;
6682 + regulator-min-microvolt = <3000000>;
6683 + regulator-max-microvolt = <3000000>;
6684 + regulator-name = "vcc-3v0";
6688 + regulator-always-on;
6689 + regulator-min-microvolt = <900000>;
6690 + regulator-max-microvolt = <1400000>;
6691 + regulator-name = "vdd-sys";
6695 + regulator-always-on;
6696 + regulator-min-microvolt = <900000>;
6697 + regulator-max-microvolt = <1400000>;
6698 + regulator-name = "vdd-cpu";
6702 + regulator-always-on;
6703 + regulator-min-microvolt = <1500000>;
6704 + regulator-max-microvolt = <1500000>;
6705 + regulator-name = "vcc-dram";
6709 + regulator-name = "vcc-rtc";
6713 pinctrl-names = "default";
6714 pinctrl-0 = <&r_uart_pins_a>;
6719 + vcc-lcd-supply = <®_dc1sw>;
6721 diff --git a/arch/arm/dts/sun9i-a80-cubieboard4.dts b/arch/arm/dts/sun9i-a80-cubieboard4.dts
6722 index 6484dcf..eb2ccd0 100644
6723 --- a/arch/arm/dts/sun9i-a80-cubieboard4.dts
6724 +++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts
6726 stdout-path = "serial0:115200n8";
6730 + compatible = "gpio-leds";
6731 + pinctrl-names = "default";
6732 + pinctrl-0 = <&led_pins_cubieboard4>;
6735 + label = "cubieboard4:green:usr";
6736 + gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
6740 + label = "cubieboard4:red:usr";
6741 + gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
6747 + led_pins_cubieboard4: led-pins@0 {
6748 + allwinner,pins = "PH6", "PH17";
6749 + allwinner,function = "gpio_out";
6750 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6751 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6754 mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
6755 allwinner,pins = "PH18";
6756 allwinner,function = "gpio_in";
6758 vmmc-supply = <®_vcc3v0>;
6766 + /* Increase drive strength for DDR modes */
6767 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
6778 diff --git a/arch/arm/dts/sun9i-a80-optimus.dts b/arch/arm/dts/sun9i-a80-optimus.dts
6779 index 6ce4b5e..d7a20d9 100644
6780 --- a/arch/arm/dts/sun9i-a80-optimus.dts
6781 +++ b/arch/arm/dts/sun9i-a80-optimus.dts
6784 compatible = "gpio-leds";
6785 pinctrl-names = "default";
6786 - pinctrl-0 = <&led_pins_optimus>;
6787 + pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
6789 /* The LED names match those found on the board */
6792 gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
6795 - /* led3 is on PM15, in R_PIO */
6797 + label = "optimus:led3:usr";
6798 + gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
6802 label = "optimus:led4:usr";
6803 @@ -106,17 +109,6 @@
6808 - pinctrl-names = "default";
6809 - pinctrl-0 = <&i2c3_pins_a>;
6814 - /* Enable internal pull-up */
6815 - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
6821 @@ -171,30 +163,42 @@
6822 vmmc-supply = <®_vcc3v0>;
6830 + /* Increase drive strength for DDR modes */
6831 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
6835 pinctrl-0 = <&usb1_vbus_pin_optimus>;
6836 gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
6841 - pinctrl-names = "default";
6842 - pinctrl-0 = <&uart0_pins_a>;
6848 - pinctrl-names = "default";
6849 - pinctrl-0 = <&uart4_pins_a>;
6851 + led_r_pins_optimus: led-pins@1 {
6852 + allwinner,pins = "PM15";
6853 + allwinner,function = "gpio_out";
6854 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6855 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6864 - /* Enable internal pull-up */
6865 - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
6867 + pinctrl-names = "default";
6868 + pinctrl-0 = <&uart0_pins_a>;
6873 diff --git a/arch/arm/dts/sun9i-a80.dtsi b/arch/arm/dts/sun9i-a80.dtsi
6874 index a43ad77..f68b324 100644
6875 --- a/arch/arm/dts/sun9i-a80.dtsi
6876 +++ b/arch/arm/dts/sun9i-a80.dtsi
6877 @@ -128,6 +128,17 @@
6879 ranges = <0 0 0 0x20000000>;
6882 + * This clock is actually configurable from the PRCM address
6883 + * space. The external 24M oscillator can be turned off, and
6884 + * the clock switched to an internal 16M RC oscillator. Under
6885 + * normal operation there's no reason to do this, and the
6886 + * default is to use the external good one, so just model this
6887 + * as a fixed clock. Also it is not entirely clear if the
6888 + * osc24M mux in the PRCM affects the entire clock tree, which
6889 + * would also throw all the PLL clock rates off, or just the
6890 + * downstream clocks in the PRCM.
6892 osc24M: osc24M_clk {
6894 compatible = "fixed-clock";
6895 @@ -135,6 +146,13 @@
6896 clock-output-names = "osc24M";
6900 + * The 32k clock is from an external source, normally the
6901 + * AC100 codec/RTC chip. This clock is by default enabled
6902 + * and clocked at 32768 Hz, from the oscillator connected
6903 + * to the AC100. It is configurable, but no such driver or
6904 + * bindings exist yet.
6906 osc32k: osc32k_clk {
6908 compatible = "fixed-clock";
6909 @@ -164,6 +182,14 @@
6910 "usb_phy2", "usb_hsic_12M";
6913 + pll3: clk@06000008 {
6914 + /* placeholder until implemented */
6915 + #clock-cells = <0>;
6916 + compatible = "fixed-clock";
6918 + clock-output-names = "pll3";
6921 pll4: clk@0600000c {
6923 compatible = "allwinner,sun9i-a80-pll4-clk";
6924 @@ -277,9 +303,12 @@
6925 compatible = "allwinner,sun9i-a80-ahb0-gates-clk";
6926 reg = <0x06000580 0x4>;
6928 - clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>,
6929 - <14>, <15>, <16>, <18>, <20>, <21>,
6931 + clock-indices = <0>, <1>, <3>,
6937 clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu",
6938 "ahb0_ss", "ahb0_sd", "ahb0_nand1",
6939 "ahb0_nand0", "ahb0_sdram",
6940 @@ -293,7 +322,10 @@
6941 compatible = "allwinner,sun9i-a80-ahb1-gates-clk";
6942 reg = <0x06000584 0x4>;
6944 - clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>;
6945 + clock-indices = <0>, <1>,
6949 clock-output-names = "ahb1_usbotg", "ahb1_usbhci",
6950 "ahb1_gmac", "ahb1_msgbox",
6951 "ahb1_spinlock", "ahb1_hstimer",
6953 compatible = "allwinner,sun9i-a80-ahb2-gates-clk";
6954 reg = <0x06000588 0x4>;
6956 - clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>,
6958 + clock-indices = <0>, <1>,
6961 clock-output-names = "ahb2_lcd0", "ahb2_lcd1",
6962 "ahb2_edp", "ahb2_csi", "ahb2_hdmi",
6963 "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi";
6964 @@ -317,8 +350,10 @@
6965 compatible = "allwinner,sun9i-a80-apb0-gates-clk";
6966 reg = <0x06000590 0x4>;
6968 - clock-indices = <1>, <5>, <11>, <12>, <13>, <15>,
6970 + clock-indices = <1>, <5>,
6974 clock-output-names = "apb0_spdif", "apb0_pio",
6975 "apb0_ac97", "apb0_i2s0", "apb0_i2s1",
6976 "apb0_lradc", "apb0_gpadc", "apb0_twd",
6977 @@ -330,14 +365,79 @@
6978 compatible = "allwinner,sun9i-a80-apb1-gates-clk";
6979 reg = <0x06000594 0x4>;
6981 - clock-indices = <0>, <1>, <2>, <3>, <4>,
6982 - <16>, <17>, <18>, <19>, <20>, <21>;
6983 + clock-indices = <0>, <1>,
6988 clock-output-names = "apb1_i2c0", "apb1_i2c1",
6989 "apb1_i2c2", "apb1_i2c3", "apb1_i2c4",
6990 "apb1_uart0", "apb1_uart1",
6991 "apb1_uart2", "apb1_uart3",
6992 "apb1_uart4", "apb1_uart5";
6995 + cpus_clk: clk@08001410 {
6996 + compatible = "allwinner,sun9i-a80-cpus-clk";
6997 + reg = <0x08001410 0x4>;
6998 + #clock-cells = <0>;
6999 + clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
7000 + clock-output-names = "cpus";
7004 + compatible = "fixed-factor-clock";
7005 + #clock-cells = <0>;
7008 + clocks = <&cpus_clk>;
7009 + clock-output-names = "ahbs";
7012 + apbs: clk@0800141c {
7013 + compatible = "allwinner,sun8i-a23-apb0-clk";
7014 + reg = <0x0800141c 0x4>;
7015 + #clock-cells = <0>;
7017 + clock-output-names = "apbs";
7020 + apbs_gates: clk@08001428 {
7021 + compatible = "allwinner,sun9i-a80-apbs-gates-clk";
7022 + reg = <0x08001428 0x4>;
7023 + #clock-cells = <1>;
7025 + clock-indices = <0>, <1>,
7032 + clock-output-names = "apbs_pio", "apbs_ir",
7033 + "apbs_timer", "apbs_rsb",
7034 + "apbs_uart", "apbs_1wire",
7035 + "apbs_i2c0", "apbs_i2c1",
7036 + "apbs_ps2_0", "apbs_ps2_1",
7037 + "apbs_dma", "apbs_i2s0",
7038 + "apbs_i2s1", "apbs_twd";
7041 + r_1wire_clk: clk@08001450 {
7042 + reg = <0x08001450 0x4>;
7043 + #clock-cells = <0>;
7044 + compatible = "allwinner,sun4i-a10-mod0-clk";
7045 + clocks = <&osc32k>, <&osc24M>;
7046 + clock-output-names = "r_1wire";
7049 + r_ir_clk: clk@08001454 {
7050 + reg = <0x08001454 0x4>;
7051 + #clock-cells = <0>;
7052 + compatible = "allwinner,sun4i-a10-mod0-clk";
7053 + clocks = <&osc32k>, <&osc24M>;
7054 + clock-output-names = "r_ir";
7062 mmc0: mmc@01c0f000 {
7063 - compatible = "allwinner,sun5i-a13-mmc";
7064 + compatible = "allwinner,sun9i-a80-mmc";
7065 reg = <0x01c0f000 0x1000>;
7066 clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
7067 <&mmc0_clk 1>, <&mmc0_clk 2>;
7071 mmc1: mmc@01c10000 {
7072 - compatible = "allwinner,sun5i-a13-mmc";
7073 + compatible = "allwinner,sun9i-a80-mmc";
7074 reg = <0x01c10000 0x1000>;
7075 clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
7076 <&mmc1_clk 1>, <&mmc1_clk 2>;
7080 mmc2: mmc@01c11000 {
7081 - compatible = "allwinner,sun5i-a13-mmc";
7082 + compatible = "allwinner,sun9i-a80-mmc";
7083 reg = <0x01c11000 0x1000>;
7084 clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
7085 <&mmc2_clk 1>, <&mmc2_clk 2>;
7089 mmc3: mmc@01c12000 {
7090 - compatible = "allwinner,sun5i-a13-mmc";
7091 + compatible = "allwinner,sun9i-a80-mmc";
7092 reg = <0x01c12000 0x1000>;
7093 clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
7094 <&mmc3_clk 1>, <&mmc3_clk 2>;
7096 clocks = <&apb0_gates 5>;
7098 interrupt-controller;
7099 - #interrupt-cells = <2>;
7100 + #interrupt-cells = <3>;
7105 mmc2_8bit_pins: mmc2_8bit {
7106 allwinner,pins = "PC6", "PC7", "PC8", "PC9",
7107 "PC10", "PC11", "PC12",
7108 - "PC13", "PC14", "PC15";
7109 + "PC13", "PC14", "PC15",
7111 allwinner,function = "mmc2";
7112 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
7113 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
7114 @@ -752,14 +853,83 @@
7115 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
7118 + apbs_rst: reset@080014b0 {
7119 + reg = <0x080014b0 0x4>;
7120 + compatible = "allwinner,sun6i-a31-clock-reset";
7121 + #reset-cells = <1>;
7124 + nmi_intc: interrupt-controller@080015a0 {
7125 + compatible = "allwinner,sun9i-a80-nmi";
7126 + interrupt-controller;
7127 + #interrupt-cells = <2>;
7128 + reg = <0x080015a0 0xc>;
7129 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
7132 + r_ir: ir@08002000 {
7133 + compatible = "allwinner,sun5i-a13-ir";
7134 + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
7135 + pinctrl-names = "default";
7136 + pinctrl-0 = <&r_ir_pins>;
7137 + clocks = <&apbs_gates 1>, <&r_ir_clk>;
7138 + clock-names = "apb", "ir";
7139 + resets = <&apbs_rst 1>;
7140 + reg = <0x08002000 0x40>;
7141 + status = "disabled";
7144 r_uart: serial@08002800 {
7145 compatible = "snps,dw-apb-uart";
7146 reg = <0x08002800 0x400>;
7147 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
7150 - clocks = <&osc24M>;
7151 + clocks = <&apbs_gates 4>;
7152 + resets = <&apbs_rst 4>;
7153 status = "disabled";
7156 + r_pio: pinctrl@08002c00 {
7157 + compatible = "allwinner,sun9i-a80-r-pinctrl";
7158 + reg = <0x08002c00 0x400>;
7159 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
7160 + <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
7161 + clocks = <&apbs_gates 0>;
7162 + resets = <&apbs_rst 0>;
7164 + interrupt-controller;
7165 + #address-cells = <1>;
7166 + #size-cells = <0>;
7167 + #gpio-cells = <3>;
7170 + allwinner,pins = "PL6";
7171 + allwinner,function = "s_cir_rx";
7172 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
7173 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
7176 + r_rsb_pins: r_rsb {
7177 + allwinner,pins = "PN0", "PN1";
7178 + allwinner,function = "s_rsb";
7179 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
7180 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
7184 + r_rsb: i2c@08003400 {
7185 + compatible = "allwinner,sun8i-a23-rsb";
7186 + reg = <0x08003400 0x400>;
7187 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
7188 + clocks = <&apbs_gates 3>;
7189 + clock-frequency = <3000000>;
7190 + resets = <&apbs_rst 3>;
7191 + pinctrl-names = "default";
7192 + pinctrl-0 = <&r_rsb_pins>;
7193 + status = "disabled";
7194 + #address-cells = <1>;
7195 + #size-cells = <0>;
7199 diff --git a/arch/arm/dts/sunxi-itead-core-common.dtsi b/arch/arm/dts/sunxi-itead-core-common.dtsi
7200 new file mode 100644
7201 index 0000000..2565d51
7203 +++ b/arch/arm/dts/sunxi-itead-core-common.dtsi
7206 + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
7208 + * This file is dual-licensed: you can use it either under the terms
7209 + * of the GPL or the X11 license, at your option. Note that this dual
7210 + * licensing only applies to this file, and not this project as a
7213 + * a) This file is free software; you can redistribute it and/or
7214 + * modify it under the terms of the GNU General Public License as
7215 + * published by the Free Software Foundation; either version 2 of the
7216 + * License, or (at your option) any later version.
7218 + * This file is distributed in the hope that it will be useful,
7219 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7220 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7221 + * GNU General Public License for more details.
7223 + * Or, alternatively,
7225 + * b) Permission is hereby granted, free of charge, to any person
7226 + * obtaining a copy of this software and associated documentation
7227 + * files (the "Software"), to deal in the Software without
7228 + * restriction, including without limitation the rights to use,
7229 + * copy, modify, merge, publish, distribute, sublicense, and/or
7230 + * sell copies of the Software, and to permit persons to whom the
7231 + * Software is furnished to do so, subject to the following
7234 + * The above copyright notice and this permission notice shall be
7235 + * included in all copies or substantial portions of the Software.
7237 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
7238 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
7239 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
7240 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
7241 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
7242 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
7243 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7244 + * OTHER DEALINGS IN THE SOFTWARE.
7247 +#include "sunxi-common-regulators.dtsi"
7255 + stdout-path = "serial0:115200n8";
7260 + cpu-supply = <®_dcdc2>;
7272 + pinctrl-names = "default";
7273 + pinctrl-0 = <&i2c0_pins_a>;
7282 + pinctrl-names = "default";
7283 + pinctrl-0 = <&i2c1_pins_a>;
7295 +#include "axp209.dtsi"
7298 + regulator-always-on;
7299 + regulator-min-microvolt = <1000000>;
7300 + regulator-max-microvolt = <1400000>;
7301 + regulator-name = "vdd-cpu";
7305 + regulator-always-on;
7306 + regulator-min-microvolt = <1000000>;
7307 + regulator-max-microvolt = <1400000>;
7308 + regulator-name = "vdd-int-dll";
7312 + regulator-name = "vdd-rtc";
7316 + regulator-always-on;
7317 + regulator-min-microvolt = <3000000>;
7318 + regulator-max-microvolt = <3000000>;
7319 + regulator-name = "avcc";
7331 + pinctrl-names = "default";
7332 + pinctrl-0 = <&uart0_pins_a>;
7337 + usb1_vbus-supply = <®_usb1_vbus>;
7338 + usb2_vbus-supply = <®_usb2_vbus>;
7341 diff --git a/arch/arm/dts/sunxi-q8-common.dtsi b/arch/arm/dts/sunxi-q8-common.dtsi
7342 index 17b26ff..b824146 100644
7343 --- a/arch/arm/dts/sunxi-q8-common.dtsi
7344 +++ b/arch/arm/dts/sunxi-q8-common.dtsi
7351 + pinctrl-names = "default";
7352 + pinctrl-0 = <&pwm0_pins>;