All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tablets
@ 2015-09-05 14:55 ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-05 14:55 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

Cheap allwinner based devices in the q8 enclosure come in many variants,
all sharing the case and a number of other basic features.

They differ in the display, touchscreen, accelerometer and wifi chips
used.

This commit adds 2 dtsi files defining the shared features of all the
q8 tablets. sunxi-q8-common.dtsi defines features shared amongst all
q8 tablets, sun8i-q8-common.dtsi defines features shared amongst all
a23 / a33 based q8 tablets, but not with a13 q8 based tablets.

a13 based tablets use a different card-detect pin for the mmc, and
use uart1 instead of the r_uart for the serial console.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts   | 76 +++-----------------------
 arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts | 70 +-----------------------
 arch/arm/boot/dts/sun8i-q8-common.dtsi        | 77 +++++++++++++++++++++++++++
 arch/arm/boot/dts/sunxi-q8-common.dtsi        | 77 +++++++++++++++++++++++++++
 4 files changed, 162 insertions(+), 138 deletions(-)
 create mode 100644 arch/arm/boot/dts/sun8i-q8-common.dtsi
 create mode 100644 arch/arm/boot/dts/sunxi-q8-common.dtsi

diff --git a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
index 8d9da68..4f47fd6 100644
--- a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
+++ b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
@@ -44,35 +44,11 @@
 
 /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 "sun8i-q8-common.dtsi"
 
 / {
 	model = "Ippo Q8H Dual Core Tablet (v5)";
 	compatible = "ippo,q8h-v5", "allwinner,sun8i-a23";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-};
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
 };
 
 &i2c2 {
@@ -82,50 +58,12 @@
 	status = "failed";
 };
 
-&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";
diff --git a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
index a438975..b8439cb 100644
--- a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
@@ -42,79 +42,11 @@
 
 /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>
+#include "sun8i-q8-common.dtsi"
 
 / {
 	model = "Ippo Q8H Quad Core Tablet (v1.2)";
 	compatible = "ippo,a33-q8h-v1.2", "allwinner,sun8i-a33";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
-
-&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";
 };
 
 /*
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
new file mode 100644
index 0000000..6f8a8bb
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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.
+ */
+#include "sunxi-q8-common.dtsi"
+
+/ {
+	aliases {
+		serial0 = &r_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_q8: 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";
+};
diff --git a/arch/arm/boot/dts/sunxi-q8-common.dtsi b/arch/arm/boot/dts/sunxi-q8-common.dtsi
new file mode 100644
index 0000000..17b26ff
--- /dev/null
+++ b/arch/arm/boot/dts/sunxi-q8-common.dtsi
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sunxi-common-regulators.dtsi"
+
+&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>;
+	};
+};
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 1/3] ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tablets
@ 2015-09-05 14:55 ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-05 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

Cheap allwinner based devices in the q8 enclosure come in many variants,
all sharing the case and a number of other basic features.

They differ in the display, touchscreen, accelerometer and wifi chips
used.

This commit adds 2 dtsi files defining the shared features of all the
q8 tablets. sunxi-q8-common.dtsi defines features shared amongst all
q8 tablets, sun8i-q8-common.dtsi defines features shared amongst all
a23 / a33 based q8 tablets, but not with a13 q8 based tablets.

a13 based tablets use a different card-detect pin for the mmc, and
use uart1 instead of the r_uart for the serial console.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts   | 76 +++-----------------------
 arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts | 70 +-----------------------
 arch/arm/boot/dts/sun8i-q8-common.dtsi        | 77 +++++++++++++++++++++++++++
 arch/arm/boot/dts/sunxi-q8-common.dtsi        | 77 +++++++++++++++++++++++++++
 4 files changed, 162 insertions(+), 138 deletions(-)
 create mode 100644 arch/arm/boot/dts/sun8i-q8-common.dtsi
 create mode 100644 arch/arm/boot/dts/sunxi-q8-common.dtsi

diff --git a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
index 8d9da68..4f47fd6 100644
--- a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
+++ b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
@@ -44,35 +44,11 @@
 
 /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 "sun8i-q8-common.dtsi"
 
 / {
 	model = "Ippo Q8H Dual Core Tablet (v5)";
 	compatible = "ippo,q8h-v5", "allwinner,sun8i-a23";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-};
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
 };
 
 &i2c2 {
@@ -82,50 +58,12 @@
 	status = "failed";
 };
 
-&lradc {
-	vref-supply = <&reg_vcc3v0>;
-	status = "okay";
-
-	button at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 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 at 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";
diff --git a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
index a438975..b8439cb 100644
--- a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
@@ -42,79 +42,11 @@
 
 /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>
+#include "sun8i-q8-common.dtsi"
 
 / {
 	model = "Ippo Q8H Quad Core Tablet (v1.2)";
 	compatible = "ippo,a33-q8h-v1.2", "allwinner,sun8i-a33";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-};
-
-&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 at 200 {
-		label = "Volume Up";
-		linux,code = <KEY_VOLUMEUP>;
-		channel = <0>;
-		voltage = <200000>;
-	};
-
-	button at 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 at 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";
 };
 
 /*
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
new file mode 100644
index 0000000..6f8a8bb
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2015 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-q8-common.dtsi"
+
+/ {
+	aliases {
+		serial0 = &r_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_q8: mmc0_cd_pin at 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";
+};
diff --git a/arch/arm/boot/dts/sunxi-q8-common.dtsi b/arch/arm/boot/dts/sunxi-q8-common.dtsi
new file mode 100644
index 0000000..17b26ff
--- /dev/null
+++ b/arch/arm/boot/dts/sunxi-q8-common.dtsi
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2015 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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sunxi-common-regulators.dtsi"
+
+&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 at 200 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <200000>;
+	};
+
+	button at 400 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <400000>;
+	};
+};
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-05 14:55 ` Hans de Goede
@ 2015-09-05 14:55     ` Hans de Goede
  -1 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-05 14:55 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
serial console, and PG0 for card-detect for mmc0.

This also adds pmic and otg support, which both use the same config on
all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
because pmic / otg support for sun8i has not yet been merged.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun5i-q8-common.dtsi | 170 +++++++++++++++++++++++++++++++++
 1 file changed, 170 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun5i-q8-common.dtsi

diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
new file mode 100644
index 0000000..0641d68
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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.
+ */
+#include "sunxi-q8-common.dtsi"
+
+/ {
+	aliases {
+		serial0 = &uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&i2c0 {
+	axp209: pmic@34 {
+		reg = <0x34>;
+		interrupts = <0>;
+	};
+};
+
+&i2c1 {
+	pcf8563: rtc@51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
+
+#include "axp209.dtsi"
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
+	cd-inverted;
+	status = "okay";
+};
+
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_q8: 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>;
+	};
+
+	usb0_vbus_pin_a: usb0_vbus_pin@0 {
+		allwinner,pins = "PG12";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	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_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";
+};
+
+&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>;
+	status = "okay";
+};
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-05 14:55     ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-05 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
serial console, and PG0 for card-detect for mmc0.

This also adds pmic and otg support, which both use the same config on
all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
because pmic / otg support for sun8i has not yet been merged.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun5i-q8-common.dtsi | 170 +++++++++++++++++++++++++++++++++
 1 file changed, 170 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun5i-q8-common.dtsi

diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
new file mode 100644
index 0000000..0641d68
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2015 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-q8-common.dtsi"
+
+/ {
+	aliases {
+		serial0 = &uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&i2c0 {
+	axp209: pmic at 34 {
+		reg = <0x34>;
+		interrupts = <0>;
+	};
+};
+
+&i2c1 {
+	pcf8563: rtc at 51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
+
+#include "axp209.dtsi"
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
+	cd-inverted;
+	status = "okay";
+};
+
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_q8: mmc0_cd_pin at 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 at 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 at 0 {
+		allwinner,pins = "PG2";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	usb0_vbus_pin_a: usb0_vbus_pin at 0 {
+		allwinner,pins = "PG12";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	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_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";
+};
+
+&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>;
+	status = "okay";
+};
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/3] ARM: dts: sun5i: Add dts file for q8 formfactor a13 based tablets
  2015-09-05 14:55 ` Hans de Goede
@ 2015-09-05 14:55     ` Hans de Goede
  -1 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-05 14:55 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

This commits adds a generic dts file for q8 formfactor a13 based tablets.

The tablets ship in many variants, with the difference mainly being the
touchscreen controller / accelerometer / wifi chip used.

The wifi is USB based, and thus not listed in devicetree.

The touchscreen controller / accelerometer may turn out to be a problem
once we add support for those. We can either do something with devicetree
overlays, or add sun5i-a13-<touchscreen>-<accelerometer>.dts files. The
latter is what the android mod community is doing with firmware images.

This dts was tested with an a13 q8 tablet with a pcb labelled: "94V-0",
silead gsl1680 touchscreen controller and a mc32x0 accelerometer.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/Makefile                |  1 +
 arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | 60 +++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun5i-a13-q8-tablet.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c08883c..6d43044 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -573,6 +573,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
 	sun5i-a13-inet-98v-rev2.dtb \
 	sun5i-a13-olinuxino.dtb \
 	sun5i-a13-olinuxino-micro.dtb \
+	sun5i-a13-q8-tablet.dtb \
 	sun5i-a13-utoo-p66.dtb \
 	sun5i-r8-chip.dtb
 dtb-$(CONFIG_MACH_SUN6I) += \
diff --git a/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
new file mode 100644
index 0000000..72e93ac
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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.
+ */
+
+/dts-v1/;
+#include "sun5i-a13.dtsi"
+#include "sun5i-q8-common.dtsi"
+
+/ {
+	model = "Q8 A13 Tablet";
+	compatible = "allwinner,q8-a13", "allwinner,sun5i-a13";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&usbphy {
+	usb1_vbus-supply = <&reg_ldo3>;
+};
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/3] ARM: dts: sun5i: Add dts file for q8 formfactor a13 based tablets
@ 2015-09-05 14:55     ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-05 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

This commits adds a generic dts file for q8 formfactor a13 based tablets.

The tablets ship in many variants, with the difference mainly being the
touchscreen controller / accelerometer / wifi chip used.

The wifi is USB based, and thus not listed in devicetree.

The touchscreen controller / accelerometer may turn out to be a problem
once we add support for those. We can either do something with devicetree
overlays, or add sun5i-a13-<touchscreen>-<accelerometer>.dts files. The
latter is what the android mod community is doing with firmware images.

This dts was tested with an a13 q8 tablet with a pcb labelled: "94V-0",
silead gsl1680 touchscreen controller and a mc32x0 accelerometer.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/Makefile                |  1 +
 arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | 60 +++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun5i-a13-q8-tablet.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c08883c..6d43044 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -573,6 +573,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
 	sun5i-a13-inet-98v-rev2.dtb \
 	sun5i-a13-olinuxino.dtb \
 	sun5i-a13-olinuxino-micro.dtb \
+	sun5i-a13-q8-tablet.dtb \
 	sun5i-a13-utoo-p66.dtb \
 	sun5i-r8-chip.dtb
 dtb-$(CONFIG_MACH_SUN6I) += \
diff --git a/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
new file mode 100644
index 0000000..72e93ac
--- /dev/null
+++ b/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2015 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-q8-common.dtsi"
+
+/ {
+	model = "Q8 A13 Tablet";
+	compatible = "allwinner,q8-a13", "allwinner,sun5i-a13";
+};
+
+&reg_ldo3 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&usbphy {
+	usb1_vbus-supply = <&reg_ldo3>;
+};
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tablets
  2015-09-05 14:55 ` Hans de Goede
@ 2015-09-08 14:31     ` Maxime Ripard
  -1 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-08 14:31 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

On Sat, Sep 05, 2015 at 04:55:51PM +0200, Hans de Goede wrote:
> Cheap allwinner based devices in the q8 enclosure come in many variants,
> all sharing the case and a number of other basic features.
> 
> They differ in the display, touchscreen, accelerometer and wifi chips
> used.
> 
> This commit adds 2 dtsi files defining the shared features of all the
> q8 tablets. sunxi-q8-common.dtsi defines features shared amongst all
> q8 tablets, sun8i-q8-common.dtsi defines features shared amongst all
> a23 / a33 based q8 tablets, but not with a13 q8 based tablets.
> 
> a13 based tablets use a different card-detect pin for the mmc, and
> use uart1 instead of the r_uart for the serial console.
> 
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/3] ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tablets
@ 2015-09-08 14:31     ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-08 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 05, 2015 at 04:55:51PM +0200, Hans de Goede wrote:
> Cheap allwinner based devices in the q8 enclosure come in many variants,
> all sharing the case and a number of other basic features.
> 
> They differ in the display, touchscreen, accelerometer and wifi chips
> used.
> 
> This commit adds 2 dtsi files defining the shared features of all the
> q8 tablets. sunxi-q8-common.dtsi defines features shared amongst all
> q8 tablets, sun8i-q8-common.dtsi defines features shared amongst all
> a23 / a33 based q8 tablets, but not with a13 q8 based tablets.
> 
> a13 based tablets use a different card-detect pin for the mmc, and
> use uart1 instead of the r_uart for the serial console.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150908/8565a8e4/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-05 14:55     ` Hans de Goede
@ 2015-09-08 14:33         ` Maxime Ripard
  -1 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-08 14:33 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> serial console, and PG0 for card-detect for mmc0.
> 
> This also adds pmic and otg support, which both use the same config on
> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> because pmic / otg support for sun8i has not yet been merged.
> 
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Are we going to have any user but the one you posted in the patch 3
planned?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-08 14:33         ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-08 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> serial console, and PG0 for card-detect for mmc0.
> 
> This also adds pmic and otg support, which both use the same config on
> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> because pmic / otg support for sun8i has not yet been merged.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Are we going to have any user but the one you posted in the patch 3
planned?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150908/f8e1c80d/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-08 14:33         ` Maxime Ripard
@ 2015-09-08 21:26           ` Hans de Goede
  -1 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-08 21:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 09/08/2015 04:33 PM, Maxime Ripard wrote:
> On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
>> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
>> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
>> serial console, and PG0 for card-detect for mmc0.
>>
>> This also adds pmic and otg support, which both use the same config on
>> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
>> because pmic / otg support for sun8i has not yet been merged.
>>
>> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> Are we going to have any user but the one you posted in the patch 3
> planned?

Depends on what I can get my hands on / what is in the post atm.

One difference in fex files of different 18 variants is how the usb wifi is
powered, either via a gpio or via ldo3. Also there are differences in which
accelerometer is used, so eventually I expect there to be several users
of this dtsi.

I've bought several second hand q8 formfactor tablets on the internet lately,
when they arrive and I get around to work on them a second user may show
up soon.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-08 21:26           ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-08 21:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 09/08/2015 04:33 PM, Maxime Ripard wrote:
> On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
>> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
>> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
>> serial console, and PG0 for card-detect for mmc0.
>>
>> This also adds pmic and otg support, which both use the same config on
>> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
>> because pmic / otg support for sun8i has not yet been merged.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Are we going to have any user but the one you posted in the patch 3
> planned?

Depends on what I can get my hands on / what is in the post atm.

One difference in fex files of different 18 variants is how the usb wifi is
powered, either via a gpio or via ldo3. Also there are differences in which
accelerometer is used, so eventually I expect there to be several users
of this dtsi.

I've bought several second hand q8 formfactor tablets on the internet lately,
when they arrive and I get around to work on them a second user may show
up soon.

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-08 21:26           ` Hans de Goede
@ 2015-09-09 14:01               ` Maxime Ripard
  -1 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-09 14:01 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

On Tue, Sep 08, 2015 at 11:26:51PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 09/08/2015 04:33 PM, Maxime Ripard wrote:
> >On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> >>This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> >>files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> >>serial console, and PG0 for card-detect for mmc0.
> >>
> >>This also adds pmic and otg support, which both use the same config on
> >>all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> >>because pmic / otg support for sun8i has not yet been merged.
> >>
> >>Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >
> >Are we going to have any user but the one you posted in the patch 3
> >planned?
> 
> Depends on what I can get my hands on / what is in the post atm.
> 
> One difference in fex files of different 18 variants is how the usb wifi is
> powered, either via a gpio or via ldo3. Also there are differences in which
> accelerometer is used, so eventually I expect there to be several users
> of this dtsi.

But no difference in the SoC used (A13 vs A10s)?

I'm not sure having 18 DTs for a single board name is going to be
really helpful. It would be something to be supported by some quirks
mechanism, instead of having to require the user to pick the right one.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-09 14:01               ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-09 14:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Sep 08, 2015 at 11:26:51PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 09/08/2015 04:33 PM, Maxime Ripard wrote:
> >On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> >>This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> >>files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> >>serial console, and PG0 for card-detect for mmc0.
> >>
> >>This also adds pmic and otg support, which both use the same config on
> >>all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> >>because pmic / otg support for sun8i has not yet been merged.
> >>
> >>Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >
> >Are we going to have any user but the one you posted in the patch 3
> >planned?
> 
> Depends on what I can get my hands on / what is in the post atm.
> 
> One difference in fex files of different 18 variants is how the usb wifi is
> powered, either via a gpio or via ldo3. Also there are differences in which
> accelerometer is used, so eventually I expect there to be several users
> of this dtsi.

But no difference in the SoC used (A13 vs A10s)?

I'm not sure having 18 DTs for a single board name is going to be
really helpful. It would be something to be supported by some quirks
mechanism, instead of having to require the user to pick the right one.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150909/fcab38ee/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-09 14:01               ` Maxime Ripard
@ 2015-09-10 15:05                 ` Hans de Goede
  -1 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-10 15:05 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 09-09-15 16:01, Maxime Ripard wrote:
> On Tue, Sep 08, 2015 at 11:26:51PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 09/08/2015 04:33 PM, Maxime Ripard wrote:
>>> On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
>>>> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
>>>> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
>>>> serial console, and PG0 for card-detect for mmc0.
>>>>
>>>> This also adds pmic and otg support, which both use the same config on
>>>> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
>>>> because pmic / otg support for sun8i has not yet been merged.
>>>>
>>>> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>>
>>> Are we going to have any user but the one you posted in the patch 3
>>> planned?
>>
>> Depends on what I can get my hands on / what is in the post atm.
>>
>> One difference in fex files of different 18 variants is how the usb wifi is
>> powered, either via a gpio or via ldo3. Also there are differences in which
>> accelerometer is used, so eventually I expect there to be several users
>> of this dtsi.
>
> But no difference in the SoC used (A13 vs A10s)?
>
> I'm not sure having 18 DTs for a single board name is going to be
> really helpful.

Sorry I meant to write q8 not 18 :)

>It would be something to be supported by some quirks
> mechanism, instead of having to require the user to pick the right one.

Agreed, which is why I added a generic sun5i-a13-q8-tablet.dts, which
can then later be extended with quirks and such to get all the different
variants supported. Which I guess means that the contents of
sun5i-q8-common.dtsi can be folded into sun5i-a13-q8-tablet.dts, otoh
we may have some special cases which do require a separate dts and
having sun5i-q8-common.dtsi follows the same scheme as used for the
a23 / a33 tablets. In the future we should probably also add
sun8i-a23-q8-tablet.dts and sun8i-a33-q8-tablet.dts files and make
the existing ones just empty files with a single #include for
compatibility.

If possible I would like to at least have you queue up the default
sun5i-a13-q8-tablet.dts so that we've a dts file for a13 based tablets
which at least gets the basics going.

Either in its current form, or with it and sun5i-q8-common.dtsi
squashed together. If you want a squashed version let me know and
I'll do a resend.

Are you coming to ELCE ? I think the both of us should go to:

http://lceeu2015.sched.org/event/999c45c7fe78824a88269f35539c7e5c#.VfGcCLPYqlM

(Device Tree NG BoF) and try to hash out a solution for this there,
the quirks / variants stuff sounds good, but I wonder how far along
that is ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-10 15:05                 ` Hans de Goede
  0 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2015-09-10 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 09-09-15 16:01, Maxime Ripard wrote:
> On Tue, Sep 08, 2015 at 11:26:51PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 09/08/2015 04:33 PM, Maxime Ripard wrote:
>>> On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
>>>> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
>>>> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
>>>> serial console, and PG0 for card-detect for mmc0.
>>>>
>>>> This also adds pmic and otg support, which both use the same config on
>>>> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
>>>> because pmic / otg support for sun8i has not yet been merged.
>>>>
>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>
>>> Are we going to have any user but the one you posted in the patch 3
>>> planned?
>>
>> Depends on what I can get my hands on / what is in the post atm.
>>
>> One difference in fex files of different 18 variants is how the usb wifi is
>> powered, either via a gpio or via ldo3. Also there are differences in which
>> accelerometer is used, so eventually I expect there to be several users
>> of this dtsi.
>
> But no difference in the SoC used (A13 vs A10s)?
>
> I'm not sure having 18 DTs for a single board name is going to be
> really helpful.

Sorry I meant to write q8 not 18 :)

>It would be something to be supported by some quirks
> mechanism, instead of having to require the user to pick the right one.

Agreed, which is why I added a generic sun5i-a13-q8-tablet.dts, which
can then later be extended with quirks and such to get all the different
variants supported. Which I guess means that the contents of
sun5i-q8-common.dtsi can be folded into sun5i-a13-q8-tablet.dts, otoh
we may have some special cases which do require a separate dts and
having sun5i-q8-common.dtsi follows the same scheme as used for the
a23 / a33 tablets. In the future we should probably also add
sun8i-a23-q8-tablet.dts and sun8i-a33-q8-tablet.dts files and make
the existing ones just empty files with a single #include for
compatibility.

If possible I would like to at least have you queue up the default
sun5i-a13-q8-tablet.dts so that we've a dts file for a13 based tablets
which at least gets the basics going.

Either in its current form, or with it and sun5i-q8-common.dtsi
squashed together. If you want a squashed version let me know and
I'll do a resend.

Are you coming to ELCE ? I think the both of us should go to:

http://lceeu2015.sched.org/event/999c45c7fe78824a88269f35539c7e5c#.VfGcCLPYqlM

(Device Tree NG BoF) and try to hash out a solution for this there,
the quirks / variants stuff sounds good, but I wonder how far along
that is ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-05 14:55     ` Hans de Goede
@ 2015-09-18 19:38         ` Maxime Ripard
  -1 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-18 19:38 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> serial console, and PG0 for card-detect for mmc0.
> 
> This also adds pmic and otg support, which both use the same config on
> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> because pmic / otg support for sun8i has not yet been merged.
> 
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-18 19:38         ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-18 19:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> serial console, and PG0 for card-detect for mmc0.
> 
> This also adds pmic and otg support, which both use the same config on
> all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> because pmic / otg support for sun8i has not yet been merged.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150918/4c6e6f70/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 3/3] ARM: dts: sun5i: Add dts file for q8 formfactor a13 based tablets
  2015-09-05 14:55     ` Hans de Goede
@ 2015-09-18 19:41         ` Maxime Ripard
  -1 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-18 19:41 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

On Sat, Sep 05, 2015 at 04:55:53PM +0200, Hans de Goede wrote:
> This commits adds a generic dts file for q8 formfactor a13 based tablets.
> 
> The tablets ship in many variants, with the difference mainly being the
> touchscreen controller / accelerometer / wifi chip used.
> 
> The wifi is USB based, and thus not listed in devicetree.
> 
> The touchscreen controller / accelerometer may turn out to be a problem
> once we add support for those. We can either do something with devicetree
> overlays, or add sun5i-a13-<touchscreen>-<accelerometer>.dts files. The
> latter is what the android mod community is doing with firmware images.
> 
> This dts was tested with an a13 q8 tablet with a pcb labelled: "94V-0",
> silead gsl1680 touchscreen controller and a mc32x0 accelerometer.
> 
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Fixed the conflicts and applied. Please post the patches on top of the
current sunxi/for-next branch.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 3/3] ARM: dts: sun5i: Add dts file for q8 formfactor a13 based tablets
@ 2015-09-18 19:41         ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-18 19:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 05, 2015 at 04:55:53PM +0200, Hans de Goede wrote:
> This commits adds a generic dts file for q8 formfactor a13 based tablets.
> 
> The tablets ship in many variants, with the difference mainly being the
> touchscreen controller / accelerometer / wifi chip used.
> 
> The wifi is USB based, and thus not listed in devicetree.
> 
> The touchscreen controller / accelerometer may turn out to be a problem
> once we add support for those. We can either do something with devicetree
> overlays, or add sun5i-a13-<touchscreen>-<accelerometer>.dts files. The
> latter is what the android mod community is doing with firmware images.
> 
> This dts was tested with an a13 q8 tablet with a pcb labelled: "94V-0",
> silead gsl1680 touchscreen controller and a mc32x0 accelerometer.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Fixed the conflicts and applied. Please post the patches on top of the
current sunxi/for-next branch.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150918/65c184bd/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
  2015-09-10 15:05                 ` Hans de Goede
@ 2015-09-18 19:53                     ` Maxime Ripard
  -1 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-18 19:53 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3086 bytes --]

On Thu, Sep 10, 2015 at 05:05:39PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 09-09-15 16:01, Maxime Ripard wrote:
> >On Tue, Sep 08, 2015 at 11:26:51PM +0200, Hans de Goede wrote:
> >>Hi,
> >>
> >>On 09/08/2015 04:33 PM, Maxime Ripard wrote:
> >>>On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> >>>>This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> >>>>files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> >>>>serial console, and PG0 for card-detect for mmc0.
> >>>>
> >>>>This also adds pmic and otg support, which both use the same config on
> >>>>all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> >>>>because pmic / otg support for sun8i has not yet been merged.
> >>>>
> >>>>Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >>>
> >>>Are we going to have any user but the one you posted in the patch 3
> >>>planned?
> >>
> >>Depends on what I can get my hands on / what is in the post atm.
> >>
> >>One difference in fex files of different 18 variants is how the usb wifi is
> >>powered, either via a gpio or via ldo3. Also there are differences in which
> >>accelerometer is used, so eventually I expect there to be several users
> >>of this dtsi.
> >
> >But no difference in the SoC used (A13 vs A10s)?
> >
> >I'm not sure having 18 DTs for a single board name is going to be
> >really helpful.
> 
> Sorry I meant to write q8 not 18 :)
> 
> >It would be something to be supported by some quirks
> >mechanism, instead of having to require the user to pick the right one.
> 
> Agreed, which is why I added a generic sun5i-a13-q8-tablet.dts, which
> can then later be extended with quirks and such to get all the different
> variants supported. Which I guess means that the contents of
> sun5i-q8-common.dtsi can be folded into sun5i-a13-q8-tablet.dts, otoh
> we may have some special cases which do require a separate dts and
> having sun5i-q8-common.dtsi follows the same scheme as used for the
> a23 / a33 tablets. In the future we should probably also add
> sun8i-a23-q8-tablet.dts and sun8i-a33-q8-tablet.dts files and make
> the existing ones just empty files with a single #include for
> compatibility.
> 
> If possible I would like to at least have you queue up the default
> sun5i-a13-q8-tablet.dts so that we've a dts file for a13 based tablets
> which at least gets the basics going.
> 
> Either in its current form, or with it and sun5i-q8-common.dtsi
> squashed together. If you want a squashed version let me know and
> I'll do a resend.
> 
> Are you coming to ELCE ? I think the both of us should go to:
> 
> http://lceeu2015.sched.org/event/999c45c7fe78824a88269f35539c7e5c#.VfGcCLPYqlM
> 
> (Device Tree NG BoF) and try to hash out a solution for this there,
> the quirks / variants stuff sounds good, but I wonder how far along
> that is ?

I will be to the technical showcase, but we can always discuss with
Pantelis a bit later :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi
@ 2015-09-18 19:53                     ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2015-09-18 19:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 10, 2015 at 05:05:39PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 09-09-15 16:01, Maxime Ripard wrote:
> >On Tue, Sep 08, 2015 at 11:26:51PM +0200, Hans de Goede wrote:
> >>Hi,
> >>
> >>On 09/08/2015 04:33 PM, Maxime Ripard wrote:
> >>>On Sat, Sep 05, 2015 at 04:55:52PM +0200, Hans de Goede wrote:
> >>>>This is the sun5i / a13 version of sun8i-q8-common.dtsi for use in dts
> >>>>files for a13 q8 based tablets. Compared to sun8i this uses uart1 for the
> >>>>serial console, and PG0 for card-detect for mmc0.
> >>>>
> >>>>This also adds pmic and otg support, which both use the same config on
> >>>>all known q8 a13 devices. This is not present in sun5i-q8-common.dtsi
> >>>>because pmic / otg support for sun8i has not yet been merged.
> >>>>
> >>>>Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >>>
> >>>Are we going to have any user but the one you posted in the patch 3
> >>>planned?
> >>
> >>Depends on what I can get my hands on / what is in the post atm.
> >>
> >>One difference in fex files of different 18 variants is how the usb wifi is
> >>powered, either via a gpio or via ldo3. Also there are differences in which
> >>accelerometer is used, so eventually I expect there to be several users
> >>of this dtsi.
> >
> >But no difference in the SoC used (A13 vs A10s)?
> >
> >I'm not sure having 18 DTs for a single board name is going to be
> >really helpful.
> 
> Sorry I meant to write q8 not 18 :)
> 
> >It would be something to be supported by some quirks
> >mechanism, instead of having to require the user to pick the right one.
> 
> Agreed, which is why I added a generic sun5i-a13-q8-tablet.dts, which
> can then later be extended with quirks and such to get all the different
> variants supported. Which I guess means that the contents of
> sun5i-q8-common.dtsi can be folded into sun5i-a13-q8-tablet.dts, otoh
> we may have some special cases which do require a separate dts and
> having sun5i-q8-common.dtsi follows the same scheme as used for the
> a23 / a33 tablets. In the future we should probably also add
> sun8i-a23-q8-tablet.dts and sun8i-a33-q8-tablet.dts files and make
> the existing ones just empty files with a single #include for
> compatibility.
> 
> If possible I would like to at least have you queue up the default
> sun5i-a13-q8-tablet.dts so that we've a dts file for a13 based tablets
> which at least gets the basics going.
> 
> Either in its current form, or with it and sun5i-q8-common.dtsi
> squashed together. If you want a squashed version let me know and
> I'll do a resend.
> 
> Are you coming to ELCE ? I think the both of us should go to:
> 
> http://lceeu2015.sched.org/event/999c45c7fe78824a88269f35539c7e5c#.VfGcCLPYqlM
> 
> (Device Tree NG BoF) and try to hash out a solution for this there,
> the quirks / variants stuff sounds good, but I wonder how far along
> that is ?

I will be to the technical showcase, but we can always discuss with
Pantelis a bit later :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150918/a4d774dd/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-09-18 19:53 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-05 14:55 [PATCH 1/3] ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tablets Hans de Goede
2015-09-05 14:55 ` Hans de Goede
     [not found] ` <1441464953-26351-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-05 14:55   ` [PATCH 2/3] ARM: dts: sun5i: Add sun5i-q8-common.dtsi Hans de Goede
2015-09-05 14:55     ` Hans de Goede
     [not found]     ` <1441464953-26351-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-08 14:33       ` Maxime Ripard
2015-09-08 14:33         ` Maxime Ripard
2015-09-08 21:26         ` Hans de Goede
2015-09-08 21:26           ` Hans de Goede
     [not found]           ` <55EF529B.80401-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-09 14:01             ` Maxime Ripard
2015-09-09 14:01               ` Maxime Ripard
2015-09-10 15:05               ` Hans de Goede
2015-09-10 15:05                 ` Hans de Goede
     [not found]                 ` <55F19C43.2000601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-18 19:53                   ` Maxime Ripard
2015-09-18 19:53                     ` Maxime Ripard
2015-09-18 19:38       ` Maxime Ripard
2015-09-18 19:38         ` Maxime Ripard
2015-09-05 14:55   ` [PATCH 3/3] ARM: dts: sun5i: Add dts file for q8 formfactor a13 based tablets Hans de Goede
2015-09-05 14:55     ` Hans de Goede
     [not found]     ` <1441464953-26351-3-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-18 19:41       ` Maxime Ripard
2015-09-18 19:41         ` Maxime Ripard
2015-09-08 14:31   ` [PATCH 1/3] ARM: dts: sunxi: Add sun?i-q8-common.dtsi files for q8 tablets Maxime Ripard
2015-09-08 14:31     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.