]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge tag 'sunxi-dt-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripa...
authorArnd Bergmann <arnd@arndb.de>
Tue, 13 Sep 2016 15:36:04 +0000 (17:36 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 13 Sep 2016 15:36:04 +0000 (17:36 +0200)
Pull "Allwinner DT changes for 4.9" from Maxime Ripard:

Business as usual on our side, with a mix of new boards and new IPs enabled
on boards:
  - Support for the GPIO found on the AXP PMIC
  - ESP8089 on the relevant boards
  - More boards converted to the reference design and q8 designs
  - New boards: Orange Pi PC Plus, Orange Pi 2, Orange Pi Plus 2E, Orange
    Pi Lite, Olimex A33-Olinuxino, Empire Electronix M712, inet-d978_rev2,
    Nano Pi Neo

* tag 'sunxi-dt-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (31 commits)
  devicetree: Add vendor prefix for FriendlyARM
  ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC
  ARM: dts: sun8i-q8-common: Add support for SDIO wifi controllers
  ARM: dts: sun8i: Add dts file for the Orange Pi Plus2E SBC
  ARM: dts: sun8i: Orange Pi Plus dts is for the Plus and Plus 2
  ARM: dts: sun8i: Add PWM controller node in H3
  ARM: dts: sun8i: Add dts file for inet-d978_rev2 tablets
  ARM: dts: sun9i: Add missing #interrupt-cells to R_PIO pinctrl device node
  ARM: dts: sun8i: Rename reference-design-tablet touchscreen node
  ARM: dts: sun5i: Add dts file for the Empire Electronix M712 tablet
  ARM: dts: sun5i: Convert inet-98v-rev2 dts to use reference-design-tablet.dtsi
  ARM: dts: sun4i: Disable ohci1 on ba10-tv-box
  ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2809
  ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2407
  ARM: dts: sun8i: add NAND controller node for A23/A33
  ARM: dts: sun6i: Add new dts file for tablets using the inet-q972 PCB
  ARM: dts: sun6i: Add sun6i-reference-design-tablet.dtsi
  ARM: dts: sun6i: colorfly-e708-q1: Remove unused mma8452_int_e708_q1 node
  ARM: dts: sun9i: Switch to the AC100 RTC clock outputs for osc32k
  ARM: dts: sun9i: cubieboard4: Add device node for AC100
  ...

29 files changed:
Documentation/devicetree/bindings/vendor-prefixes.txt
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/axp209.dtsi
arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
arch/arm/boot/dts/sun5i-a13-empire-electronix-m712.dts [new file with mode: 0644]
arch/arm/boot/dts/sun5i-a13-inet-98v-rev2.dts
arch/arm/boot/dts/sun5i-r8-chip.dts
arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts
arch/arm/boot/dts/sun6i-a31s-inet-q972.dts [new file with mode: 0644]
arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sun8i-a23-a33.dtsi
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts
arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-a33-olinuxino.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3.dtsi
arch/arm/boot/dts/sun8i-q8-common.dtsi
arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
arch/arm/boot/dts/sun9i-a80-optimus.dts
arch/arm/boot/dts/sun9i-a80.dtsi

index 1992aa97d45ac8b0a9cfaefbaf5de40780c601ad..7b6bda3b41890afcc090810e822f829c49328640 100644 (file)
@@ -98,6 +98,7 @@ ezchip        EZchip Semiconductor
 fcs    Fairchild Semiconductor
 firefly        Firefly
 focaltech      FocalTech Systems Co.,Ltd
+friendlyarm    Guangzhou FriendlyARM Computer Tech Co., Ltd
 fsl    Freescale Semiconductor
 ge     General Electric Company
 geekbuying     GeekBuying
index 8eb8cff8c97db02c86cc42ede6a87d1a05a391b2..f228163b02f7dc150f7555a437d28c96f799cde0 100644 (file)
@@ -731,6 +731,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
        sun5i-a10s-wobo-i5.dtb \
        sun5i-a13-difrnce-dit4350.dtb \
        sun5i-a13-empire-electronix-d709.dtb \
+       sun5i-a13-empire-electronix-m712.dtb \
        sun5i-a13-hsg-h702.dtb \
        sun5i-a13-inet-98v-rev2.dtb \
        sun5i-a13-olinuxino.dtb \
@@ -747,6 +748,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
        sun6i-a31-mele-a1000g-quad.dtb \
        sun6i-a31s-colorfly-e708-q1.dtb \
        sun6i-a31s-cs908.dtb \
+       sun6i-a31s-inet-q972.dtb \
        sun6i-a31s-primo81.dtb \
        sun6i-a31s-sina31s.dtb \
        sun6i-a31s-sinovoip-bpi-m2.dtb \
@@ -786,16 +788,22 @@ dtb-$(CONFIG_MACH_SUN8I) += \
        sun8i-a23-q8-tablet.dtb \
        sun8i-a33-et-q8-v1.6.dtb \
        sun8i-a33-ga10h-v1.1.dtb \
+       sun8i-a33-inet-d978-rev2.dtb \
        sun8i-a33-ippo-q8h-v1.2.dtb \
+       sun8i-a33-olinuxino.dtb \
        sun8i-a33-q8-tablet.dtb \
        sun8i-a33-sinlinx-sina33.dtb \
        sun8i-a83t-allwinner-h8homlet-v2.dtb \
        sun8i-a83t-cubietruck-plus.dtb \
        sun8i-h3-bananapi-m2-plus.dtb \
+       sun8i-h3-nanopi-neo.dtb \
        sun8i-h3-orangepi-2.dtb \
+       sun8i-h3-orangepi-lite.dtb \
        sun8i-h3-orangepi-one.dtb \
        sun8i-h3-orangepi-pc.dtb \
+       sun8i-h3-orangepi-pc-plus.dtb \
        sun8i-h3-orangepi-plus.dtb \
+       sun8i-h3-orangepi-plus2e.dtb \
        sun8i-r16-parrot.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
        sun9i-a80-optimus.dtb \
index afbe89c01df582a45e9480d1d2180dcaf3859935..675bb0f30825b44abf72581aecb4fdd024964eee 100644 (file)
        interrupt-controller;
        #interrupt-cells = <1>;
 
+       axp_gpio: gpio {
+               compatible = "x-powers,axp209-gpio";
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
        regulators {
                /* Default work frequency for buck regulators */
                x-powers,dcdc-freq = <1500>;
index f3cb297fd1db3d22c4510aa8d0da8ee3d88d18e2..5f98582232d67b36b8194d488f354047f70616e4 100644 (file)
        status = "okay";
 };
 
-&ohci1 {
-       status = "okay";
-};
-
 &otg_sram {
        status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun5i-a13-empire-electronix-m712.dts b/arch/arm/boot/dts/sun5i-a13-empire-electronix-m712.dts
new file mode 100644 (file)
index 0000000..b1e2afd
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun5i-a13.dtsi"
+#include "sun5i-reference-design-tablet.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       model = "Empire Electronix M712 tablet";
+       compatible = "empire-electronix,m712", "allwinner,sun5i-a13";
+};
index 1b11ec95ae5312546bfd92ba5d1fc09080e5a9fe..439ae3b537dfa184258c484eb49f877af13a5889 100644 (file)
 
 /dts-v1/;
 #include "sun5i-a13.dtsi"
-#include "sunxi-common-regulators.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sun5i-reference-design-tablet.dtsi"
 
 / {
        model = "INet-98V Rev 02";
        compatible = "primux,inet98v-rev2", "allwinner,sun5i-a13";
-
-       aliases {
-               serial0 = &uart1;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-};
-
-&cpu0 {
-       cpu-supply = <&reg_dcdc2>;
-};
-
-&ehci0 {
-       status = "okay";
-};
-
-&i2c0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c0_pins_a>;
-       status = "okay";
-
-       axp209: pmic@34 {
-               reg = <0x34>;
-               interrupts = <0>;
-       };
-};
-
-#include "axp209.dtsi"
-
-&i2c1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins_a>;
-       status = "okay";
-
-       pcf8563: rtc@51 {
-               compatible = "nxp,pcf8563";
-               reg = <0x51>;
-       };
-};
-
-&lradc {
-       vref-supply = <&reg_ldo2>;
-       status = "okay";
-
-       button@200 {
-               label = "Volume Up";
-               linux,code = <KEY_VOLUMEUP>;
-               channel = <0>;
-               voltage = <200000>;
-       };
-
-       button@400 {
-               label = "Volume Down";
-               linux,code = <KEY_VOLUMEDOWN>;
-               channel = <0>;
-               voltage = <400000>;
-       };
-};
-
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <4>;
-       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
-       cd-inverted;
-       status = "okay";
-};
-
-&otg_sram {
-       status = "okay";
-};
-
-&pio {
-       mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
-               allwinner,pins = "PG0";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-
-       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
-               allwinner,pins = "PG1";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
-       };
-
-       usb0_id_detect_pin: usb0_id_detect_pin@0 {
-               allwinner,pins = "PG2";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-};
-
-&reg_dcdc2 {
-       regulator-always-on;
-       regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1400000>;
-       regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc3 {
-       regulator-always-on;
-       regulator-min-microvolt = <1250000>;
-       regulator-max-microvolt = <1250000>;
-       regulator-name = "vdd-int-pll";
-};
-
-&reg_ldo1 {
-       regulator-name = "vdd-rtc";
-};
-
-&reg_ldo2 {
-       regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "avcc";
-};
-
-&reg_ldo3 {
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "vcc-wifi";
-};
-
-&reg_usb0_vbus {
-       gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
-       status = "okay";
-};
-
-&uart1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart1_pins_b>;
-       status = "okay";
-};
-
-&usb_otg {
-       dr_mode = "otg";
-       status = "okay";
-};
-
-&usb0_vbus_pin_a {
-       allwinner,pins = "PG12";
-};
-
-&usbphy {
-       pinctrl-names = "default";
-       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-       usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
-       usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
-       usb0_vbus-supply = <&reg_usb0_vbus>;
-       usb1_vbus-supply = <&reg_ldo3>;
-       status = "okay";
 };
index f694482bdeb64ccf1f21ffaa69d3fb3f1027ea0b..b68a12374b35f24e02e12b6e026f04adb1a461bd 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               status {
+                       label = "chip:white:status";
+                       gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
 };
 
 &be0 {
index e182eec6d878c57d4ec92ed0070d8c7158ea9333..882a4d89fa220b411fcba755b00c287ee3006caa 100644 (file)
 
 /dts-v1/;
 #include "sun6i-a31s.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sun6i-reference-design-tablet.dtsi"
 
 / {
        model = "Colorfly E708 Q1 tablet";
        compatible = "colorfly,e708-q1", "allwinner,sun6i-a31s";
-
-       aliases {
-               serial0 = &uart0;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-};
-
-&cpu0 {
-       cpu-supply = <&reg_dcdc3>;
-};
-
-&ehci0 {
-       /* rtl8188etv wifi is connected here */
-       status = "okay";
 };
 
 &lradc {
        };
 };
 
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>;
-       vmmc-supply = <&reg_dcdc1>;
-       bus-width = <4>;
-       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
-       cd-inverted;
-       status = "okay";
-};
-
-&pio {
-       mma8452_int_e708_q1: mma8452_int_pin@0 {
-               allwinner,pins = "PA9";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-
-       mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 {
-               allwinner,pins = "PA8";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-};
-
-&p2wi {
-       status = "okay";
-
-       axp22x: pmic@68 {
-               compatible = "x-powers,axp221";
-               reg = <0x68>;
-               interrupt-parent = <&nmi_intc>;
-               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-       };
-};
-
-#include "axp22x.dtsi"
-
-&reg_aldo3 {
-       regulator-always-on;
-       regulator-min-microvolt = <2700000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "avcc";
-};
-
-&reg_dc1sw {
-       regulator-name = "vcc-lcd";
-};
-
-&reg_dc5ldo {
-       regulator-always-on;
-       regulator-min-microvolt = <700000>;
-       regulator-max-microvolt = <1320000>;
-       regulator-name = "vdd-cpus"; /* This is an educated guess */
-};
-
-&reg_dcdc1 {
-       regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "vcc-3v0";
-};
-
-&reg_dcdc2 {
-       regulator-min-microvolt = <700000>;
-       regulator-max-microvolt = <1320000>;
-       regulator-name = "vdd-gpu";
-};
-
-&reg_dcdc3 {
-       regulator-always-on;
-       regulator-min-microvolt = <700000>;
-       regulator-max-microvolt = <1320000>;
-       regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc4 {
-       regulator-always-on;
-       regulator-min-microvolt = <700000>;
-       regulator-max-microvolt = <1320000>;
-       regulator-name = "vdd-sys-dll";
-};
-
-&reg_dcdc5 {
-       regulator-always-on;
-       regulator-min-microvolt = <1500000>;
-       regulator-max-microvolt = <1500000>;
-       regulator-name = "vcc-dram";
-};
-
-&reg_dldo1 {
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "vcc-wifi";
-};
-
 &reg_dldo2 {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
 };
 
 &simplefb_lcd {
-       vcc-lcd-supply = <&reg_dc1sw>;
        vcc-pg-supply = <&reg_dldo2>;
 };
-
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp221 pmic on the board.
- *
- * Once we have axp221 power-supply and vbus-usb support we should switch
- * to fully supporting otg.
- */
-&usb_otg {
-       dr_mode = "host";
-       status = "okay";
-};
-
-&usbphy {
-       usb1_vbus-supply = <&reg_dldo1>;
-       status = "okay";
-};
diff --git a/arch/arm/boot/dts/sun6i-a31s-inet-q972.dts b/arch/arm/boot/dts/sun6i-a31s-inet-q972.dts
new file mode 100644 (file)
index 0000000..e584e6b
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sun6i-reference-design-tablet.dtsi"
+
+/ {
+       model = "iNet Q972 tablet";
+       compatible = "inet-tek,inet-q972", "allwinner,sun6i-a31s";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       ft5406ee8: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+               touchscreen-size-x = <768>;
+               touchscreen-size-y = <1024>;
+               touchscreen-swapped-x-y;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_aldo3>;
+       status = "okay";
+
+       button@200 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <200000>;
+       };
+
+       button@900 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <900000>;
+       };
+
+       button@1200 {
+               label = "Back";
+               linux,code = <KEY_BACK>;
+               channel = <0>;
+               voltage = <1200000>;
+       };
+};
+
+&ohci1 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi
new file mode 100644 (file)
index 0000000..0c43430
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc3>;
+};
+
+&ehci0 {
+       /* Wifi is connected here */
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_e708_q1>;
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+       cd-inverted;
+       status = "okay";
+};
+
+&pio {
+       mmc0_cd_pin_e708_q1: mmc0_cd_pin@0 {
+               allwinner,pins = "PA8";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PA15";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&p2wi {
+       status = "okay";
+
+       axp22x: pmic@68 {
+               compatible = "x-powers,axp221";
+               reg = <0x68>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               drivevbus-supply = <&reg_vcc5v0>;
+               x-powers,drive-vbus-en;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus"; /* This is an educated guess */
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_drivevbus {
+       regulator-name = "usb0-vbus";
+       status = "okay";
+};
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_drivevbus>;
+       usb1_vbus-supply = <&reg_dldo1>;
+       status = "okay";
+};
index 7e05e09e61c7e49fa78a287220047e70f0b2fa99..6d6509c71009ea3a41a90c4e57af257bfca51f33 100644 (file)
                                             "mmc2_sample";
                };
 
+               nand_clk: clk@01c20080 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       reg = <0x01c20080 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>;
+                       clock-output-names = "nand";
+               };
+
                usb_clk: clk@01c200cc {
                        #clock-cells = <1>;
                        #reset-cells = <1>;
                        #size-cells = <0>;
                };
 
+               nfc: nand@01c03000 {
+                       compatible = "allwinner,sun4i-a10-nand";
+                       reg = <0x01c03000 0x1000>;
+                       interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ahb1_gates 13>, <&nand_clk>;
+                       clock-names = "ahb", "mod";
+                       resets = <&ahb1_rst 13>;
+                       reset-names = "ahb";
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                ehci0: usb@01c1a000 {
                        compatible = "allwinner,sun8i-a23-ehci", "generic-ehci";
                        reg = <0x01c1a000 0x100>;
index b2ce284a65a23f3d3859dbd1a08993d6ab387c3d..f27ebbbeac0981c541d798141466062a1f8585f3 100644 (file)
 
 /dts-v1/;
 #include "sun8i-a23.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-#include <dt-bindings/pwm/pwm.h>
+#include "sun8i-reference-design-tablet.dtsi"
 
 / {
        model = "Allwinner GT90H Dual Core Tablet (v4)";
        compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
-
-       aliases {
-               serial0 = &r_uart;
-       };
-
-       backlight: backlight {
-               compatible = "pwm-backlight";
-               pinctrl-names = "default";
-               pinctrl-0 = <&bl_en_pin_gt90h>;
-               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-               default-brightness-level = <8>;
-               enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
 };
 
 &ehci0 {
        status = "okay";
 };
 
-&i2c0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c0_pins_a>;
-       status = "okay";
-};
-
-&i2c1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins_a>;
-       status = "okay";
-};
-
 &lradc {
-       vref-supply = <&reg_vcc3v0>;
-       status = "okay";
-
-       button@200 {
-               label = "Volume Up";
-               linux,code = <KEY_VOLUMEUP>;
-               channel = <0>;
-               voltage = <200000>;
-       };
-
-       button@400 {
-               label = "Volume Down";
-               linux,code = <KEY_VOLUMEDOWN>;
-               channel = <0>;
-               voltage = <400000>;
-       };
-
        button@600 {
                label = "Back";
                linux,code = <KEY_BACK>;
        };
 };
 
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
-       vmmc-supply = <&reg_aldo1>;
-       bus-width = <4>;
-       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-       cd-inverted;
-       status = "okay";
-};
-
-&pio {
-       bl_en_pin_gt90h: bl_en_pin@0 {
-               allwinner,pins = "PH6";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-
-       mmc0_cd_pin_gt90h: mmc0_cd_pin@0 {
-               allwinner,pins = "PB4";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-       };
-};
-
-&pwm {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pwm0_pins>;
-       status = "okay";
-};
-
-&r_rsb {
-       status = "okay";
-
-       axp22x: pmic@3a3 {
-               compatible = "x-powers,axp223";
-               reg = <0x3a3>;
-               interrupt-parent = <&nmi_intc>;
-               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-               eldoin-supply = <&reg_dcdc1>;
-       };
-};
-
-&r_uart {
-       pinctrl-names = "default";
-       pinctrl-0 = <&r_uart_pins_a>;
-       status = "okay";
-};
-
-#include "axp22x.dtsi"
-
-&reg_aldo1 {
-       regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "vcc-io";
-};
-
-&reg_aldo2 {
-       regulator-always-on;
-       regulator-min-microvolt = <2350000>;
-       regulator-max-microvolt = <2650000>;
-       regulator-name = "vdd-dll";
-};
-
-&reg_aldo3 {
-       regulator-always-on;
-       regulator-min-microvolt = <2700000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "vcc-pll-avcc";
-};
-
-&reg_dc1sw {
-       regulator-name = "vcc-lcd";
-};
-
-&reg_dc5ldo {
-       regulator-always-on;
-       regulator-min-microvolt = <900000>;
-       regulator-max-microvolt = <1400000>;
-       regulator-name = "vdd-cpus";
-};
-
-&reg_dcdc1 {
-       regulator-always-on;
-       regulator-min-microvolt = <3000000>;
-       regulator-max-microvolt = <3000000>;
-       regulator-name = "vcc-3v0";
-};
-
-&reg_dcdc2 {
-       regulator-always-on;
-       regulator-min-microvolt = <900000>;
-       regulator-max-microvolt = <1400000>;
-       regulator-name = "vdd-sys";
-};
-
-&reg_dcdc3 {
-       regulator-always-on;
-       regulator-min-microvolt = <900000>;
-       regulator-max-microvolt = <1400000>;
-       regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc5 {
-       regulator-always-on;
-       regulator-min-microvolt = <1500000>;
-       regulator-max-microvolt = <1500000>;
-       regulator-name = "vcc-dram";
-};
-
-&reg_dldo1 {
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-name = "vcc-wifi";
-};
-
-&reg_rtc_ldo {
-       regulator-name = "vcc-rtc";
-};
-
-&simplefb_lcd {
-       vcc-lcd-supply = <&reg_dc1sw>;
-};
-
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp223 pmic on the board.
- *
- * Once we have axp223 support we should switch to fully supporting otg.
- */
-&usb_otg {
-       dr_mode = "host";
-       status = "okay";
-};
-
 &usbphy {
        usb1_vbus-supply = <&reg_dldo1>;
-       status = "okay";
 };
index e3004428e7a72648c5b77c0a1dcfb1a6bd16fab4..4789aac89955b55cb440282e1d06bf1309b84c95 100644 (file)
 / {
        model = "Polaroid MID2407PXE03 tablet";
        compatible = "polaroid,mid2407pxe03", "allwinner,sun8i-a23";
+
+       aliases {
+               ethernet0 = &esp8089;
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_pwrseq_pin_mid2407>;
+               reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
+               /* The esp8089 needs 200 ms after driving wifi-en high */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_dldo1>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       esp8089: sdio_wifi@1 {
+               compatible = "esp,esp8089";
+               reg = <1>;
+               esp,crystal-26M-en = <2>;
+       };
+};
+
+&mmc1_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&r_pio {
+       wifi_pwrseq_pin_mid2407: wifi_pwrseq_pin@0 {
+               allwinner,pins = "PL6";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
index 6d06e24d446b91e477d651ab90dc3d803ce6f9c8..c9213caf74241e9c4189a5d6f964cd01a7e19279 100644 (file)
 / {
        model = "Polaroid MID2809PXE04 tablet";
        compatible = "polaroid,mid2809pxe04", "allwinner,sun8i-a23";
+
+       aliases {
+               ethernet0 = &esp8089;
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_pwrseq_pin_mid2809>;
+               reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
+               /* The esp8089 needs 200 ms after driving wifi-en high */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_dldo1>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       esp8089: sdio_wifi@1 {
+               compatible = "esp,esp8089";
+               reg = <1>;
+               esp,crystal-26M-en = <2>;
+       };
+};
+
+&mmc1_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&r_pio {
+       wifi_pwrseq_pin_mid2809: wifi_pwrseq_pin@0 {
+               allwinner,pins = "PL6";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
index 65660324005c703718fa98946d45c890a5c5c69b..de6269dcac3aba95782e825a26ac5e691e5b9fe0 100644 (file)
 / {
        model = "Allwinner GA10H Quad Core Tablet (v1.1)";
        compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33";
+
+       aliases {
+               /* Make u-boot set mac-address for rtl8703as (no eeprom) */
+               ethernet0 = &rtl8703as;
+       };
 };
 
 &ehci0 {
        };
 };
 
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_dldo1>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       rtl8703as: sdio_wifi@1 {
+               reg = <1>;
+       };
+};
+
 &ohci0 {
        status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts b/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts
new file mode 100644 (file)
index 0000000..0f52cd9
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
+ * Copyright 2016 Icenowy Zheng <icenowy@aosc.xyz>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-a33.dtsi"
+#include "sun8i-reference-design-tablet.dtsi"
+
+/ {
+       model = "INet-D978 Rev 02";
+       compatible = "primux,inet-d978-rev2", "allwinner,sun8i-a33";
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pin_d978>;
+
+               home {
+                       label = "d978:blue:home";
+                       gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
+               };
+       };
+};
+
+&mmc1_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_dldo1>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       rtl8723bs: sdio_wifi@1 {
+               reg = <1>;
+       };
+};
+
+&r_pio {
+       led_pin_d978: led_pin_d978@0 {
+               allwinner,pins = "PL5";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
diff --git a/arch/arm/boot/dts/sun8i-a33-olinuxino.dts b/arch/arm/boot/dts/sun8i-a33-olinuxino.dts
new file mode 100644 (file)
index 0000000..9ea637e
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2016 - Stefan Mavrodiev <stefan.mavrodiev@gmail.com>
+ *                  Olimex LTD. <support@olimex.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-a33.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Olimex A33-OLinuXino";
+       compatible = "olimex,a33-olinuxino","allwinner,sun8i-a33";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pin_olinuxino>;
+
+               green {
+                       label = "a33-olinuxino:green:usr";
+                       gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
+               };
+       };
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+       cd-inverted;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&pio {
+       led_pin_olinuxino: led_pins@0 {
+               allwinner,pins = "PB7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
+               allwinner,pins = "PB4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PB3";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_rsb {
+       status = "okay";
+
+       axp22x: pmic@3a3 {
+               compatible = "x-powers,axp223";
+               reg = <0x3a3>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               eldoin-supply = <&reg_dcdc1>;
+               x-powers,drive-vbus-en;
+       };
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-io";
+};
+
+&reg_aldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <2350000>;
+       regulator-max-microvolt = <2650000>;
+       regulator-name = "vdd-dll";
+};
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-avcc";
+};
+
+&reg_dc1sw {
+       regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-3v3";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-sys";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_drivevbus {
+       regulator-name = "usb0-vbus";
+       status = "okay";
+};
+
+&reg_rtc_ldo {
+       regulator-name = "vcc-rtc";
+};
+
+&simplefb_lcd {
+       vcc-lcd-supply = <&reg_dc1sw>;
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_b>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb_power_supply {
+       status = "okay";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+       usb0_vbus_power-supply = <&usb_power_supply>;
+       usb0_vbus-supply = <&reg_drivevbus>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
new file mode 100644 (file)
index 0000000..3d64caf
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2016 James Pettigrew <james@innovum.com.au>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "FriendlyARM NanoPi NEO";
+       compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
+
+               pwr {
+                       label = "nanopi:green:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
+                       default-state = "on";
+               };
+
+               status {
+                       label = "nanopi:blue:status";
+                       gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
+               };
+       };
+};
+
+&ehci3 {
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
+       cd-inverted;
+       status = "okay";
+};
+
+&ohci3 {
+       status = "okay";
+};
+
+&pio {
+       leds_opc: led-pins {
+               allwinner,pins = "PA10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_pio {
+       leds_r_opc: led-pins {
+               allwinner,pins = "PL10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       /* USB VBUS is always on */
+       status = "okay";
+};
index f93f5d1695c4b38a05fbc8fdb818e2301e7366e4..f89fe00ddec55b054e0ceee704838f646b0abb30 100644 (file)
@@ -54,6 +54,8 @@
 
        aliases {
                serial0 = &uart0;
+               /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+               ethernet1 = &rtl8189;
        };
 
        chosen {
        bus-width = <4>;
        non-removable;
        status = "okay";
+
+       /*
+        * Explicitly define the sdio device, so that we can add an ethernet
+        * alias for it (which e.g. makes u-boot set a mac-address).
+        */
+       rtl8189: sdio_wifi@1 {
+               reg = <1>;
+       };
 };
 
 &pio {
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
new file mode 100644 (file)
index 0000000..1550fee
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Xunlong Orange Pi Lite";
+       compatible = "xunlong,orangepi-lite", "allwinner,sun8i-h3";
+
+       aliases {
+               /* The H3 emac is not used so the wifi is ethernet0 */
+               ethernet0 = &rtl8189ftv;
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
+
+               pwr_led {
+                       label = "orangepi:green:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+
+               status_led {
+                       label = "orangepi:red:status";
+                       gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       r_gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&sw_r_opc>;
+
+               sw4 {
+                       label = "sw4";
+                       linux,code = <BTN_0>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
+&ir {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       /*
+        * Explicitly define the sdio device, so that we can add an ethernet
+        * alias for it (which e.g. makes u-boot set a mac-address).
+        */
+       rtl8189ftv: sdio_wifi@1 {
+               reg = <1>;
+       };
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
+
+&pio {
+       leds_opc: led_pins@0 {
+               allwinner,pins = "PA15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_pio {
+       leds_r_opc: led_pins@0 {
+               allwinner,pins = "PL10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       sw_r_opc: key_pins@0 {
+               allwinner,pins = "PL3";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       /* USB VBUS is always on */
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
new file mode 100644 (file)
index 0000000..851fd2c
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* The Orange Pi PC Plus is an extended version of the regular PC */
+#include "sun8i-h3-orangepi-pc.dts"
+
+/ {
+       model = "Xunlong Orange Pi PC Plus";
+       compatible = "xunlong,orangepi-pc-plus", "allwinner,sun8i-h3";
+
+       aliases {
+               /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+               ethernet1 = &rtl8189ftv;
+       };
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       /*
+        * Explicitly define the sdio device, so that we can add an ethernet
+        * alias for it (which e.g. makes u-boot set a mac-address).
+        */
+       rtl8189ftv: sdio_wifi@1 {
+               reg = <1>;
+       };
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_8bit_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       status = "okay";
+};
+
+&mmc2_8bit_pins {
+       /* Increase drive strength for DDR modes */
+       allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+       /* eMMC is missing pull-ups */
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
index b0cb41787e09c0102b184f15cc4d2bae8f1b65c4..bb585918cf544b53f648a673df2866ef7474b575 100644 (file)
@@ -44,7 +44,7 @@
 #include "sun8i-h3-orangepi-2.dts"
 
 / {
-       model = "Xunlong Orange Pi Plus";
+       model = "Xunlong Orange Pi Plus / Plus 2";
        compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
 
        reg_usb3_vbus: usb3-vbus {
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
new file mode 100644 (file)
index 0000000..5851a47
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The Orange Pi Plus 2E is an extended version of the Orange Pi PC Plus,
+ * with 2G RAM and an external gbit ethernet phy.
+ */
+
+#include "sun8i-h3-orangepi-pc-plus.dts"
+
+/ {
+       model = "Xunlong Orange Pi Plus 2E";
+       compatible = "xunlong,orangepi-plus2e", "allwinner,sun8i-h3";
+};
index fdf9fdbda26787321743d765dc2e290f7b8fdf22..6d83b8674201d9a977b22b8858d177b966407956 100644 (file)
                        interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               pwm: pwm@01c21400 {
+                       compatible = "allwinner,sun8i-h3-pwm";
+                       reg = <0x01c21400 0x8>;
+                       clocks = <&osc24M>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
                uart0: serial@01c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
index 60fa9585022b058a5a1f47dd50a9480fbedf307c..29f837a47771d40da22e37183c6af17349b05a61 100644 (file)
 #include "sunxi-reference-design-tablet.dtsi"
 #include "sun8i-reference-design-tablet.dtsi"
 
+/ {
+       aliases {
+               serial0 = &r_uart;
+               /* Make u-boot set mac-address for wifi without an eeprom */
+               ethernet0 = &sdio_wifi;
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               /*
+                * Q8 boards use various PL# pins as wifi-en. On other boards
+                * these may be connected to a wifi module output pin. To avoid
+                * short-circuits we configure these as inputs with pull-ups via
+                * pinctrl, instead of listing them as active-low reset-gpios.
+                */
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_pwrseq_pin_q8>;
+               /* The esp8089 needs 200 ms after driving wifi-en high */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
 &ehci0 {
        status  = "okay";
 };
 
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_a>;
+       vmmc-supply = <&reg_dldo1>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       sdio_wifi: sdio_wifi@1 {
+               reg = <1>;
+       };
+};
+
+&mmc1_pins_a {
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&r_pio {
+       wifi_pwrseq_pin_q8: wifi_pwrseq_pin@0 {
+               allwinner,pins = "PL6", "PL7", "PL11";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
 &usbphy {
        usb1_vbus-supply = <&reg_dldo1>;
 };
index 9d9036140511da214084348f50886f175e962e79..08cd00143635b4380b9f5c0a14495523279c6550 100644 (file)
        };
 };
 
+&i2c0 {
+       /*
+        * The gsl1680 is rated at 400KHz and it will not work reliable at
+        * 100KHz, this has been confirmed on multiple different q8 tablets.
+        * The gsl1680 is the only device on this bus.
+        */
+       clock-frequency = <400000>;
+
+       touchscreen: touchscreen@0 {
+               interrupt-parent = <&pio>;
+               interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
+               pinctrl-names = "default";
+               pinctrl-0 = <&ts_power_pin>;
+               power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+               /* Tablet dts must provide reg and compatible */
+               status = "disabled";
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
                allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
        };
 
+       ts_power_pin: ts_power_pin@0 {
+               allwinner,pins = "PH1";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH8";
                allwinner,function = "gpio_in";
index 1526b41c70f106fc8303a0f5a6940501be8c8d2c..04b014603659dca3adab9060eba7a44f548496cb 100644 (file)
        allwinner,drive = <SUN4I_PINCTRL_40_MA>;
 };
 
+&osc32k {
+       /* osc32k input is from AC100 */
+       clocks = <&ac100_rtc 0>;
+};
+
 &pio {
        led_pins_cubieboard4: led-pins@0 {
                allwinner,pins = "PH6", "PH17";
                        };
                };
        };
+
+       ac100: codec@e89 {
+               compatible = "x-powers,ac100";
+               reg = <0xe89>;
+
+               ac100_codec: codec {
+                       compatible = "x-powers,ac100-codec";
+                       interrupt-parent = <&r_pio>;
+                       interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
+                       #clock-cells = <0>;
+                       clock-output-names = "4M_adda";
+               };
+
+               ac100_rtc: rtc {
+                       compatible = "x-powers,ac100-rtc";
+                       interrupt-parent = <&nmi_intc>;
+                       interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+                       clocks = <&ac100_codec>;
+                       #clock-cells = <1>;
+                       clock-output-names = "cko1_rtc",
+                                            "cko2_rtc",
+                                            "cko3_rtc";
+               };
+       };
 };
 
 #include "axp809.dtsi"
index 7fd22e888602c7e7bc7897a96e25e90d7ace1d80..fd874ded890ef44608e6dd05052cf5dba18461c1 100644 (file)
        status = "okay";
 };
 
+&osc32k {
+       /* osc32k input is from AC100 */
+       clocks = <&ac100_rtc 0>;
+};
+
 &pio {
        led_pins_optimus: led-pins@0 {
                allwinner,pins = "PH0", "PH1";
                        };
                };
        };
+
+       ac100: codec@e89 {
+               compatible = "x-powers,ac100";
+               reg = <0xe89>;
+
+               ac100_codec: codec {
+                       compatible = "x-powers,ac100-codec";
+                       interrupt-parent = <&r_pio>;
+                       interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
+                       #clock-cells = <0>;
+                       clock-output-names = "4M_adda";
+               };
+
+               ac100_rtc: rtc {
+                       compatible = "x-powers,ac100-rtc";
+                       interrupt-parent = <&nmi_intc>;
+                       interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+                       clocks = <&ac100_codec>;
+                       #clock-cells = <1>;
+                       clock-output-names = "cko1_rtc",
+                                            "cko2_rtc",
+                                            "cko3_rtc";
+               };
+       };
 };
 
 #include "axp809.dtsi"
index f68b3242b33a09b0ff0c197c817b75525c9d9bb9..3c5214cbe4e6949c5a4c491cb68b4909c169340a 100644 (file)
 
                /*
                 * The 32k clock is from an external source, normally the
-                * AC100 codec/RTC chip. This clock is by default enabled
-                * and clocked at 32768 Hz, from the oscillator connected
-                * to the AC100. It is configurable, but no such driver or
-                * bindings exist yet.
+                * AC100 codec/RTC chip. This serves as a placeholder for
+                * board dts files to specify the source.
                 */
                osc32k: osc32k_clk {
                        #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <32768>;
+                       compatible = "fixed-factor-clock";
+                       clock-div = <1>;
+                       clock-mult = <1>;
                        clock-output-names = "osc32k";
                };
 
                        resets = <&apbs_rst 0>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
+                       #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
                        r_ir_pins: r_ir {