Skip to contentSkip to conversation

ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts

PATCH New Hans de Goede 4 participants 29 messages Aug 8, 2016 – Aug 30, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/8 ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts

This results in quite a nice cleanup for this dts file.

As an added bonus this also enables full otg support. I've tested that this works as advertised.

---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 192 +------------------------------
 1 file changed, 1 insertion(+), 191 deletions(-)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +1 -191
index b2ce284..f27ebbb 100644
@@ -42,70 +42,18 @@
 
 /dts-v1/;
 #include "sun8i-a23.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-#include <dt-bindings/pwm/pwm.h>
+#include "sun8i-reference-design-tablet.dtsi"
 
 / {
 	model = "Allwinner GT90H Dual Core Tablet (v4)";
 	compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23";
-
-	aliases {
-		serial0 = &r_uart;
-	};
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pinctrl-names = "default";
-		pinctrl-0 = <&bl_en_pin_gt90h>;
-		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
-		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-		default-brightness-level = <8>;
-		enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
 };
 
 &ehci0 {
 	status = "okay";
 };
 
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
-};
-
-&i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
-};
-
 &lradc {
-	vref-supply = <&reg_vcc3v0>;
-	status = "okay";
-
-	button 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>;
-	};
-
 	button at 600 {
 		label = "Back";
 		linux,code = <KEY_BACK>;
@@ -114,144 +62,6 @@
 	};
 };
 
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>;
-	vmmc-supply = <&reg_aldo1>;
-	bus-width = <4>;
-	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
-	cd-inverted;
-	status = "okay";
-};
-
-&pio {
-	bl_en_pin_gt90h: bl_en_pin at 0 {
-		allwinner,pins = "PH6";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-	};
-
-	mmc0_cd_pin_gt90h: mmc0_cd_pin at 0 {
-		allwinner,pins = "PB4";
-		allwinner,function = "gpio_in";
-		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm0_pins>;
-	status = "okay";
-};
-
-&r_rsb {
-	status = "okay";
-
-	axp22x: pmic at 3a3 {
-		compatible = "x-powers,axp223";
-		reg = <0x3a3>;
-		interrupt-parent = <&nmi_intc>;
-		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		eldoin-supply = <&reg_dcdc1>;
-	};
-};
-
-&r_uart {
-	pinctrl-names = "default";
-	pinctrl-0 = <&r_uart_pins_a>;
-	status = "okay";
-};
-
-#include "axp22x.dtsi"
-
-&reg_aldo1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-io";
-};
-
-&reg_aldo2 {
-	regulator-always-on;
-	regulator-min-microvolt = <2350000>;
-	regulator-max-microvolt = <2650000>;
-	regulator-name = "vdd-dll";
-};
-
-&reg_aldo3 {
-	regulator-always-on;
-	regulator-min-microvolt = <2700000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-pll-avcc";
-};
-
-&reg_dc1sw {
-	regulator-name = "vcc-lcd";
-};
-
-&reg_dc5ldo {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpus";
-};
-
-&reg_dcdc1 {
-	regulator-always-on;
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
-	regulator-name = "vcc-3v0";
-};
-
-&reg_dcdc2 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-sys";
-};
-
-&reg_dcdc3 {
-	regulator-always-on;
-	regulator-min-microvolt = <900000>;
-	regulator-max-microvolt = <1400000>;
-	regulator-name = "vdd-cpu";
-};
-
-&reg_dcdc5 {
-	regulator-always-on;
-	regulator-min-microvolt = <1500000>;
-	regulator-max-microvolt = <1500000>;
-	regulator-name = "vcc-dram";
-};
-
-&reg_dldo1 {
-	regulator-min-microvolt = <3300000>;
-	regulator-max-microvolt = <3300000>;
-	regulator-name = "vcc-wifi";
-};
-
-&reg_rtc_ldo {
-	regulator-name = "vcc-rtc";
-};
-
-&simplefb_lcd {
-	vcc-lcd-supply = <&reg_dc1sw>;
-};
-
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp223 pmic on the board.
- *
- * Once we have axp223 support we should switch to fully supporting otg.
- */
-&usb_otg {
-	dr_mode = "host";
-	status = "okay";
-};
-
 &usbphy {
 	usb1_vbus-supply = <&reg_dldo1>;
-	status = "okay";
 };
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/8 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h

The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.

This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver).

---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +18 -0
index 6566032..de6269d 100644
@@ -47,6 +47,11 @@
 / {
 	model = "Allwinner GA10H Quad Core Tablet (v1.1)";
 	compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33";
+
+	aliases {
+		/* Make u-boot set mac-address for rtl8703as (no eeprom) */
+		ethernet0 = &rtl8703as;
+	};
 };
 
 &ehci0 {
@@ -62,6 +67,19 @@
 	};
 };
 
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_dldo1>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	rtl8703as: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};
+
 &ohci0 {
 	status = "okay";
 };
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/8 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h

Quoted 6 lines · Hans de Goede

The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.

This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver).

Does the chip or board support out of band interrupts?

#3 lore raw

PATCH 2/8 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h

Hi,

Quoted 11 lines · Chen-Yu Tsai
Quoted 6 lines · Hans de Goede

The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.

This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver).

Does the chip or board support out of band interrupts?

I believe so, but since the sunxi-mmc controller properly supports sdio-irq-s (without needing to poll) there is not to much to win there, so currently I've no plans to support this (this would require defining a dt binding + dts changes + driver changes).

Regards,

Hans

#4 lore raw

PATCH 3/8 ARM: dts: sun8i: reference-design-tablet: Add gsl1680 touchscreen node

In reply to Hans de Goede

Almost all sun8i tablets use a gsl1680 touchscreen controller, so add a node describing it to reference-design-tablet.dtsi.

Almost all, but not all, so mark it as disabled by default (dts files will also need to supply a firmware-name and resolution info).

---
 .../boot/dts/sun8i-reference-design-tablet.dtsi    | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi +28 -0
index 9d90361..f29897c 100644
@@ -63,6 +63,27 @@
 	};
 };
 
+&i2c0 {
+	/*
+	 * The gsl1680 is rated at 400KHz and it will not work reliable at
+	 * 100KHz, this has been confirmed on multiple different q8 tablets.
+	 * The gsl1680 is the only device on this bus.
+	 */
+	clock-frequency = <400000>;
+
+	gsl1680: touchscreen at 40 {
+		compatible = "silead,gsl1680";
+		reg = <0x40>;
+		interrupt-parent = <&pio>;
+		interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts_power_pin>;
+		power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+		/* Most tablets use this touchscreen, but not all */
+		status = "disabled";
+	};
+};
+
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
@@ -88,6 +109,13 @@
 		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 	};
 
+	ts_power_pin: ts_power_pin at 0 {
+		allwinner,pins = "PH1";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
 	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
 		allwinner,pins = "PH8";
 		allwinner,function = "gpio_in";
Signature · 1 line
2.7.4
#5 lore raw

PATCH 3/8 ARM: dts: sun8i: reference-design-tablet: Add gsl1680 touchscreen node

Quoted 7 lines · Hans de Goede

Almost all sun8i tablets use a gsl1680 touchscreen controller, so add a node describing it to reference-design-tablet.dtsi.

Almost all, but not all, so mark it as disabled by default (dts files will also need to supply a firmware-name and resolution info).

#6 lore raw

PATCH 3/8 ARM: dts: sun8i: reference-design-tablet: Add gsl1680 touchscreen node

In reply to Hans de Goede
Quoted 7 lines · Hans de Goede

Almost all sun8i tablets use a gsl1680 touchscreen controller, so add a node describing it to reference-design-tablet.dtsi.

Almost all, but not all, so mark it as disabled by default (dts files will also need to supply a firmware-name and resolution info).

Applied the first three patches, thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160822/dd6567ad/attachment.sig>
#7 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

In reply to Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +8 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";
+	touchscreen-size-x = <1792>;
+	touchscreen-size-y = <1024>;
+	status = "okay";
+};
+
 &lradc {
 	button at 600 {
 		label = "Back";
Signature · 1 line
2.7.4
#8 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Quoted 3 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

Quoted 9 lines
---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 57

Quoted 5 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +2 -0
@@ -53,6 +53,14 @@
        status = "okay";
 };
 
+&gsl1680 {
+       compatible = "silead,gsl3675";

The silead binding should be updated with all the other supported chips though. It currently only lists gsl1680.

Quoted 12 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +6 -1
+       touchscreen-fw-name = "silead/gsl3675-gt90h.fw";
+       touchscreen-size-x = <1792>;
+       touchscreen-size-y = <1024>;
+       status = "okay";
+};
+
 &lradc {
        button at 600 {
                label = "Back";
--

2.7.4

#9 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Hi,

Quoted 19 lines · Chen-Yu Tsai
Quoted 3 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

Quoted 12 lines
---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
        status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 57

Quoted 2 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +2 -0
+&gsl1680 {
+       compatible = "silead,gsl3675";

The silead binding should be updated with all the other supported chips though. It currently only lists gsl1680.

Good point. I've just send out a patch adding them.

Regards,

Hans

Quoted 13 lines
Quoted 13 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +6 -1
+       touchscreen-fw-name = "silead/gsl3675-gt90h.fw";
+       touchscreen-size-x = <1792>;
+       touchscreen-size-y = <1024>;
+       status = "okay";
+};
+
 &lradc {
        button at 600 {
                label = "Back";
--

2.7.4

#10 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

In reply to Hans de Goede
Quoted 12 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 6 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Rob, is that even allowed?

Thanks,
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160822/985c1496/attachment.sig>
#11 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

Regards,

Hans

#12 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

23.08.2016, 03:08, "Hans de Goede" <[email protected]>:

Quoted 32 lines

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

?The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

?Signed-off-by: Hans de Goede <[email protected]> ?--- ??arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++ ??1 file changed, 8 insertions(+)

?diff --git a/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts b/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts ?index f27ebbb..da55b5a 100644
?--- a/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
?+++ b/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
?@@ -53,6 +53,14 @@
??????????status = "okay";
??};

Quoted 5 lines
Quoted 3 lines

?+&gsl1680 {
?+ compatible = "silead,gsl3675";
?+ touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

?That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

I do think it's a mixture of executable MCU codes and data. The GSL1680 datasheet indicates that there's a 32-bit MCU in it.

Quoted 9 lines

Regards,

Hans

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#13 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

In reply to Hans de Goede
Quoted 32 lines · Hans de Goede

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++

1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

It's not really the firmware itself that I find suspicious, but more the encoding of a path to a file in the DT, especially when you can apparently derive it from other informations already found in the DT (<vendor>/<compatible>-<board>.fw)

Thanks,
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160823/d2bd5ec5/attachment.sig>
#14 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Hi,

Quoted 40 lines · Maxime Ripard
Quoted 32 lines · Hans de Goede

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++

1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

Quoted 2 lines

It's not really the firmware itself that I find suspicious, but more the encoding of a path to a file in the DT,

It is not a path it is a filename. We could drop the "silead/" prefix and put that in the driver instead to really make it a filename.

Quoted 3 lines

especially when you can
apparently derive it from other informations already found in the DT (<vendor>/<compatible>-<board>.fw)

That will not work, sometimes different boards use the same digitizer and thus the same firmware. Also in case of the q8 tablets, we need different firmware for different variants (this is to be dealt with by the q8-hardware-manager I'm working on), since although they all use the same digitizer they do not wire it up to the controllers pins the same in all models, so we need different firmware files corresponding to different wirings.

TL;DR: There is no 1:1 mapping between board and the firmware filename.

Also note that this is not the first driver to introduce a firmware filename in a dts binding, a quick grep shows at least:

Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt

Also does this, as well as several dt-bindings where board specific firmware gets embedded in the device tree itself.

Regards,

Hans

#15 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Quoted 61 lines · Hans de Goede

Hi,

Quoted 40 lines · Maxime Ripard
Quoted 32 lines · Hans de Goede

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++

1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

Quoted 2 lines

It's not really the firmware itself that I find suspicious, but more the encoding of a path to a file in the DT,

It is not a path it is a filename. We could drop the "silead/" prefix and put that in the driver instead to really make it a filename.

Quoted 3 lines

especially when you can
apparently derive it from other informations already found in the DT (<vendor>/<compatible>-<board>.fw)

That will not work, sometimes different boards use the same digitizer and thus the same firmware. Also in case of the q8 tablets, we need different firmware for different variants (this is to be dealt with by the q8-hardware-manager I'm working on), since although they all use the same digitizer they do not wire it up to the controllers pins the same in all models, so we need different firmware files corresponding to different wirings.

Quoted 1 line

TL;DR: There is no 1:1 mapping between board and the firmware filename.

The point still holds. It's exactly the same case than the broadcom nvram filename discussion, and it raised the same issues.

Quoted 7 lines

Also note that this is not the first driver to introduce a firmware filename in a dts binding, a quick grep shows at least:

Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt

Also does this, as well as several dt-bindings where board specific firmware gets embedded in the device tree itself.

Which has never been acked by any of the DT maintainers.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160823/c52468b4/attachment.sig>
#16 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Hi,

Quoted 62 lines · Maxime Ripard
Quoted 61 lines · Hans de Goede

Hi,

Quoted 40 lines · Maxime Ripard
Quoted 32 lines · Hans de Goede

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++

1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

Quoted 2 lines

It's not really the firmware itself that I find suspicious, but more the encoding of a path to a file in the DT,

It is not a path it is a filename. We could drop the "silead/" prefix and put that in the driver instead to really make it a filename.

Quoted 3 lines

especially when you can
apparently derive it from other informations already found in the DT (<vendor>/<compatible>-<board>.fw)

That will not work, sometimes different boards use the same digitizer and thus the same firmware. Also in case of the q8 tablets, we need different firmware for different variants (this is to be dealt with by the q8-hardware-manager I'm working on), since although they all use the same digitizer they do not wire it up to the controllers pins the same in all models, so we need different firmware files corresponding to different wirings.

Quoted 4 lines
Quoted 1 line

TL;DR: There is no 1:1 mapping between board and the firmware filename.

The point still holds. It's exactly the same case than the broadcom nvram filename discussion, and it raised the same issues.

No it is not, in this case we also want to be able to specify different fw names on devices using the same base dts, here is a tablet for all the q8 tablets with gsl1680 I've:

a13-94v-0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a13-tzx-713b-v2.1: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-q8h-v3: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a23-tj-a23-q88-v4.0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-tw-ao721-v41: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a23-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-tzx-723q4: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640 inverted-x
a33-q8-v2.4-1118: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640
a33-q8h-v1.5: b482 a33-q8h-v1.5/GSL1688_A70_FW.fw 960x640

I'm working on a q8hardware-mgr (inspired by the beagle bone cape mgr) to automatically detect the touchscreen controller as well as the controller id (the 2nd column above), and it will need to set a filename for the firmware file based on this, deriving this from the machine compatible will simply not work here.

Regards,

Hans

#17 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Quoted 65 lines · Hans de Goede

Hi,

Quoted 62 lines · Maxime Ripard
Quoted 61 lines · Hans de Goede

Hi,

Quoted 40 lines · Maxime Ripard
Quoted 32 lines · Hans de Goede

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++

1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

Quoted 2 lines

It's not really the firmware itself that I find suspicious, but more the encoding of a path to a file in the DT,

It is not a path it is a filename. We could drop the "silead/" prefix and put that in the driver instead to really make it a filename.

Quoted 3 lines

especially when you can
apparently derive it from other informations already found in the DT (<vendor>/<compatible>-<board>.fw)

That will not work, sometimes different boards use the same digitizer and thus the same firmware. Also in case of the q8 tablets, we need different firmware for different variants (this is to be dealt with by the q8-hardware-manager I'm working on), since although they all use the same digitizer they do not wire it up to the controllers pins the same in all models, so we need different firmware files corresponding to different wirings.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

TL;DR: There is no 1:1 mapping between board and the firmware filename.

The point still holds. It's exactly the same case than the broadcom nvram filename discussion, and it raised the same issues.

No it is not, in this case we also want to be able to specify different fw names on devices using the same base dts, here is a tablet for all the q8 tablets with gsl1680 I've:

At least two other dev told you exactly that in that thread though:
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/439978.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/440024.html

Quoted 12 lines

a13-94v-0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a13-tzx-713b-v2.1: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-q8h-v3: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a23-tj-a23-q88-v4.0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-tw-ao721-v41: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a23-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-tzx-723q4: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640 inverted-x
a33-q8-v2.4-1118: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640
a33-q8h-v1.5: b482 a33-q8h-v1.5/GSL1688_A70_FW.fw 960x640

Quoted 5 lines

I'm working on a q8hardware-mgr (inspired by the beagle bone cape mgr) to automatically detect the touchscreen controller as well as the controller id (the 2nd column above), and it will need to set a filename for the firmware file based on this, deriving this from the machine compatible will simply not work here.

I'm not sure why we need to stick to some insane naming scheme. Or why can't we use symlinks.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160826/a8242ec7/attachment.sig>
#18 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Hi,

Quoted 71 lines · Maxime Ripard
Quoted 70 lines · Hans de Goede

Hi,

Quoted 66 lines · Maxime Ripard
Quoted 61 lines · Hans de Goede

Hi,

Quoted 40 lines · Maxime Ripard
Quoted 32 lines · Hans de Goede

Hi,

Quoted 16 lines · Maxime Ripard
Quoted 15 lines · Hans de Goede

The gt90h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 8 ++++++++

1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +0 -0
index f27ebbb..da55b5a 100644
@@ -53,6 +53,14 @@
 	status = "okay";
 };
 
Quoted 5 lines

arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts line 58

Quoted 3 lines
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +3 -0
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-gt90h.fw";

That's not documented anywhere, and looks really suspicious.

Ugh, that should have been in:

Documentation/devicetree/bindings/input/touchscreen/silead_gsl1680.txt

But somehow it is not (I believe it was there in earlier revisions of the patch), I'll send a patch to fix this.

Quoted 6 lines

About it being suspicious, this is not really firmware it is a bunch of configuration data / lookup tables for the controller which tell it in which order the touchscreen horizontal / vertical sensor lines are connected to its sense pins, and what values to send for finger x% between line z and line z+1, which differs per tablet model, since not all tablets use the same digitizer.

Quoted 2 lines

It's not really the firmware itself that I find suspicious, but more the encoding of a path to a file in the DT,

It is not a path it is a filename. We could drop the "silead/" prefix and put that in the driver instead to really make it a filename.

Quoted 3 lines

especially when you can
apparently derive it from other informations already found in the DT (<vendor>/<compatible>-<board>.fw)

That will not work, sometimes different boards use the same digitizer and thus the same firmware. Also in case of the q8 tablets, we need different firmware for different variants (this is to be dealt with by the q8-hardware-manager I'm working on), since although they all use the same digitizer they do not wire it up to the controllers pins the same in all models, so we need different firmware files corresponding to different wirings.

Quoted 1 line

TL;DR: There is no 1:1 mapping between board and the firmware filename.

The point still holds. It's exactly the same case than the broadcom nvram filename discussion, and it raised the same issues.

Quoted 7 lines
Quoted 3 lines

No it is not, in this case we also want to be able to specify different fw names on devices using the same base dts, here is a tablet for all the q8 tablets with gsl1680 I've:

At least two other dev told you exactly that in that thread though:
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/439978.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/440024.html

That is a different scenario / different mail thread, I agree that the solution proposed there should work for the brcmfmac driver.

But that is _not_ what we're discussing here.

Quoted 11 lines
Quoted 11 lines

a13-94v-0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a13-tzx-713b-v2.1: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-q8h-v3: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a23-tj-a23-q88-v4.0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-tw-ao721-v41: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a23-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-tzx-723q4: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640 inverted-x
a33-q8-v2.4-1118: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640
a33-q8h-v1.5: b482 a33-q8h-v1.5/GSL1688_A70_FW.fw 960x640

Quoted 8 lines
Quoted 5 lines

I'm working on a q8hardware-mgr (inspired by the beagle bone cape mgr) to automatically detect the touchscreen controller as well as the controller id (the 2nd column above), and it will need to set a filename for the firmware file based on this, deriving this from the machine compatible will simply not work here.

I'm not sure why we need to stick to some insane naming scheme. Or why can't we use symlinks.

All the above tablets use the same dts file (sun5i-a13-q8-tablet.dts, sun8i-a23-q8-tablet.dts, sun8i-a33-q8-tablet.dts) while not having the same touchscreen, as discussed in the past I'm working on a kernel module to detect which touchscreen is in use and then automatically update the dt using dynamic-devicetree since creating a separate dt file for each variant is madness (there is a new revision every few weeks).

I already have this sort of working and I can detect if a tablet has a gsl1680 touchscreen (*) and if it is the a082 or b482 variant. Now we could encode the chip-id (the a082/b482) in the firmware name at the driver level, but that is still not good enough, e.g. these 2 tablets:

a23-q8h-v3: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a23-tj-a23-q88-v4.0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600

Both use a a082 revision gsl1680 but need different firmware files, since they both use sun8i-a23-q8-tablet.dts, so simply embedding the machine compatible string in the filename passed to request_firmware is not going to help.

I hope to get permission to get these firmware files added to linux-firmware and then the different files need unique names, and we need a way to specify in devicetree which file to load.

We can do some weird indirect dance but that is not really helpful, esp. since I also expect users to need to override which firmware file gets used in certain cases and in that scenario simply specifying the filename certainly is the most userfriendly.

TL;DR: we need a way to specify which firmware needs to be loaded and this CANNOT be derived from the machine compatible as devices with the same machine compatible need different firmwares.

Regards,

Hans

*) Not all a13/a23/a33 tablets have a gsl1680 touchscreen, I'm also working on detecting other controllers

#19 lore raw

PATCH 4/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h

Quoted 52 lines · Hans de Goede
Quoted 11 lines
Quoted 11 lines

a13-94v-0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a13-tzx-713b-v2.1: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-q8h-v3: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a23-tj-a23-q88-v4.0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600
a23-tw-ao721-v41: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600 inverted-x
a23-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-ippo-q8h-v1.2: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a33-tzx-723q4: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640 inverted-x
a33-q8-v2.4-1118: b482 a33-Q8_V2.4_1118/GSL1680_FW_D702.fw 960x640
a33-q8h-v1.5: b482 a33-q8h-v1.5/GSL1688_A70_FW.fw 960x640

Quoted 8 lines
Quoted 5 lines

I'm working on a q8hardware-mgr (inspired by the beagle bone cape mgr) to automatically detect the touchscreen controller as well as the controller id (the 2nd column above), and it will need to set a filename for the firmware file based on this, deriving this from the machine compatible will simply not work here.

I'm not sure why we need to stick to some insane naming scheme. Or why can't we use symlinks.

All the above tablets use the same dts file (sun5i-a13-q8-tablet.dts, sun8i-a23-q8-tablet.dts, sun8i-a33-q8-tablet.dts) while not having the same touchscreen, as discussed in the past I'm working on a kernel module to detect which touchscreen is in use and then automatically update the dt using dynamic-devicetree since creating a separate dt file for each variant is madness (there is a new revision every few weeks).

I already have this sort of working and I can detect if a tablet has a gsl1680 touchscreen (*) and if it is the a082 or b482 variant. Now we could encode the chip-id (the a082/b482) in the firmware name at the driver level, but that is still not good enough, e.g. these 2 tablets:

a23-q8h-v3: a082 a23-tj-a23-q88-v4.0_20140815/GSL1688_A70_FW.fw 800x480 swapped-x-y
a23-tj-a23-q88-v4.0: a082 a23-tj-a23-q88-v4.0_20140815/GSL1680E_700_FW.fw 1024x600

Both use a a082 revision gsl1680 but need different firmware files, since they both use sun8i-a23-q8-tablet.dts, so simply embedding the machine compatible string in the filename passed to request_firmware is not going to help.

I hope to get permission to get these firmware files added to linux-firmware and then the different files need unique names, and we need a way to specify in devicetree which file to load.

We can do some weird indirect dance but that is not really helpful, esp. since I also expect users to need to override which firmware file gets used in certain cases and in that scenario simply specifying the filename certainly is the most userfriendly.

Quoted 4 lines

TL;DR: we need a way to specify which firmware needs to be loaded and this CANNOT be derived from the machine compatible as devices with the same machine compatible need different firmwares.

You convinced me. Let's see Rob's answer, on your new serie, but since it's what he suggested, that should be ok.

I'll merge it as soon as he's ok with it.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160830/c4eace1c/attachment.sig>
#20 lore raw

PATCH 5/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-inet86dz

In reply to Hans de Goede

The inet86dz tablet has a gsl1680 touchscreen,
add a dt node describing it.

---
 arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sun8i-a23-inet86dz.dts +7 -0
index 0f9f71b..9972021 100644
@@ -53,6 +53,13 @@
 	status = "okay";
 };
 
+&gsl1680 {
+	touchscreen-size-x = <960>;
+	touchscreen-size-y = <640>;
+	touchscreen-fw-name = "silead/gsl1680-inet86dz.fw";
+	status = "okay";
+};
+
 &usbphy {
 	usb1_vbus-supply = <&reg_dldo1>;
 };
Signature · 1 line
2.7.4
#22 lore raw

PATCH 6/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03

In reply to Hans de Goede

Add a node enabling the gsl1680 touchscreen controller found on sun8i-a23-polaroid-mid2407pxe03 tablets.

---
 arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts +17 -0
index e300442..cd64fd61 100644
@@ -48,3 +48,20 @@
 	model = "Polaroid MID2407PXE03 tablet";
 	compatible = "polaroid,mid2407pxe03", "allwinner,sun8i-a23";
 };
+
+&gsl1680 {
+	touchscreen-size-x = <960>;
+	touchscreen-size-y = <640>;
+	touchscreen-inverted-x;
+	touchscreen-inverted-y;
+	touchscreen-fw-name = "silead/gsl1680-polaroid-mid2407pxe03.fw";
+	status = "okay";
+};
+
+&reg_ldo_io1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-touchscreen";
+	status = "okay";
+};
Signature · 1 line
2.7.4
#23 lore raw

PATCH 6/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03

Hi,

Quoted 23 lines · Hans de Goede

Add a node enabling the gsl1680 touchscreen controller found on sun8i-a23-polaroid-mid2407pxe03 tablets.

---
 arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts +7 -0
index e300442..cd64fd61 100644
@@ -48,3 +48,20 @@
        model = "Polaroid MID2407PXE03 tablet";
        compatible = "polaroid,mid2407pxe03", "allwinner,sun8i-a23";
 };
+
+&gsl1680 {
+       touchscreen-size-x = <960>;
+       touchscreen-size-y = <640>;
+       touchscreen-inverted-x;
+       touchscreen-inverted-y;
+       touchscreen-fw-name = "silead/gsl1680-polaroid-mid2407pxe03.fw";

arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts line 67

Quoted 10 lines
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts +10 -0
+       status = "okay";
+};
+
+&reg_ldo_io1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-touchscreen";
+       status = "okay";
+};

This looks good, but it would be better if the touchscreen node took the regulator as a supply.

Regards
ChenYu

#24 lore raw

PATCH 7/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2809pxe04

In reply to Hans de Goede

Add a node enabling the gsl3670 touchscreen controller found on sun8i-a23-polaroid-mid2809pxe04 tablets.

---
 arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts +8 -0
index 6d06e24..70d9339 100644
@@ -48,3 +48,11 @@
 	model = "Polaroid MID2809PXE04 tablet";
 	compatible = "polaroid,mid2809pxe04", "allwinner,sun8i-a23";
 };
+
+&gsl1680 {
+	compatible = "silead,gsl3670";
+	touchscreen-fw-name = "silead/gsl3670-polaroid-mid2809pxe04.fw";
+	touchscreen-size-x = <1660>;
+	touchscreen-size-y = <890>;
+	status = "okay";
+};
Signature · 1 line
2.7.4
#26 lore raw

PATCH 8/8 ARM: dts: sun8i: Add touchscreen node for sun8i-a33-ga10h

In reply to Hans de Goede

The ga10h tablet has a gsl3675 touchscreen, add a dt node describing it.

---
 arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +9 -0
index de6269d..2fea1af 100644
@@ -58,6 +58,15 @@
 	status = "okay";
 };
 
+&gsl1680 {
+	compatible = "silead,gsl3675";
+	touchscreen-fw-name = "silead/gsl3675-ga10h.fw";
+	touchscreen-size-x = <1630>;
+	touchscreen-size-y = <990>;
+	touchscreen-inverted-y;
+	status = "okay";
+};
+
 &lradc {
 	button at 600 {
 		label = "Back";
Signature · 1 line
2.7.4