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>;
3454 @@ -150,6 +154,10 @@
3463 led_pins_cubieboard2: led_pins@0 {
3464 allwinner,pins = "PH20", "PH21";
3465 @@ -157,12 +165,24 @@
3466 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3467 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3470 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
3471 + allwinner,pins = "PH4";
3472 + allwinner,function = "gpio_in";
3473 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3474 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
3487 #include "axp209.dtsi"
3494 + pinctrl-names = "default";
3495 + pinctrl-0 = <&usb0_id_detect_pin>;
3496 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
3497 usb1_vbus-supply = <®_usb1_vbus>;
3498 usb2_vbus-supply = <®_usb2_vbus>;
3500 --- a/arch/arm/dts/sun7i-a20-cubietruck.dts
3501 +++ b/arch/arm/dts/sun7i-a20-cubietruck.dts
3502 @@ -101,6 +101,10 @@
3511 cpu-supply = <®_dcdc2>;
3514 +++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts
3517 + * Copyright 2015 Stefan Roese <sr@denx.de>
3519 + * This file is dual-licensed: you can use it either under the terms
3520 + * of the GPL or the X11 license, at your option. Note that this dual
3521 + * licensing only applies to this file, and not this project as a
3524 + * a) This file is free software; you can redistribute it and/or
3525 + * modify it under the terms of the GNU General Public License as
3526 + * published by the Free Software Foundation; either version 2 of the
3527 + * License, or (at your option) any later version.
3529 + * This file is distributed in the hope that it will be useful,
3530 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3531 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3532 + * GNU General Public License for more details.
3534 + * Or, alternatively,
3536 + * b) Permission is hereby granted, free of charge, to any person
3537 + * obtaining a copy of this software and associated documentation
3538 + * files (the "Software"), to deal in the Software without
3539 + * restriction, including without limitation the rights to use,
3540 + * copy, modify, merge, publish, distribute, sublicense, and/or
3541 + * sell copies of the Software, and to permit persons to whom the
3542 + * Software is furnished to do so, subject to the following
3545 + * The above copyright notice and this permission notice shall be
3546 + * included in all copies or substantial portions of the Software.
3548 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3549 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3550 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3551 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3552 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3553 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3554 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3555 + * OTHER DEALINGS IN THE SOFTWARE.
3559 +#include "sun7i-a20.dtsi"
3560 +#include "sunxi-common-regulators.dtsi"
3562 +#include <dt-bindings/gpio/gpio.h>
3563 +#include <dt-bindings/interrupt-controller/irq.h>
3564 +#include <dt-bindings/pinctrl/sun4i-a10.h>
3567 + model = "ICnova-A20 SWAC";
3568 + compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
3575 + stdout-path = "serial0:115200n8";
3580 + cpu-supply = <®_dcdc2>;
3592 + pinctrl-names = "default";
3593 + pinctrl-0 = <&gmac_pins_mii_a>;
3598 + phy1: ethernet-phy@1 {
3604 + pinctrl-names = "default";
3605 + pinctrl-0 = <&i2c0_pins_a>;
3610 + interrupt-parent = <&nmi_intc>;
3611 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3616 + pinctrl-names = "default";
3617 + pinctrl-0 = <&i2c1_pins_a>;
3622 + pinctrl-names = "default";
3623 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
3624 + vmmc-supply = <®_vcc3v3>;
3626 + cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
3639 +#include "axp209.dtsi"
3642 + regulator-always-on;
3643 + regulator-min-microvolt = <1000000>;
3644 + regulator-max-microvolt = <1400000>;
3645 + regulator-name = "vdd-cpu";
3649 + regulator-always-on;
3650 + regulator-min-microvolt = <1000000>;
3651 + regulator-max-microvolt = <1400000>;
3652 + regulator-name = "vdd-int-dll";
3656 + regulator-name = "vdd-rtc";
3660 + regulator-always-on;
3661 + regulator-min-microvolt = <3000000>;
3662 + regulator-max-microvolt = <3000000>;
3663 + regulator-name = "avcc";
3675 + pinctrl-names = "default";
3676 + pinctrl-0 = <&uart0_pins_a>;
3681 + usb1_vbus-supply = <®_usb1_vbus>;
3682 + usb2_vbus-supply = <®_usb2_vbus>;
3686 +++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts
3689 + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
3691 + * This file is dual-licensed: you can use it either under the terms
3692 + * of the GPL or the X11 license, at your option. Note that this dual
3693 + * licensing only applies to this file, and not this project as a
3696 + * a) This file is free software; you can redistribute it and/or
3697 + * modify it under the terms of the GNU General Public License as
3698 + * published by the Free Software Foundation; either version 2 of the
3699 + * License, or (at your option) any later version.
3701 + * This file is distributed in the hope that it will be useful,
3702 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3703 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3704 + * GNU General Public License for more details.
3706 + * Or, alternatively,
3708 + * b) Permission is hereby granted, free of charge, to any person
3709 + * obtaining a copy of this software and associated documentation
3710 + * files (the "Software"), to deal in the Software without
3711 + * restriction, including without limitation the rights to use,
3712 + * copy, modify, merge, publish, distribute, sublicense, and/or
3713 + * sell copies of the Software, and to permit persons to whom the
3714 + * Software is furnished to do so, subject to the following
3717 + * The above copyright notice and this permission notice shall be
3718 + * included in all copies or substantial portions of the Software.
3720 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3721 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3722 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3723 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3724 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3725 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3726 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3727 + * OTHER DEALINGS IN THE SOFTWARE.
3731 +#include "sun7i-a20.dtsi"
3732 +#include "sunxi-itead-core-common.dtsi"
3735 + model = "Itead Ibox A20";
3736 + compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20";
3739 + compatible = "gpio-leds";
3740 + pinctrl-names = "default";
3741 + pinctrl-0 = <&led_pins_itead_core>;
3744 + label = "itead_core:green:usr";
3745 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
3746 + default-state = "on";
3750 + label = "itead_core:blue:usr";
3751 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
3752 + default-state = "on";
3758 + target-supply = <®_ahci_5v>;
3767 + pinctrl-names = "default";
3768 + pinctrl-0 = <&gmac_pins_mii_a>;
3773 + phy1: ethernet-phy@1 {
3780 + interrupt-parent = <&nmi_intc>;
3781 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
3786 + pinctrl-names = "default";
3787 + pinctrl-0 = <&ir0_rx_pins_a>;
3792 + pinctrl-names = "default";
3793 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
3794 + vmmc-supply = <®_vcc3v3>;
3796 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
3802 + led_pins_itead_core: led_pins@0 {
3803 + allwinner,pins = "PH20","PH21";
3804 + allwinner,function = "gpio_out";
3805 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
3806 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3813 --- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts
3814 +++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
3818 cpu-supply = <®_dcdc2>;
3819 - operating-points = <
3832 --- a/arch/arm/dts/sun7i-a20-mk808c.dts
3833 +++ b/arch/arm/dts/sun7i-a20-mk808c.dts
3836 #include <dt-bindings/gpio/gpio.h>
3837 #include <dt-bindings/interrupt-controller/irq.h>
3838 +#include <dt-bindings/pinctrl/sun4i-a10.h>
3853 @@ -121,6 +126,30 @@
3862 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
3863 + allwinner,pins = "PH4";
3864 + allwinner,function = "gpio_in";
3865 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3866 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3869 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
3870 + allwinner,pins = "PH5";
3871 + allwinner,function = "gpio_in";
3872 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
3873 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
3884 @@ -141,7 +170,17 @@
3894 + pinctrl-names = "default";
3895 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
3896 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
3897 + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
3898 + usb0_vbus-supply = <®_usb0_vbus>;
3899 usb1_vbus-supply = <®_usb1_vbus>;
3900 usb2_vbus-supply = <®_usb2_vbus>;
3902 --- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
3903 +++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
3906 * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
3907 + * Copyright 2015 - Karsten Merker <merker@debian.org>
3909 * This file is dual-licensed: you can use it either under the terms
3910 * of the GPL or the X11 license, at your option. Note that this dual
3912 #include "sunxi-common-regulators.dtsi"
3914 #include <dt-bindings/gpio/gpio.h>
3915 +#include <dt-bindings/input/input.h>
3916 #include <dt-bindings/interrupt-controller/irq.h>
3917 #include <dt-bindings/pinctrl/sun4i-a10.h>
3920 default-state = "on";
3924 - reg_axp_ipsout: axp_ipsout {
3925 - compatible = "regulator-fixed";
3926 - regulator-name = "axp-ipsout";
3927 - regulator-min-microvolt = <5000000>;
3928 - regulator-max-microvolt = <5000000>;
3929 - regulator-always-on;
3943 pinctrl-names = "default";
3944 pinctrl-0 = <&gmac_pins_rgmii_a>;
3945 @@ -118,10 +116,58 @@
3950 - pinctrl-names = "default";
3951 - pinctrl-0 = <&i2c1_pins_a>;
3953 + vref-supply = <®_vcc3v0>;
3957 + label = "Volume Up";
3958 + linux,code = <KEY_VOLUMEUP>;
3960 + voltage = <190000>;
3964 + label = "Volume Down";
3965 + linux,code = <KEY_VOLUMEDOWN>;
3967 + voltage = <390000>;
3972 + linux,code = <KEY_MENU>;
3974 + voltage = <600000>;
3979 + linux,code = <KEY_SEARCH>;
3981 + voltage = <800000>;
3986 + linux,code = <KEY_HOMEPAGE>;
3988 + voltage = <980000>;
3993 + linux,code = <KEY_ESC>;
3995 + voltage = <1180000>;
4000 + linux,code = <KEY_ENTER>;
4002 + voltage = <1400000>;
4007 @@ -134,6 +180,16 @@
4012 + pinctrl-names = "default";
4013 + pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
4014 + vmmc-supply = <®_vcc3v3>;
4016 + cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
4024 @@ -161,15 +217,22 @@
4025 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4028 + mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
4029 + allwinner,pins = "PH0";
4030 + allwinner,function = "gpio_in";
4031 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4032 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4035 usb0_id_detect_pin: usb0_id_detect_pin@0 {
4036 - allwinner,pins = "PH04";
4037 + allwinner,pins = "PH4";
4038 allwinner,function = "gpio_in";
4039 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4040 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4043 usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
4044 - allwinner,pins = "PH05";
4045 + allwinner,pins = "PH5";
4046 allwinner,function = "gpio_in";
4047 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4048 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4051 regulator-always-on;
4052 regulator-min-microvolt = <1000000>;
4053 - regulator-max-microvolt = <1425000>;
4054 + regulator-max-microvolt = <1400000>;
4055 regulator-name = "vdd-cpu";
4060 pinctrl-names = "default";
4061 pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
4062 - usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */
4063 - usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */
4064 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
4065 + usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
4066 usb0_vbus-supply = <®_usb0_vbus>;
4067 usb1_vbus-supply = <®_usb1_vbus>;
4068 usb2_vbus-supply = <®_usb2_vbus>;
4069 --- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
4070 +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts
4071 @@ -117,6 +117,18 @@
4076 + pinctrl-names = "default";
4077 + pinctrl-0 = <&i2c1_pins_a>;
4080 + eeprom: eeprom@50 {
4081 + compatible = "atmel,24c16";
4088 pinctrl-names = "default";
4089 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
4090 --- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
4091 +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
4092 @@ -170,6 +170,12 @@
4093 pinctrl-names = "default";
4094 pinctrl-0 = <&i2c1_pins_a>;
4097 + eeprom: eeprom@50 {
4098 + compatible = "atmel,24c16";
4105 @@ -190,6 +196,10 @@
4114 ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
4115 allwinner,pins = "PC3";
4116 @@ -204,6 +214,27 @@
4117 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
4118 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4121 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4122 + allwinner,pins = "PH4";
4123 + allwinner,function = "gpio_in";
4124 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4125 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4128 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
4129 + allwinner,pins = "PH5";
4130 + allwinner,function = "gpio_in";
4131 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4132 + allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
4135 + usb0_vbus_pin_lime2: usb0_vbus_pin@0 {
4136 + allwinner,pins = "PC17";
4137 + allwinner,function = "gpio_out";
4138 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4139 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4144 @@ -212,6 +243,12 @@
4149 + pinctrl-0 = <&usb0_vbus_pin_lime2>;
4150 + gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
4157 @@ -226,7 +263,17 @@
4167 + pinctrl-names = "default";
4168 + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
4169 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4170 + usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
4171 + usb0_vbus-supply = <®_usb0_vbus>;
4172 usb1_vbus-supply = <®_usb1_vbus>;
4173 usb2_vbus-supply = <®_usb2_vbus>;
4175 --- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
4176 +++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts
4177 @@ -125,6 +125,12 @@
4178 pinctrl-names = "default";
4179 pinctrl-0 = <&i2c1_pins_a>;
4182 + eeprom: eeprom@50 {
4183 + compatible = "atmel,24c16";
4190 --- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts
4191 +++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
4203 @@ -156,7 +160,18 @@
4212 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4213 + allwinner,pins = "PH4";
4214 + allwinner,function = "gpio_in";
4215 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4216 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4219 mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
4220 allwinner,pins = "PH10";
4221 allwinner,function = "gpio_in";
4222 @@ -225,6 +240,10 @@
4223 regulator-name = "avcc";
4231 pinctrl-0 = <&usb1_vbus_pin_bananapro>;
4232 gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
4233 @@ -243,7 +262,21 @@
4242 +&usb_power_supply {
4247 + pinctrl-names = "default";
4248 + pinctrl-0 = <&usb0_id_detect_pin>;
4249 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4250 + usb0_vbus_power-supply = <&usb_power_supply>;
4251 + usb0_vbus-supply = <®_usb0_vbus>;
4252 usb1_vbus-supply = <®_usb1_vbus>;
4253 usb2_vbus-supply = <®_usb2_vbus>;
4255 --- a/arch/arm/dts/sun7i-a20-orangepi.dts
4256 +++ b/arch/arm/dts/sun7i-a20-orangepi.dts
4257 @@ -141,7 +141,18 @@
4266 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4267 + allwinner,pins = "PH4";
4268 + allwinner,function = "gpio_in";
4269 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4270 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4273 mmc0_cd_pin_orangepi: mmc0_cd_pin@0 {
4274 allwinner,pins = "PH10";
4275 allwinner,function = "gpio_in";
4276 @@ -203,6 +214,10 @@
4277 regulator-name = "avcc";
4285 pinctrl-0 = <&usb1_vbus_pin_bananapro>;
4286 gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */
4287 @@ -221,7 +236,21 @@
4296 +&usb_power_supply {
4301 + pinctrl-names = "default";
4302 + pinctrl-0 = <&usb0_id_detect_pin>;
4303 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4304 + usb0_vbus_power-supply = <&usb_power_supply>;
4305 + usb0_vbus-supply = <®_usb0_vbus>;
4306 usb1_vbus-supply = <®_usb1_vbus>;
4307 usb2_vbus-supply = <®_usb2_vbus>;
4309 --- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
4310 +++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
4320 + cpu-supply = <®_dcdc2>;
4326 @@ -108,13 +116,9 @@
4330 - compatible = "x-powers,axp209";
4332 interrupt-parent = <&nmi_intc>;
4333 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
4335 - interrupt-controller;
4336 - #interrupt-cells = <1>;
4340 @@ -142,6 +146,10 @@
4349 ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 {
4350 allwinner,pins = "PH2";
4351 @@ -157,8 +165,15 @@
4352 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4355 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4356 + allwinner,pins = "PH4";
4357 + allwinner,function = "gpio_in";
4358 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4359 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4362 usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 {
4363 - allwinner,pins = "PH11";
4364 + allwinner,pins = "PD2";
4365 allwinner,function = "gpio_out";
4366 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4367 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4368 @@ -171,13 +186,37 @@
4373 - pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
4374 - gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
4376 +#include "axp209.dtsi"
4379 + regulator-always-on;
4380 + regulator-min-microvolt = <1000000>;
4381 + regulator-max-microvolt = <1400000>;
4382 + regulator-name = "vdd-cpu";
4386 + regulator-always-on;
4387 + regulator-min-microvolt = <1000000>;
4388 + regulator-max-microvolt = <1400000>;
4389 + regulator-name = "vdd-int-pll";
4393 + regulator-name = "vdd-rtc";
4397 + regulator-always-on;
4398 + regulator-min-microvolt = <3000000>;
4399 + regulator-max-microvolt = <3000000>;
4400 + regulator-name = "avcc";
4404 +/* A single regulator (U24) powers both USB host ports. */
4406 + pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
4407 + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
4411 @@ -187,8 +226,16 @@
4421 + pinctrl-names = "default";
4422 + pinctrl-0 = <&usb0_id_detect_pin>;
4423 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4424 usb1_vbus-supply = <®_usb1_vbus>;
4425 - usb2_vbus-supply = <®_usb2_vbus>;
4426 + usb2_vbus-supply = <®_usb1_vbus>;
4429 --- a/arch/arm/dts/sun7i-a20-pcduino3.dts
4430 +++ b/arch/arm/dts/sun7i-a20-pcduino3.dts
4431 @@ -111,6 +111,14 @@
4432 allwinner,pins = "PH2";
4440 + cpu-supply = <®_dcdc2>;
4446 @@ -137,16 +145,14 @@
4450 - compatible = "x-powers,axp209";
4452 interrupt-parent = <&nmi_intc>;
4453 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
4455 - interrupt-controller;
4456 - #interrupt-cells = <1>;
4460 +#include "axp209.dtsi"
4463 pinctrl-names = "default";
4464 pinctrl-0 = <&ir0_rx_pins_a>;
4465 @@ -171,6 +177,10 @@
4474 led_pins_pcduino3: led_pins@0 {
4475 allwinner,pins = "PH15", "PH16";
4476 @@ -185,6 +195,13 @@
4477 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4478 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4481 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4482 + allwinner,pins = "PH4";
4483 + allwinner,function = "gpio_in";
4484 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4485 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4490 @@ -192,6 +209,31 @@
4495 + regulator-always-on;
4496 + regulator-min-microvolt = <1000000>;
4497 + regulator-max-microvolt = <1400000>;
4498 + regulator-name = "vdd-cpu";
4502 + regulator-always-on;
4503 + regulator-min-microvolt = <1000000>;
4504 + regulator-max-microvolt = <1400000>;
4505 + regulator-name = "vdd-int-pll";
4509 + regulator-name = "vdd-rtc";
4513 + regulator-always-on;
4514 + regulator-min-microvolt = <3000000>;
4515 + regulator-max-microvolt = <3000000>;
4516 + regulator-name = "avcc";
4522 @@ -206,7 +248,15 @@
4532 + pinctrl-names = "default";
4533 + pinctrl-0 = <&usb0_id_detect_pin>;
4534 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4535 usb1_vbus-supply = <®_usb1_vbus>;
4536 usb2_vbus-supply = <®_usb2_vbus>;
4538 --- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
4539 +++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts
4541 #include <dt-bindings/gpio/gpio.h>
4542 #include <dt-bindings/input/input.h>
4543 #include <dt-bindings/interrupt-controller/irq.h>
4544 +#include <dt-bindings/pwm/pwm.h>
4547 model = "Wexler TAB7200";
4553 + compatible = "pwm-backlight";
4554 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
4555 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
4556 + default-brightness-level = <8>;
4557 + pinctrl-names = "default";
4558 + pinctrl-0 = <&bl_enable_pin>;
4559 + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
4563 stdout-path = "serial0:115200n8";
4568 + pinctrl-names = "default";
4569 + pinctrl-0 = <&codec_pa_pin>;
4570 + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
4575 cpu-supply = <®_dcdc2>;
4581 +#include "axp209.dtsi"
4584 pinctrl-names = "default";
4585 pinctrl-0 = <&i2c1_pins_a>;
4587 pinctrl-names = "default";
4588 pinctrl-0 = <&i2c2_pins_a>;
4591 + gt911: touchscreen@5d {
4592 + compatible = "goodix,gt911";
4594 + interrupt-parent = <&pio>;
4595 + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
4596 + pinctrl-names = "default";
4597 + pinctrl-0 = <&ts_reset_pin>;
4598 + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
4599 + reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
4600 + touchscreen-swapped-x-y;
4605 @@ -135,7 +167,45 @@
4609 -#include "axp209.dtsi"
4615 + bl_enable_pin: bl_enable_pin@0 {
4616 + allwinner,pins = "PH7";
4617 + allwinner,function = "gpio_out";
4618 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4619 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4622 + codec_pa_pin: codec_pa_pin@0 {
4623 + allwinner,pins = "PH15";
4624 + allwinner,function = "gpio_out";
4625 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4626 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4629 + ts_reset_pin: ts_reset_pin@0 {
4630 + allwinner,pins = "PB13";
4631 + allwinner,function = "gpio_out";
4632 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4633 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4636 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4637 + allwinner,pins = "PH4";
4638 + allwinner,function = "gpio_in";
4639 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4640 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4645 + pinctrl-names = "default";
4646 + pinctrl-0 = <&pwm0_pins_a>;
4651 regulator-always-on;
4652 @@ -162,6 +232,10 @@
4653 regulator-name = "avcc";
4663 @@ -176,7 +250,21 @@
4672 +&usb_power_supply {
4677 + pinctrl-names = "default";
4678 + pinctrl-0 = <&usb0_id_detect_pin>;
4679 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4680 + usb0_vbus_power-supply = <&usb_power_supply>;
4681 + usb0_vbus-supply = <®_usb0_vbus>;
4682 usb1_vbus-supply = <®_usb1_vbus>;
4683 usb2_vbus-supply = <®_usb2_vbus>;
4685 --- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
4686 +++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
4689 - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
4690 + * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
4692 - * Minimal dts file for the Wits Pro A20 DKT for u-boot only
4693 + * This file is dual-licensed: you can use it either under the terms
4694 + * of the GPL or the X11 license, at your option. Note that this dual
4695 + * licensing only applies to this file, and not this project as a
4698 - * SPDX-License-Identifier: GPL-2.0+ or X11
4699 + * a) This file is free software; you can redistribute it and/or
4700 + * modify it under the terms of the GNU General Public License as
4701 + * published by the Free Software Foundation; either version 2 of the
4702 + * License, or (at your option) any later version.
4704 + * This file is distributed in the hope that it will be useful,
4705 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4706 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4707 + * GNU General Public License for more details.
4709 + * Or, alternatively,
4711 + * b) Permission is hereby granted, free of charge, to any person
4712 + * obtaining a copy of this software and associated documentation
4713 + * files (the "Software"), to deal in the Software without
4714 + * restriction, including without limitation the rights to use,
4715 + * copy, modify, merge, publish, distribute, sublicense, and/or
4716 + * sell copies of the Software, and to permit persons to whom the
4717 + * Software is furnished to do so, subject to the following
4720 + * The above copyright notice and this permission notice shall be
4721 + * included in all copies or substantial portions of the Software.
4723 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4724 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4725 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4726 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4727 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4728 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4729 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4730 + * OTHER DEALINGS IN THE SOFTWARE.
4734 #include "sun7i-a20.dtsi"
4735 +#include "sunxi-common-regulators.dtsi"
4737 +#include <dt-bindings/gpio/gpio.h>
4738 +#include <dt-bindings/input/input.h>
4739 +#include <dt-bindings/interrupt-controller/irq.h>
4742 model = "Wits Pro A20 DKT";
4745 stdout-path = "serial0:115200n8";
4748 + mmc3_pwrseq: mmc3_pwrseq {
4749 + compatible = "mmc-pwrseq-simple";
4750 + pinctrl-names = "default";
4751 + pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
4752 + reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
4757 + cpu-supply = <®_dcdc2>;
4766 + pinctrl-names = "default";
4767 + pinctrl-0 = <&i2c0_pins_a>;
4772 + interrupt-parent = <&nmi_intc>;
4773 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
4778 + pinctrl-names = "default";
4779 + pinctrl-0 = <&i2c1_pins_a>;
4784 + pinctrl-names = "default";
4785 + pinctrl-0 = <&i2c2_pins_a>;
4789 +#include "axp209.dtsi"
4792 + pinctrl-names = "default";
4793 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
4794 + vmmc-supply = <®_vcc3v3>;
4796 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
4802 + pinctrl-names = "default";
4803 + pinctrl-0 = <&mmc3_pins_a>;
4804 + vmmc-supply = <®_vcc3v3>;
4805 + mmc-pwrseq = <&mmc3_pwrseq>;
4812 + compatible = "brcm,bcm4329-fmac";
4813 + interrupt-parent = <&pio>;
4814 + interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
4815 + interrupt-names = "host-wake";
4831 + vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin@0 {
4832 + allwinner,pins = "PH9";
4833 + allwinner,function = "gpio_out";
4834 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4835 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
4838 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
4839 + allwinner,pins = "PH4";
4840 + allwinner,function = "gpio_in";
4841 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
4842 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
4847 + regulator-always-on;
4848 + regulator-min-microvolt = <1000000>;
4849 + regulator-max-microvolt = <1450000>;
4850 + regulator-name = "vdd-cpu";
4854 + regulator-always-on;
4855 + regulator-min-microvolt = <1000000>;
4856 + regulator-max-microvolt = <1400000>;
4857 + regulator-name = "vdd-int-dll";
4861 + regulator-name = "vdd-rtc";
4865 + regulator-always-on;
4866 + regulator-min-microvolt = <3000000>;
4867 + regulator-max-microvolt = <3000000>;
4868 + regulator-name = "avcc";
4884 pinctrl-names = "default";
4885 pinctrl-0 = <&uart0_pins_a>;
4894 +&usb_power_supply {
4899 + pinctrl-names = "default";
4900 + pinctrl-0 = <&usb0_id_detect_pin>;
4901 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
4902 + usb0_vbus_power-supply = <&usb_power_supply>;
4903 + usb0_vbus-supply = <®_usb0_vbus>;
4904 + usb1_vbus-supply = <®_usb1_vbus>;
4905 + usb2_vbus-supply = <®_usb2_vbus>;
4908 --- a/arch/arm/dts/sun7i-a20.dtsi
4909 +++ b/arch/arm/dts/sun7i-a20.dtsi
4911 #include <dt-bindings/interrupt-controller/arm-gic.h>
4912 #include <dt-bindings/thermal/thermal.h>
4914 +#include <dt-bindings/clock/sun4i-a10-pll2.h>
4915 #include <dt-bindings/dma/sun4i-a10.h>
4916 #include <dt-bindings/pinctrl/sun4i-a10.h>
4919 "simple-framebuffer";
4920 allwinner,pipeline = "de_be0-lcd0-hdmi";
4921 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
4923 + <&ahb_gates 44>, <&dram_gates 26>;
4924 status = "disabled";
4928 compatible = "allwinner,simple-framebuffer",
4929 "simple-framebuffer";
4930 allwinner,pipeline = "de_be0-lcd0";
4931 - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
4932 + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
4934 status = "disabled";
4938 "simple-framebuffer";
4939 allwinner,pipeline = "de_be0-lcd0-tve0";
4940 clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
4942 + <&ahb_gates 44>, <&dram_gates 26>;
4943 status = "disabled";
4953 #cooling-cells = <2>;
4954 cooling-min-level = <0>;
4955 @@ -199,6 +201,15 @@
4956 clock-output-names = "pll1";
4959 + pll2: clk@01c20008 {
4960 + #clock-cells = <1>;
4961 + compatible = "allwinner,sun4i-a10-pll2-clk";
4962 + reg = <0x01c20008 0x8>;
4963 + clocks = <&osc24M>;
4964 + clock-output-names = "pll2-1x", "pll2-2x",
4965 + "pll2-4x", "pll2-8x";
4968 pll4: clk@01c20018 {
4970 compatible = "allwinner,sun7i-a20-pll4-clk";
4971 @@ -267,6 +278,19 @@
4972 compatible = "allwinner,sun7i-a20-ahb-gates-clk";
4973 reg = <0x01c20060 0x8>;
4975 + clock-indices = <0>, <1>,
4977 + <5>, <6>, <7>, <8>,
4978 + <9>, <10>, <11>, <12>,
4980 + <17>, <18>, <20>, <21>,
4982 + <28>, <32>, <33>, <34>,
4983 + <35>, <36>, <37>, <40>,
4988 clock-output-names = "ahb_usb0", "ahb_ehci0",
4989 "ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
4990 "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
4991 @@ -295,6 +319,10 @@
4992 compatible = "allwinner,sun7i-a20-apb0-gates-clk";
4993 reg = <0x01c20068 0x4>;
4995 + clock-indices = <0>, <1>,
4999 clock-output-names = "apb0_codec", "apb0_spdif",
5000 "apb0_ac97", "apb0_iis0", "apb0_iis1",
5001 "apb0_pio", "apb0_ir0", "apb0_ir1",
5002 @@ -314,6 +342,12 @@
5003 compatible = "allwinner,sun7i-a20-apb1-gates-clk";
5004 reg = <0x01c2006c 0x4>;
5006 + clock-indices = <0>, <1>,
5012 clock-output-names = "apb1_i2c0", "apb1_i2c1",
5013 "apb1_i2c2", "apb1_i2c3", "apb1_can",
5014 "apb1_scr", "apb1_ps20", "apb1_ps21",
5015 @@ -442,6 +476,14 @@
5016 clock-output-names = "ir1";
5019 + keypad_clk: clk@01c200c4 {
5020 + #clock-cells = <0>;
5021 + compatible = "allwinner,sun4i-a10-mod0-clk";
5022 + reg = <0x01c200c4 0x4>;
5023 + clocks = <&osc24M>;
5024 + clock-output-names = "keypad";
5027 usb_clk: clk@01c200cc {
5030 @@ -460,6 +502,48 @@
5031 clock-output-names = "spi3";
5034 + dram_gates: clk@01c20100 {
5035 + #clock-cells = <1>;
5036 + compatible = "allwinner,sun4i-a10-dram-gates-clk";
5037 + reg = <0x01c20100 0x4>;
5038 + clocks = <&pll5 0>;
5039 + clock-indices = <0>,
5048 + clock-output-names = "dram_ve",
5049 + "dram_csi0", "dram_csi1",
5052 + "dram_tve0", "dram_tve1",
5054 + "dram_de_fe1", "dram_de_fe0",
5055 + "dram_de_be0", "dram_de_be1",
5056 + "dram_de_mp", "dram_ace";
5059 + ve_clk: clk@01c2013c {
5060 + #clock-cells = <0>;
5061 + #reset-cells = <0>;
5062 + compatible = "allwinner,sun4i-a10-ve-clk";
5063 + reg = <0x01c2013c 0x4>;
5065 + clock-output-names = "ve";
5068 + codec_clk: clk@01c20140 {
5069 + #clock-cells = <0>;
5070 + compatible = "allwinner,sun4i-a10-codec-clk";
5071 + reg = <0x01c20140 0x4>;
5072 + clocks = <&pll2 SUN4I_A10_PLL2_1X>;
5073 + clock-output-names = "codec";
5076 mbus_clk: clk@01c2015c {
5078 compatible = "allwinner,sun5i-a13-mbus-clk";
5079 @@ -744,6 +828,14 @@
5080 status = "disabled";
5083 + crypto: crypto-engine@01c15000 {
5084 + compatible = "allwinner,sun4i-a10-crypto";
5085 + reg = <0x01c15000 0x1000>;
5086 + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
5087 + clocks = <&ahb_gates 5>, <&ss_clk>;
5088 + clock-names = "ahb", "mod";
5091 spi2: spi@01c17000 {
5092 compatible = "allwinner,sun4i-a10-spi";
5093 reg = <0x01c17000 0x1000>;
5094 @@ -1159,6 +1251,19 @@
5095 status = "disabled";
5098 + codec: codec@01c22c00 {
5099 + #sound-dai-cells = <0>;
5100 + compatible = "allwinner,sun7i-a20-codec";
5101 + reg = <0x01c22c00 0x40>;
5102 + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
5103 + clocks = <&apb0_gates 0>, <&codec_clk>;
5104 + clock-names = "apb", "codec";
5105 + dmas = <&dma SUN4I_DMA_NORMAL 19>,
5106 + <&dma SUN4I_DMA_NORMAL 19>;
5107 + dma-names = "rx", "tx";
5108 + status = "disabled";
5111 sid: eeprom@01c23800 {
5112 compatible = "allwinner,sun7i-a20-sid";
5113 reg = <0x01c23800 0x200>;
5114 --- a/arch/arm/dts/sun8i-a23-a33.dtsi
5115 +++ b/arch/arm/dts/sun8i-a23-a33.dtsi
5121 + simplefb_lcd: framebuffer@0 {
5122 compatible = "allwinner,simple-framebuffer",
5123 "simple-framebuffer";
5124 allwinner,pipeline = "de_be0-lcd0";
5125 @@ -175,27 +175,13 @@
5126 clock-output-names = "apb1";
5129 - ahb1_gates: clk@01c20060 {
5130 - #clock-cells = <1>;
5131 - compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
5132 - reg = <0x01c20060 0x8>;
5134 - clock-output-names = "ahb1_mipidsi", "ahb1_dma",
5135 - "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
5136 - "ahb1_nand", "ahb1_sdram",
5137 - "ahb1_hstimer", "ahb1_spi0",
5138 - "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
5139 - "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
5140 - "ahb1_csi", "ahb1_be", "ahb1_fe",
5141 - "ahb1_gpu", "ahb1_spinlock",
5145 apb1_gates: clk@01c20068 {
5147 compatible = "allwinner,sun8i-a23-apb1-gates-clk";
5148 reg = <0x01c20068 0x4>;
5150 + clock-indices = <0>, <5>,
5152 clock-output-names = "apb1_codec", "apb1_pio",
5153 "apb1_daudio0", "apb1_daudio1";
5155 @@ -213,6 +199,10 @@
5156 compatible = "allwinner,sun8i-a23-apb2-gates-clk";
5157 reg = <0x01c2006c 0x4>;
5159 + clock-indices = <0>, <1>,
5163 clock-output-names = "apb2_i2c0", "apb2_i2c1",
5164 "apb2_i2c2", "apb2_uart0",
5165 "apb2_uart1", "apb2_uart2",
5166 @@ -391,12 +381,19 @@
5167 allwinner,pins = "PC5", "PC6", "PC8",
5168 "PC9", "PC10", "PC11",
5169 "PC12", "PC13", "PC14",
5172 allwinner,function = "mmc2";
5173 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
5174 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5178 + allwinner,pins = "PH0";
5179 + allwinner,function = "pwm0";
5180 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5181 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5184 i2c0_pins_a: i2c0@0 {
5185 allwinner,pins = "PH2", "PH3";
5186 allwinner,function = "i2c0";
5187 @@ -451,6 +448,14 @@
5188 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
5191 + pwm: pwm@01c21400 {
5192 + compatible = "allwinner,sun7i-a20-pwm";
5193 + reg = <0x01c21400 0xc>;
5194 + clocks = <&osc24M>;
5196 + status = "disabled";
5199 lradc: lradc@01c22800 {
5200 compatible = "allwinner,sun4i-a10-lradc-keys";
5201 reg = <0x01c22800 0x100>;
5202 @@ -574,6 +579,14 @@
5203 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
5206 + nmi_intc: interrupt-controller@01f00c0c {
5207 + compatible = "allwinner,sun6i-a31-sc-nmi";
5208 + interrupt-controller;
5209 + #interrupt-cells = <2>;
5210 + reg = <0x01f00c0c 0x38>;
5211 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
5215 compatible = "allwinner,sun8i-a23-prcm";
5216 reg = <0x01f01400 0x200>;
5217 @@ -642,10 +655,18 @@
5218 resets = <&apb0_rst 0>;
5220 interrupt-controller;
5221 + #interrupt-cells = <3>;
5222 #address-cells = <1>;
5226 + r_rsb_pins: r_rsb {
5227 + allwinner,pins = "PL0", "PL1";
5228 + allwinner,function = "s_rsb";
5229 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
5230 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
5233 r_uart_pins_a: r_uart@0 {
5234 allwinner,pins = "PL2", "PL3";
5235 allwinner,function = "s_uart";
5236 @@ -653,5 +674,19 @@
5237 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5241 + r_rsb: rsb@01f03400 {
5242 + compatible = "allwinner,sun8i-a23-rsb";
5243 + reg = <0x01f03400 0x400>;
5244 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
5245 + clocks = <&apb0_gates 3>;
5246 + clock-frequency = <3000000>;
5247 + resets = <&apb0_rst 3>;
5248 + pinctrl-names = "default";
5249 + pinctrl-0 = <&r_rsb_pins>;
5250 + status = "disabled";
5251 + #address-cells = <1>;
5252 + #size-cells = <0>;
5256 --- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts
5257 +++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts
5259 #include <dt-bindings/gpio/gpio.h>
5260 #include <dt-bindings/input/input.h>
5261 #include <dt-bindings/pinctrl/sun4i-a10.h>
5262 +#include <dt-bindings/pwm/pwm.h>
5265 - model = "Allwinner GT90H Quad Core Tablet (v4)";
5266 - compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33";
5267 + model = "Allwinner GT90H Dual Core Tablet (v4)";
5268 + compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
5274 + backlight: backlight {
5275 + compatible = "pwm-backlight";
5276 + pinctrl-names = "default";
5277 + pinctrl-0 = <&bl_en_pin_gt90h>;
5278 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
5279 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
5280 + default-brightness-level = <8>;
5281 + enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
5285 stdout-path = "serial0:115200n8";
5289 pinctrl-names = "default";
5290 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
5291 - /* FIXME this really is aldo1, correct once we've pmic support */
5292 - vmmc-supply = <®_vcc3v0>;
5293 + vmmc-supply = <®_aldo1>;
5295 cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
5297 @@ -115,6 +125,13 @@
5301 + bl_en_pin_gt90h: bl_en_pin@0 {
5302 + allwinner,pins = "PH6";
5303 + allwinner,function = "gpio_in";
5304 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5305 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5308 mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
5309 allwinner,pins = "PB4";
5310 allwinner,function = "gpio_in";
5311 @@ -123,12 +140,106 @@
5316 + pinctrl-names = "default";
5317 + pinctrl-0 = <&pwm0_pins>;
5324 + axp22x: pmic@3a3 {
5325 + compatible = "x-powers,axp223";
5327 + interrupt-parent = <&nmi_intc>;
5328 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
5329 + eldoin-supply = <®_dcdc1>;
5334 pinctrl-names = "default";
5335 pinctrl-0 = <&r_uart_pins_a>;
5339 +#include "axp22x.dtsi"
5342 + regulator-always-on;
5343 + regulator-min-microvolt = <3000000>;
5344 + regulator-max-microvolt = <3000000>;
5345 + regulator-name = "vcc-io";
5349 + regulator-always-on;
5350 + regulator-min-microvolt = <2350000>;
5351 + regulator-max-microvolt = <2650000>;
5352 + regulator-name = "vdd-dll";
5356 + regulator-always-on;
5357 + regulator-min-microvolt = <2700000>;
5358 + regulator-max-microvolt = <3300000>;
5359 + regulator-name = "vcc-pll-avcc";
5363 + regulator-name = "vcc-lcd";
5367 + regulator-always-on;
5368 + regulator-min-microvolt = <900000>;
5369 + regulator-max-microvolt = <1400000>;
5370 + regulator-name = "vdd-cpus";
5374 + regulator-always-on;
5375 + regulator-min-microvolt = <3000000>;
5376 + regulator-max-microvolt = <3000000>;
5377 + regulator-name = "vcc-3v0";
5381 + regulator-always-on;
5382 + regulator-min-microvolt = <900000>;
5383 + regulator-max-microvolt = <1400000>;
5384 + regulator-name = "vdd-sys";
5388 + regulator-always-on;
5389 + regulator-min-microvolt = <900000>;
5390 + regulator-max-microvolt = <1400000>;
5391 + regulator-name = "vdd-cpu";
5395 + regulator-always-on;
5396 + regulator-min-microvolt = <1500000>;
5397 + regulator-max-microvolt = <1500000>;
5398 + regulator-name = "vcc-dram";
5402 + regulator-min-microvolt = <3300000>;
5403 + regulator-max-microvolt = <3300000>;
5404 + regulator-name = "vcc-wifi";
5408 + regulator-name = "vcc-rtc";
5412 + vcc-lcd-supply = <®_dc1sw>;
5416 * FIXME for now we only support host mode and rely on u-boot to have
5417 * turned on Vbus which is controlled by the axp223 pmic on the board.
5422 + usb1_vbus-supply = <®_dldo1>;
5425 --- a/arch/arm/dts/sun8i-a23.dtsi
5426 +++ b/arch/arm/dts/sun8i-a23.dtsi
5431 + ahb1_gates: clk@01c20060 {
5432 + #clock-cells = <1>;
5433 + compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
5434 + reg = <0x01c20060 0x8>;
5436 + clock-indices = <1>, <6>,
5445 + clock-output-names = "ahb1_mipidsi", "ahb1_dma",
5446 + "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
5447 + "ahb1_nand", "ahb1_sdram",
5448 + "ahb1_hstimer", "ahb1_spi0",
5449 + "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
5450 + "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
5451 + "ahb1_csi", "ahb1_be", "ahb1_fe",
5452 + "ahb1_gpu", "ahb1_msgbox",
5453 + "ahb1_spinlock", "ahb1_drc";
5456 mbus_clk: clk@01c2015c {
5458 compatible = "allwinner,sun8i-a23-mbus-clk";
5459 --- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
5460 +++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
5465 - vref-supply = <®_vcc3v0>;
5466 + vref-supply = <®_dcdc1>;
5472 pinctrl-names = "default";
5473 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
5474 - vmmc-supply = <®_vcc3v0>;
5475 + vmmc-supply = <®_dcdc1>;
5477 cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
5479 @@ -106,13 +106,16 @@
5481 pinctrl-names = "default";
5482 pinctrl-0 = <&mmc2_8bit_pins>;
5483 - vmmc-supply = <®_vcc3v0>;
5484 + vmmc-supply = <®_dcdc1>;
5492 + /* Increase drive strength for DDR modes */
5493 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
5494 /* eMMC is missing pull-ups */
5495 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
5497 @@ -130,6 +133,80 @@
5504 + axp22x: pmic@3a3 {
5505 + compatible = "x-powers,axp223";
5507 + interrupt-parent = <&nmi_intc>;
5508 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
5509 + eldoin-supply = <®_dcdc1>;
5513 +#include "axp22x.dtsi"
5516 + regulator-always-on;
5517 + regulator-min-microvolt = <3000000>;
5518 + regulator-max-microvolt = <3000000>;
5519 + regulator-name = "vcc-io";
5523 + regulator-always-on;
5524 + regulator-min-microvolt = <2350000>;
5525 + regulator-max-microvolt = <2650000>;
5526 + regulator-name = "vdd-dll";
5530 + regulator-always-on;
5531 + regulator-min-microvolt = <2700000>;
5532 + regulator-max-microvolt = <3300000>;
5533 + regulator-name = "vcc-pll-avcc";
5537 + regulator-always-on;
5538 + regulator-min-microvolt = <900000>;
5539 + regulator-max-microvolt = <1400000>;
5540 + regulator-name = "vdd-cpus";
5544 + regulator-always-on;
5545 + regulator-min-microvolt = <3000000>;
5546 + regulator-max-microvolt = <3000000>;
5547 + regulator-name = "vcc-3v0";
5551 + regulator-always-on;
5552 + regulator-min-microvolt = <900000>;
5553 + regulator-max-microvolt = <1400000>;
5554 + regulator-name = "vdd-sys";
5558 + regulator-always-on;
5559 + regulator-min-microvolt = <900000>;
5560 + regulator-max-microvolt = <1400000>;
5561 + regulator-name = "vdd-cpu";
5565 + regulator-always-on;
5566 + regulator-min-microvolt = <1500000>;
5567 + regulator-max-microvolt = <1500000>;
5568 + regulator-name = "vcc-dram";
5572 + regulator-name = "vcc-rtc";
5576 pinctrl-names = "default";
5577 pinctrl-0 = <&uart0_pins_b>;
5578 --- a/arch/arm/dts/sun8i-a33.dtsi
5579 +++ b/arch/arm/dts/sun8i-a33.dtsi
5581 clock-output-names = "pll11";
5584 + ahb1_gates: clk@01c20060 {
5585 + #clock-cells = <1>;
5586 + compatible = "allwinner,sun8i-a33-ahb1-gates-clk";
5587 + reg = <0x01c20060 0x8>;
5589 + clock-indices = <1>, <5>,
5599 + clock-output-names = "ahb1_mipidsi", "ahb1_ss",
5600 + "ahb1_dma","ahb1_mmc0", "ahb1_mmc1",
5601 + "ahb1_mmc2", "ahb1_nand", "ahb1_sdram",
5602 + "ahb1_hstimer", "ahb1_spi0",
5603 + "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
5604 + "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
5605 + "ahb1_csi", "ahb1_be", "ahb1_fe",
5606 + "ahb1_gpu", "ahb1_msgbox",
5607 + "ahb1_spinlock", "ahb1_drc",
5611 + ss_clk: clk@01c2009c {
5612 + #clock-cells = <0>;
5613 + compatible = "allwinner,sun4i-a10-mod0-clk";
5614 + reg = <0x01c2009c 0x4>;
5615 + clocks = <&osc24M>, <&pll6 0>;
5616 + clock-output-names = "ss";
5619 mbus_clk: clk@01c2015c {
5621 compatible = "allwinner,sun8i-a23-mbus-clk";
5626 + crypto: crypto-engine@01c15000 {
5627 + compatible = "allwinner,sun4i-a10-crypto";
5628 + reg = <0x01c15000 0x1000>;
5629 + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
5630 + clocks = <&ahb1_gates 5>, <&ss_clk>;
5631 + clock-names = "ahb", "mod";
5632 + resets = <&ahb1_rst 5>;
5633 + reset-names = "ahb";
5636 usb_otg: usb@01c19000 {
5637 compatible = "allwinner,sun8i-a33-musb";
5638 reg = <0x01c19000 0x0400>;
5640 +++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
5643 + * Copyright 2015 Chen-Yu Tsai
5645 + * Chen-Yu Tsai <wens@csie.org>
5647 + * This file is dual-licensed: you can use it either under the terms
5648 + * of the GPL or the X11 license, at your option. Note that this dual
5649 + * licensing only applies to this file, and not this project as a
5652 + * a) This file is free software; you can redistribute it and/or
5653 + * modify it under the terms of the GNU General Public License as
5654 + * published by the Free Software Foundation; either version 2 of the
5655 + * License, or (at your option) any later version.
5657 + * This file is distributed in the hope that it will be useful,
5658 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5659 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5660 + * GNU General Public License for more details.
5662 + * Or, alternatively,
5664 + * b) Permission is hereby granted, free of charge, to any person
5665 + * obtaining a copy of this software and associated documentation
5666 + * files (the "Software"), to deal in the Software without
5667 + * restriction, including without limitation the rights to use,
5668 + * copy, modify, merge, publish, distribute, sublicense, and/or
5669 + * sell copies of the Software, and to permit persons to whom the
5670 + * Software is furnished to do so, subject to the following
5673 + * The above copyright notice and this permission notice shall be
5674 + * included in all copies or substantial portions of the Software.
5676 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5677 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
5678 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5679 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
5680 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
5681 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5682 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5683 + * OTHER DEALINGS IN THE SOFTWARE.
5687 +#include "sun8i-a83t.dtsi"
5690 + model = "Cubietech Cubietruck Plus";
5691 + compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
5698 + stdout-path = "serial0:115200n8";
5703 + pinctrl-names = "default";
5704 + pinctrl-0 = <&uart0_pins_b>;
5707 --- a/arch/arm/dts/sun8i-a83t.dtsi
5708 +++ b/arch/arm/dts/sun8i-a83t.dtsi
5711 interrupt-parent = <&gic>;
5714 - #address-cells = <1>;
5715 - #size-cells = <1>;
5720 #address-cells = <1>;
5723 device_type = "cpu";
5728 compatible = "arm,cortex-a7";
5729 device_type = "cpu";
5731 device_type = "cpu";
5736 compatible = "arm,cortex-a7";
5737 device_type = "cpu";
5738 @@ -109,18 +105,12 @@
5743 - reg = <0x40000000 0x80000000>;
5747 compatible = "arm,armv7-timer";
5748 - interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
5749 - <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
5750 - <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
5751 - <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
5752 - clock-frequency = <24000000>;
5753 - arm,cpu-registers-not-fw-configured;
5754 + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
5755 + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
5756 + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
5757 + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
5765 + /* TODO: PRCM block has a mux for this. */
5766 osc24M: osc24M_clk {
5768 compatible = "fixed-clock";
5769 @@ -135,36 +126,39 @@
5770 clock-output-names = "osc24M";
5773 - osc32k: osc32k_clk {
5775 + * This is called "internal OSC" in some places.
5776 + * It is an internal RC-based oscillator.
5777 + * TODO: Its controls are in the PRCM block.
5779 + osc16M: osc16M_clk {
5781 compatible = "fixed-clock";
5782 - clock-frequency = <32768>;
5783 - clock-output-names = "osc32k";
5784 + clock-frequency = <16000000>;
5785 + clock-output-names = "osc16M";
5788 + osc16Md512: osc16Md512_clk {
5789 + #clock-cells = <0>;
5790 + compatible = "fixed-factor-clock";
5791 + clock-div = <512>;
5793 + clocks = <&osc16M>;
5794 + clock-output-names = "osc16M-d512";
5800 compatible = "simple-bus";
5801 #address-cells = <1>;
5805 - gic: interrupt-controller@01c81000 {
5806 - compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
5807 - reg = <0x01c81000 0x1000>,
5808 - <0x01c82000 0x1000>,
5809 - <0x01c84000 0x2000>,
5810 - <0x01c86000 0x2000>;
5811 - interrupt-controller;
5812 - #interrupt-cells = <3>;
5813 - interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
5816 pio: pinctrl@01c20800 {
5817 compatible = "allwinner,sun8i-a83t-pinctrl";
5818 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
5819 - <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
5820 - <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
5821 + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
5822 + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
5823 reg = <0x01c20800 0x400>;
5826 @@ -172,27 +166,6 @@
5827 #interrupt-cells = <3>;
5830 - i2c0_pins_a: i2c0@0 {
5831 - allwinner,pins = "PH0", "PH1";
5832 - allwinner,function = "i2c0";
5833 - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5834 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5837 - i2c1_pins_a: i2c1@0 {
5838 - allwinner,pins = "PH2", "PH3";
5839 - allwinner,function = "i2c1";
5840 - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5841 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5844 - i2c2_pins_a: i2c2@0 {
5845 - allwinner,pins = "PH4", "PH5";
5846 - allwinner,function = "i2c2";
5847 - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5848 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5851 mmc0_pins_a: mmc0@0 {
5852 allwinner,pins = "PF0", "PF1", "PF2",
5853 "PF3", "PF4", "PF5";
5854 @@ -201,24 +174,6 @@
5855 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5858 - mmc1_pins_a: mmc1@0 {
5859 - allwinner,pins = "PG0", "PG1", "PG2",
5860 - "PG3", "PG4", "PG5";
5861 - allwinner,function = "mmc1";
5862 - allwinner,drive = <SUN4I_PINCTRL_30_MA>;
5863 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5866 - mmc2_8bit_pins: mmc2_8bit {
5867 - allwinner,pins = "PC5", "PC6", "PC8",
5868 - "PC9", "PC10", "PC11",
5869 - "PC12", "PC13", "PC14",
5871 - allwinner,function = "mmc2";
5872 - allwinner,drive = <SUN4I_PINCTRL_30_MA>;
5873 - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5876 uart0_pins_a: uart0@0 {
5877 allwinner,pins = "PF2", "PF4";
5878 allwinner,function = "uart0";
5879 @@ -234,6 +189,21 @@
5884 + compatible = "allwinner,sun4i-a10-timer";
5885 + reg = <0x01c20c00 0xa0>;
5886 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
5887 + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
5888 + clocks = <&osc24M>;
5891 + watchdog@01c20ca0 {
5892 + compatible = "allwinner,sun6i-a31-wdt";
5893 + reg = <0x01c20ca0 0x20>;
5894 + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
5895 + clocks = <&osc24M>;
5898 uart0: serial@01c28000 {
5899 compatible = "snps,dw-apb-uart";
5900 reg = <0x01c28000 0x400>;
5901 @@ -243,5 +213,16 @@
5903 status = "disabled";
5906 + gic: interrupt-controller@01c81000 {
5907 + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
5908 + reg = <0x01c81000 0x1000>,
5909 + <0x01c82000 0x1000>,
5910 + <0x01c84000 0x2000>,
5911 + <0x01c86000 0x2000>;
5912 + interrupt-controller;
5913 + #interrupt-cells = <3>;
5914 + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
5918 --- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts
5919 +++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
5921 #include "sunxi-common-regulators.dtsi"
5923 #include <dt-bindings/gpio/gpio.h>
5924 +#include <dt-bindings/input/input.h>
5925 #include <dt-bindings/pinctrl/sun4i-a10.h>
5930 stdout-path = "serial0:115200n8";
5934 + compatible = "gpio-leds";
5935 + pinctrl-names = "default";
5936 + pinctrl-0 = <&leds_opc>;
5939 + label = "status:red:user";
5940 + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
5945 + compatible = "gpio-leds";
5946 + pinctrl-names = "default";
5947 + pinctrl-0 = <&leds_r_opc>;
5950 + label = "pwr:green:user";
5951 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
5952 + default-state = "on";
5957 + compatible = "gpio-keys";
5958 + input-name = "sw4";
5960 + pinctrl-names = "default";
5961 + pinctrl-0 = <&sw_r_opc>;
5965 + linux,code = <BTN_0>;
5966 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
5977 + pinctrl-names = "default";
5978 + pinctrl-0 = <&ir_pins_a>;
5983 pinctrl-names = "default";
5984 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
5990 + leds_opc: led_pins@0 {
5991 + allwinner,pins = "PA15";
5992 + allwinner,function = "gpio_out";
5993 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
5994 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
5999 + leds_r_opc: led_pins@0 {
6000 + allwinner,pins = "PL10";
6001 + allwinner,function = "gpio_out";
6002 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6003 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6006 + sw_r_opc: key_pins@0 {
6007 + allwinner,pins = "PL03";
6008 + allwinner,function = "gpio_in";
6009 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6010 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6015 pinctrl-names = "default";
6016 pinctrl-0 = <&uart0_pins_a>;
6017 --- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
6018 +++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
6020 #include "sunxi-common-regulators.dtsi"
6022 #include <dt-bindings/gpio/gpio.h>
6023 +#include <dt-bindings/input/input.h>
6024 #include <dt-bindings/pinctrl/sun4i-a10.h>
6029 gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
6033 + compatible = "gpio-leds";
6034 + pinctrl-names = "default";
6035 + pinctrl-0 = <&leds_opc>;
6038 + label = "status:red:user";
6039 + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
6044 + compatible = "gpio-leds";
6045 + pinctrl-names = "default";
6046 + pinctrl-0 = <&leds_r_opc>;
6049 + label = "pwr:green:user";
6050 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
6051 + default-state = "on";
6056 + compatible = "gpio-keys";
6057 + input-name = "sw4";
6059 + pinctrl-names = "default";
6060 + pinctrl-0 = <&sw_r_opc>;
6064 + linux,code = <BTN_0>;
6065 + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
6071 + leds_opc: led_pins@0 {
6072 + allwinner,pins = "PA15";
6073 + allwinner,function = "gpio_out";
6074 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6075 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6080 + leds_r_opc: led_pins@0 {
6081 + allwinner,pins = "PL10";
6082 + allwinner,function = "gpio_out";
6083 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6084 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6087 + sw_r_opc: key_pins@0 {
6088 + allwinner,pins = "PL03";
6089 + allwinner,function = "gpio_in";
6090 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6091 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6096 --- a/arch/arm/dts/sun8i-h3.dtsi
6097 +++ b/arch/arm/dts/sun8i-h3.dtsi
6099 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
6100 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
6101 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
6102 - clock-frequency = <24000000>;
6103 - arm,cpu-registers-not-fw-configured;
6107 - reg = <0x40000000 0x80000000>;
6111 @@ -131,15 +125,24 @@
6112 compatible = "allwinner,sun6i-a31-pll6-clk";
6113 reg = <0x01c20028 0x4>;
6115 - clock-output-names = "pll6", "pll6x2", "pll6d2";
6116 + clock-output-names = "pll6", "pll6x2";
6119 - pll8: clk@01c20044 {
6120 - #clock-cells = <1>;
6121 - compatible = "allwinner,sun6i-a31-pll6-clk";
6122 - reg = <0x01c20044 0x4>;
6123 - clocks = <&osc24M>;
6124 - clock-output-names = "pll8", "pll8x2";
6125 + pll6d2: pll6d2_clk {
6126 + #clock-cells = <0>;
6127 + compatible = "fixed-factor-clock";
6130 + clocks = <&pll6 0>;
6131 + clock-output-names = "pll6d2";
6134 + /* dummy clock until pll6 can be reused */
6136 + #clock-cells = <0>;
6137 + compatible = "fixed-clock";
6138 + clock-frequency = <1>;
6139 + clock-output-names = "pll8";
6142 cpu: cpu_clk@01c20050 {
6145 compatible = "allwinner,sun8i-h3-ahb2-clk";
6146 reg = <0x01c2005c 0x4>;
6147 - clocks = <&ahb1>, <&pll6 2>;
6148 + clocks = <&ahb1>, <&pll6d2>;
6149 clock-output-names = "ahb2";
6152 @@ -213,34 +216,34 @@
6156 - <114>, <115>, <116>,
6158 - clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0",
6159 - "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand",
6160 - "ahb1_sdram", "ahb2_gmac", "ahb1_ts",
6161 - "ahb1_hstimer", "ahb1_spi0",
6162 - "ahb1_spi1", "ahb1_otg",
6163 - "ahb1_otg_ehci0", "ahb1_ehic1",
6164 - "ahb1_ehic2", "ahb1_ehic3",
6165 - "ahb1_otg_ohci0", "ahb2_ohic1",
6166 - "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve",
6167 - "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint",
6168 - "ahb1_csi", "ahb1_tve", "ahb1_hdmi",
6169 - "ahb1_de", "ahb1_gpu", "ahb1_msgbox",
6170 - "ahb1_spinlock", "apb1_codec",
6171 - "apb1_spdif", "apb1_pio", "apb1_ths",
6172 - "apb1_i2s0", "apb1_i2s1", "apb1_i2s2",
6173 - "apb2_i2c0", "apb2_i2c1", "apb2_i2c2",
6174 - "apb2_uart0", "apb2_uart1",
6175 - "apb2_uart2", "apb2_uart3", "apb2_scr",
6176 - "ahb1_ephy", "ahb1_dbg";
6178 + <116>, <128>, <135>;
6179 + clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
6180 + "bus_mmc1", "bus_mmc2", "bus_nand",
6181 + "bus_sdram", "bus_gmac", "bus_ts",
6182 + "bus_hstimer", "bus_spi0",
6183 + "bus_spi1", "bus_otg",
6184 + "bus_otg_ehci0", "bus_ehci1",
6185 + "bus_ehci2", "bus_ehci3",
6186 + "bus_otg_ohci0", "bus_ohci1",
6187 + "bus_ohci2", "bus_ohci3", "bus_ve",
6188 + "bus_lcd0", "bus_lcd1", "bus_deint",
6189 + "bus_csi", "bus_tve", "bus_hdmi",
6190 + "bus_de", "bus_gpu", "bus_msgbox",
6191 + "bus_spinlock", "bus_codec",
6192 + "bus_spdif", "bus_pio", "bus_ths",
6193 + "bus_i2s0", "bus_i2s1", "bus_i2s2",
6194 + "bus_i2c0", "bus_i2c1", "bus_i2c2",
6195 + "bus_uart0", "bus_uart1",
6196 + "bus_uart2", "bus_uart3",
6197 + "bus_scr", "bus_ephy", "bus_dbg";
6200 mmc0_clk: clk@01c20088 {
6202 compatible = "allwinner,sun4i-a10-mmc-clk";
6203 reg = <0x01c20088 0x4>;
6204 - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
6205 + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
6206 clock-output-names = "mmc0",
6211 compatible = "allwinner,sun4i-a10-mmc-clk";
6212 reg = <0x01c2008c 0x4>;
6213 - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
6214 + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
6215 clock-output-names = "mmc1",
6220 compatible = "allwinner,sun4i-a10-mmc-clk";
6221 reg = <0x01c20090 0x4>;
6222 - clocks = <&osc24M>, <&pll6 0>, <&pll8 0>;
6223 + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
6224 clock-output-names = "mmc2",
6227 @@ -285,6 +288,33 @@
6228 clocks = <&osc24M>, <&pll6 1>, <&pll5>;
6229 clock-output-names = "mbus";
6233 + compatible = "fixed-factor-clock";
6234 + #clock-cells = <0>;
6237 + clocks = <&osc24M>;
6238 + clock-output-names = "apb0";
6241 + apb0_gates: clk@01f01428 {
6242 + compatible = "allwinner,sun8i-h3-apb0-gates-clk",
6243 + "allwinner,sun4i-a10-gates-clk";
6244 + reg = <0x01f01428 0x4>;
6245 + #clock-cells = <1>;
6247 + clock-indices = <0>, <1>;
6248 + clock-output-names = "apb0_pio", "apb0_ir";
6251 + ir_clk: ir_clk@01f01454 {
6252 + compatible = "allwinner,sun4i-a10-mod0-clk";
6253 + reg = <0x01f01454 0x4>;
6254 + #clock-cells = <0>;
6255 + clocks = <&osc32k>, <&osc24M>;
6256 + clock-output-names = "ir";
6262 reg = <0x01c02000 0x1000>;
6263 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
6264 clocks = <&bus_gates 6>;
6265 - resets = <&bus_rst 6>;
6266 + resets = <&ahb_rst 6>;
6274 - resets = <&bus_rst 8>;
6275 + resets = <&ahb_rst 8>;
6276 reset-names = "ahb";
6277 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
6278 status = "disabled";
6283 - resets = <&bus_rst 9>;
6284 + resets = <&ahb_rst 9>;
6285 reset-names = "ahb";
6286 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
6287 status = "disabled";
6292 - resets = <&bus_rst 10>;
6293 + resets = <&ahb_rst 10>;
6294 reset-names = "ahb";
6295 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
6296 status = "disabled";
6298 reg = <0x01c1b000 0x100>;
6299 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
6300 clocks = <&bus_gates 25>, <&bus_gates 29>;
6301 - resets = <&bus_rst 25>, <&bus_rst 29>;
6302 + resets = <&ahb_rst 25>, <&ahb_rst 29>;
6305 status = "disabled";
6307 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
6308 clocks = <&bus_gates 29>, <&bus_gates 25>,
6310 - resets = <&bus_rst 29>, <&bus_rst 25>;
6311 + resets = <&ahb_rst 29>, <&ahb_rst 25>;
6314 status = "disabled";
6316 reg = <0x01c1c000 0x100>;
6317 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
6318 clocks = <&bus_gates 26>, <&bus_gates 30>;
6319 - resets = <&bus_rst 26>, <&bus_rst 30>;
6320 + resets = <&ahb_rst 26>, <&ahb_rst 30>;
6323 status = "disabled";
6325 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
6326 clocks = <&bus_gates 30>, <&bus_gates 26>,
6328 - resets = <&bus_rst 30>, <&bus_rst 26>;
6329 + resets = <&ahb_rst 30>, <&ahb_rst 26>;
6332 status = "disabled";
6334 reg = <0x01c1d000 0x100>;
6335 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
6336 clocks = <&bus_gates 27>, <&bus_gates 31>;
6337 - resets = <&bus_rst 27>, <&bus_rst 31>;
6338 + resets = <&ahb_rst 27>, <&ahb_rst 31>;
6341 status = "disabled";
6343 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
6344 clocks = <&bus_gates 31>, <&bus_gates 27>,
6346 - resets = <&bus_rst 31>, <&bus_rst 27>;
6347 + resets = <&ahb_rst 31>, <&ahb_rst 27>;
6350 status = "disabled";
6354 interrupt-controller;
6355 - #interrupt-cells = <2>;
6356 + #interrupt-cells = <3>;
6358 uart0_pins_a: uart0@0 {
6359 allwinner,pins = "PA4", "PA5";
6360 @@ -502,10 +532,22 @@
6364 - bus_rst: reset@01c202c0 {
6365 + ahb_rst: reset@01c202c0 {
6367 - compatible = "allwinner,sun8i-h3-bus-reset";
6368 - reg = <0x01c202c0 0x1c>;
6369 + compatible = "allwinner,sun6i-a31-ahb1-reset";
6370 + reg = <0x01c202c0 0xc>;
6373 + apb1_rst: reset@01c202d0 {
6374 + #reset-cells = <1>;
6375 + compatible = "allwinner,sun6i-a31-clock-reset";
6376 + reg = <0x01c202d0 0x4>;
6379 + apb2_rst: reset@01c202d8 {
6380 + #reset-cells = <1>;
6381 + compatible = "allwinner,sun6i-a31-clock-reset";
6382 + reg = <0x01c202d8 0x4>;
6389 clocks = <&bus_gates 112>;
6390 - resets = <&bus_rst 144>;
6391 + resets = <&apb2_rst 16>;
6392 dmas = <&dma 6>, <&dma 6>;
6393 dma-names = "rx", "tx";
6394 status = "disabled";
6398 clocks = <&bus_gates 113>;
6399 - resets = <&bus_rst 145>;
6400 + resets = <&apb2_rst 17>;
6401 dmas = <&dma 7>, <&dma 7>;
6402 dma-names = "rx", "tx";
6403 status = "disabled";
6407 clocks = <&bus_gates 114>;
6408 - resets = <&bus_rst 146>;
6409 + resets = <&apb2_rst 18>;
6410 dmas = <&dma 8>, <&dma 8>;
6411 dma-names = "rx", "tx";
6412 status = "disabled";
6416 clocks = <&bus_gates 115>;
6417 - resets = <&bus_rst 147>;
6418 + resets = <&apb2_rst 19>;
6419 dmas = <&dma 9>, <&dma 9>;
6420 dma-names = "rx", "tx";
6421 status = "disabled";
6422 @@ -591,5 +633,40 @@
6423 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
6424 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
6427 + apb0_reset: reset@01f014b0 {
6428 + reg = <0x01f014b0 0x4>;
6429 + compatible = "allwinner,sun6i-a31-clock-reset";
6430 + #reset-cells = <1>;
6434 + compatible = "allwinner,sun5i-a13-ir";
6435 + clocks = <&apb0_gates 1>, <&ir_clk>;
6436 + clock-names = "apb", "ir";
6437 + resets = <&apb0_reset 1>;
6438 + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
6439 + reg = <0x01f02000 0x40>;
6440 + status = "disabled";
6443 + r_pio: pinctrl@01f02c00 {
6444 + compatible = "allwinner,sun8i-h3-r-pinctrl";
6445 + reg = <0x01f02c00 0x400>;
6446 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
6447 + clocks = <&apb0_gates 0>;
6448 + resets = <&apb0_reset 0>;
6450 + #gpio-cells = <3>;
6451 + interrupt-controller;
6452 + #interrupt-cells = <3>;
6455 + allwinner,pins = "PL11";
6456 + allwinner,function = "s_cir_rx";
6457 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6458 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6463 --- a/arch/arm/dts/sun8i-q8-common.dtsi
6464 +++ b/arch/arm/dts/sun8i-q8-common.dtsi
6467 #include "sunxi-q8-common.dtsi"
6469 +#include <dt-bindings/pwm/pwm.h>
6476 + backlight: backlight {
6477 + compatible = "pwm-backlight";
6478 + pinctrl-names = "default";
6479 + pinctrl-0 = <&bl_en_pin_q8>;
6480 + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
6481 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
6482 + default-brightness-level = <8>;
6483 + enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
6487 stdout-path = "serial0:115200n8";
6491 pinctrl-names = "default";
6492 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
6493 - vmmc-supply = <®_vcc3v0>;
6494 + vmmc-supply = <®_dcdc1>;
6496 cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
6505 + axp22x: pmic@3a3 {
6506 + compatible = "x-powers,axp223";
6508 + interrupt-parent = <&nmi_intc>;
6509 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
6510 + eldoin-supply = <®_dcdc1>;
6514 +#include "axp22x.dtsi"
6517 + regulator-always-on;
6518 + regulator-min-microvolt = <3000000>;
6519 + regulator-max-microvolt = <3000000>;
6520 + regulator-name = "vcc-io";
6524 + regulator-always-on;
6525 + regulator-min-microvolt = <2350000>;
6526 + regulator-max-microvolt = <2650000>;
6527 + regulator-name = "vdd-dll";
6531 + regulator-always-on;
6532 + regulator-min-microvolt = <2700000>;
6533 + regulator-max-microvolt = <3300000>;
6534 + regulator-name = "vcc-pll-avcc";
6538 + regulator-name = "vcc-lcd";
6542 + regulator-always-on;
6543 + regulator-min-microvolt = <900000>;
6544 + regulator-max-microvolt = <1400000>;
6545 + regulator-name = "vdd-cpus";
6549 + regulator-always-on;
6550 + regulator-min-microvolt = <3000000>;
6551 + regulator-max-microvolt = <3000000>;
6552 + regulator-name = "vcc-3v0";
6556 + regulator-always-on;
6557 + regulator-min-microvolt = <900000>;
6558 + regulator-max-microvolt = <1400000>;
6559 + regulator-name = "vdd-sys";
6563 + regulator-always-on;
6564 + regulator-min-microvolt = <900000>;
6565 + regulator-max-microvolt = <1400000>;
6566 + regulator-name = "vdd-cpu";
6570 + regulator-always-on;
6571 + regulator-min-microvolt = <1500000>;
6572 + regulator-max-microvolt = <1500000>;
6573 + regulator-name = "vcc-dram";
6577 + regulator-name = "vcc-rtc";
6581 pinctrl-names = "default";
6582 pinctrl-0 = <&r_uart_pins_a>;
6587 + vcc-lcd-supply = <®_dc1sw>;
6589 --- a/arch/arm/dts/sun9i-a80-cubieboard4.dts
6590 +++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts
6592 stdout-path = "serial0:115200n8";
6596 + compatible = "gpio-leds";
6597 + pinctrl-names = "default";
6598 + pinctrl-0 = <&led_pins_cubieboard4>;
6601 + label = "cubieboard4:green:usr";
6602 + gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
6606 + label = "cubieboard4:red:usr";
6607 + gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
6613 + led_pins_cubieboard4: led-pins@0 {
6614 + allwinner,pins = "PH6", "PH17";
6615 + allwinner,function = "gpio_out";
6616 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6617 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6620 mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
6621 allwinner,pins = "PH18";
6622 allwinner,function = "gpio_in";
6624 vmmc-supply = <®_vcc3v0>;
6632 + /* Increase drive strength for DDR modes */
6633 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
6644 --- a/arch/arm/dts/sun9i-a80-optimus.dts
6645 +++ b/arch/arm/dts/sun9i-a80-optimus.dts
6648 compatible = "gpio-leds";
6649 pinctrl-names = "default";
6650 - pinctrl-0 = <&led_pins_optimus>;
6651 + pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
6653 /* The LED names match those found on the board */
6656 gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
6659 - /* led3 is on PM15, in R_PIO */
6661 + label = "optimus:led3:usr";
6662 + gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
6666 label = "optimus:led4:usr";
6667 @@ -106,17 +109,6 @@
6672 - pinctrl-names = "default";
6673 - pinctrl-0 = <&i2c3_pins_a>;
6678 - /* Enable internal pull-up */
6679 - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
6685 @@ -171,30 +163,42 @@
6686 vmmc-supply = <®_vcc3v0>;
6694 + /* Increase drive strength for DDR modes */
6695 + allwinner,drive = <SUN4I_PINCTRL_40_MA>;
6699 pinctrl-0 = <&usb1_vbus_pin_optimus>;
6700 gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
6705 - pinctrl-names = "default";
6706 - pinctrl-0 = <&uart0_pins_a>;
6712 - pinctrl-names = "default";
6713 - pinctrl-0 = <&uart4_pins_a>;
6715 + led_r_pins_optimus: led-pins@1 {
6716 + allwinner,pins = "PM15";
6717 + allwinner,function = "gpio_out";
6718 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
6719 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6728 - /* Enable internal pull-up */
6729 - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
6731 + pinctrl-names = "default";
6732 + pinctrl-0 = <&uart0_pins_a>;
6737 --- a/arch/arm/dts/sun9i-a80.dtsi
6738 +++ b/arch/arm/dts/sun9i-a80.dtsi
6739 @@ -128,6 +128,17 @@
6741 ranges = <0 0 0 0x20000000>;
6744 + * This clock is actually configurable from the PRCM address
6745 + * space. The external 24M oscillator can be turned off, and
6746 + * the clock switched to an internal 16M RC oscillator. Under
6747 + * normal operation there's no reason to do this, and the
6748 + * default is to use the external good one, so just model this
6749 + * as a fixed clock. Also it is not entirely clear if the
6750 + * osc24M mux in the PRCM affects the entire clock tree, which
6751 + * would also throw all the PLL clock rates off, or just the
6752 + * downstream clocks in the PRCM.
6754 osc24M: osc24M_clk {
6756 compatible = "fixed-clock";
6757 @@ -135,6 +146,13 @@
6758 clock-output-names = "osc24M";
6762 + * The 32k clock is from an external source, normally the
6763 + * AC100 codec/RTC chip. This clock is by default enabled
6764 + * and clocked at 32768 Hz, from the oscillator connected
6765 + * to the AC100. It is configurable, but no such driver or
6766 + * bindings exist yet.
6768 osc32k: osc32k_clk {
6770 compatible = "fixed-clock";
6771 @@ -164,6 +182,14 @@
6772 "usb_phy2", "usb_hsic_12M";
6775 + pll3: clk@06000008 {
6776 + /* placeholder until implemented */
6777 + #clock-cells = <0>;
6778 + compatible = "fixed-clock";
6780 + clock-output-names = "pll3";
6783 pll4: clk@0600000c {
6785 compatible = "allwinner,sun9i-a80-pll4-clk";
6786 @@ -277,9 +303,12 @@
6787 compatible = "allwinner,sun9i-a80-ahb0-gates-clk";
6788 reg = <0x06000580 0x4>;
6790 - clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>,
6791 - <14>, <15>, <16>, <18>, <20>, <21>,
6793 + clock-indices = <0>, <1>, <3>,
6799 clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu",
6800 "ahb0_ss", "ahb0_sd", "ahb0_nand1",
6801 "ahb0_nand0", "ahb0_sdram",
6802 @@ -293,7 +322,10 @@
6803 compatible = "allwinner,sun9i-a80-ahb1-gates-clk";
6804 reg = <0x06000584 0x4>;
6806 - clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>;
6807 + clock-indices = <0>, <1>,
6811 clock-output-names = "ahb1_usbotg", "ahb1_usbhci",
6812 "ahb1_gmac", "ahb1_msgbox",
6813 "ahb1_spinlock", "ahb1_hstimer",
6815 compatible = "allwinner,sun9i-a80-ahb2-gates-clk";
6816 reg = <0x06000588 0x4>;
6818 - clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>,
6820 + clock-indices = <0>, <1>,
6823 clock-output-names = "ahb2_lcd0", "ahb2_lcd1",
6824 "ahb2_edp", "ahb2_csi", "ahb2_hdmi",
6825 "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi";
6826 @@ -317,8 +350,10 @@
6827 compatible = "allwinner,sun9i-a80-apb0-gates-clk";
6828 reg = <0x06000590 0x4>;
6830 - clock-indices = <1>, <5>, <11>, <12>, <13>, <15>,
6832 + clock-indices = <1>, <5>,
6836 clock-output-names = "apb0_spdif", "apb0_pio",
6837 "apb0_ac97", "apb0_i2s0", "apb0_i2s1",
6838 "apb0_lradc", "apb0_gpadc", "apb0_twd",
6839 @@ -330,14 +365,79 @@
6840 compatible = "allwinner,sun9i-a80-apb1-gates-clk";
6841 reg = <0x06000594 0x4>;
6843 - clock-indices = <0>, <1>, <2>, <3>, <4>,
6844 - <16>, <17>, <18>, <19>, <20>, <21>;
6845 + clock-indices = <0>, <1>,
6850 clock-output-names = "apb1_i2c0", "apb1_i2c1",
6851 "apb1_i2c2", "apb1_i2c3", "apb1_i2c4",
6852 "apb1_uart0", "apb1_uart1",
6853 "apb1_uart2", "apb1_uart3",
6854 "apb1_uart4", "apb1_uart5";
6857 + cpus_clk: clk@08001410 {
6858 + compatible = "allwinner,sun9i-a80-cpus-clk";
6859 + reg = <0x08001410 0x4>;
6860 + #clock-cells = <0>;
6861 + clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
6862 + clock-output-names = "cpus";
6866 + compatible = "fixed-factor-clock";
6867 + #clock-cells = <0>;
6870 + clocks = <&cpus_clk>;
6871 + clock-output-names = "ahbs";
6874 + apbs: clk@0800141c {
6875 + compatible = "allwinner,sun8i-a23-apb0-clk";
6876 + reg = <0x0800141c 0x4>;
6877 + #clock-cells = <0>;
6879 + clock-output-names = "apbs";
6882 + apbs_gates: clk@08001428 {
6883 + compatible = "allwinner,sun9i-a80-apbs-gates-clk";
6884 + reg = <0x08001428 0x4>;
6885 + #clock-cells = <1>;
6887 + clock-indices = <0>, <1>,
6894 + clock-output-names = "apbs_pio", "apbs_ir",
6895 + "apbs_timer", "apbs_rsb",
6896 + "apbs_uart", "apbs_1wire",
6897 + "apbs_i2c0", "apbs_i2c1",
6898 + "apbs_ps2_0", "apbs_ps2_1",
6899 + "apbs_dma", "apbs_i2s0",
6900 + "apbs_i2s1", "apbs_twd";
6903 + r_1wire_clk: clk@08001450 {
6904 + reg = <0x08001450 0x4>;
6905 + #clock-cells = <0>;
6906 + compatible = "allwinner,sun4i-a10-mod0-clk";
6907 + clocks = <&osc32k>, <&osc24M>;
6908 + clock-output-names = "r_1wire";
6911 + r_ir_clk: clk@08001454 {
6912 + reg = <0x08001454 0x4>;
6913 + #clock-cells = <0>;
6914 + compatible = "allwinner,sun4i-a10-mod0-clk";
6915 + clocks = <&osc32k>, <&osc24M>;
6916 + clock-output-names = "r_ir";
6924 mmc0: mmc@01c0f000 {
6925 - compatible = "allwinner,sun5i-a13-mmc";
6926 + compatible = "allwinner,sun9i-a80-mmc";
6927 reg = <0x01c0f000 0x1000>;
6928 clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>,
6929 <&mmc0_clk 1>, <&mmc0_clk 2>;
6933 mmc1: mmc@01c10000 {
6934 - compatible = "allwinner,sun5i-a13-mmc";
6935 + compatible = "allwinner,sun9i-a80-mmc";
6936 reg = <0x01c10000 0x1000>;
6937 clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>,
6938 <&mmc1_clk 1>, <&mmc1_clk 2>;
6942 mmc2: mmc@01c11000 {
6943 - compatible = "allwinner,sun5i-a13-mmc";
6944 + compatible = "allwinner,sun9i-a80-mmc";
6945 reg = <0x01c11000 0x1000>;
6946 clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>,
6947 <&mmc2_clk 1>, <&mmc2_clk 2>;
6951 mmc3: mmc@01c12000 {
6952 - compatible = "allwinner,sun5i-a13-mmc";
6953 + compatible = "allwinner,sun9i-a80-mmc";
6954 reg = <0x01c12000 0x1000>;
6955 clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>,
6956 <&mmc3_clk 1>, <&mmc3_clk 2>;
6958 clocks = <&apb0_gates 5>;
6960 interrupt-controller;
6961 - #interrupt-cells = <2>;
6962 + #interrupt-cells = <3>;
6967 mmc2_8bit_pins: mmc2_8bit {
6968 allwinner,pins = "PC6", "PC7", "PC8", "PC9",
6969 "PC10", "PC11", "PC12",
6970 - "PC13", "PC14", "PC15";
6971 + "PC13", "PC14", "PC15",
6973 allwinner,function = "mmc2";
6974 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
6975 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
6976 @@ -752,14 +853,83 @@
6977 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
6980 + apbs_rst: reset@080014b0 {
6981 + reg = <0x080014b0 0x4>;
6982 + compatible = "allwinner,sun6i-a31-clock-reset";
6983 + #reset-cells = <1>;
6986 + nmi_intc: interrupt-controller@080015a0 {
6987 + compatible = "allwinner,sun9i-a80-nmi";
6988 + interrupt-controller;
6989 + #interrupt-cells = <2>;
6990 + reg = <0x080015a0 0xc>;
6991 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
6994 + r_ir: ir@08002000 {
6995 + compatible = "allwinner,sun5i-a13-ir";
6996 + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
6997 + pinctrl-names = "default";
6998 + pinctrl-0 = <&r_ir_pins>;
6999 + clocks = <&apbs_gates 1>, <&r_ir_clk>;
7000 + clock-names = "apb", "ir";
7001 + resets = <&apbs_rst 1>;
7002 + reg = <0x08002000 0x40>;
7003 + status = "disabled";
7006 r_uart: serial@08002800 {
7007 compatible = "snps,dw-apb-uart";
7008 reg = <0x08002800 0x400>;
7009 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
7012 - clocks = <&osc24M>;
7013 + clocks = <&apbs_gates 4>;
7014 + resets = <&apbs_rst 4>;
7015 status = "disabled";
7018 + r_pio: pinctrl@08002c00 {
7019 + compatible = "allwinner,sun9i-a80-r-pinctrl";
7020 + reg = <0x08002c00 0x400>;
7021 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
7022 + <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
7023 + clocks = <&apbs_gates 0>;
7024 + resets = <&apbs_rst 0>;
7026 + interrupt-controller;
7027 + #address-cells = <1>;
7028 + #size-cells = <0>;
7029 + #gpio-cells = <3>;
7032 + allwinner,pins = "PL6";
7033 + allwinner,function = "s_cir_rx";
7034 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
7035 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
7038 + r_rsb_pins: r_rsb {
7039 + allwinner,pins = "PN0", "PN1";
7040 + allwinner,function = "s_rsb";
7041 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
7042 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
7046 + r_rsb: i2c@08003400 {
7047 + compatible = "allwinner,sun8i-a23-rsb";
7048 + reg = <0x08003400 0x400>;
7049 + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
7050 + clocks = <&apbs_gates 3>;
7051 + clock-frequency = <3000000>;
7052 + resets = <&apbs_rst 3>;
7053 + pinctrl-names = "default";
7054 + pinctrl-0 = <&r_rsb_pins>;
7055 + status = "disabled";
7056 + #address-cells = <1>;
7057 + #size-cells = <0>;
7062 +++ b/arch/arm/dts/sunxi-itead-core-common.dtsi
7065 + * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
7067 + * This file is dual-licensed: you can use it either under the terms
7068 + * of the GPL or the X11 license, at your option. Note that this dual
7069 + * licensing only applies to this file, and not this project as a
7072 + * a) This file is free software; you can redistribute it and/or
7073 + * modify it under the terms of the GNU General Public License as
7074 + * published by the Free Software Foundation; either version 2 of the
7075 + * License, or (at your option) any later version.
7077 + * This file is distributed in the hope that it will be useful,
7078 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7079 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7080 + * GNU General Public License for more details.
7082 + * Or, alternatively,
7084 + * b) Permission is hereby granted, free of charge, to any person
7085 + * obtaining a copy of this software and associated documentation
7086 + * files (the "Software"), to deal in the Software without
7087 + * restriction, including without limitation the rights to use,
7088 + * copy, modify, merge, publish, distribute, sublicense, and/or
7089 + * sell copies of the Software, and to permit persons to whom the
7090 + * Software is furnished to do so, subject to the following
7093 + * The above copyright notice and this permission notice shall be
7094 + * included in all copies or substantial portions of the Software.
7096 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
7097 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
7098 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
7099 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
7100 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
7101 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
7102 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7103 + * OTHER DEALINGS IN THE SOFTWARE.
7106 +#include "sunxi-common-regulators.dtsi"
7114 + stdout-path = "serial0:115200n8";
7119 + cpu-supply = <®_dcdc2>;
7131 + pinctrl-names = "default";
7132 + pinctrl-0 = <&i2c0_pins_a>;
7141 + pinctrl-names = "default";
7142 + pinctrl-0 = <&i2c1_pins_a>;
7154 +#include "axp209.dtsi"
7157 + regulator-always-on;
7158 + regulator-min-microvolt = <1000000>;
7159 + regulator-max-microvolt = <1400000>;
7160 + regulator-name = "vdd-cpu";
7164 + regulator-always-on;
7165 + regulator-min-microvolt = <1000000>;
7166 + regulator-max-microvolt = <1400000>;
7167 + regulator-name = "vdd-int-dll";
7171 + regulator-name = "vdd-rtc";
7175 + regulator-always-on;
7176 + regulator-min-microvolt = <3000000>;
7177 + regulator-max-microvolt = <3000000>;
7178 + regulator-name = "avcc";
7190 + pinctrl-names = "default";
7191 + pinctrl-0 = <&uart0_pins_a>;
7196 + usb1_vbus-supply = <®_usb1_vbus>;
7197 + usb2_vbus-supply = <®_usb2_vbus>;
7200 --- a/arch/arm/dts/sunxi-q8-common.dtsi
7201 +++ b/arch/arm/dts/sunxi-q8-common.dtsi
7208 + pinctrl-names = "default";
7209 + pinctrl-0 = <&pwm0_pins>;