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 --- a/arch/arm/dts/Makefile
97 +++ b/arch/arm/dts/Makefile
98 @@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
99 sun4i-a10-mk802ii.dtb \
100 sun4i-a10-olinuxino-lime.dtb \
101 sun4i-a10-pcduino.dtb \
102 + sun4i-a10-pcduino2.dtb \
103 sun4i-a10-pov-protab2-ips9.dtb
104 dtb-$(CONFIG_MACH_SUN5I) += \
105 sun5i-a10s-auxtek-t003.dtb \
106 @@ -155,7 +156,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \
107 sun6i-a31-pangolin.dtb \
108 sun6i-a31s-cs908.dtb \
109 sun6i-a31s-primo81.dtb \
110 - sun6i-a31s-sinovoip-bpi-m2.dtb
111 + sun6i-a31s-sina31s.dtb \
112 + sun6i-a31s-sinovoip-bpi-m2.dtb \
113 + sun6i-a31s-yones-toptech-bs1078-v2.dtb
114 dtb-$(CONFIG_MACH_SUN7I) += \
115 sun7i-a20-ainol-aw1.dtb \
116 sun7i-a20-bananapi.dtb \
117 @@ -164,6 +167,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
118 sun7i-a20-cubietruck.dtb \
119 sun7i-a20-hummingbird.dtb \
120 sun7i-a20-i12-tvbox.dtb \
121 + sun7i-a20-icnova-swac.dtb \
122 + sun7i-a20-itead-ibox.dtb \
123 sun7i-a20-lamobo-r1.dtb \
126 @@ -190,6 +195,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
127 sun8i-a33-sinlinx-sina33.dtb
128 dtb-$(CONFIG_MACH_SUN8I_A83T) += \
129 sun8i-a83t-allwinner-h8homlet-v2.dtb \
130 + sun8i-a83t-cubietruck-plus.dtb \
131 sun8i-a83t-sinovoip-bpi-m3.dtb
132 dtb-$(CONFIG_MACH_SUN8I_H3) += \
133 sun8i-h3-orangepi-pc.dtb \
135 +++ b/arch/arm/dts/axp22x.dtsi
138 + * Copyright 2015 Chen-Yu Tsai
140 + * Chen-Yu Tsai <wens@csie.org>
142 + * This file is dual-licensed: you can use it either under the terms
143 + * of the GPL or the X11 license, at your option. Note that this dual
144 + * licensing only applies to this file, and not this project as a
147 + * a) This file is free software; you can redistribute it and/or
148 + * modify it under the terms of the GNU General Public License as
149 + * published by the Free Software Foundation; either version 2 of the
150 + * License, or (at your option) any later version.
152 + * This file is distributed in the hope that it will be useful,
153 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
154 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
155 + * GNU General Public License for more details.
157 + * Or, alternatively,
159 + * b) Permission is hereby granted, free of charge, to any person
160 + * obtaining a copy of this software and associated documentation
161 + * files (the "Software"), to deal in the Software without
162 + * restriction, including without limitation the rights to use,
163 + * copy, modify, merge, publish, distribute, sublicense, and/or
164 + * sell copies of the Software, and to permit persons to whom the
165 + * Software is furnished to do so, subject to the following
168 + * The above copyright notice and this permission notice shall be
169 + * included in all copies or substantial portions of the Software.
171 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
172 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
173 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
174 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
175 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
176 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
177 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
178 + * OTHER DEALINGS IN THE SOFTWARE.
182 + * AXP221/221s/223 Integrated Power Management Chip
183 + * http://www.x-powers.com/product/AXP22X.php
184 + * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
188 + interrupt-controller;
189 + #interrupt-cells = <1>;
192 + /* Default work frequency for buck regulators */
193 + x-powers,dcdc-freq = <3000>;
196 + regulator-name = "dcdc1";
200 + regulator-name = "dcdc2";
204 + regulator-name = "dcdc3";
208 + regulator-name = "dcdc4";
212 + regulator-name = "dcdc5";
216 + regulator-name = "dc1sw";
219 + reg_dc5ldo: dc5ldo {
220 + regulator-name = "dc5ldo";
224 + regulator-name = "aldo1";
228 + regulator-name = "aldo2";
232 + regulator-name = "aldo3";
236 + regulator-name = "dldo1";
240 + regulator-name = "dldo2";
244 + regulator-name = "dldo3";
248 + regulator-name = "dldo4";
252 + regulator-name = "eldo1";
256 + regulator-name = "eldo2";
260 + regulator-name = "eldo3";
263 + reg_ldo_io0: ldo_io0 {
264 + regulator-name = "ldo_io0";
265 + status = "disabled";
268 + reg_ldo_io1: ldo_io1 {
269 + regulator-name = "ldo_io1";
270 + status = "disabled";
273 + reg_rtc_ldo: rtc_ldo {
274 + /* RTC_LDO is a fixed, always-on regulator */
275 + regulator-always-on;
276 + regulator-min-microvolt = <3000000>;
277 + regulator-max-microvolt = <3000000>;
278 + regulator-name = "rtc_ldo";
282 --- a/arch/arm/dts/sun4i-a10-a1000.dts
283 +++ b/arch/arm/dts/sun4i-a10-a1000.dts
295 --- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
296 +++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
298 #include "sunxi-common-regulators.dtsi"
299 #include <dt-bindings/gpio/gpio.h>
300 #include <dt-bindings/input/input.h>
301 +#include <dt-bindings/interrupt-controller/irq.h>
304 model = "Chuwi V7 CW0825";
310 + pinctrl-names = "default";
311 + pinctrl-0 = <&i2c1_pins_a>;
316 + pinctrl-names = "default";
317 + pinctrl-0 = <&i2c2_pins_a>;
320 + ft5306de4: touchscreen@38 {
321 + compatible = "edt,edt-ft5406";
323 + interrupt-parent = <&pio>;
324 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
325 + touchscreen-size-x = <1024>;
326 + touchscreen-size-y = <768>;
331 vref-supply = <®_vcc3v0>;
333 --- a/arch/arm/dts/sun4i-a10-cubieboard.dts
334 +++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
344 cpu-supply = <®_dcdc2>;
346 --- a/arch/arm/dts/sun4i-a10-gemei-g9.dts
347 +++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts
349 #include "sunxi-common-regulators.dtsi"
350 #include <dt-bindings/gpio/gpio.h>
351 #include <dt-bindings/input/input.h>
352 +#include <dt-bindings/interrupt-controller/irq.h>
355 model = "Gemei G9 Tablet";
361 * AXP battery management
364 * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
367 + /* PH15 controls power to external amplifier (ft2012q) */
368 + pinctrl-names = "default";
369 + pinctrl-0 = <&codec_pa_pin>;
370 + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
375 + cpu-supply = <®_dcdc2>;
384 - compatible = "x-powers,axp209";
388 - interrupt-controller;
389 - #interrupt-cells = <1>;
393 +#include "axp209.dtsi"
396 pinctrl-names = "default";
397 pinctrl-0 = <&i2c1_pins_a>;
398 @@ -103,17 +112,13 @@
400 compatible = "bosch,bma250";
404 - * TODO: interrupt pins:
408 + interrupt-parent = <&pio>;
409 + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */
414 - vref-supply = <®_vcc3v0>;
415 + vref-supply = <®_ldo2>;
424 + codec_pa_pin: codec_pa_pin@0 {
425 + allwinner,pins = "PH15";
426 + allwinner,function = "gpio_out";
427 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
428 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
433 + regulator-always-on;
434 + regulator-min-microvolt = <1000000>;
435 + regulator-max-microvolt = <1400000>;
436 + regulator-name = "vdd-cpu";
440 + regulator-always-on;
441 + regulator-min-microvolt = <1250000>;
442 + regulator-max-microvolt = <1250000>;
443 + regulator-name = "vdd-int-dll";
447 + regulator-name = "vdd-rtc";
451 + regulator-always-on;
452 + regulator-min-microvolt = <3000000>;
453 + regulator-max-microvolt = <3000000>;
454 + regulator-name = "avcc";
460 --- a/arch/arm/dts/sun4i-a10-inet1.dts
461 +++ b/arch/arm/dts/sun4i-a10-inet1.dts
463 #include <dt-bindings/input/input.h>
464 #include <dt-bindings/interrupt-controller/irq.h>
465 #include <dt-bindings/pinctrl/sun4i-a10.h>
466 +#include <dt-bindings/pwm/pwm.h>
474 + backlight: backlight {
475 + compatible = "pwm-backlight";
476 + pinctrl-names = "default";
477 + pinctrl-0 = <&bl_en_pin_inet>;
478 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
479 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
480 + default-brightness-level = <8>;
481 + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
485 stdout-path = "serial0:115200n8";
494 cpu-supply = <®_dcdc2>;
497 pinctrl-names = "default";
498 pinctrl-0 = <&i2c2_pins_a>;
501 + ft5x: touchscreen@38 {
502 + compatible = "edt,edt-ft5406";
504 + interrupt-parent = <&pio>;
505 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
506 + pinctrl-names = "default";
507 + pinctrl-0 = <&touchscreen_wake_pin>;
508 + wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
509 + touchscreen-size-x = <600>;
510 + touchscreen-size-y = <1024>;
511 + touchscreen-swapped-x-y;
520 + bl_en_pin_inet: bl_en_pin@0 {
521 + allwinner,pins = "PH7";
522 + allwinner,function = "gpio_out";
523 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
524 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
527 + touchscreen_wake_pin: touchscreen_wake_pin@0 {
528 + allwinner,pins = "PB13";
529 + allwinner,function = "gpio_out";
530 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
531 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
534 usb0_id_detect_pin: usb0_id_detect_pin@0 {
535 allwinner,pins = "PH4";
536 allwinner,function = "gpio_in";
542 + pinctrl-names = "default";
543 + pinctrl-0 = <&pwm0_pins_a>;
549 regulator-min-microvolt = <1000000>;
550 --- a/arch/arm/dts/sun4i-a10-inet97fv2.dts
551 +++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts
553 #include "sunxi-common-regulators.dtsi"
555 #include <dt-bindings/gpio/gpio.h>
556 +#include <dt-bindings/input/input.h>
557 +#include <dt-bindings/interrupt-controller/irq.h>
560 model = "INet-97F Rev 02";
568 + cpu-supply = <®_dcdc2>;
576 - compatible = "x-powers,axp209";
582 +#include "axp209.dtsi"
585 + pinctrl-names = "default";
586 + pinctrl-0 = <&i2c1_pins_a>;
591 + pinctrl-names = "default";
592 + pinctrl-0 = <&i2c2_pins_a>;
595 + ft5406ee8: touchscreen@38 {
596 + compatible = "edt,edt-ft5406";
598 + interrupt-parent = <&pio>;
599 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
600 + touchscreen-size-x = <800>;
601 + touchscreen-size-y = <480>;
606 + vref-supply = <®_ldo2>;
611 + linux,code = <KEY_MENU>;
613 + voltage = <200000>;
617 + label = "Volume Up";
618 + linux,code = <KEY_VOLUMEUP>;
620 + voltage = <600000>;
623 - interrupt-controller;
624 - #interrupt-cells = <1>;
626 + label = "Volume Down";
627 + linux,code = <KEY_VOLUMEDOWN>;
629 + voltage = <800000>;
634 + linux,code = <KEY_HOMEPAGE>;
636 + voltage = <1000000>;
641 + linux,code = <KEY_ESC>;
643 + voltage = <1200000>;
659 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
660 + allwinner,pins = "PH4";
661 + allwinner,function = "gpio_in";
662 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
663 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
666 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
667 + allwinner,pins = "PH5";
668 + allwinner,function = "gpio_in";
669 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
670 + allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
675 + regulator-always-on;
676 + regulator-min-microvolt = <1000000>;
677 + regulator-max-microvolt = <1400000>;
678 + regulator-name = "vdd-cpu";
683 + regulator-always-on;
684 + regulator-min-microvolt = <1250000>;
685 + regulator-max-microvolt = <1250000>;
686 + regulator-name = "vdd-int-dll";
690 + regulator-name = "vdd-rtc";
694 + regulator-always-on;
695 + regulator-min-microvolt = <3000000>;
696 + regulator-max-microvolt = <3000000>;
697 + regulator-name = "avcc";
714 - usb1_vbus-supply = <®_usb1_vbus>;
715 + pinctrl-names = "default";
716 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
717 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
718 + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
719 + usb0_vbus-supply = <®_usb0_vbus>;
720 usb2_vbus-supply = <®_usb2_vbus>;
723 --- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
724 +++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
727 stdout-path = "serial0:115200n8";
731 + compatible = "gpio-keys-polled";
732 + pinctrl-names = "default";
733 + pinctrl-0 = <&key_pins_inet9f>;
734 + #address-cells = <1>;
736 + poll-interval = <20>;
739 + label = "Left Joystick Left";
740 + linux,code = <ABS_X>;
741 + linux,input-type = <EV_ABS>;
742 + linux,input-value = <0xffffffff>; /* -1 */
743 + gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
747 + label = "Left Joystick Right";
748 + linux,code = <ABS_X>;
749 + linux,input-type = <EV_ABS>;
750 + linux,input-value = <1>;
751 + gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
755 + label = "Left Joystick Up";
756 + linux,code = <ABS_Y>;
757 + linux,input-type = <EV_ABS>;
758 + linux,input-value = <0xffffffff>; /* -1 */
759 + gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
763 + label = "Left Joystick Down";
764 + linux,code = <ABS_Y>;
765 + linux,input-type = <EV_ABS>;
766 + linux,input-value = <1>;
767 + gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
771 + label = "Right Joystick Left";
772 + linux,code = <ABS_Z>;
773 + linux,input-type = <EV_ABS>;
774 + linux,input-value = <0xffffffff>; /* -1 */
775 + gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
779 + label = "Right Joystick Right";
780 + linux,code = <ABS_Z>;
781 + linux,input-type = <EV_ABS>;
782 + linux,input-value = <1>;
783 + gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
787 + label = "Right Joystick Up";
788 + linux,code = <ABS_RZ>;
789 + linux,input-type = <EV_ABS>;
790 + linux,input-value = <0xffffffff>; /* -1 */
791 + gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
795 + label = "Right Joystick Down";
796 + linux,code = <ABS_RZ>;
797 + linux,input-type = <EV_ABS>;
798 + linux,input-value = <1>;
799 + gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
803 + label = "DPad Left";
804 + linux,code = <ABS_HAT0X>;
805 + linux,input-type = <EV_ABS>;
806 + linux,input-value = <0xffffffff>; /* -1 */
807 + gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
811 + label = "DPad Right";
812 + linux,code = <ABS_HAT0X>;
813 + linux,input-type = <EV_ABS>;
814 + linux,input-value = <1>;
815 + gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
820 + linux,code = <ABS_HAT0Y>;
821 + linux,input-type = <EV_ABS>;
822 + linux,input-value = <0xffffffff>; /* -1 */
823 + gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
827 + label = "DPad Down";
828 + linux,code = <ABS_HAT0Y>;
829 + linux,input-type = <EV_ABS>;
830 + linux,input-value = <1>;
831 + gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
835 + label = "Button X";
836 + linux,code = <BTN_X>;
837 + gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
841 + label = "Button Y";
842 + linux,code = <BTN_Y>;
843 + gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
847 + label = "Button A";
848 + linux,code = <BTN_A>;
849 + gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
853 + label = "Button B";
854 + linux,code = <BTN_B>;
855 + gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
859 + label = "Select Button";
860 + linux,code = <BTN_SELECT>;
861 + gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
865 + label = "Start Button";
866 + linux,code = <BTN_START>;
867 + gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
871 + label = "Top Left Button";
872 + linux,code = <BTN_TL>;
873 + gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
877 + label = "Top Right Button";
878 + linux,code = <BTN_TR>;
879 + gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
886 pinctrl-names = "default";
887 pinctrl-0 = <&i2c1_pins_a>;
890 + /* Accelerometer */
892 + compatible = "bosch,bma250";
894 + interrupt-parent = <&pio>;
895 + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
900 pinctrl-names = "default";
901 pinctrl-0 = <&i2c2_pins_a>;
904 + ft5406ee8: touchscreen@38 {
905 + compatible = "edt,edt-ft5406";
907 + interrupt-parent = <&pio>;
908 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
909 + touchscreen-size-x = <800>;
910 + touchscreen-size-y = <480>;
919 + key_pins_inet9f: key_pins@0 {
920 + allwinner,pins = "PA0", "PA1", "PA3", "PA4",
921 + "PA5", "PA6", "PA8", "PA9",
922 + "PA11", "PA12", "PA13",
923 + "PA14", "PA15", "PA16", "PA17",
924 + "PH22", "PH23", "PH24", "PH25", "PH26";
925 + allwinner,function = "gpio_in";
926 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
927 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
930 usb0_id_detect_pin: usb0_id_detect_pin@0 {
931 allwinner,pins = "PH4";
932 allwinner,function = "gpio_in";
933 --- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
934 +++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
937 * Copyright 2015 Josef Gajdusek <atx@atx.name>
938 + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
940 * This file is dual-licensed: you can use it either under the terms
941 * of the GPL or the X11 license, at your option. Note that this dual
945 #include "sun4i-a10.dtsi"
946 -#include "sunxi-common-regulators.dtsi"
948 -#include <dt-bindings/gpio/gpio.h>
949 -#include <dt-bindings/pinctrl/sun4i-a10.h>
950 +#include "sunxi-itead-core-common.dtsi"
953 model = "Iteaduino Plus A10";
954 compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
961 - stdout-path = "serial0:115200n8";
971 - cpu-supply = <®_dcdc2>;
983 pinctrl-names = "default";
984 pinctrl-0 = <&emac_pins_a>;
989 - pinctrl-names = "default";
990 - pinctrl-0 = <&i2c0_pins_a>;
998 @@ -135,68 +108,13 @@
1014 -#include "axp209.dtsi"
1017 - regulator-always-on;
1018 - regulator-min-microvolt = <1000000>;
1019 - regulator-max-microvolt = <1450000>;
1020 - regulator-name = "vdd-cpu";
1024 - regulator-always-on;
1025 - regulator-min-microvolt = <1000000>;
1026 - regulator-max-microvolt = <1400000>;
1027 - regulator-name = "vdd-int-dll";
1031 - regulator-name = "vdd-rtc";
1035 - regulator-always-on;
1036 - regulator-min-microvolt = <3000000>;
1037 - regulator-max-microvolt = <3000000>;
1038 - regulator-name = "avcc";
1050 pinctrl-names = "default";
1051 pinctrl-0 = <&spi0_pins_a>,
1057 - pinctrl-names = "default";
1058 - pinctrl-0 = <&uart0_pins_a>;
1063 - usb1_vbus-supply = <®_usb1_vbus>;
1064 - usb2_vbus-supply = <®_usb2_vbus>;
1067 --- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
1068 +++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
1069 @@ -156,6 +156,10 @@
1078 emac_power_pin_q5: emac_power_pin@0 {
1079 allwinner,pins = "PH19";
1080 @@ -172,6 +176,11 @@
1085 + regulator-boot-on;
1092 @@ -186,7 +195,13 @@
1102 + usb0_vbus-supply = <®_usb0_vbus>;
1103 usb1_vbus-supply = <®_usb1_vbus>;
1104 usb2_vbus-supply = <®_usb2_vbus>;
1106 --- a/arch/arm/dts/sun4i-a10-marsboard.dts
1107 +++ b/arch/arm/dts/sun4i-a10-marsboard.dts
1119 @@ -154,6 +158,10 @@
1128 led_pins_marsboard: led_pins@0 {
1129 allwinner,pins = "PB5", "PB6", "PB7", "PB8";
1130 @@ -161,6 +169,13 @@
1131 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1132 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1135 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
1136 + allwinner,pins = "PH4";
1137 + allwinner,function = "gpio_in";
1138 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1139 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
1144 @@ -184,7 +199,15 @@
1154 + pinctrl-names = "default";
1155 + pinctrl-0 = <&usb0_id_detect_pin>;
1156 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
1157 usb1_vbus-supply = <®_usb1_vbus>;
1158 usb2_vbus-supply = <®_usb2_vbus>;
1160 --- a/arch/arm/dts/sun4i-a10-mk802.dts
1161 +++ b/arch/arm/dts/sun4i-a10-mk802.dts
1163 #include "sun4i-a10.dtsi"
1164 #include "sunxi-common-regulators.dtsi"
1165 #include <dt-bindings/gpio/gpio.h>
1166 +#include <dt-bindings/pinctrl/sun4i-a10.h>
1190 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
1191 + allwinner,pins = "PH4";
1192 + allwinner,function = "gpio_in";
1193 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1194 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1197 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
1198 + allwinner,pins = "PH5";
1199 + allwinner,function = "gpio_in";
1200 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1201 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1204 usb2_vbus_pin_mk802: usb2_vbus_pin@0 {
1205 allwinner,pins = "PH12";
1206 allwinner,function = "gpio_out";
1218 @@ -105,7 +132,17 @@
1228 + pinctrl-names = "default";
1229 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
1230 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
1231 + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
1232 + usb0_vbus-supply = <®_usb0_vbus>;
1233 usb1_vbus-supply = <®_usb1_vbus>;
1234 usb2_vbus-supply = <®_usb2_vbus>;
1236 --- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
1237 +++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
1238 @@ -124,6 +124,18 @@
1243 + pinctrl-names = "default";
1244 + pinctrl-0 = <&i2c1_pins_a>;
1247 + eeprom: eeprom@50 {
1248 + compatible = "atmel,24c16";
1257 --- a/arch/arm/dts/sun4i-a10-pcduino.dts
1258 +++ b/arch/arm/dts/sun4i-a10-pcduino.dts
1259 @@ -104,6 +104,10 @@
1264 + cpu-supply = <®_dcdc2>;
1270 @@ -129,12 +133,8 @@
1274 - compatible = "x-powers,axp209";
1278 - interrupt-controller;
1279 - #interrupt-cells = <1>;
1283 @@ -164,6 +164,10 @@
1292 led_pins_pcduino: led_pins@0 {
1293 allwinner,pins = "PH15", "PH16";
1294 @@ -178,14 +182,40 @@
1295 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1296 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1299 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
1300 + allwinner,pins = "PH4";
1301 + allwinner,function = "gpio_in";
1302 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1303 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
1309 +#include "axp209.dtsi"
1312 + regulator-always-on;
1313 + regulator-min-microvolt = <1000000>;
1314 + regulator-max-microvolt = <1400000>;
1315 + regulator-name = "vdd-cpu";
1321 + regulator-always-on;
1322 + regulator-min-microvolt = <1000000>;
1323 + regulator-max-microvolt = <1400000>;
1324 + regulator-name = "vdd-int-dll";
1328 + regulator-name = "vdd-rtc";
1332 + regulator-always-on;
1333 + regulator-min-microvolt = <3000000>;
1334 + regulator-max-microvolt = <3000000>;
1335 + regulator-name = "avcc";
1339 @@ -194,8 +224,16 @@
1349 - usb1_vbus-supply = <®_usb1_vbus>;
1350 - usb2_vbus-supply = <®_usb2_vbus>;
1351 + pinctrl-names = "default";
1352 + pinctrl-0 = <&usb0_id_detect_pin>;
1353 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
1354 + usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */
1355 + usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */
1359 +++ b/arch/arm/dts/sun4i-a10-pcduino2.dts
1362 + * Copyright 2015 Siarhei Siamashka <siarhei.siamashka@gmail.com>
1364 + * This file is dual-licensed: you can use it either under the terms
1365 + * of the GPL or the X11 license, at your option. Note that this dual
1366 + * licensing only applies to this file, and not this project as a
1369 + * a) This file is free software; you can redistribute it and/or
1370 + * modify it under the terms of the GNU General Public License as
1371 + * published by the Free Software Foundation; either version 2 of the
1372 + * License, or (at your option) any later version.
1374 + * This file is distributed in the hope that it will be useful,
1375 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1376 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1377 + * GNU General Public License for more details.
1379 + * Or, alternatively,
1381 + * b) Permission is hereby granted, free of charge, to any person
1382 + * obtaining a copy of this software and associated documentation
1383 + * files (the "Software"), to deal in the Software without
1384 + * restriction, including without limitation the rights to use,
1385 + * copy, modify, merge, publish, distribute, sublicense, and/or
1386 + * sell copies of the Software, and to permit persons to whom the
1387 + * Software is furnished to do so, subject to the following
1390 + * The above copyright notice and this permission notice shall be
1391 + * included in all copies or substantial portions of the Software.
1393 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1394 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
1395 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1396 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
1397 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1398 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1399 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1400 + * OTHER DEALINGS IN THE SOFTWARE.
1404 + * The LinkSprite pcDuino2 board is almost identical to the older
1405 + * LinkSprite pcDuino1 board. The only software visible difference
1406 + * is that the pcDuino2 board got a USB VBUS voltage regulator, which
1407 + * is controlled by the PD2 pin (pulled-up by default). Also one of
1408 + * the USB host ports has been replaced with a USB WIFI chip.
1411 +#include "sun4i-a10-pcduino.dts"
1414 + model = "LinkSprite pcDuino2";
1415 + compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10";
1419 + usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 {
1420 + allwinner,pins = "PD2";
1421 + allwinner,function = "gpio_out";
1422 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1423 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1428 + pinctrl-names = "default";
1429 + pinctrl-0 = <&usb2_vbus_pin_pcduino2>;
1430 + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>;
1435 + usb1_vbus-supply = <®_vcc3v3>; /* USB WIFI is always on */
1436 + usb2_vbus-supply = <®_usb2_vbus>;
1439 --- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
1440 +++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
1442 #include <dt-bindings/input/input.h>
1443 #include <dt-bindings/interrupt-controller/irq.h>
1444 #include <dt-bindings/pinctrl/sun4i-a10.h>
1445 +#include <dt-bindings/pwm/pwm.h>
1448 model = "Point of View Protab2-IPS9";
1453 + backlight: backlight {
1454 + compatible = "pwm-backlight";
1455 + pinctrl-names = "default";
1456 + pinctrl-0 = <&bl_en_pin_protab>;
1457 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
1458 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
1459 + default-brightness-level = <8>;
1460 + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
1464 stdout-path = "serial0:115200n8";
1469 + pinctrl-names = "default";
1470 + pinctrl-0 = <&codec_pa_pin>;
1471 + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
1476 cpu-supply = <®_dcdc2>;
1478 @@ -86,12 +104,36 @@
1479 pinctrl-names = "default";
1480 pinctrl-0 = <&i2c1_pins_a>;
1483 + /* Accelerometer */
1485 + compatible = "bosch,bma250";
1487 + interrupt-parent = <&pio>;
1488 + interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
1493 pinctrl-names = "default";
1494 pinctrl-0 = <&i2c2_pins_a>;
1498 + pinctrl-names = "default";
1499 + pinctrl-0 = <&touchscreen_pins>;
1500 + compatible = "pixcir,pixcir_tangoc";
1502 + interrupt-parent = <&pio>;
1503 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
1504 + attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
1505 + enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
1506 + wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
1507 + touchscreen-size-x = <1024>;
1508 + touchscreen-size-y = <768>;
1509 + touchscreen-inverted-x;
1510 + touchscreen-inverted-y;
1515 @@ -128,6 +170,27 @@
1519 + bl_en_pin_protab: bl_en_pin@0 {
1520 + allwinner,pins = "PH7";
1521 + allwinner,function = "gpio_out";
1522 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1523 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1526 + codec_pa_pin: codec_pa_pin@0 {
1527 + allwinner,pins = "PH15";
1528 + allwinner,function = "gpio_out";
1529 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1530 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1533 + touchscreen_pins: touchscreen_pins@0 {
1534 + allwinner,pins = "PA5", "PB13";
1535 + allwinner,function = "gpio_out";
1536 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1537 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1540 usb0_id_detect_pin: usb0_id_detect_pin@0 {
1541 allwinner,pins = "PH4";
1542 allwinner,function = "gpio_in";
1543 @@ -143,6 +206,12 @@
1548 + pinctrl-names = "default";
1549 + pinctrl-0 = <&pwm0_pins_a>;
1554 regulator-always-on;
1555 regulator-min-microvolt = <1000000>;
1556 --- a/arch/arm/dts/sun4i-a10.dtsi
1557 +++ b/arch/arm/dts/sun4i-a10.dtsi
1560 #include <dt-bindings/thermal/thermal.h>
1562 +#include <dt-bindings/clock/sun4i-a10-pll2.h>
1563 #include <dt-bindings/dma/sun4i-a10.h>
1564 #include <dt-bindings/pinctrl/sun4i-a10.h>
1567 "simple-framebuffer";
1568 allwinner,pipeline = "de_be0-lcd0-hdmi";
1569 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
1571 + <&ahb_gates 44>, <&dram_gates 26>;
1572 status = "disabled";
1576 "simple-framebuffer";
1577 allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
1578 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
1579 - <&ahb_gates 44>, <&ahb_gates 46>;
1580 + <&ahb_gates 44>, <&ahb_gates 46>,
1581 + <&dram_gates 25>, <&dram_gates 26>;
1582 status = "disabled";
1586 "simple-framebuffer";
1587 allwinner,pipeline = "de_fe0-de_be0-lcd0";
1588 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
1590 + <&ahb_gates 46>, <&dram_gates 25>,
1592 status = "disabled";
1596 "simple-framebuffer";
1597 allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
1598 clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
1599 - <&ahb_gates 44>, <&ahb_gates 46>;
1600 + <&ahb_gates 44>, <&ahb_gates 46>,
1601 + <&dram_gates 25>, <&dram_gates 26>;
1602 status = "disabled";
1605 @@ -195,6 +199,15 @@
1606 clock-output-names = "pll1";
1609 + pll2: clk@01c20008 {
1610 + #clock-cells = <1>;
1611 + compatible = "allwinner,sun4i-a10-pll2-clk";
1612 + reg = <0x01c20008 0x8>;
1613 + clocks = <&osc24M>;
1614 + clock-output-names = "pll2-1x", "pll2-2x",
1615 + "pll2-4x", "pll2-8x";
1618 pll4: clk@01c20018 {
1620 compatible = "allwinner,sun4i-a10-pll1-clk";
1622 compatible = "allwinner,sun4i-a10-axi-gates-clk";
1623 reg = <0x01c2005c 0x4>;
1625 + clock-indices = <0>;
1626 clock-output-names = "axi_dram";
1629 @@ -257,17 +271,36 @@
1630 compatible = "allwinner,sun4i-a10-ahb-gates-clk";
1631 reg = <0x01c20060 0x8>;
1633 + clock-indices = <0>, <1>,
1648 clock-output-names = "ahb_usb0", "ahb_ehci0",
1649 - "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss",
1650 - "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1",
1651 - "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand",
1652 - "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts",
1653 - "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3",
1654 - "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve",
1655 - "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0",
1656 - "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi",
1657 - "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
1658 - "ahb_de_fe1", "ahb_mp", "ahb_mali400";
1659 + "ahb_ohci0", "ahb_ehci1",
1660 + "ahb_ohci1", "ahb_ss", "ahb_dma",
1661 + "ahb_bist", "ahb_mmc0", "ahb_mmc1",
1662 + "ahb_mmc2", "ahb_mmc3", "ahb_ms",
1663 + "ahb_nand", "ahb_sdram", "ahb_ace",
1664 + "ahb_emac", "ahb_ts", "ahb_spi0",
1665 + "ahb_spi1", "ahb_spi2", "ahb_spi3",
1666 + "ahb_pata", "ahb_sata", "ahb_gps",
1667 + "ahb_ve", "ahb_tvd", "ahb_tve0",
1668 + "ahb_tve1", "ahb_lcd0", "ahb_lcd1",
1669 + "ahb_csi0", "ahb_csi1", "ahb_hdmi",
1670 + "ahb_de_be0", "ahb_de_be1",
1671 + "ahb_de_fe0", "ahb_de_fe1",
1672 + "ahb_mp", "ahb_mali400";
1675 apb0: apb0@01c20054 {
1676 @@ -283,9 +316,14 @@
1677 compatible = "allwinner,sun4i-a10-apb0-gates-clk";
1678 reg = <0x01c20068 0x4>;
1680 + clock-indices = <0>, <1>,
1684 clock-output-names = "apb0_codec", "apb0_spdif",
1685 - "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0",
1686 - "apb0_ir1", "apb0_keypad";
1687 + "apb0_ac97", "apb0_iis",
1688 + "apb0_pio", "apb0_ir0",
1689 + "apb0_ir1", "apb0_keypad";
1692 apb1: clk@01c20058 {
1693 @@ -301,12 +339,22 @@
1694 compatible = "allwinner,sun4i-a10-apb1-gates-clk";
1695 reg = <0x01c2006c 0x4>;
1697 + clock-indices = <0>, <1>,
1705 clock-output-names = "apb1_i2c0", "apb1_i2c1",
1706 - "apb1_i2c2", "apb1_can", "apb1_scr",
1707 - "apb1_ps20", "apb1_ps21", "apb1_uart0",
1708 - "apb1_uart1", "apb1_uart2", "apb1_uart3",
1709 - "apb1_uart4", "apb1_uart5", "apb1_uart6",
1711 + "apb1_i2c2", "apb1_can",
1712 + "apb1_scr", "apb1_ps20",
1713 + "apb1_ps21", "apb1_uart0",
1714 + "apb1_uart1", "apb1_uart2",
1715 + "apb1_uart3", "apb1_uart4",
1716 + "apb1_uart5", "apb1_uart6",
1720 nand_clk: clk@01c20080 {
1721 @@ -446,6 +494,48 @@
1722 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
1723 clock-output-names = "spi3";
1726 + dram_gates: clk@01c20100 {
1727 + #clock-cells = <1>;
1728 + compatible = "allwinner,sun4i-a10-dram-gates-clk";
1729 + reg = <0x01c20100 0x4>;
1730 + clocks = <&pll5 0>;
1731 + clock-indices = <0>,
1740 + clock-output-names = "dram_ve",
1741 + "dram_csi0", "dram_csi1",
1744 + "dram_tve0", "dram_tve1",
1746 + "dram_de_fe1", "dram_de_fe0",
1747 + "dram_de_be0", "dram_de_be1",
1748 + "dram_de_mp", "dram_ace";
1751 + ve_clk: clk@01c2013c {
1752 + #clock-cells = <0>;
1753 + #reset-cells = <0>;
1754 + compatible = "allwinner,sun4i-a10-ve-clk";
1755 + reg = <0x01c2013c 0x4>;
1757 + clock-output-names = "ve";
1760 + codec_clk: clk@01c20140 {
1761 + #clock-cells = <0>;
1762 + compatible = "allwinner,sun4i-a10-codec-clk";
1763 + reg = <0x01c20140 0x4>;
1764 + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
1765 + clock-output-names = "codec";
1770 @@ -656,6 +746,14 @@
1771 status = "disabled";
1774 + crypto: crypto-engine@01c15000 {
1775 + compatible = "allwinner,sun4i-a10-crypto";
1776 + reg = <0x01c15000 0x1000>;
1777 + interrupts = <86>;
1778 + clocks = <&ahb_gates 5>, <&ss_clk>;
1779 + clock-names = "ahb", "mod";
1782 spi2: spi@01c17000 {
1783 compatible = "allwinner,sun4i-a10-spi";
1784 reg = <0x01c17000 0x1000>;
1785 @@ -961,6 +1059,19 @@
1786 status = "disabled";
1789 + codec: codec@01c22c00 {
1790 + #sound-dai-cells = <0>;
1791 + compatible = "allwinner,sun4i-a10-codec";
1792 + reg = <0x01c22c00 0x40>;
1793 + interrupts = <30>;
1794 + clocks = <&apb0_gates 0>, <&codec_clk>;
1795 + clock-names = "apb", "codec";
1796 + dmas = <&dma SUN4I_DMA_NORMAL 19>,
1797 + <&dma SUN4I_DMA_NORMAL 19>;
1798 + dma-names = "rx", "tx";
1799 + status = "disabled";
1802 sid: eeprom@01c23800 {
1803 compatible = "allwinner,sun4i-a10-sid";
1804 reg = <0x01c23800 0x10>;
1805 --- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
1806 +++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts
1812 + pinctrl-names = "default";
1813 + pinctrl-0 = <&i2c0_pins_a>;
1817 + compatible = "x-powers,axp152";
1820 + interrupt-controller;
1821 + #interrupt-cells = <1>;
1826 pinctrl-names = "default";
1827 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
1828 --- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
1829 +++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
1834 - compatible = "at,24c16";
1835 + compatible = "atmel,24c16";
1839 --- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
1840 +++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
1844 pinctrl-names = "default";
1845 - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
1846 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
1847 vmmc-supply = <®_vcc3v3>;
1849 cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
1850 @@ -131,27 +131,12 @@
1855 - pinctrl-names = "default";
1856 - pinctrl-0 = <&mmc2_pins_a>;
1857 - vmmc-supply = <®_vcc3v3>;
1862 - mmccard: mmccard@0 {
1864 - compatible = "mmc-card";
1874 - mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
1875 + mmc0_cd_pin_d709: mmc0_cd_pin@0 {
1876 allwinner,pins = "PG0";
1877 allwinner,function = "gpio_in";
1878 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1879 --- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
1880 +++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts
1881 @@ -123,21 +123,6 @@
1886 - pinctrl-names = "default";
1887 - pinctrl-0 = <&mmc2_pins_a>;
1888 - vmmc-supply = <®_vcc3v3>;
1893 - mmccard: mmccard@0 {
1895 - compatible = "mmc-card";
1903 @@ -201,11 +186,6 @@
1908 - gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
1913 pinctrl-names = "default";
1914 pinctrl-0 = <&uart1_pins_b>;
1915 @@ -221,16 +201,12 @@
1916 allwinner,pins = "PG12";
1920 - allwinner,pins = "PG11";
1924 pinctrl-names = "default";
1925 pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
1926 usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
1927 usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
1928 usb0_vbus-supply = <®_usb0_vbus>;
1929 - usb1_vbus-supply = <®_usb1_vbus>;
1930 + usb1_vbus-supply = <®_ldo3>;
1933 --- a/arch/arm/dts/sun5i-a13-utoo-p66.dts
1934 +++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts
1936 #include <dt-bindings/input/input.h>
1937 #include <dt-bindings/interrupt-controller/irq.h>
1938 #include <dt-bindings/pinctrl/sun4i-a10.h>
1939 +#include <dt-bindings/pwm/pwm.h>
1943 compatible = "utoo,p66", "allwinner,sun5i-a13";
1945 + backlight: backlight {
1946 + compatible = "pwm-backlight";
1947 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
1948 + /* Note levels of 10 / 20% result in backlight off */
1949 + brightness-levels = <0 30 40 50 60 70 80 90 100>;
1950 + default-brightness-level = <6>;
1951 + /* TODO: backlight uses axp gpio1 as enable pin */
1955 /* The lcd panel i2c interface is hooked up via gpios */
1956 compatible = "i2c-gpio";
1962 + pinctrl-names = "default";
1963 + pinctrl-0 = <&codec_pa_pin>;
1964 + allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
1969 cpu-supply = <®_dcdc2>;
1971 @@ -158,6 +175,13 @@
1975 + codec_pa_pin: codec_pa_pin@0 {
1976 + allwinner,pins = "PG3";
1977 + allwinner,function = "gpio_out";
1978 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1979 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1982 mmc0_cd_pin_p66: mmc0_cd_pin@0 {
1983 allwinner,pins = "PG0";
1984 allwinner,function = "gpio_in";
1985 @@ -201,6 +225,12 @@
1990 + pinctrl-names = "default";
1991 + pinctrl-0 = <&pwm0_pins>;
1996 regulator-always-on;
1997 regulator-min-microvolt = <1000000>;
1998 --- a/arch/arm/dts/sun5i-q8-common.dtsi
1999 +++ b/arch/arm/dts/sun5i-q8-common.dtsi
2002 #include "sunxi-q8-common.dtsi"
2004 +#include <dt-bindings/pwm/pwm.h>
2011 + backlight: backlight {
2012 + compatible = "pwm-backlight";
2013 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
2014 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
2015 + default-brightness-level = <8>;
2016 + /* TODO: backlight uses axp gpio1 as enable pin */
2020 stdout-path = "serial0:115200n8";
2022 --- a/arch/arm/dts/sun5i-r8-chip.dts
2023 +++ b/arch/arm/dts/sun5i-r8-chip.dts
2026 stdout-path = "serial0:115200n8";
2029 + wifi_reg_on: wifi_reg_on {
2030 + compatible = "regulator-fixed";
2031 + pinctrl-names = "default";
2032 + pinctrl-0 = <&chip_wifi_reg_on_pin>;
2034 + regulator-name = "wifi-reg-on";
2035 + regulator-min-microvolt = <3300000>;
2036 + regulator-max-microvolt = <3300000>;
2037 + gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
2038 + enable-active-high;
2047 + cpu-supply = <®_dcdc2>;
2051 @@ -109,10 +129,14 @@
2056 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2060 pinctrl-names = "default";
2061 pinctrl-0 = <&mmc0_pins_a>;
2062 - vmmc-supply = <®_vcc3v3>;
2063 + vmmc-supply = <&wifi_reg_on>;
2067 @@ -134,6 +158,13 @@
2068 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2071 + chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 {
2072 + allwinner,pins = "PC19";
2073 + allwinner,function = "gpio_out";
2074 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2075 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2078 chip_id_det_pin: chip_id_det_pin@0 {
2079 allwinner,pins = "PG2";
2080 allwinner,function = "gpio_in";
2081 @@ -167,6 +198,20 @@
2082 regulator-always-on;
2086 + regulator-min-microvolt = <3300000>;
2087 + regulator-max-microvolt = <3300000>;
2088 + regulator-name = "vdd-wifi1";
2089 + regulator-always-on;
2093 + regulator-min-microvolt = <3300000>;
2094 + regulator-max-microvolt = <3300000>;
2095 + regulator-name = "vdd-wifi2";
2096 + regulator-always-on;
2100 regulator-min-microvolt = <1800000>;
2101 regulator-max-microvolt = <1800000>;
2102 --- a/arch/arm/dts/sun5i.dtsi
2103 +++ b/arch/arm/dts/sun5i.dtsi
2106 #include "skeleton.dtsi"
2108 +#include <dt-bindings/clock/sun4i-a10-pll2.h>
2109 #include <dt-bindings/dma/sun4i-a10.h>
2110 #include <dt-bindings/pinctrl/sun4i-a10.h>
2112 @@ -102,6 +103,15 @@
2113 clock-output-names = "pll1";
2116 + pll2: clk@01c20008 {
2117 + #clock-cells = <1>;
2118 + compatible = "allwinner,sun5i-a13-pll2-clk";
2119 + reg = <0x01c20008 0x8>;
2120 + clocks = <&osc24M>;
2121 + clock-output-names = "pll2-1x", "pll2-2x",
2122 + "pll2-4x", "pll2-8x";
2125 pll4: clk@01c20018 {
2127 compatible = "allwinner,sun4i-a10-pll1-clk";
2128 @@ -285,6 +295,14 @@
2129 clock-output-names = "usb_ohci0", "usb_phy";
2132 + codec_clk: clk@01c20140 {
2133 + #clock-cells = <0>;
2134 + compatible = "allwinner,sun4i-a10-codec-clk";
2135 + reg = <0x01c20140 0x4>;
2136 + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
2137 + clock-output-names = "codec";
2140 mbus_clk: clk@01c2015c {
2142 compatible = "allwinner,sun5i-a13-mbus-clk";
2143 @@ -571,6 +589,19 @@
2144 status = "disabled";
2147 + codec: codec@01c22c00 {
2148 + #sound-dai-cells = <0>;
2149 + compatible = "allwinner,sun4i-a10-codec";
2150 + reg = <0x01c22c00 0x40>;
2151 + interrupts = <30>;
2152 + clocks = <&apb0_gates 0>, <&codec_clk>;
2153 + clock-names = "apb", "codec";
2154 + dmas = <&dma SUN4I_DMA_NORMAL 19>,
2155 + <&dma SUN4I_DMA_NORMAL 19>;
2156 + dma-names = "rx", "tx";
2157 + status = "disabled";
2160 sid: eeprom@01c23800 {
2161 compatible = "allwinner,sun4i-a10-sid";
2162 reg = <0x01c23800 0x10>;
2163 --- a/arch/arm/dts/sun6i-a31-colombus.dts
2164 +++ b/arch/arm/dts/sun6i-a31-colombus.dts
2167 stdout-path = "serial0:115200n8";
2171 + /* The lcd panel i2c interface is hooked up via gpios */
2172 + compatible = "i2c-gpio";
2173 + pinctrl-names = "default";
2174 + pinctrl-0 = <&i2c_lcd_pins>;
2175 + gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
2176 + <&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
2177 + i2c-gpio,delay-us = <5>;
2183 pinctrl-names = "default";
2184 pinctrl-0 = <&i2c2_pins_a>;
2187 + mma8452: mma8452@1d {
2188 + compatible = "fsl,mma8452";
2190 + interrupt-parent = <&pio>;
2191 + interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
2196 @@ -124,6 +141,13 @@
2197 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2198 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2201 + i2c_lcd_pins: i2c_lcd_pin@0 {
2202 + allwinner,pins = "PA23", "PA24";
2203 + allwinner,function = "gpio_out";
2204 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2205 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2210 --- a/arch/arm/dts/sun6i-a31-hummingbird.dts
2211 +++ b/arch/arm/dts/sun6i-a31-hummingbird.dts
2213 compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
2226 + cpu-supply = <®_dcdc3>;
2234 pinctrl-names = "default";
2235 - pinctrl-0 = <&gmac_pins_rgmii_a>;
2236 + pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>;
2239 snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
2242 pinctrl-names = "default";
2243 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
2244 - vmmc-supply = <&vcc_3v0>;
2245 + vmmc-supply = <®_dcdc1>;
2247 cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
2251 pinctrl-names = "default";
2252 pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
2253 - vmmc-supply = <&vcc_wifi>;
2254 + vmmc-supply = <®_aldo1>;
2255 mmc-pwrseq = <&wifi_pwrseq>;
2258 @@ -146,6 +152,13 @@
2262 + gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 {
2263 + allwinner,pins = "PA21";
2264 + allwinner,function = "gpio_out";
2265 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2266 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2269 mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
2270 allwinner,pins = "PA8";
2271 allwinner,function = "gpio_in";
2272 @@ -164,70 +177,69 @@
2278 compatible = "x-powers,axp221";
2280 interrupt-parent = <&nmi_intc>;
2281 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2282 - interrupt-controller;
2283 - #interrupt-cells = <1>;
2284 - dcdc1-supply = <&vcc_3v0>;
2285 - dcdc5-supply = <&vcc_dram>;
2288 - x-powers,dcdc-freq = <3000>;
2291 - regulator-always-on;
2292 - regulator-min-microvolt = <3000000>;
2293 - regulator-max-microvolt = <3000000>;
2294 - regulator-name = "vcc-3v0";
2298 - regulator-always-on;
2299 - regulator-min-microvolt = <700000>;
2300 - regulator-max-microvolt = <1320000>;
2301 - regulator-name = "vdd-cpu";
2305 - regulator-always-on;
2306 - regulator-min-microvolt = <700000>;
2307 - regulator-max-microvolt = <1320000>;
2308 - regulator-name = "vdd-gpu";
2311 - vdd_sys_dll: dcdc4 {
2312 - regulator-always-on;
2313 - regulator-min-microvolt = <1100000>;
2314 - regulator-max-microvolt = <1100000>;
2315 - regulator-name = "vdd-sys-dll";
2319 - regulator-always-on;
2320 - regulator-min-microvolt = <1500000>;
2321 - regulator-max-microvolt = <1500000>;
2322 - regulator-name = "vcc-dram";
2326 - regulator-min-microvolt = <3300000>;
2327 - regulator-max-microvolt = <3300000>;
2328 - regulator-name = "vcc_wifi";
2332 - regulator-always-on;
2333 - regulator-min-microvolt = <3000000>;
2334 - regulator-max-microvolt = <3000000>;
2335 - regulator-name = "avcc";
2341 +#include "axp22x.dtsi"
2344 + regulator-min-microvolt = <3300000>;
2345 + regulator-max-microvolt = <3300000>;
2346 + regulator-name = "vcc-wifi";
2350 + regulator-always-on;
2351 + regulator-min-microvolt = <2700000>;
2352 + regulator-max-microvolt = <3300000>;
2353 + regulator-name = "avcc";
2357 + regulator-min-microvolt = <700000>;
2358 + regulator-max-microvolt = <1320000>;
2359 + regulator-name = "vdd-cpus";
2363 + regulator-always-on;
2364 + regulator-min-microvolt = <3000000>;
2365 + regulator-max-microvolt = <3000000>;
2366 + regulator-name = "vcc-3v0";
2370 + regulator-min-microvolt = <700000>;
2371 + regulator-max-microvolt = <1320000>;
2372 + regulator-name = "vdd-gpu";
2376 + regulator-always-on;
2377 + regulator-min-microvolt = <700000>;
2378 + regulator-max-microvolt = <1320000>;
2379 + regulator-name = "vdd-cpu";
2383 + regulator-always-on;
2384 + regulator-min-microvolt = <700000>;
2385 + regulator-max-microvolt = <1320000>;
2386 + regulator-name = "vdd-sys-dll";
2390 + regulator-always-on;
2391 + regulator-min-microvolt = <1500000>;
2392 + regulator-max-microvolt = <1500000>;
2393 + regulator-name = "vcc-dram";
2397 gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
2399 --- a/arch/arm/dts/sun6i-a31.dtsi
2400 +++ b/arch/arm/dts/sun6i-a31.dtsi
2406 + simplefb_hdmi: framebuffer@0 {
2407 compatible = "allwinner,simple-framebuffer",
2408 "simple-framebuffer";
2409 allwinner,pipeline = "de_be0-lcd0-hdmi";
2411 status = "disabled";
2415 + simplefb_lcd: framebuffer@1 {
2416 compatible = "allwinner,simple-framebuffer",
2417 "simple-framebuffer";
2418 allwinner,pipeline = "de_be0-lcd0";
2419 @@ -252,6 +252,20 @@
2420 compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
2421 reg = <0x01c20060 0x8>;
2423 + clock-indices = <1>, <5>,
2437 clock-output-names = "ahb1_mipidsi", "ahb1_ss",
2438 "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
2439 "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
2441 compatible = "allwinner,sun6i-a31-apb1-gates-clk";
2442 reg = <0x01c20068 0x4>;
2444 + clock-indices = <0>, <4>,
2447 clock-output-names = "apb1_codec", "apb1_digital_mic",
2448 "apb1_pio", "apb1_daudio0",
2450 @@ -299,6 +316,10 @@
2451 compatible = "allwinner,sun6i-a31-apb2-gates-clk";
2452 reg = <0x01c2006c 0x4>;
2454 + clock-indices = <0>, <1>,
2458 clock-output-names = "apb2_i2c0", "apb2_i2c1",
2459 "apb2_i2c2", "apb2_i2c3",
2460 "apb2_uart0", "apb2_uart1",
2461 @@ -346,6 +367,14 @@
2465 + ss_clk: clk@01c2009c {
2466 + #clock-cells = <0>;
2467 + compatible = "allwinner,sun4i-a10-mod0-clk";
2468 + reg = <0x01c2009c 0x4>;
2469 + clocks = <&osc24M>, <&pll6 0>;
2470 + clock-output-names = "ss";
2473 spi0_clk: clk@01c200a0 {
2475 compatible = "allwinner,sun4i-a10-mod0-clk";
2477 compatible = "allwinner,sun6i-a31-usb-clk";
2478 reg = <0x01c200cc 0x4>;
2480 + clock-indices = <8>, <9>, <10>,
2483 clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
2484 "usb_ohci0", "usb_ohci1",
2486 @@ -684,6 +716,16 @@
2487 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2490 + mmc3_8bit_emmc_pins: mmc3@1 {
2491 + allwinner,pins = "PC6", "PC7", "PC8", "PC9",
2492 + "PC10", "PC11", "PC12",
2493 + "PC13", "PC14", "PC15",
2495 + allwinner,function = "mmc3";
2496 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
2497 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2500 gmac_pins_mii_a: gmac_mii@0 {
2501 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
2502 "PA8", "PA9", "PA11",
2503 @@ -761,6 +803,13 @@
2504 reg = <0x01c20ca0 0x20>;
2507 + lradc: lradc@01c22800 {
2508 + compatible = "allwinner,sun4i-a10-lradc-keys";
2509 + reg = <0x01c22800 0x100>;
2510 + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
2511 + status = "disabled";
2515 compatible = "allwinner,sun6i-a31-ts";
2516 reg = <0x01c25000 0x100>;
2517 @@ -907,6 +956,16 @@
2521 + crypto: crypto-engine@01c15000 {
2522 + compatible = "allwinner,sun4i-a10-crypto";
2523 + reg = <0x01c15000 0x1000>;
2524 + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
2525 + clocks = <&ahb1_gates 5>, <&ss_clk>;
2526 + clock-names = "ahb", "mod";
2527 + resets = <&ahb1_rst 5>;
2528 + reset-names = "ahb";
2532 compatible = "allwinner,sun6i-a31-hstimer",
2533 "allwinner,sun7i-a20-hstimer";
2534 @@ -1068,7 +1127,7 @@
2535 resets = <&apb0_rst 0>;
2537 interrupt-controller;
2538 - #interrupt-cells = <2>;
2539 + #interrupt-cells = <3>;
2543 --- a/arch/arm/dts/sun6i-a31s-primo81.dts
2544 +++ b/arch/arm/dts/sun6i-a31s-primo81.dts
2547 - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
2548 + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
2549 + * Copyright 2015 Karsten Merker <merker@debian.org>
2550 + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
2552 - * Minimal dts file for the MSI Primo81 for u-boot only
2553 + * This file is dual-licensed: you can use it either under the terms
2554 + * of the GPL or the X11 license, at your option. Note that this dual
2555 + * licensing only applies to this file, and not this project as a
2558 - * SPDX-License-Identifier: GPL-2.0+ or X11
2559 + * a) This file is free software; you can redistribute it and/or
2560 + * modify it under the terms of the GNU General Public License as
2561 + * published by the Free Software Foundation; either version 2 of the
2562 + * License, or (at your option) any later version.
2564 + * This file is distributed in the hope that it will be useful,
2565 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2566 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2567 + * GNU General Public License for more details.
2569 + * Or, alternatively,
2571 + * b) Permission is hereby granted, free of charge, to any person
2572 + * obtaining a copy of this software and associated documentation
2573 + * files (the "Software"), to deal in the Software without
2574 + * restriction, including without limitation the rights to use,
2575 + * copy, modify, merge, publish, distribute, sublicense, and/or
2576 + * sell copies of the Software, and to permit persons to whom the
2577 + * Software is furnished to do so, subject to the following
2580 + * The above copyright notice and this permission notice shall be
2581 + * included in all copies or substantial portions of the Software.
2583 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2584 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
2585 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2586 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
2587 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2588 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2589 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2590 + * OTHER DEALINGS IN THE SOFTWARE.
2594 #include "sun6i-a31s.dtsi"
2595 +#include "sunxi-common-regulators.dtsi"
2597 +#include <dt-bindings/gpio/gpio.h>
2598 +#include <dt-bindings/input/input.h>
2599 +#include <dt-bindings/pinctrl/sun4i-a10.h>
2602 - model = "MSI Primo81";
2603 + model = "MSI Primo81 tablet";
2604 compatible = "msi,primo81", "allwinner,sun6i-a31s";
2613 + cpu-supply = <®_dcdc3>;
2617 + /* rtl8188etv wifi is connected here */
2622 + /* pull-ups and device VDDIO use AXP221 DLDO3 */
2623 + pinctrl-names = "default";
2624 + pinctrl-0 = <&i2c0_pins_a>;
2625 + status = "failed";
2629 + pinctrl-names = "default";
2630 + pinctrl-0 = <&i2c1_pins_a>;
2634 + pinctrl-names = "default";
2635 + pinctrl-0 = <>911_int_primo81>;
2636 + compatible = "goodix,gt911";
2638 + interrupt-parent = <&pio>;
2639 + interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
2640 + touchscreen-swapped-x-y;
2645 pinctrl-names = "default";
2646 - pinctrl-0 = <&uart0_pins_a>;
2647 + pinctrl-0 = <&i2c2_pins_a>;
2650 + accelerometer@1c {
2651 + pinctrl-names = "default";
2652 + pinctrl-0 = <&mma8452_int_primo81>;
2653 + compatible = "fsl,mma8452";
2655 + interrupt-parent = <&pio>;
2656 + interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
2657 + #io-channel-cells = <1>;
2662 + vref-supply = <®_aldo3>;
2666 + label = "Volume Up";
2667 + linux,code = <KEY_VOLUMEUP>;
2669 + voltage = <158730>;
2673 + label = "Volume Down";
2674 + linux,code = <KEY_VOLUMEDOWN>;
2676 + voltage = <349206>;
2681 + pinctrl-names = "default";
2682 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
2683 + vmmc-supply = <®_dcdc1>;
2685 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
2691 + gt911_int_primo81: gt911_int_pin@0 {
2692 + allwinner,pins = "PA3";
2693 + allwinner,function = "gpio_in";
2694 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2695 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
2698 + mma8452_int_primo81: mma8452_int_pin@0 {
2699 + allwinner,pins = "PA9";
2700 + allwinner,function = "gpio_in";
2701 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2702 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2705 + mmc0_cd_pin_primo81: mmc0_cd_pin@0 {
2706 + allwinner,pins = "PA8";
2707 + allwinner,function = "gpio_in";
2708 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
2709 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
2717 + compatible = "x-powers,axp221";
2719 + interrupt-parent = <&nmi_intc>;
2720 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2724 +#include "axp22x.dtsi"
2727 + regulator-always-on;
2728 + regulator-min-microvolt = <2700000>;
2729 + regulator-max-microvolt = <3300000>;
2730 + regulator-name = "avcc";
2734 + regulator-min-microvolt = <3000000>;
2735 + regulator-max-microvolt = <3000000>;
2736 + regulator-name = "vcc-lcd";
2740 + regulator-min-microvolt = <700000>;
2741 + regulator-max-microvolt = <1320000>;
2742 + regulator-name = "vdd-cpus"; /* This is an educated guess */
2746 + regulator-always-on;
2747 + regulator-min-microvolt = <3000000>;
2748 + regulator-max-microvolt = <3000000>;
2749 + regulator-name = "vcc-3v0";
2753 + regulator-min-microvolt = <700000>;
2754 + regulator-max-microvolt = <1320000>;
2755 + regulator-name = "vdd-gpu";
2759 + regulator-always-on;
2760 + regulator-min-microvolt = <700000>;
2761 + regulator-max-microvolt = <1320000>;
2762 + regulator-name = "vdd-cpu";
2766 + regulator-always-on;
2767 + regulator-min-microvolt = <700000>;
2768 + regulator-max-microvolt = <1320000>;
2769 + regulator-name = "vdd-sys-dll";
2773 + regulator-always-on;
2774 + regulator-min-microvolt = <1500000>;
2775 + regulator-max-microvolt = <1500000>;
2776 + regulator-name = "vcc-dram";
2780 + regulator-min-microvolt = <3300000>;
2781 + regulator-max-microvolt = <3300000>;
2782 + regulator-name = "vcc-wifi";
2786 + regulator-min-microvolt = <2800000>;
2787 + regulator-max-microvolt = <2800000>;
2788 + regulator-name = "vddio-csi";
2792 + regulator-min-microvolt = <1080000>;
2793 + regulator-max-microvolt = <1320000>;
2794 + regulator-name = "vdd-mipi-bridge";
2798 + vcc-lcd-supply = <®_dc1sw>;
2799 + vdd-mipi-bridge-supply = <®_eldo3>;
2803 + /* otg support requires support for AXP221 usb-power-supply and GPIO */
2809 + usb1_vbus-supply = <®_dldo1>;
2813 +++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi
2816 + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
2818 + * This file is dual-licensed: you can use it either under the terms
2819 + * of the GPL or the X11 license, at your option. Note that this dual
2820 + * licensing only applies to this file, and not this project as a
2823 + * a) This file is free software; you can redistribute it and/or
2824 + * modify it under the terms of the GNU General Public License as
2825 + * published by the Free Software Foundation; either version 2 of the
2826 + * License, or (at your option) any later version.
2828 + * This file is distributed in the hope that it will be useful,
2829 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2830 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2831 + * GNU General Public License for more details.
2833 + * Or, alternatively,
2835 + * b) Permission is hereby granted, free of charge, to any person
2836 + * obtaining a copy of this software and associated documentation
2837 + * files (the "Software"), to deal in the Software without
2838 + * restriction, including without limitation the rights to use,
2839 + * copy, modify, merge, publish, distribute, sublicense, and/or
2840 + * sell copies of the Software, and to permit persons to whom the
2841 + * Software is furnished to do so, subject to the following
2844 + * The above copyright notice and this permission notice shall be
2845 + * included in all copies or substantial portions of the Software.
2847 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2848 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
2849 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2850 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
2851 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2852 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2853 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2854 + * OTHER DEALINGS IN THE SOFTWARE.
2858 +#include "sun6i-a31s.dtsi"
2859 +#include "sunxi-common-regulators.dtsi"
2861 +#include <dt-bindings/gpio/gpio.h>
2862 +#include <dt-bindings/pinctrl/sun4i-a10.h>
2865 + model = "Sinlinx SinA31s Core Board";
2866 + compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
2874 + cpu-supply = <®_dcdc3>;
2877 +/* eMMC on core board */
2879 + pinctrl-names = "default";
2880 + pinctrl-0 = <&mmc3_8bit_emmc_pins>;
2881 + vmmc-supply = <®_dcdc1>;
2882 + vqmmc-supply = <®_dcdc1>;
2889 +/* AXP221s PMIC on core board */
2894 + compatible = "x-powers,axp221";
2896 + interrupt-parent = <&nmi_intc>;
2897 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2901 +#include "axp22x.dtsi"
2904 + regulator-always-on;
2905 + regulator-min-microvolt = <2700000>;
2906 + regulator-max-microvolt = <3300000>;
2907 + regulator-name = "avcc";
2911 + regulator-min-microvolt = <700000>;
2912 + regulator-max-microvolt = <1320000>;
2913 + regulator-name = "vdd-cpus";
2917 + regulator-always-on;
2918 + regulator-min-microvolt = <3000000>;
2919 + regulator-max-microvolt = <3000000>;
2920 + regulator-name = "vcc-3v0";
2924 + regulator-min-microvolt = <700000>;
2925 + regulator-max-microvolt = <1320000>;
2926 + regulator-name = "vdd-gpu";
2930 + regulator-always-on;
2931 + regulator-min-microvolt = <700000>;
2932 + regulator-max-microvolt = <1320000>;
2933 + regulator-name = "vdd-cpu";
2937 + regulator-always-on;
2938 + regulator-min-microvolt = <700000>;
2939 + regulator-max-microvolt = <1320000>;
2940 + regulator-name = "vdd-sys-dll";
2944 + regulator-always-on;
2945 + regulator-min-microvolt = <1500000>;
2946 + regulator-max-microvolt = <1500000>;
2947 + regulator-name = "vcc-dram";
2950 +/* UART0 pads available on core board */
2952 + pinctrl-names = "default";
2953 + pinctrl-0 = <&uart0_pins_a>;
2958 +++ b/arch/arm/dts/sun6i-a31s-sina31s.dts
2961 + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
2963 + * This file is dual-licensed: you can use it either under the terms
2964 + * of the GPL or the X11 license, at your option. Note that this dual
2965 + * licensing only applies to this file, and not this project as a
2968 + * a) This file is free software; you can redistribute it and/or
2969 + * modify it under the terms of the GNU General Public License as
2970 + * published by the Free Software Foundation; either version 2 of the
2971 + * License, or (at your option) any later version.
2973 + * This file is distributed in the hope that it will be useful,
2974 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2975 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2976 + * GNU General Public License for more details.
2978 + * Or, alternatively,
2980 + * b) Permission is hereby granted, free of charge, to any person
2981 + * obtaining a copy of this software and associated documentation
2982 + * files (the "Software"), to deal in the Software without
2983 + * restriction, including without limitation the rights to use,
2984 + * copy, modify, merge, publish, distribute, sublicense, and/or
2985 + * sell copies of the Software, and to permit persons to whom the
2986 + * Software is furnished to do so, subject to the following
2989 + * The above copyright notice and this permission notice shall be
2990 + * included in all copies or substantial portions of the Software.
2992 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2993 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
2994 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2995 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
2996 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2997 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2998 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2999 + * OTHER DEALINGS IN THE SOFTWARE.
3002 +/* The SinA31s development board has the SinA31s core board soldered on */
3003 +#include "sun6i-a31s-sina31s-core.dtsi"
3005 +#include <dt-bindings/input/input.h>
3008 + model = "Sinlinx SinA31s Development Board";
3009 + compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
3012 + stdout-path = "serial0:115200n8";
3016 + compatible = "gpio-leds";
3017 + pinctrl-names = "default";
3018 + pinctrl-0 = <&led_pin_sina31s>;
3021 + label = "sina31s:status:usr";
3022 + gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
3028 + /* USB 2.0 4 port hub IC */
3037 + pinctrl-names = "default";
3038 + pinctrl-0 = <&gmac_pins_mii_a>;
3041 + phy-supply = <®_dldo1>;
3044 + phy1: ethernet-phy@1 {
3050 + pinctrl-names = "default";
3051 + pinctrl-0 = <&ir_pins_a>;
3056 + vref-supply = <®_aldo3>;
3060 + label = "Volume Up";
3061 + linux,code = <KEY_VOLUMEUP>;
3063 + voltage = <158730>;
3067 + label = "Volume Down";
3068 + linux,code = <KEY_VOLUMEDOWN>;
3070 + voltage = <349206>;
3075 + pinctrl-names = "default";
3076 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
3077 + vmmc-supply = <®_dcdc1>;
3079 + cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
3089 + led_pin_sina31s: led_pin@0 {
3090 + allwinner,pins = "PH13";
3091 + allwinner,function = "gpio_out";
3092 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3093 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3096 + mmc0_cd_pin_sina31s: mmc0_cd_pin@0 {
3097 + allwinner,pins = "PA4";
3098 + allwinner,function = "gpio_in";
3099 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3100 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3105 + regulator-min-microvolt = <3300000>;
3106 + regulator-max-microvolt = <3300000>;
3107 + regulator-name = "vcc-gmac-phy";
3114 +++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
3117 + * Copyright 2015 Lawrence Yu <lyu@micile.com>
3119 + * This file is dual-licensed: you can use it either under the terms
3120 + * of the GPL or the X11 license, at your option. Note that this dual
3121 + * licensing only applies to this file, and not this project as a
3124 + * a) This file is free software; you can redistribute it and/or
3125 + * modify it under the terms of the GNU General Public License as
3126 + * published by the Free Software Foundation; either version 2 of the
3127 + * License, or (at your option) any later version.
3129 + * This file is distributed in the hope that it will be useful,
3130 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3131 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3132 + * GNU General Public License for more details.
3134 + * Or, alternatively,
3136 + * b) Permission is hereby granted, free of charge, to any person
3137 + * obtaining a copy of this software and associated documentation
3138 + * files (the "Software"), to deal in the Software without
3139 + * restriction, including without limitation the rights to use,
3140 + * copy, modify, merge, publish, distribute, sublicense, and/or
3141 + * sell copies of the Software, and to permit persons to whom the
3142 + * Software is furnished to do so, subject to the following
3145 + * The above copyright notice and this permission notice shall be
3146 + * included in all copies or substantial portions of the Software.
3148 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3149 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3150 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3151 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3152 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3153 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3154 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3155 + * OTHER DEALINGS IN THE SOFTWARE.
3159 +#include "sun6i-a31s.dtsi"
3160 +#include "sunxi-common-regulators.dtsi"
3162 +#include <dt-bindings/gpio/gpio.h>
3163 +#include <dt-bindings/pinctrl/sun4i-a10.h>
3166 + model = "Yones TopTech BS1078 v2 Tablet";
3167 + compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s";
3176 + stdout-path = "serial0:115200n8";
3181 + pinctrl-names = "default";
3182 + pinctrl-0 = <&i2c1_pins_a>;
3187 + pinctrl-names = "default";
3188 + pinctrl-0 = <&i2c2_pins_a>;
3209 + mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 {
3210 + allwinner,pins = "PA8";
3211 + allwinner,function = "gpio_in";
3212 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3213 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3218 + pinctrl-names = "default";
3219 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>;
3220 + vmmc-supply = <®_vcc3v0>;
3222 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
3228 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3235 + compatible = "x-powers,axp221";
3237 + interrupt-parent = <&nmi_intc>;
3238 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3242 +#include "axp22x.dtsi"
3245 + regulator-always-on;
3246 + regulator-min-microvolt = <2700000>;
3247 + regulator-max-microvolt = <3300000>;
3248 + regulator-name = "avcc";
3252 + regulator-name = "vcc-lcd-usb2";
3253 + regulator-min-microvolt = <3000000>;
3254 + regulator-max-microvolt = <3000000>;
3258 + regulator-min-microvolt = <700000>;
3259 + regulator-max-microvolt = <1320000>;
3260 + regulator-name = "vdd-cpus";
3264 + regulator-always-on;
3265 + regulator-min-microvolt = <3000000>;
3266 + regulator-max-microvolt = <3000000>;
3267 + regulator-name = "vcc-3v0";
3271 + regulator-min-microvolt = <700000>;
3272 + regulator-max-microvolt = <1320000>;
3273 + regulator-name = "vdd-gpu";
3277 + regulator-always-on;
3278 + regulator-min-microvolt = <700000>;
3279 + regulator-max-microvolt = <1320000>;
3280 + regulator-name = "vdd-cpu";
3284 + regulator-always-on;
3285 + regulator-min-microvolt = <700000>;
3286 + regulator-max-microvolt = <1320000>;
3287 + regulator-name = "vdd-sys-dll";
3291 + regulator-always-on;
3292 + regulator-min-microvolt = <1500000>;
3293 + regulator-max-microvolt = <1500000>;
3294 + regulator-name = "vcc-dram";
3298 + regulator-min-microvolt = <3300000>;
3299 + regulator-max-microvolt = <3300000>;
3300 + regulator-name = "vcc-wifi";
3303 +/* Voltage source for I2C pullup resistors for I2C Bus 0 */
3305 + regulator-min-microvolt = <2800000>;
3306 + regulator-max-microvolt = <2800000>;
3307 + regulator-name = "vddio-csi";
3311 + pinctrl-names = "default";
3312 + pinctrl-0 = <&uart0_pins_a>;
3317 + usb1_vbus-supply = <®_dldo1>;
3318 + usb2_vbus-supply = <®_dc1sw>;
3321 --- a/arch/arm/dts/sun7i-a20-bananapi.dts
3322 +++ b/arch/arm/dts/sun7i-a20-bananapi.dts
3332 + cpu-supply = <®_dcdc2>;
3333 + operating-points = <
3348 @@ -119,13 +137,9 @@
3352 - compatible = "x-powers,axp209";
3354 interrupt-parent = <&nmi_intc>;
3355 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3357 - interrupt-controller;
3358 - #interrupt-cells = <1>;
3362 @@ -159,7 +173,18 @@
3371 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
3372 + allwinner,pins = "PH4";
3373 + allwinner,function = "gpio_in";
3374 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3375 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3378 mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
3379 allwinner,pins = "PH10";
3380 allwinner,function = "gpio_in";
3381 @@ -182,6 +207,37 @@
3385 +#include "axp209.dtsi"
3388 + regulator-always-on;
3389 + regulator-min-microvolt = <1000000>;
3390 + regulator-max-microvolt = <1400000>;
3391 + regulator-name = "vdd-cpu";
3395 + regulator-always-on;
3396 + regulator-min-microvolt = <1000000>;
3397 + regulator-max-microvolt = <1400000>;
3398 + regulator-name = "vdd-int-dll";
3402 + regulator-name = "vdd-rtc";
3406 + regulator-always-on;
3407 + regulator-min-microvolt = <3000000>;
3408 + regulator-max-microvolt = <3000000>;
3409 + regulator-name = "avcc";
3419 @@ -216,7 +272,21 @@
3428 +&usb_power_supply {
3433 + pinctrl-names = "default";
3434 + pinctrl-0 = <&usb0_id_detect_pin>;
3435 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
3436 + usb0_vbus_power-supply = <&usb_power_supply>;
3437 + usb0_vbus-supply = <®_usb0_vbus>;
3438 usb1_vbus-supply = <®_usb1_vbus>;
3439 usb2_vbus-supply = <®_usb2_vbus>;
3441 --- a/arch/arm/dts/sun7i-a20-cubieboard2.dts
3442 +++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts
3452 cpu-supply = <®_dcdc2>;