Skip to contentSkip to conversation

arm64: dts: mediatek: mt8183: Switch to Elan touchscreen driver

PATCH RESEND In review Hsin-Te Yuan 2 participants 2 messages Jan 20, 2025 – Feb 20, 2025

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

PATCH RESEND v3 1/1 arm64: dts: mediatek: mt8183: Switch to Elan touchscreen driver

After commit 2be404486c05 ("HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of"), the i2c-hid-of driver used by some mt8183 devices resets the touchscreen without having enough post-reset delay. This makes those touchscreen fail to get probed.

Switch to Elan touchscreen driver, which has enough post-reset delay.

Fixes 2be404486c05 ("HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of")

---
After commit 2be404486c05 ("HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of"), i2c-hid-of driver resets the touchscreen without having proper post-reset delay on OF platform. From the commit message of that commit, not to decribe poset-reset delay in device tree is intended. Instead, describing the delay in platform data and changing to use specialized driver is more preferable solution.
---
Changes in v3:
- Remove patches related to the race condition of pinctrl since they are not needed anymore.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Add second source touchscreen patches since they should based on the first patch of this series.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts       | 9 +++------
 .../arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts | 8 ++------
 .../arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts | 8 ++------
 .../arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts | 8 ++------
 4 files changed, 9 insertions(+), 24 deletions(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts +3 -6
index 65860b33c01fe832f3a4b2e21d24ea6b4f0cba2b..b226dfee22669d596e5b45a7cc02133ee4aaa828 100644
@@ -14,16 +14,13 @@ / {
 };
 
 &touchscreen {
-	status = "okay";
+	compatible = "elan,ekth6a12nay";
 
-	compatible = "hid-over-i2c";
-	reg = <0x10>;
-	interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&touchscreen_pins>;
 
-	post-power-on-delay-ms = <10>;
-	hid-descr-addr = <0x0001>;
+	vcc33-supply = <&pp3300_alw>;
+	vccio-supply = <&pp1800_alw>;
 };
 
 &qca_wifi {
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dts +2 -6
index 72852b7600383972d98d9b0edd40b6e99e34a85b..863f3e403de8577da41b17b144cdb17c578b2027 100644
@@ -27,16 +27,12 @@ &cros_ec_pwm {
 };
 
 &touchscreen {
-	status = "okay";
+	compatible = "elan,ekth6a12nay";
 
-	compatible = "hid-over-i2c";
-	reg = <0x10>;
-	interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&touchscreen_pins>;
 
-	post-power-on-delay-ms = <10>;
-	hid-descr-addr = <0x0001>;
+	vcc33-supply = <&pp3300_alw>;
 };
 
 &qca_wifi {
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dts +2 -6
index 757d0afd14fb064fc1de4608e65eb1a561c4dfa6..e0a583ce4a0bb18095a77d23ab8409bb80898979 100644
@@ -14,16 +14,12 @@ / {
 };
 
 &touchscreen {
-	status = "okay";
+	compatible = "elan,ekth6a12nay";
 
-	compatible = "hid-over-i2c";
-	reg = <0x10>;
-	interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&touchscreen_pins>;
 
-	post-power-on-delay-ms = <10>;
-	hid-descr-addr = <0x0001>;
+	vcc33-supply = <&pp3300_alw>;
 };
 
 
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dts +2 -6
index 6641b087e7c5f3a957e43ac985137dfd84ac7878..7874c9a20e124c65ace3f90e2ec5bcaf59b69c40 100644
@@ -14,16 +14,12 @@ / {
 };
 
 &touchscreen {
-	status = "okay";
+	compatible = "elan,ekth6a12nay";
 
-	compatible = "hid-over-i2c";
-	reg = <0x10>;
-	interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&touchscreen_pins>;
 
-	post-power-on-delay-ms = <10>;
-	hid-descr-addr = <0x0001>;
+	vcc33-supply = <&pp3300_alw>;
 };
 
 

---
base-commit: eefa7a9c069908412f8f5d15833901d1b46ae1b2
change-id: 20241018-post-reset-ac66b0351613

Best regards,

Signature · 1 line
Hsin-Te Yuan <[email protected]>
#1 lore raw

Il 20/01/25 04:35, Hsin-Te Yuan ha scritto:

Quoted 9 lines

After commit 2be404486c05 ("HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of"), the i2c-hid-of driver used by some mt8183 devices resets the touchscreen without having enough post-reset delay. This makes those touchscreen fail to get probed.

Switch to Elan touchscreen driver, which has enough post-reset delay.

Fixes 2be404486c05 ("HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of")

Applied after fixing a merge issue.

Thanks!

Regards,
Angelo