Skip to contentSkip to conversation

Introduce Samsung S6SY761 (Google Pixel 3 XL) touchscreen.

PATCH In review Marco Mattiolo 4 participants 13 messages Dec 4 – Dec 5

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

cover Introduce Samsung S6SY761 (Google Pixel 3 XL) touchscreen.

Includes refactoring of the existing S6SY761 driver to support reset and mode-switch pins. S6SY761 driver is already used by the Galaxy S9 (Korea version, sdm845-samsung-starqltechn) and a few others.

Patch 4 includes touchscreen support for blueline (Google Pixel 3).

Applied and built on top of sdm845-next-20261120, successfully tested on the relevant Google Pixel 3 XL (google-crosshatch) device.

---
Marco Mattiolo (5):
dt-bindings: input: touchscreen: samsung,s6sy761: Introduce reset and mode-switch GPIOs
Input: s6sy761 - Add optional reset GPIO support
Input: s6sy761 - Add mode-switch support
arm64: dts: qcom: sdm845-google: Group touchscreen pins, add mode-switch pin
arm64: dts: qcom: sdm845-google-crosshatch: Add touchscreen support

 .../input/touchscreen/samsung,s6sy761.yaml         | 10 +++++++
 .../arm64/boot/dts/qcom/sdm845-google-blueline.dts | 19 ++++++++++++-
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 31 ++++++++++++++--------
 .../boot/dts/qcom/sdm845-google-crosshatch.dts     | 23 +++++++++++++---
 drivers/input/touchscreen/s6sy761.c                | 22 +++++++++++++++
 5 files changed, 90 insertions(+), 15 deletions(-)

---
base-commit: e5aad2bdbbee783611d32599f89cea3f12f9593d
change-id: 20261204-crosshatch_touchscreen-64a3a45f32f1

Best regards,

Signature · 1 line
Marco Mattiolo <[email protected]>
#1 lore raw

PATCH 1/5 dt-bindings: input: touchscreen: samsung,s6sy761: Introduce reset and mode-switch GPIOs

Pixel 3 XL (google-crosshatch) features this touchscreen using reset and mode-switch GPIO pins.

---
 .../devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml +10 -0
index 1ffd17af3c53..6f9af51d8461 100644
@@ -25,6 +25,16 @@ properties:
   avdd-supply: true
   vdd-supply: true
 
+  reset-gpios:
+    description: Reset GPIO (active-low)
+    maxItems: 1
+
+  mode-switch-gpios:
+    description:
+      Selects the I2C bus master on boards that share the touch bus between
+      the AP and the SLPI sensor DSP. Asserted gives the bus to the AP.
+    maxItems: 1
+
 unevaluatedProperties: false
 
 required:
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH 1/5] dt-bindings: input: touchscreen: samsung,s6sy761: Introduce reset and mode-switch GPIOs

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] dt-bindings: samsung,s6sy761: board I2C bus switch modeled in slave binding --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] dt-bindings: samsung,s6sy761: board I2C bus switch modeled in slave binding
--

commit e01649d8dd942787fd1b897cbaadc40016274910
Author: Marco Mattiolo <[email protected]>

dt-bindings: input: touchscreen: samsung,s6sy761: Introduce reset and mode-switch GPIOs

This commit adds optional reset-gpios and mode-switch-gpios properties to the Samsung S6SY761 touchscreen Devicetree binding.

Quoted 7 lines
Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml +0 -0
index 1ffd17af3c53f..6f9af51d8461b 100644
@@ -25,6 +25,16 @@ properties:
   avdd-supply: true
   vdd-supply: true

Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml properties: · line 36

Quoted 10 lines
Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml +9 -0
 
+  reset-gpios:
+    description: Reset GPIO (active-low)
+    maxItems: 1
+
+  mode-switch-gpios:
+    description:
+      Selects the I2C bus master on boards that share the touch bus between
+      the AP and the SLPI sensor DSP. Asserted gives the bus to the AP.
+    maxItems: 1

[Severity: Medium]
Should mode-switch-gpios be part of the Samsung S6SY761 client binding? An I2C slave touchscreen controller does not have a pin that selects its own external bus master; physically this GPIO drives a board-level switch between the AP and SLPI I2C controllers.

Adding it here creates permanent DT ABI for external board hardware and forces every touchscreen binding behind this switch to duplicate a non-chip pin (as in st,stmfts.yaml for Pixel 3), while hiding bus topology, settle timing, and SLPI arbitration from the I2C core.

Could this bus switch be modeled at the I2C bus or board level instead, for example via i2c-mux-gpio.yaml, i2c-arb-gpio-challenge.yaml, or a gpio-hog if Linux statically owns the bus?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer
#3 lore raw

Re: [PATCH 1/5] dt-bindings: input: touchscreen: samsung,s6sy761: Introduce reset and mode-switch GPIOs

In reply to Marco Mattiolo

Hi Marco,

Quoted 18 lines · On Fri, Dec 04, 2026 at 11:13:12PM +0100, Marco Mattiolo via B4 Relay wrote:

From: Marco Mattiolo <[email protected]>

Pixel 3 XL (google-crosshatch) features this touchscreen using reset and mode-switch GPIO pins.

---
 .../devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml +0 -0
index 1ffd17af3c53..6f9af51d8461 100644
@@ -25,6 +25,16 @@ properties:
   avdd-supply: true
   vdd-supply: true

Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml properties: · line 36

Quoted 10 lines
Documentation/devicetree/bindings/input/touchscreen/samsung,s6sy761.yaml +9 -0
 
+  reset-gpios:
+    description: Reset GPIO (active-low)
+    maxItems: 1
+
+  mode-switch-gpios:
+    description:
+      Selects the I2C bus master on boards that share the touch bus between
+      the AP and the SLPI sensor DSP. Asserted gives the bus to the AP.
+    maxItems: 1

Does this really belong to the touch controller binding? This seems a board quirk, completely independent from the touch controller.

Maybe pinctrl can be leveraged here somehow?

Thanks.

Signature · 1 line
Dmitry
#4 lore raw

PATCH 2/5 Input: s6sy761 - Add optional reset GPIO support

In reply to Marco Mattiolo

Add support for an optional "reset-gpios" property. If present, the controller is held in reset from probe until its supplies are enabled, released before the existing 140 ms boot wait, and put back into reset before the supplies are disabled.

---
 drivers/input/touchscreen/s6sy761.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/input/touchscreen/s6sy761.c +11 -0
index c6cc5cba577a..5972a3194a7d 100644
@@ -6,6 +6,7 @@
 
 #include <linux/unaligned.h>
 #include <linux/delay.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/input/mt.h>
 #include <linux/input/touchscreen.h>
@@ -102,6 +103,7 @@ struct s6sy761_data {
 	struct i2c_client *client;
 	struct regulator_bulk_data regulators[2];
 	struct input_dev *input;
+	struct gpio_desc *reset_gpio;
 	struct touchscreen_properties prop;
 
 	u8 data[S6SY761_EVENT_SIZE * S6SY761_EVENT_COUNT];
@@ -301,6 +303,8 @@ static int s6sy761_power_on(struct s6sy761_data *sdata)
 	if (ret)
 		return ret;
 
+	/* release the optional reset line, then wait for the boot */
+	gpiod_set_value_cansleep(sdata->reset_gpio, 0);
 	msleep(140);
 
 	/* double check whether the touch is functional */
@@ -395,6 +399,7 @@ static void s6sy761_power_off(void *data)
 	if (!sdata->powered_up)
 		return;
 
+	gpiod_set_value_cansleep(sdata->reset_gpio, 1);
 	regulator_bulk_disable(ARRAY_SIZE(sdata->regulators), sdata->regulators);
 	sdata->powered_up = false;
 }
@@ -425,6 +430,12 @@ static int s6sy761_probe(struct i2c_client *client)
 	if (err)
 		return err;
 
+	sdata->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
+						    GPIOD_OUT_HIGH);
+	if (IS_ERR(sdata->reset_gpio))
+		return dev_err_probe(&client->dev, PTR_ERR(sdata->reset_gpio),
+				     "Failed to get reset GPIO\n");
+
 	err = devm_add_action_or_reset(&client->dev, s6sy761_power_off, sdata);
 	if (err)
 		return err;
Signature · 1 line
2.53.0
#5 lore raw

Re: [PATCH 2/5] Input: s6sy761 - Add optional reset GPIO support

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] input: s6sy761_power_on() omits reset re-assertion on error path --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] input: s6sy761_power_on() omits reset re-assertion on error path
--

commit 1fec0c9d8f9e59834ae02a3e0d9d0500c3097ede
Author: Marco Mattiolo <[email protected]>

Input: s6sy761 - Add optional reset GPIO support

This commit adds optional reset GPIO handling to the s6sy761 touchscreen driver, requesting the GPIO asserted during probe, releasing it after enabling regulators in s6sy761_power_on(), and re-asserting it before disabling regulators in s6sy761_power_off().

Quoted 4 lines
drivers/input/touchscreen/s6sy761.c +0 -0
index c6cc5cba577a1..5972a3194a7dc 100644

[ ... ]

drivers/input/touchscreen/s6sy761.c static int s6sy761_power_on(struct s6sy761_data *sdata) · line 310

Quoted 9 lines
drivers/input/touchscreen/s6sy761.c +2 -0
@@ -301,6 +303,8 @@ static int s6sy761_power_on(struct s6sy761_data *sdata)
 	if (ret)
 		return ret;
 
+	/* release the optional reset line, then wait for the boot */
+	gpiod_set_value_cansleep(sdata->reset_gpio, 0);
 	msleep(140);
 
 	/* double check whether the touch is functional */

[Severity: Medium]
Should the err_disable_regulators path in s6sy761_power_on() re-assert sdata->reset_gpio before calling regulator_bulk_disable()?

If a subsequent I2C or boot-status check fails, disabling the supplies with sdata->reset_gpio still deasserted risks back-powering the controller. Because sdata->powered_up stays false, s6sy761_power_off() returns early on probe unwind or suspend and never re-asserts it either.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#6 lore raw

PATCH 3/5 Input: s6sy761 - Add mode-switch support

In reply to Marco Mattiolo

On the Pixel 3 XL the touch I2C bus can be driven either by the AP or by the SLPI sensor DSP, selected by a GPIO. Take the optional "mode-switch-gpios" line and assert it at probe, before the first I2C access, so the AP owns the bus. Handing the bus back to the SLPI for low-power touch is not supported.

---
 drivers/input/touchscreen/s6sy761.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/input/touchscreen/s6sy761.c +11 -0
index 5972a3194a7d..7f2730e30699 100644
@@ -407,6 +407,7 @@ static void s6sy761_power_off(void *data)
 static int s6sy761_probe(struct i2c_client *client)
 {
 	struct s6sy761_data *sdata;
+	struct gpio_desc *gpiod;
 	unsigned int max_x, max_y;
 	int err;
 
@@ -436,6 +437,16 @@ static int s6sy761_probe(struct i2c_client *client)
 		return dev_err_probe(&client->dev, PTR_ERR(sdata->reset_gpio),
 				     "Failed to get reset GPIO\n");
 
+	/*
+	 * Some boards share the touch I2C bus between the AP and the SLPI
+	 * sensor DSP; make the AP the bus master before talking to the chip.
+	 */
+	gpiod = devm_gpiod_get_optional(&client->dev, "mode-switch",
+					GPIOD_OUT_HIGH);
+	if (IS_ERR(gpiod))
+		return dev_err_probe(&client->dev, PTR_ERR(gpiod),
+				     "Failed to get mode-switch GPIO\n");
+
 	err = devm_add_action_or_reset(&client->dev, s6sy761_power_off, sdata);
 	if (err)
 		return err;
Signature · 1 line
2.53.0
#7 lore raw

Re: [PATCH 3/5] Input: s6sy761 - Add mode-switch support

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] Input: s6sy761: s6sy761_power_on() leaves reset deasserted on error --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] Input: s6sy761: s6sy761_power_on() leaves reset deasserted on error
--

commit 038329598e92eec17f68c862bc567c93b4e723cc
Author: Marco Mattiolo <[email protected]>

Input: s6sy761 - Add mode-switch support

This commit adds support for an optional mode-switch GPIO in the s6sy761 touchscreen driver and asserts it during probe so the AP owns the touch I2C bus before the first I2C access.

Quoted 4 lines
drivers/input/touchscreen/s6sy761.c +0 -0
index 5972a3194a7dc..7f2730e306999 100644

[ ... ]

Quoted 7 lines
drivers/input/touchscreen/s6sy761.c +3 -0
@@ -436,6 +437,16 @@ static int s6sy761_probe(struct i2c_client *client)
 		return dev_err_probe(&client->dev, PTR_ERR(sdata->reset_gpio),
 				     "Failed to get reset GPIO\n");
 
+	/*
+	 * Some boards share the touch I2C bus between the AP and the SLPI
+	 * sensor DSP; make the AP the bus master before talking to the chip.

drivers/input/touchscreen/s6sy761.c static int s6sy761_probe(struct i2c_client *client) · line 452

Quoted 10 lines
drivers/input/touchscreen/s6sy761.c +7 -0
+	 */
+	gpiod = devm_gpiod_get_optional(&client->dev, "mode-switch",
+					GPIOD_OUT_HIGH);
+	if (IS_ERR(gpiod))
+		return dev_err_probe(&client->dev, PTR_ERR(gpiod),
+				     "Failed to get mode-switch GPIO\n");
+
 	err = devm_add_action_or_reset(&client->dev, s6sy761_power_off, sdata);
 	if (err)
 		return err;

[Severity: Medium]
In commit "Input: s6sy761 - Add optional reset GPIO support", does s6sy761_power_on() leave sdata->reset_gpio deasserted on error?

drivers/input/touchscreen/s6sy761.c:s6sy761_power_on() {
	...
	gpiod_set_value_cansleep(sdata->reset_gpio, 0);
	msleep(140);
	...
	if (ret < 0)
		goto err_disable_regulators;
	...
err_disable_regulators:
	regulator_bulk_disable(ARRAY_SIZE(sdata->regulators),
			       sdata->regulators);
	return ret;
}

If an I2C transfer or boot status check fails after releasing reset, err_disable_regulators disables vdd and avdd without re-asserting sdata->reset_gpio. Because sdata->powered_up is still false, s6sy761_power_off() returns early and does not assert it either.

This leaves the active-low reset line driven high while the controller supplies are off, risking back-powering the chip through ESD diodes and preventing a clean reset pulse on a later s6sy761_resume().

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#8 lore raw

PATCH 4/5 arm64: dts: qcom: sdm845-google: Group touchscreen pins, add mode-switch pin

In reply to Marco Mattiolo

Pixel 3 and Pixel 3 XL use different touchscreen controllers on the same
pins: reset on gpio99, interrupt on gpio125, and the AP/SLPI I2C bus switch on gpio136. Move the reset and interrupt pin configuration into a single touchscreen-default-state, add the switch pin to it, and use the grouped state on blueline.

---
 .../arm64/boot/dts/qcom/sdm845-google-blueline.dts | 19 ++++++++++++-
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 31 ++++++++++++++--------
 2 files changed, 38 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts +18 -1
index a000c75494f1..a412d2e93850 100644
@@ -26,7 +26,24 @@ &i2c2 {
 
 	status = "okay";
 
-	/* ST,FTS @ 49 */
+	touchscreen@49 {
+		compatible = "st,stmfts5";
+		reg = <0x49>;
+
+		pinctrl-0 = <&touchscreen_default>;
+		pinctrl-names = "default";
+
+		interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
+
+		mode-switch-gpios = <&tlmm 136 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>;
+
+		avdd-supply = <&vreg_l19a_3p3>;
+		vdd-supply = <&vreg_l14a_1p8>;
+
+		touchscreen-size-x = <1080>;
+		touchscreen-size-y = <2160>;
+	};
 };
 
 &mdss_dsi0 {
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +20 -11
index 3c9656b88b69..a706efec1b10 100644
@@ -523,18 +523,27 @@ firmware-pins {
 
 	};
 
-	touchscreen_reset: ts-reset-state {
-		pins = "gpio99";
-		function = "gpio";
-		drive-strength = <8>;
-		bias-pull-up;
-	};
+	touchscreen_default: touchscreen-default-state {
+		reset-pins {
+			pins = "gpio99";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+
+		irq-pins {
+			pins = "gpio125";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
 
-	touchscreen_pins: ts-pins-gpio-state {
-		pins = "gpio125";
-		function = "gpio";
-		drive-strength = <2>;
-		bias-disable;
+		switch-pins {
+			pins = "gpio136";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
 	};
 };
 
Signature · 1 line
2.53.0
#9 lore raw

Re: [PATCH 4/5] arm64: dts: qcom: sdm845-google: Group touchscreen pins, add mode-switch pin

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] arm64: dts: commit message omits adding st,stmfts5 touchscreen on blueline --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] arm64: dts: commit message omits adding st,stmfts5 touchscreen on blueline
--

commit d14c0ae894c19e8982350b2d1047223567d0ff49
Author: Marco Mattiolo <[email protected]>

Quoted 10 lines

arm64: dts: qcom: sdm845-google: Group touchscreen pins, add mode-switch pin

Pixel 3 and Pixel 3 XL use different touchscreen controllers on the same
pins: reset on gpio99, interrupt on gpio125, and the AP/SLPI I2C bus switch on gpio136. Move the reset and interrupt pin configuration into a single touchscreen-default-state, add the switch pin to it, and use the grouped state on blueline.

[Severity: Medium]
Should the commit message mention that this patch adds and enables the st,stmfts5 touchscreen@49 node on blueline, or should that enablement be split into a separate commit?

Before this change, &i2c2 in sdm845-google-blueline.dts only had a placeholder comment and no touchscreen node. Saying "use the grouped state on blueline" reads as updating an existing node's pinctrl state, whereas the diff adds the full touchscreen device.

Bundling hardware enablement into a pinctrl reorganization commit can mislead reviewers and complicate bisection if touchscreen probing or &i2c2 regresses on blueline.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#10 lore raw

Re: [PATCH 4/5] arm64: dts: qcom: sdm845-google: Group touchscreen pins, add mode-switch pin

In reply to Marco Mattiolo
Quoted 32 lines · On 04/12/2026 23:13, Marco Mattiolo via B4 Relay wrote:

From: Marco Mattiolo <[email protected]>

Pixel 3 and Pixel 3 XL use different touchscreen controllers on the same
pins: reset on gpio99, interrupt on gpio125, and the AP/SLPI I2C bus switch on gpio136. Move the reset and interrupt pin configuration into a single touchscreen-default-state, add the switch pin to it, and use the grouped state on blueline.

---
  .../arm64/boot/dts/qcom/sdm845-google-blueline.dts | 19 ++++++++++++-
  arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 31 ++++++++++++++--------
  2 files changed, 38 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts +8 -1
index a000c75494f1..a412d2e93850 100644
@@ -26,7 +26,24 @@ &i2c2 {
 
  	status = "okay";
 
-	/* ST,FTS @ 49 */
+	touchscreen@49 {
+		compatible = "st,stmfts5";
+		reg = <0x49>;
+
+		pinctrl-0 = <&touchscreen_default>;
+		pinctrl-names = "default";
+
+		interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts &i2c2 { · line 46

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts +10 -0
+
+		mode-switch-gpios = <&tlmm 136 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>;
+
+		avdd-supply = <&vreg_l19a_3p3>;
+		vdd-supply = <&vreg_l14a_1p8>;
+
+		touchscreen-size-x = <1080>;
+		touchscreen-size-y = <2160>;
+	};

It seems that during the rebases you accidentally included the stmfts5 changes, which I sent as a separate change. Sadly these are not yet merged (but should be unblocked now).

[PATCH v8 5/5] arm64: dts: qcom: sdm845-google: Add STM FTS touchscreen support

David

#11 lore raw

PATCH 5/5 arm64: dts: qcom: sdm845-google-crosshatch: Add touchscreen support

In reply to Marco Mattiolo

Add support for the Samsung S6SY761X touchscreen controller connected on I2C bus.

---
 .../boot/dts/qcom/sdm845-google-crosshatch.dts     | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts +20 -3
index 2a81ca1d00b1..7550a0b1041d 100644
@@ -26,9 +26,26 @@ &framebuffer0 {
 	stride = <(1440 * 4)>;
 };
 
-&mdss {
-	/* Disable for now so simple-framebuffer continues working */
-	status = "disabled";
+&i2c2 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+
+		interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
+
+		pinctrl-0 = <&touchscreen_default>;
+		pinctrl-names = "default";
+
+		reset-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>;
+		mode-switch-gpios = <&tlmm 136 GPIO_ACTIVE_HIGH>;
+
+		avdd-supply = <&vreg_l19a_3p3>;
+		vdd-supply = <&vreg_l14a_1p8>;
+	};
 };
 
 &wifi {
Signature · 1 line
2.53.0
#12 lore raw

Re: [PATCH 5/5] arm64: dts: qcom: sdm845-google-crosshatch: Add touchscreen support

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] arm64: dts: qcom: crosshatch accidentally deletes mdss disabled override - [Medium] Input: s6sy761…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] arm64: dts: qcom: crosshatch accidentally deletes mdss disabled override
- [Medium] Input: s6sy761: s6sy761_power_on() leaves reset GPIO deasserted on error
--

commit 64cc994b433a5ec33a076729ba6ce3a2c5dbc02b
Author: Marco Mattiolo <[email protected]>

arm64: dts: qcom: sdm845-google-crosshatch: Add touchscreen support

This commit adds the Samsung s6sy761 touchscreen node on i2c2 for the Google Pixel 3 XL (crosshatch) and removes the disabled override for mdss.

arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts &framebuffer0 { · line 31

Quoted 11 lines
arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts +0 -3
index 2a81ca1d00b1b..7550a0b1041dd 100644
@@ -26,9 +26,26 @@ &framebuffer0 {
 	stride = <(1440 * 4)>;
 };
 
-&mdss {
-	/* Disable for now so simple-framebuffer continues working */
-	status = "disabled";

[Severity: High]
Was removing the &mdss disabled override accidental?

sdm845-google-common.dtsi enables &mdss, while &dispcc remains disabled in this file. Because &mdss depends on &dispcc for its power domain and clocks, msm-mdss repeatedly defers and fails probe at boot, delaying sync_state() on mmss_noc, mem_noc, apps_smmu, and rpmhpd.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts +5 -0
+&i2c2 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+

arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts &framebuffer0 { · line 43

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts +10 -0
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+
+		interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
+
+		pinctrl-0 = <&touchscreen_default>;
+		pinctrl-names = "default";
+
+		reset-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>;

[Severity: Medium]
Does s6sy761_power_on() leave reset_gpio deasserted on error now that reset-gpios is wired up here?

In drivers/input/touchscreen/s6sy761.c (added in commit "Input: s6sy761 - Add optional reset GPIO support"), s6sy761_power_on() deasserts reset_gpio before the I2C boot checks, but err_disable_regulators does not re-assert it:

drivers/input/touchscreen/s6sy761.c:s6sy761_power_on() {
    ...
	/* release the optional reset line, then wait for the boot */
	gpiod_set_value_cansleep(sdata->reset_gpio, 0);
    ...
err_disable_regulators:
	regulator_bulk_disable(ARRAY_SIZE(sdata->regulators),
			       sdata->regulators);
	return ret;
}

Because sdata->powered_up remains false when s6sy761_power_on() fails, s6sy761_power_off() returns early too. On an I2C failure during probe or resume, the active-low reset line stays driven high while the supplies are off, risking back-powering the controller.

Should err_disable_regulators assert sdata->reset_gpio before calling regulator_bulk_disable()?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5