Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks
@ 2026-07-18 17:06 Jens Glathe via B4 Relay
  2026-07-18 17:06 ` [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property Jens Glathe via B4 Relay
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-07-18 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Heikki Krogerus, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-msm, stable,
	Dr. David Alan Gilbert, Jens Glathe

On Qualcomm X1E80100 platforms (e.g. Lenovo ThinkPad T14s Gen 6)
using the Parade PS883x retimer, connecting USB4-capable docks such
as the Lenovo 40B0 via a regular Type-C cable (which forces the dock
into Type-C fallback mode) often results in working USB but no
DisplayPort output.

This series addresses the issue with two main changes:

- Add a new optional DT property "parade,disable-usb4". When present,
  the PS883x driver rejects USB4 mode (-EOPNOTSUPP). This forces the
  Type-C stack to fall back to USB3 + DP Alt Mode, which works
  reliably with the 40B0.

- Refactor DP altmode handling to also support the legacy
  TYPEC_DP_STATE_F request (deprecated since DP Alt Mode 1.0b) sent by
  the 40B0 and other docks (e.g. SSK SC220).

- Add a short delay after writing configuration registers, which
  improves hotplug reliability.

This is a temporary workaround until full USB4 DP tunneling support is
available in the X1E USB4 controller and qmp-combo PHY stack.

Note: The DT patch adds the new property to all currently upstream
boards using the PS883x retimer (15 files). Happy to split it on v2
if requested.

As an additional observation, the same dock with type-c cable works well
on Thinkpad X13s, Thinkbook 16 G7 QOY, Ideapad 5 14Q8X9, but doesn't need
the ps883x changes (naturally). 

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
Jens Glathe (5):
      dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property
      usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set
      usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F
      usb: typec: mux: ps883x: add a delay after writing config regs
      arm64: dts: qcom: x1: disable ps883x USB4 capability

 .../devicetree/bindings/usb/parade,ps8830.yaml     |  6 +++
 arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts         |  4 ++
 .../qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts  |  2 +
 arch/arm64/boot/dts/qcom/purwa-iot-evk.dts         |  6 +++
 arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi |  4 ++
 arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi  |  4 ++
 arch/arm64/boot/dts/qcom/x1-crd.dtsi               |  6 +++
 arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi        |  4 ++
 arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi   |  2 +
 arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi  |  4 ++
 arch/arm64/boot/dts/qcom/x1e001de-devkit.dts       |  6 +++
 .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi    |  4 ++
 .../boot/dts/qcom/x1e80100-dell-xps13-9345.dts     |  4 ++
 .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts  |  6 +++
 .../dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts    |  2 +
 .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi  |  4 ++
 drivers/usb/typec/mux/ps883x.c                     | 47 +++++++++++++++-------
 17 files changed, 100 insertions(+), 15 deletions(-)
---
base-commit: 0718283ab28bc3907e10b61a6b4be6fefa1cbb2f
change-id: 20260718-ps883x-disable-usb4-19b0fc13b5ab

Best regards,
-- 
Jens Glathe <jens.glathe@oldschoolsolutions.biz>



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

* [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property
  2026-07-18 17:06 [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
@ 2026-07-18 17:06 ` Jens Glathe via B4 Relay
  2026-07-18 17:11   ` sashiko-bot
  2026-07-18 17:06 ` [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set Jens Glathe via B4 Relay
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-07-18 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Heikki Krogerus, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-msm, stable,
	Dr. David Alan Gilbert, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

Document a new optional boolean property "parade,disable-usb4".
When present, the retimer rejects USB4 mode by returning -EOPNOTSUPP,
forcing a fallback to USB3 + DP Alternate Mode.

Assisted-by: Grok(xAI):4.3
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 Documentation/devicetree/bindings/usb/parade,ps8830.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/parade,ps8830.yaml b/Documentation/devicetree/bindings/usb/parade,ps8830.yaml
index eaeab1c01a594..44242907461eb 100644
--- a/Documentation/devicetree/bindings/usb/parade,ps8830.yaml
+++ b/Documentation/devicetree/bindings/usb/parade,ps8830.yaml
@@ -66,6 +66,12 @@ properties:
           Sideband Use (SBU) AUX lines endpoint to the Type-C connector for the purpose of
           handling altmode muxing and orientation switching.
 
+  parade,disable-usb4:
+    type: boolean
+    description:
+      When present, the retimer rejects USB4 mode (returns -EOPNOTSUPP).
+      This forces the Type-C stack to fall back to USB3 + DP Alternate Mode.
+
 required:
   - compatible
   - reg

-- 
2.53.0



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

* [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set
  2026-07-18 17:06 [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
  2026-07-18 17:06 ` [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property Jens Glathe via B4 Relay
@ 2026-07-18 17:06 ` Jens Glathe via B4 Relay
  2026-07-18 17:14   ` sashiko-bot
  2026-07-18 17:06 ` [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-07-18 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Heikki Krogerus, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-msm, stable,
	Dr. David Alan Gilbert, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

On Qualcomm X1E80100 platforms using the Parade PS883x retimer (like
Lenovo ThinkPad T14s Gen6), hotplugging USB4-capable docks such as the
Lenovo 40B0 results in working USB but no DisplayPort output on the
dock's HDMI/DP ports.

When the dock negotiates USB4, the retimer receives TYPEC_MODE_USB4
and forwards it via typec_mux_set(). The qmp_combo PHY then selects
QMPPHY_MODE_USB3_ONLY because no classic DP altmode SVID is present in
the state, leaving the DP transmitter and AUX channel disabled.

Add a DT property "parade,disable-usb4" that, when present, makes the
PS883x driver reject USB4 modes as not supported. DP altmode
configuration is still applied if negotiated, so both USB and
DisplayPort continue to work.

This is a temporary workaround until proper USB4 DP tunneling support
is available in the X1E USB4 controller and qmp_combo PHY stack.

Link: https://patch.msgid.link/20260312101431.2375709-1-krishna.kurapati@oss.qualcomm.com
Assisted-by: Grok(xAI):4.3
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 drivers/usb/typec/mux/ps883x.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
index 64e0a61b776a1..3fa26ce01a9c9 100644
--- a/drivers/usb/typec/mux/ps883x.c
+++ b/drivers/usb/typec/mux/ps883x.c
@@ -62,6 +62,7 @@ struct ps883x_retimer {
 
 	enum typec_orientation orientation;
 	bool in_reset;
+	bool disable_usb4;
 };
 
 static int ps883x_enable_vregs(struct ps883x_retimer *retimer)
@@ -249,6 +250,13 @@ static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state
 			cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
 			break;
 		case TYPEC_MODE_USB4:
+			if (retimer->disable_usb4) {
+				dev_info(&retimer->client->dev,
+					 "USB4 disabled via DT property, rejecting USB4 mode\n");
+				return -EOPNOTSUPP;
+			}
+
+			/* Normal USB4 handling */
 			eudo_data = state->data;
 
 			cfg2 |= CONN_STATUS_2_USB4_CONNECTED;
@@ -378,6 +386,8 @@ static int ps883x_retimer_probe(struct i2c_client *client)
 
 	retimer->client = client;
 
+	retimer->disable_usb4 = device_property_read_bool(dev, "parade,disable-usb4");
+
 	mutex_init(&retimer->lock);
 
 	retimer->regmap = devm_regmap_init_i2c(client, &ps883x_retimer_regmap);

-- 
2.53.0



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

* [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F
  2026-07-18 17:06 [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
  2026-07-18 17:06 ` [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property Jens Glathe via B4 Relay
  2026-07-18 17:06 ` [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set Jens Glathe via B4 Relay
@ 2026-07-18 17:06 ` Jens Glathe via B4 Relay
  2026-07-18 17:29   ` sashiko-bot
  2026-07-18 17:06 ` [PATCH 4/5] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
  2026-07-18 17:06 ` [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability Jens Glathe via B4 Relay
  4 siblings, 1 reply; 10+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-07-18 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Heikki Krogerus, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-msm, stable,
	Dr. David Alan Gilbert, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

Several docks, including the Lenovo 40B0 and SSK SC220, still send the
legacy TYPEC_DP_STATE_F mode request (deprecated since DisplayPort Alt
Mode spec version 1.0b). Treat it as USB3 + DP altmode (same as
TYPEC_DP_STATE_D) so that DP altmode works correctly, especially on
the 40B0 in Type-C fallback mode.

Extract the state handling into ps883x_apply_dp_altmode() (modelled
after qmp-combo-phy) for consistency.

Assisted-by: Grok(xAI):4.3
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 drivers/usb/typec/mux/ps883x.c | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
index 3fa26ce01a9c9..3533d4f363286 100644
--- a/drivers/usb/typec/mux/ps883x.c
+++ b/drivers/usb/typec/mux/ps883x.c
@@ -188,6 +188,25 @@ static int ps883x_configure(struct ps883x_retimer *retimer, int cfg0,
 	return 0;
 }
 
+static void ps883x_apply_dp_altmode(int *cfg0, int *cfg1, int dp_state)
+{
+	*cfg1 |= CONN_STATUS_1_DP_CONNECTED | CONN_STATUS_1_DP_HPD_LEVEL;
+
+	switch (dp_state) {
+	case TYPEC_DP_STATE_D:
+	case TYPEC_DP_STATE_F:
+		*cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
+		fallthrough;
+	case TYPEC_DP_STATE_C:
+	case TYPEC_DP_STATE_E:
+		*cfg1 |= CONN_STATUS_1_DP_SINK_REQUESTED |
+			 CONN_STATUS_1_DP_PIN_ASSIGNMENT_C_D;
+		break;
+	default:
+		break;
+	}
+}
+
 static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state *state)
 {
 	struct typec_thunderbolt_data *tb_data;
@@ -203,24 +222,10 @@ static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state
 	if (state->alt) {
 		switch (state->alt->svid) {
 		case USB_TYPEC_DP_SID:
-			cfg1 |= CONN_STATUS_1_DP_CONNECTED |
-				CONN_STATUS_1_DP_HPD_LEVEL;
-
-			switch (state->mode)  {
-			case TYPEC_DP_STATE_D:
-				cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
-				fallthrough;
-			case TYPEC_DP_STATE_C:
-				cfg1 |= CONN_STATUS_1_DP_SINK_REQUESTED |
-					CONN_STATUS_1_DP_PIN_ASSIGNMENT_C_D;
-				break;
-			default: /* MODE_E */
-				break;
-			}
+			ps883x_apply_dp_altmode(&cfg0, &cfg1, state->mode);
 			break;
 		case USB_TYPEC_TBT_SID:
 			tb_data = state->data;
-
 			/* Unconditional */
 			cfg2 |= CONN_STATUS_2_TBT_CONNECTED;
 

-- 
2.53.0



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

* [PATCH 4/5] usb: typec: mux: ps883x: add a delay after writing config regs
  2026-07-18 17:06 [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
                   ` (2 preceding siblings ...)
  2026-07-18 17:06 ` [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
@ 2026-07-18 17:06 ` Jens Glathe via B4 Relay
  2026-07-18 17:06 ` [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability Jens Glathe via B4 Relay
  4 siblings, 0 replies; 10+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-07-18 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Heikki Krogerus, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-msm, stable,
	Dr. David Alan Gilbert, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

The config regs seem to need a few ms to propagate the changes through the
system (like, PLLs). This improves the hotplug dp altmode success rate
on the Lenovo 40B0 dock to 100%.

Tested with T14s G6 and 40B0 dock on the HDMI port with a type-c host cable.

Assisted-by: Gemini:3
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 drivers/usb/typec/mux/ps883x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
index 3533d4f363286..3ca2952e6a0a3 100644
--- a/drivers/usb/typec/mux/ps883x.c
+++ b/drivers/usb/typec/mux/ps883x.c
@@ -185,6 +185,8 @@ static int ps883x_configure(struct ps883x_retimer *retimer, int cfg0,
 		return ret;
 	}
 
+	usleep_range(20000, 30000);
+
 	return 0;
 }
 

-- 
2.53.0



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

* [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability
  2026-07-18 17:06 [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
                   ` (3 preceding siblings ...)
  2026-07-18 17:06 ` [PATCH 4/5] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
@ 2026-07-18 17:06 ` Jens Glathe via B4 Relay
  2026-07-18 17:22   ` sashiko-bot
  4 siblings, 1 reply; 10+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-07-18 17:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Heikki Krogerus, Bjorn Andersson,
	Konrad Dybcio
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-msm, stable,
	Dr. David Alan Gilbert, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

Add the "parade,disable-usb4" property to the PS883x node so that the
retimer driver treats USB4 as USB3. This allows the combo PHY to remain
in a DP-capable mode, restoring working DisplayPort output over the
dock while keeping USB functional.

This is a temporary platform workaround until proper USB4 DP tunneling
support is available.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts                        | 4 ++++
 arch/arm64/boot/dts/qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts | 2 ++
 arch/arm64/boot/dts/qcom/purwa-iot-evk.dts                        | 6 ++++++
 arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi                | 4 ++++
 arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi                 | 4 ++++
 arch/arm64/boot/dts/qcom/x1-crd.dtsi                              | 6 ++++++
 arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi                       | 4 ++++
 arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi                  | 2 ++
 arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi                 | 4 ++++
 arch/arm64/boot/dts/qcom/x1e001de-devkit.dts                      | 6 ++++++
 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi       | 4 ++++
 arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts             | 4 ++++
 arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts          | 6 ++++++
 arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts       | 2 ++
 arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi          | 4 ++++
 15 files changed, 62 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index 9fa86bb6438ec..5ec77c5912f8e 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -762,6 +762,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -877,6 +879,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts b/arch/arm64/boot/dts/qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts
index bfb7cea56df96..328a360843f4c 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-lenovo-ideacentre-mini-01q8x10.dts
@@ -601,6 +601,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts b/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
index ad503beec1d3d..9ce080b9ae896 100644
--- a/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
@@ -703,6 +703,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -760,6 +762,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -865,6 +869,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi b/arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi
index 48c4ad648354e..d67ded1da5875 100644
--- a/arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi
@@ -678,6 +678,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -798,6 +800,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi b/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi
index 66d566808f583..e1033d3bef359 100644
--- a/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi
@@ -845,6 +845,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -945,6 +947,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1-crd.dtsi b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
index 9602d65c8b3db..002a974c88751 100644
--- a/arch/arm64/boot/dts/qcom/x1-crd.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
@@ -967,6 +967,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -1024,6 +1026,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -1112,6 +1116,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi b/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi
index d6de4da02dcd3..fa17cdafc07b4 100644
--- a/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi
@@ -852,6 +852,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -947,6 +949,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi b/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi
index 02708f23a8657..4dd62092b8809 100644
--- a/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi
@@ -917,6 +917,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi b/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
index 7559557610ed4..1aa075d6eeda5 100644
--- a/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
@@ -759,6 +759,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -822,6 +824,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
index 2e38402e2c140..ada5da526634a 100644
--- a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
+++ b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
@@ -795,6 +795,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -852,6 +854,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -943,6 +947,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
index 5d49df41be02a..c8bfb38c64ad5 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
@@ -895,6 +895,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -1018,6 +1020,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
index ce7b10ea89b6d..11412099eaec1 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
@@ -726,6 +726,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -789,6 +791,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index beb1475d7fa0c..d16d3627796b8 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -863,6 +863,8 @@ typec-mux@8 {
 		orientation-switch;
 		retimer-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -920,6 +922,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -977,6 +981,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts b/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts
index f95b1f9f439d3..55f9df8e5f403 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts
@@ -857,6 +857,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
index 28342cb84ded7..4ccfbe7e14eb8 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
@@ -902,6 +902,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -984,6 +986,8 @@ typec-mux@8 {
 		retimer-switch;
 		orientation-switch;
 
+		parade,disable-usb4;
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;

-- 
2.53.0



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

* Re: [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property
  2026-07-18 17:06 ` [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property Jens Glathe via B4 Relay
@ 2026-07-18 17:11   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-07-18 17:11 UTC (permalink / raw)
  To: Jens Glathe; +Cc: robh, conor+dt, devicetree

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The device tree binding violates OS-agnostic design principles by describing Linux-specific software behavior and internal driver states instead of hardware properties.
- [Low] The commit message contains a malformed and non-standard patch trailer 'Assisted-by: Grok(xAI):4.3'.
--

--- Patch [1]: [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property ---
commit 3e93d13f3a0b964fe4e6611bd03b162fa75d29a3
Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property

This commit documents a new optional boolean property parade,disable-usb4
for the parade,ps8830 device tree binding, which disables USB4 mode.

>     Assisted-by: Grok(xAI):4.3
>     Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

[Severity: Low]
Does the Assisted-by trailer conform to the standard patch submission
guidelines? 

This tag is non-standard, and it is missing the expected Name <email>
formatting. Could this cause issues with automated patch parsing tools?

> diff --git a/Documentation/devicetree/bindings/usb/parade,ps8830.yaml b/Documentation/devicetree/bindings/usb/parade,ps8830.yaml
> index eaeab1c01a594..44242907461eb 100644
> --- a/Documentation/devicetree/bindings/usb/parade,ps8830.yaml
> +++ b/Documentation/devicetree/bindings/usb/parade,ps8830.yaml

[ ... ]

> @@ -66,6 +66,12 @@ properties:
>            Sideband Use (SBU) AUX lines endpoint to the Type-C connector for the purpose of
>            handling altmode muxing and orientation switching.
>  
> +  parade,disable-usb4:
> +    type: boolean
> +    description:
> +      When present, the retimer rejects USB4 mode (returns -EOPNOTSUPP).
> +      This forces the Type-C stack to fall back to USB3 + DP Alternate Mode.

[Severity: Low]
Should the description for parade,disable-usb4 focus on the physical
hardware state or board constraints rather than Linux-specific driver
behavior? 

Mentioning internal software details like returning -EOPNOTSUPP and the
Type-C stack seems to go against the principle that device tree bindings
should be OS-agnostic. Could this be rephrased to describe the hardware
limitations instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260718-ps883x-disable-usb4-v1-0-cec86d0b909e@oldschoolsolutions.biz?part=1

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

* Re: [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set
  2026-07-18 17:06 ` [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set Jens Glathe via B4 Relay
@ 2026-07-18 17:14   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-07-18 17:14 UTC (permalink / raw)
  To: Jens Glathe; +Cc: devicetree, conor+dt, robh

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Encoding a temporary software workaround into the Device Tree using a custom property (`parade,disable-usb4`).
--

--- Patch [2]: [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set ---
commit e075e4adfa41dd9a2eea759527c1bbbc8a97f7a9
Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Subject: usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set

This commit adds a temporary workaround to disable USB4 support on the
PS883x retimer using a new device tree property. It addresses an issue on
X1E80100 platforms where negotiating USB4 results in no DisplayPort output
due to missing software support in the qmp_combo PHY stack.

Link: https://patch.msgid.link/20260312101431.2375709-1-krishna.kurapati@oss.qualcomm.com

> diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
> index 64e0a61b776a1..3fa26ce01a9c9 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
[ ... ]
> @@ -249,6 +250,13 @@ static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state
>  			cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
>  			break;
>  		case TYPEC_MODE_USB4:
> +			if (retimer->disable_usb4) {
> +				dev_info(&retimer->client->dev,
> +					 "USB4 disabled via DT property, rejecting USB4 mode\n");
> +				return -EOPNOTSUPP;
> +			}

[Severity: High]
Since the commit message notes this is a temporary workaround for missing OS
support in the X1E USB4 controller and PHY stack, does this approach conflict
with the principle that the device tree is a stable hardware description ABI?

If this workaround is deployed in user device trees or firmware, wouldn't
those boards permanently have USB4 disabled on this retimer even after the
kernel drivers are eventually updated to fully support it?

Could this be implemented as a software quirk instead, perhaps by matching
the platform's compatible string or inferring the limitation dynamically
from the dependent drivers, rather than altering the hardware description?

> +
> +			/* Normal USB4 handling */
>  			eudo_data = state->data;
>  
>  			cfg2 |= CONN_STATUS_2_USB4_CONNECTED;
[ ... ]
> @@ -378,6 +386,8 @@ static int ps883x_retimer_probe(struct i2c_client *client)
>  
>  	retimer->client = client;
>  
> +	retimer->disable_usb4 = device_property_read_bool(dev, "parade,disable-usb4");
> +
>  	mutex_init(&retimer->lock);
>  
>  	retimer->regmap = devm_regmap_init_i2c(client, &ps883x_retimer_regmap);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260718-ps883x-disable-usb4-v1-0-cec86d0b909e@oldschoolsolutions.biz?part=2

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

* Re: [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability
  2026-07-18 17:06 ` [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability Jens Glathe via B4 Relay
@ 2026-07-18 17:22   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-07-18 17:22 UTC (permalink / raw)
  To: Jens Glathe; +Cc: devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `parade,disable-usb4` property encodes a transient software workaround into the Device Tree and breaks non-fallback docks by intentionally failing retimer configuration.
--

--- Patch [5]: [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability ---
commit c967f56ff3b6574dc86834616a0288179a8a0cd3
Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

arm64: dts: qcom: x1: disable ps883x USB4 capability

Add the "parade,disable-usb4" property to the PS883x node so that the
retimer driver treats USB4 as USB3. This allows the combo PHY to remain
in a DP-capable mode, restoring working DisplayPort output over the
dock while keeping USB functional.

[ ... ]

> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> index 5d49df41be02a..c8bfb38c64ad5 100644
> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> @@ -895,6 +895,8 @@ typec-mux@8 {
>  		orientation-switch;
>  		retimer-switch;
>  
> +		parade,disable-usb4;

[Severity: High]
The commit message mentions this is a temporary platform workaround for missing
software support. Does this encode a transient OS driver limitation into the
device tree?

Device trees typically describe fixed hardware capabilities. Will adding this
property permanently mask the hardware's actual capabilities and cause issues 
for future OS updates once proper USB4 DP tunneling is available?

Also, looking at how the retimer driver handles this property:

drivers/usb/typec/mux/ps883x.c:ps883x_set() {
    ...
    case TYPEC_MODE_USB4:
        if (retimer->disable_usb4) {
            dev_info(&retimer->client->dev,
                     "USB4 disabled via DT property, rejecting USB4 mode\n");
            return -EOPNOTSUPP;
        }
    ...
}

By returning -EOPNOTSUPP, this intentionally skips retimer configuration and
leaves the physical link broken. While some docks might detect the broken
link, time out, and fall back to DP Alt Mode + USB3, what happens with docks
that don't implement this fallback behavior? 

Could this approach result in completely broken USB and DisplayPort
functionality on non-fallback docks when the PMIC autonomously negotiates
USB4?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260718-ps883x-disable-usb4-v1-0-cec86d0b909e@oldschoolsolutions.biz?part=5

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

* Re: [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F
  2026-07-18 17:06 ` [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
@ 2026-07-18 17:29   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-07-18 17:29 UTC (permalink / raw)
  To: Jens Glathe; +Cc: conor+dt, robh, devicetree

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Pre-existing issues:
- [High] Dereferencing NULL pointer during Thunderbolt Alt Mode teardown.
- [High] Failure to tear down DisplayPort Alt Mode correctly during SAFE state transition.
--

--- Patch [3]: [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F ---
commit 1182bfe184aec8b5b6e514d7c1a3d153c73073da
Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F

This commit refactors DisplayPort altmode handling into a helper function.
It also adds support for the legacy TYPEC_DP_STATE_F mode to ensure DP
altmode works correctly on certain docks during Type-C fallback mode.

> diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
> index 3fa26ce01a9c9..3533d4f363286 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
[ ... ]
> @@ -188,6 +188,25 @@ static int ps883x_configure(struct ps883x_retimer *retimer, int cfg0,
>  	return 0;
>  }
>  
> +static void ps883x_apply_dp_altmode(int *cfg0, int *cfg1, int dp_state)
> +{
> +	*cfg1 |= CONN_STATUS_1_DP_CONNECTED | CONN_STATUS_1_DP_HPD_LEVEL;
> +
> +	switch (dp_state) {

[Severity: High]
This is a pre-existing issue, but does this correctly handle tearing down
the DisplayPort Alt Mode?

When the system requests TYPEC_STATE_SAFE (mode 0) to tear down the alt
mode, dp_state will be 0. It seems the CONN_STATUS_1_DP_CONNECTED and
CONN_STATUS_1_DP_HPD_LEVEL bits are unconditionally applied here, and the
switch statement hits the default empty case. Because state->alt is still
present, the retimer remains inappropriately configured for DisplayPort
instead of resetting.

> +	case TYPEC_DP_STATE_D:
> +	case TYPEC_DP_STATE_F:
> +		*cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
> +		fallthrough;
> +	case TYPEC_DP_STATE_C:
> +	case TYPEC_DP_STATE_E:
> +		*cfg1 |= CONN_STATUS_1_DP_SINK_REQUESTED |
> +			 CONN_STATUS_1_DP_PIN_ASSIGNMENT_C_D;
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>  static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state *state)
>  {
>  	struct typec_thunderbolt_data *tb_data;
[ ... ]
>  		case USB_TYPEC_TBT_SID:
>  			tb_data = state->data;
> -
>  			/* Unconditional */
>  			cfg2 |= CONN_STATUS_2_TBT_CONNECTED;
>  

[Severity: High]
This isn't a bug introduced by this patch, but will this cause a NULL
pointer dereference when a Thunderbolt device is unplugged?

During an active Thunderbolt device unplug, the Type-C bus core calls
typec_altmode_remove() which sets the state to TYPEC_STATE_SAFE and passes
NULL for state->data. Here in ps883x_set(), tb_data is assigned to
state->data and then unconditionally dereferenced just below this block for
tb_data->cable_mode, which seems like it would cause a kernel panic during
teardown.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260718-ps883x-disable-usb4-v1-0-cec86d0b909e@oldschoolsolutions.biz?part=3

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

end of thread, other threads:[~2026-07-18 17:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-18 17:06 [PATCH 0/5] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
2026-07-18 17:06 ` [PATCH 1/5] dt-bindings: usb: parade,ps8830: Add parade,disable-usb4 property Jens Glathe via B4 Relay
2026-07-18 17:11   ` sashiko-bot
2026-07-18 17:06 ` [PATCH 2/5] usb: typec: ps883x: Return -EOPNOTSUPP for USB4 when parade,disable-usb4 is set Jens Glathe via B4 Relay
2026-07-18 17:14   ` sashiko-bot
2026-07-18 17:06 ` [PATCH 3/5] usb: typec: mux: ps883x: refactor DP altmode handling and support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
2026-07-18 17:29   ` sashiko-bot
2026-07-18 17:06 ` [PATCH 4/5] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
2026-07-18 17:06 ` [PATCH 5/5] arm64: dts: qcom: x1: disable ps883x USB4 capability Jens Glathe via B4 Relay
2026-07-18 17:22   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox