]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sunxi: dts: Sync with kernel
authorHans de Goede <hdegoede@redhat.com>
Wed, 5 Aug 2015 15:39:14 +0000 (17:39 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 08:23:18 +0000 (10:23 +0200)
Sync the sunxi dts files with the changes queued up for kernel-4.3 in
mripard's sunxi/dt-for-4.3 branch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
32 files changed:
arch/arm/dts/Makefile
arch/arm/dts/axp152.dtsi [new file with mode: 0644]
arch/arm/dts/axp209.dtsi
arch/arm/dts/sun4i-a10-ba10-tvbox.dts
arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
arch/arm/dts/sun4i-a10-cubieboard.dts
arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts [new file with mode: 0644]
arch/arm/dts/sun4i-a10-mini-xplus.dts
arch/arm/dts/sun4i-a10-olinuxino-lime.dts
arch/arm/dts/sun4i-a10.dtsi
arch/arm/dts/sun5i-a10s-olinuxino-micro.dts
arch/arm/dts/sun5i-a13-hsg-h702.dts
arch/arm/dts/sun5i-a13-olinuxino.dts
arch/arm/dts/sun5i-a13-utoo-p66.dts
arch/arm/dts/sun5i.dtsi
arch/arm/dts/sun6i-a31-m9.dts
arch/arm/dts/sun6i-a31-mele-a1000g-quad.dts
arch/arm/dts/sun6i-a31.dtsi
arch/arm/dts/sun6i-a31s-cs908.dts
arch/arm/dts/sun7i-a20-cubietruck.dts
arch/arm/dts/sun7i-a20-i12-tvbox.dts
arch/arm/dts/sun7i-a20-olinuxino-lime.dts
arch/arm/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/dts/sun7i-a20.dtsi
arch/arm/dts/sun8i-a23-a33.dtsi
arch/arm/dts/sun8i-a23-ippo-q8h-v5.dts
arch/arm/dts/sun8i-a23.dtsi
arch/arm/dts/sun8i-a33-ga10h-v1.1.dts
arch/arm/dts/sun8i-a33-ippo-q8h-v1.2.dts
arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
arch/arm/dts/sun8i-a33.dtsi
arch/arm/dts/sunxi-common-regulators.dtsi

index ff868910146a2b6d92f8bfe098dfa171b779425d..12ff007e6d8387807d193c3f1811a0a7e09cd0d2 100644 (file)
@@ -77,6 +77,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
        sun4i-a10-inet-3f.dtb \
        sun4i-a10-inet-3w.dtb \
        sun4i-a10-inet97fv2.dtb \
+       sun4i-a10-itead-iteaduino-plus.dtb \
        sun4i-a10-jesurun-q5.dtb \
        sun4i-a10-marsboard.dtb \
        sun4i-a10-mini-xplus.dtb \
diff --git a/arch/arm/dts/axp152.dtsi b/arch/arm/dts/axp152.dtsi
new file mode 100644 (file)
index 0000000..f90ad6c
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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.
+ */
+
+&axp152 {
+       compatible = "x-powers,axp152";
+       interrupt-controller;
+       #interrupt-cells = <1>;
+};
index c20cf537f5a534dcbbbacdf3f9192410a757a14d..24c935c72e5e611f3f945744404eae6bd135175f 100644 (file)
  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *     GNU General Public License for more details.
  *
- *     You should have received a copy of the GNU General Public
- *     License along with this file; if not, write to the Free
- *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- *     MA 02110-1301 USA
- *
  * Or, alternatively,
  *
  *  b) Permission is hereby granted, free of charge, to any person
index 93d435670ef1eeedb2b7d62dea8d730f16790dda..f3cb297fd1db3d22c4510aa8d0da8ee3d88d18e2 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        usb2_vbus_pin_a: usb2_vbus_pin@0 {
                allwinner,pins = "PH12";
        };
 };
 
+&reg_usb0_vbus {
+       regulator-boot-on;
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usbphy {
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 5878a0b11f7be387d9d09daf10b2ee884788dcb2..1430568726501e6283cca376d8619a548952f27c 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               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 = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+};
+
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb2_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
 };
index 9afb4e0185935ee4ffdda47e3595cc352341364a..046a84d9719d6cffb34e76398b359567a6134668 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        led_pins_cubieboard: led_pins@0 {
                allwinner,pins = "PH20", "PH21";
                allwinner,drive = <SUN4I_PINCTRL_20_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
new file mode 100644 (file)
index 0000000..985e155
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * Copyright 2015 Josef Gajdusek <atx@atx.name>
+ *
+ * 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 "sun4i-a10.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Iteaduino Plus A10";
+       compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&ahci {
+       target-supply = <&reg_ahci_5v>;
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emac_pins_a>;
+       phy = <&phy1>;
+       status = "okay";
+};
+
+&emac_sram {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupts = <0>;
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins_a>;
+       status = "okay";
+};
+
+&ir0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir0_rx_pins_a>;
+       status = "okay";
+};
+
+&mdio {
+       status = "okay";
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+       cd-inverted;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&reg_ahci_5v {
+       status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1450000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb1_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
+&spi0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pins_a>,
+                   <&spi0_cs0_pins_a>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index ebe2a04ef649a11d8b1c1d1263b3ca1300d0a2ef..a7dd86d30fa2711ba2533670cff0cc8559377505 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
+&reg_usb0_vbus {
+       regulator-boot-on;
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usbphy {
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index b64aa4eb071e34d49b384e1731657dce451aa972..28e32ad705cd25848e087f1ee4a9ad08c986740d 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
                allwinner,pins = "PC3";
                allwinner,drive = <SUN4I_PINCTRL_20_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               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 = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio   = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply   = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 61c03d1fe5303301a7ee44f1069c3865da958313..463bacd6a74d7024892587abadf9a2a701f4da16 100644 (file)
                        #size-cells = <0>;
                };
 
+               usb_otg: usb@01c13000 {
+                       compatible = "allwinner,sun4i-a10-musb";
+                       reg = <0x01c13000 0x0400>;
+                       clocks = <&ahb_gates 0>;
+                       interrupts = <38>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       allwinner,sram = <&otg_sram 1>;
+                       status = "disabled";
+               };
+
                usbphy: phy@01c13400 {
                        #phy-cells = <1>;
                        compatible = "allwinner,sun4i-a10-usb-phy";
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
-                       #size-cells = <0>;
+                       #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
                        pwm0_pins_a: pwm0@0 {
index a7e19e4847f75d60050b71f219e17d80f29e5c19..5a422c1ff725d875ceca0f2b61eeea696b117323 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins_a>;
        status = "okay";
+
+       axp152: pmic@30 {
+               reg = <0x30>;
+               interrupts = <0>;
+       };
 };
 
+#include "axp152.dtsi"
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
                allwinner,pins = "PG1";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PG12";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+       status = "okay";
 };
 
 &reg_usb1_vbus {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb0_vbus_pin_a {
+       allwinner,pins = "PG11";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>;
+       usb0_id_det-gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
 };
-
index 990f9d61ae4d01756a812fe2a7b4fc7c5b9cae2f..3724b988064eba83f152669407bd127801a23160 100644 (file)
@@ -45,6 +45,7 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        status = "okay";
 };
 
+&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_h702>;
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        mmc0_cd_pin_h702: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
        };
+
+       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>;
+       };
+
+       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_NO_PULL>;
+       };
 };
 
 #include "axp209.dtsi"
        regulator-name = "vcc-wifi";
 };
 
+&reg_usb0_vbus {
+       pinctrl-0 = <&usb0_vbus_pin_a>;
+       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-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+       usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_ldo3>;
        status = "okay";
 };
index 42324005eb7c0ead40426a9eefcd9b4449423c1b..b3c234c65ea19bb1f69984f350db0dad7ceea440 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
+       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>;
+       };
+
+       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>;
+       };
+
        usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
                allwinner,pins = "PG11";
                allwinner,function = "gpio_out";
        };
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+       gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+};
+
 &reg_usb1_vbus {
        pinctrl-0 = <&usb1_vbus_pin_olinuxino>;
        gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
        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_usb1_vbus>;
        status = "okay";
 };
index 514f159a14d42d369c1de6159185d593b6e78be0..eb793d5a2bd6748cec5696c2bdbfbbb4999b530f 100644 (file)
@@ -93,7 +93,7 @@
                compatible = "chipone,icn8318";
                reg = <0x40>;
                interrupt-parent = <&pio>;
-               interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
                pinctrl-names = "default";
                pinctrl-0 = <&ts_wake_pin_p66>;
                wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
        };
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        mmc0_cd_pin_p66: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                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>;
+       };
+
        i2c_lcd_pins: i2c_lcd_pin@0 {
                allwinner,pins = "PG10", "PG12";
                allwinner,function = "gpio_out";
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &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 54b0978304344104d94d7d4e79a3117986563204..759117d14ce5fa8f46276ab45f07f9d25329f95f 100644 (file)
                        #size-cells = <0>;
                };
 
+               usb_otg: usb@01c13000 {
+                       compatible = "allwinner,sun4i-a10-musb";
+                       reg = <0x01c13000 0x0400>;
+                       clocks = <&ahb_gates 0>;
+                       interrupts = <38>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       allwinner,sram = <&otg_sram 1>;
+                       status = "disabled";
+               };
+
                usbphy: phy@01c13400 {
                        #phy-cells = <1>;
                        compatible = "allwinner,sun5i-a13-usb-phy";
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
-                       #size-cells = <0>;
+                       #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
                        i2c0_pins_a: i2c0@0 {
index a5660d61a96e9182a6d178ed1e042b56790a62c0..6e0e5687a09c73a03a6512bf2bf7f8015c6b4b12 100644 (file)
@@ -48,7 +48,7 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-       model = "Mele M9 / A1000G Quad top set box";
+       model = "Mele M9 top set box";
        compatible = "mele,m9", "allwinner,sun6i-a31";
 
        aliases {
index 4404f37d132ec9d5906834533c319cfeb7c1670f..4dd70cce212743fcd38eb32a942b0cdc8cca888c 100644 (file)
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usbphy {
        usb1_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
index 008047a018cf2b645cc85136c194be665376c5ef..39953e76bbfcfc1aa67c1d58d8bae9061b1ede10 100644 (file)
                        #size-cells = <0>;
                };
 
+               usb_otg: usb@01c19000 {
+                       compatible = "allwinner,sun6i-a31-musb";
+                       reg = <0x01c19000 0x0400>;
+                       clocks = <&ahb1_gates 24>;
+                       resets = <&ahb1_rst 24>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       status = "disabled";
+               };
+
                usbphy: phy@01c19400 {
                        compatible = "allwinner,sun6i-a31-usb-phy";
                        reg = <0x01c19400 0x10>,
                        clocks = <&apb1_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
-                       #size-cells = <0>;
+                       #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
                        uart0_pins_a: uart0@0 {
index 1e2411a2bceac845237b62cf9f404d2817be4e77..5e8f8c4f2b302a67ab02f396977a92e174d76ce3 100644 (file)
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usbphy {
        status = "okay";
 };
index 4611e2f5a99e85577f4ba7ad7363e7878049305b..e6b019232a9e880ea48a9b7f9dd975f6846be84e 100644 (file)
                };
        };
 
-       reg_vmmc3: vmmc3 {
-               compatible = "regulator-fixed";
+       mmc3_pwrseq: mmc3_pwrseq {
+               compatible = "mmc-pwrseq-simple";
                pinctrl-names = "default";
-               pinctrl-0 = <&vmmc3_pin_cubietruck>;
-               regulator-name = "vmmc3";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               enable-active-high;
-               gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
+               pinctrl-0 = <&mmc3_pwrseq_pin_cubietruck>;
+               reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
        };
 };
 
 &mmc3 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc3_pins_a>;
-       vmmc-supply = <&reg_vmmc3>;
+       vmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&mmc3_pwrseq>;
        bus-width = <4>;
        non-removable;
        status = "okay";
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
                interrupt-parent = <&pio>;
-               interrupts = <10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
+               interrupts = <10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
                interrupt-names = "host-wake";
        };
 };
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
-       vmmc3_pin_cubietruck: vmmc3_pin@0 {
-               allwinner,pins = "PH9";
+       ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
+               allwinner,pins = "PH12";
                allwinner,function = "gpio_out";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
-       ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
-               allwinner,pins = "PH12";
+       led_pins_cubietruck: led_pins@0 {
+               allwinner,pins = "PH7", "PH11", "PH20", "PH21";
                allwinner,function = "gpio_out";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
 
-       led_pins_cubietruck: led_pins@0 {
-               allwinner,pins = "PH7", "PH11", "PH20", "PH21";
+       mmc3_pwrseq_pin_cubietruck: mmc3_pwrseq_pin@0 {
+               allwinner,pins = "PH9";
                allwinner,function = "gpio_out";
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH19";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PH22";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
 };
 
 &pwm {
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
+       usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
index f32f6f20d92339cb1f1f20bdeb158d98a05da418..1e6bd360dac0eaae2c7a651e35000ba6924e72fa 100644 (file)
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
                interrupt-parent = <&pio>;
-               interrupts = <10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
+               interrupts = <10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
                interrupt-names = "host-wake";
        };
 };
index 769726dfb04622247aa3dd4a23531d2a1a42e445..04237085dc394423add52ff8d23486a183c5d55d 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
                allwinner,pins = "PC3";
                allwinner,drive = <SUN4I_PINCTRL_20_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               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 = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 00f8f25eccae57f7a5d64f138d71a9dc8dc8af65..c5d70caade8238179f136f5326adb25fa8454c41 100644 (file)
        status = "okay";
 };
 
+&otg_sram {
+       status = "okay";
+};
+
 &pio {
        mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 {
                allwinner,pins = "PH11";
                allwinner,drive = <SUN4I_PINCTRL_20_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PH4";
+               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 = "PH5";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
 };
 
 &reg_ahci_5v {
        status = "okay";
 };
 
+&reg_usb0_vbus {
+       status = "okay";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+       usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
index 6a63f30c9a699d0e4620aac31f64247ad9c1f95b..71ab6b85f240a2478a698df9a5590096b4c5bbc5 100644 (file)
                        #size-cells = <0>;
                };
 
+               usb_otg: usb@01c13000 {
+                       compatible = "allwinner,sun4i-a10-musb";
+                       reg = <0x01c13000 0x0400>;
+                       clocks = <&ahb_gates 0>;
+                       interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       allwinner,sram = <&otg_sram 1>;
+                       status = "disabled";
+               };
+
                usbphy: phy@01c13400 {
                        #phy-cells = <1>;
                        compatible = "allwinner,sun7i-a20-usb-phy";
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
-                       #size-cells = <0>;
+                       #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
                        pwm0_pins_a: pwm0@0 {
index 5cd2e92c1940ad1c0807d25d3adfb0c00ebf9af4..9c4a55c5510e51b1bf8a7fc9ef7a1ff0787cf7d8 100644 (file)
                        interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ahb1_gates 26>;
                        resets = <&ahb1_rst 26>;
+                       phys = <&usbphy 1>;
+                       phy-names = "usb";
                        status = "disabled";
                };
 
                        interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&ahb1_gates 29>, <&usb_clk 16>;
                        resets = <&ahb1_rst 29>;
+                       phys = <&usbphy 1>;
+                       phy-names = "usb";
                        status = "disabled";
                };
 
                        clocks = <&apb1_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
+                       #interrupt-cells = <3>;
                        #gpio-cells = <3>;
 
                        uart0_pins_a: uart0@0 {
index 95134c69cfc1b9050eadc07a32cc7cad96ddbea3..8d9da6886a4c975113ffd916de447a552295401e 100644 (file)
        pinctrl-0 = <&r_uart_pins_a>;
        status = "okay";
 };
+
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 8698f7aa31c71b20f9c67f2334c8c970fa48c989..2cc27c7a59dc389b7cf835fcaa9d7c23fd073291 100644 (file)
                        clock-output-names = "mbus";
                };
        };
+
+       soc@01c00000 {
+               usb_otg: usb@01c19000 {
+                       compatible = "allwinner,sun6i-a31-musb";
+                       reg = <0x01c19000 0x0400>;
+                       clocks = <&ahb1_gates 24>;
+                       resets = <&ahb1_rst 24>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       status = "disabled";
+               };
+
+               usbphy: phy@01c19400 {
+                       compatible = "allwinner,sun8i-a23-usb-phy";
+                       reg = <0x01c19400 0x10>,
+                             <0x01c1a800 0x4>;
+                       reg-names = "phy_ctrl",
+                                   "pmu1";
+                       clocks = <&usb_clk 8>,
+                                <&usb_clk 9>;
+                       clock-names = "usb0_phy",
+                                     "usb1_phy";
+                       resets = <&usb_clk 0>,
+                                <&usb_clk 1>;
+                       reset-names = "usb0_reset",
+                                     "usb1_reset";
+                       status = "disabled";
+                       #phy-cells = <1>;
+               };
+       };
 };
 
 &pio {
index da16343346407a6b8e9112527a5f12744be19dc8..1aefc6793e25e330dea05befe8306fc22651ad26 100644 (file)
        pinctrl-0 = <&r_uart_pins_a>;
        status = "okay";
 };
+
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 97771495c21bda10c7dd6422470e24d89744768c..a43897515fb65dd4b71fe167acf0ba98df632041 100644 (file)
@@ -1,17 +1,56 @@
 /*
  * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
  *
- * Minimal dts file for the Ippo Q8H V1.2 (A33, 1024x600) for u-boot only
+ * 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.
  *
- * SPDX-License-Identifier:     GPL-2.0+ or X11
+ *  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>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-       model = "Ippo Q8H V1.2 (A33, 1024x600)";
-       compatible = "ippo,q8h-v1.2-a33-lcd1024x600", "allwinner,sun8i-a23";
+       model = "Ippo Q8H Quad Core Tablet (v1.2)";
+       compatible = "ippo,a33-q8h-v1.2", "allwinner,sun8i-a33";
 
        aliases {
                serial0 = &r_uart;
        };
 };
 
+&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>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>;
+       vmmc-supply = <&reg_vcc3v0>;
+       bus-width = <4>;
+       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+       cd-inverted;
+       status = "okay";
+};
+
+&pio {
+       mmc0_cd_pin_q8h: mmc0_cd_pin@0 {
+               allwinner,pins = "PB4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
 &r_uart {
        pinctrl-names = "default";
        pinctrl-0 = <&r_uart_pins_a>;
        status = "okay";
 };
+
+/*
+ * 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 {
+       status = "okay";
+};
index 5788c29cb56a78c87bea6e750468ed0dc7680612..1d5390d4e03aadd44965918d43c0672c070de9f9 100644 (file)
        };
 };
 
+&ehci0 {
+       status = "okay";
+};
+
 &lradc {
        vref-supply = <&reg_vcc3v0>;
        status = "okay";
        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
 
+&ohci0 {
+       status = "okay";
+};
+
 &pio {
        mmc0_cd_pin_sina33: mmc0_cd_pin@0 {
                allwinner,pins = "PB4";
        pinctrl-0 = <&uart0_pins_b>;
        status = "okay";
 };
+
+&usbphy {
+       status = "okay";
+       usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
+};
index 85ee08098b7b1dcbd684d3311caa56c74e16103c..faa7d3c1fceacdc9eb80d396e23807bccb4d7aa1 100644 (file)
                        clock-output-names = "mbus";
                };
        };
+
+       soc@01c00000 {
+               usb_otg: usb@01c19000 {
+                       compatible = "allwinner,sun8i-a33-musb";
+                       reg = <0x01c19000 0x0400>;
+                       clocks = <&ahb1_gates 24>;
+                       resets = <&ahb1_rst 24>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       status = "disabled";
+               };
+
+               usbphy: phy@01c19400 {
+                       compatible = "allwinner,sun8i-a33-usb-phy";
+                       reg = <0x01c19400 0x14>,
+                             <0x01c1a800 0x4>;
+                       reg-names = "phy_ctrl",
+                                   "pmu1";
+                       clocks = <&usb_clk 8>,
+                                <&usb_clk 9>;
+                       clock-names = "usb0_phy",
+                                     "usb1_phy";
+                       resets = <&usb_clk 0>,
+                                <&usb_clk 1>;
+                       reset-names = "usb0_reset",
+                                     "usb1_reset";
+                       status = "disabled";
+                       #phy-cells = <1>;
+               };
+       };
 };
 
 &pio {
index 51cc8383f70f5d82fee3ca750d6c15b18b1bacbc..f1953b0c505939e78fe6d43837d8e4c12c48eb1b 100644 (file)
                regulator-name = "usb1-vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
                enable-active-high;
                gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
                status = "disabled";
                regulator-name = "usb2-vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
                enable-active-high;
                gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>;
                status = "disabled";