* [PATCH v3 0/3] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks
@ 2026-09-16 19:36 Jens Glathe via B4 Relay
2026-09-16 19:36 ` [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-09-16 19:36 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson,
Konrad Dybcio, Sebastian Reichel
Cc: linux-usb, linux-kernel, linux-arm-msm, stable,
Dr. David Alan Gilbert, Dmitry Baryshkov, Jens Glathe
On Qualcomm X1E80100 / X1P42100 platforms using the Parade PS883x
retimer, connecting USB4-capable docks such as the Lenovo 40B0 via a
regular Type-C cable (Type-C fallback mode) often results in working
USB but no DisplayPort output.
This series addresses the issue with three driver-only changes:
- Support the legacy TYPEC_DP_STATE_F request (deprecated since DP Alt
Mode 1.0b) that docks such as the 40B0 and SSK SC220 still send.
Handle it in the existing DP altmode path in ps883x_set(). F is
programmed like D; E is unchanged.
- Add a post-configuration delay after writing the connection-status
registers so the analog front-end can settle. This makes DP Alt Mode
hotplug reliable on the 40B0.
- On platforms whose USB4 / DP-tunneling stack is not ready yet, reject
TYPEC_MODE_USB4 with -EOPNOTSUPP. That forces the Type-C stack to
fall back to USB3 + DP Alt Mode. The quirk is a machine-compatible
table inside the driver, not a DT property.
This is a temporary workaround until full USB4 DP tunneling support is
available in the X1E USB4 controller and qmp-combo PHY stack.
As an additional observation, the same dock with a Type-C cable works
well on Thinkpad X13s, Thinkbook 16 G7 QOY and Ideapad 5 14Q8X9, which
do not use this retimer.
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Abel Vesa <abelvesa@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: stable@vger.kernel.org
Cc: Dr. David Alan Gilbert <dave@treblig.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Assisted-by: Grok(xAI):4.6
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
Changes in v3:
- reduced the dp logic changein ps883x_set() to only adding
TYPEC_DP_STATE_F handling grouped with TYPEC_DP_STATE_D.
- picked up Tested-by tag from David, thanks for the re-test.
- Link to v2: https://lore.kernel.org/r/20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz
Changes in v2:
- Drop the parade,disable-usb4 DT property, bindings and board DTS
changes (Sebastian Reichel, Krzysztof Kozlowski). DT describes
hardware; incomplete software support is not a board property.
- Disable USB4 from the driver via of_machine_is_compatible() for
qcom,x1e80100, qcom,x1p42100, qcom,hamoa and qcom,purwa. The quirk
stays kernel-contained and can be dropped later without ABI.
- Keep DP altmode handling in the existing ps883x_set() path instead
of extracting a helper (Konrad Dybcio). Treat STATE_F like STATE_D
and STATE_E like STATE_C, matching qcom-qmp-combo.
- Replace usleep_range(20000, 30000) with fsleep(30000) and document
why the delay is required (Heikki Krogerus).
- Drop the per-event "USB4 disabled via DT property" log; print once
at probe when the quirk is active.
- Link to v1: https://lore.kernel.org/r/20260718-ps883x-disable-usb4-v1-0-cec86d0b909e@oldschoolsolutions.biz
---
Jens Glathe (3):
usb: typec: mux: ps883x: support TYPEC_DP_STATE_F
usb: typec: mux: ps883x: add a delay after writing config regs
usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms
drivers/usb/typec/mux/ps883x.c | 48 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
---
base-commit: 601057b3eec13d1f37e5b45dd1410facd7b1bdeb
change-id: 20260718-ps883x-disable-usb4-19b0fc13b5ab
Best regards,
--
Jens Glathe <jens.glathe@oldschoolsolutions.biz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F
2026-09-16 19:36 [PATCH v3 0/3] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
@ 2026-09-16 19:36 ` Jens Glathe via B4 Relay
2026-09-18 9:55 ` Heikki Krogerus
2026-09-16 19:36 ` [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
2026-09-16 19:36 ` [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms Jens Glathe via B4 Relay
2 siblings, 1 reply; 7+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-09-16 19:36 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson,
Konrad Dybcio, Sebastian Reichel
Cc: linux-usb, linux-kernel, linux-arm-msm, stable,
Dr. David Alan Gilbert, Dmitry Baryshkov, 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).
Group it with TYPEC_DP_STATE_D.
Assisted-by: Grok(xAI):4.6
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
drivers/usb/typec/mux/ps883x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
index 64e0a61b776a1..a5696aef054ee 100644
--- a/drivers/usb/typec/mux/ps883x.c
+++ b/drivers/usb/typec/mux/ps883x.c
@@ -207,6 +207,7 @@ static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state
switch (state->mode) {
case TYPEC_DP_STATE_D:
+ case TYPEC_DP_STATE_F:
cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
fallthrough;
case TYPEC_DP_STATE_C:
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs
2026-09-16 19:36 [PATCH v3 0/3] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
2026-09-16 19:36 ` [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
@ 2026-09-16 19:36 ` Jens Glathe via B4 Relay
2026-09-18 9:55 ` Heikki Krogerus
2026-09-16 19:36 ` [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms Jens Glathe via B4 Relay
2 siblings, 1 reply; 7+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-09-16 19:36 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson,
Konrad Dybcio, Sebastian Reichel
Cc: linux-usb, linux-kernel, linux-arm-msm, stable,
Dr. David Alan Gilbert, Dmitry Baryshkov, Jens Glathe
From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
The connection-status registers need time to propagate through the
analog front-end (PLLs, lane training) after they are written. A 30 ms
delay after ps883x_configure() brings DisplayPort Alt Mode hotplug on
the Lenovo 40B0 to a reliable success rate.
Tested with T14s G6 and IdeaCentre Mini with the 40B0 dock on the HDMI
port with a Type-C host cable. Qualcomm firmware that programs this
retimer from an MCU uses a similar post-config delay.
Assisted-by: Grok(xAI):4.6
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 a5696aef054ee..15aee1d613b1a 100644
--- a/drivers/usb/typec/mux/ps883x.c
+++ b/drivers/usb/typec/mux/ps883x.c
@@ -7,6 +7,7 @@
#include <drm/bridge/aux-bridge.h>
#include <linux/clk.h>
+#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
@@ -184,6 +185,15 @@ static int ps883x_configure(struct ps883x_retimer *retimer, int cfg0,
return ret;
}
+ /*
+ * The retimer needs time after the connection-status registers are
+ * written for the analog front-end (PLLs, lane training) to settle.
+ * Without this, DisplayPort Alt Mode hotplug is unreliable on some
+ * docks (e.g. Lenovo 40B0). Qualcomm firmware on platforms that
+ * program this chip from an MCU uses a similar post-config delay.
+ */
+ fsleep(30000);
+
return 0;
}
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms
2026-09-16 19:36 [PATCH v3 0/3] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
2026-09-16 19:36 ` [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
2026-09-16 19:36 ` [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
@ 2026-09-16 19:36 ` Jens Glathe via B4 Relay
2026-09-18 9:56 ` Heikki Krogerus
2 siblings, 1 reply; 7+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-09-16 19:36 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson,
Konrad Dybcio, Sebastian Reichel
Cc: linux-usb, linux-kernel, linux-arm-msm, stable,
Dr. David Alan Gilbert, Dmitry Baryshkov, Jens Glathe
From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
On Qualcomm X1E80100 / X1P42100 platforms using the Parade PS883x
retimer, hotplugging USB4-capable docks such as the Lenovo 40B0 can
result in working USB but no DisplayPort output.
When the dock negotiates USB4, the retimer receives TYPEC_MODE_USB4
and forwards it via typec_mux_set(). The qmp-combo PHY then selects
USB3-only because no classic DP altmode SVID is present in the state,
leaving the DP transmitter and AUX channel disabled.
Reject USB4 with -EOPNOTSUPP on platforms whose USB4 / DP-tunneling
stack is not ready yet. The Type-C stack then falls back to USB3 + DP
Alt Mode. DP altmode configuration continues to use the existing
ps883x_set() path.
Use a machine-compatible table rather than a DT property so the quirk
stays inside the kernel and can be removed later without creating ABI.
Link: https://patch.msgid.link/20260312101431.2375709-1-krishna.kurapati@oss.qualcomm.com
Assisted-by: Grok(xAI):4.6
Tested-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
drivers/usb/typec/mux/ps883x.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
index 15aee1d613b1a..2ec57cfe748a9 100644
--- a/drivers/usb/typec/mux/ps883x.c
+++ b/drivers/usb/typec/mux/ps883x.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/usb/pd.h>
@@ -42,6 +43,22 @@
#define CONN_STATUS_2_TBT_UNIDIR_LSRX_ACT_LT BIT(4)
#define CONN_STATUS_2_USB4_CONNECTED BIT(7)
+/*
+ * Platforms where the USB4 / DP-tunneling stack is not ready yet. Rejecting
+ * USB4 here lets the Type-C stack fall back to USB3 + DP Alt Mode instead of
+ * negotiating USB4 and then failing to drive DisplayPort.
+ *
+ * This is a temporary, kernel-contained quirk (not DT ABI). Drop the entries
+ * once the corresponding USB4 support is complete.
+ */
+static const char * const ps883x_disable_usb4_compats[] = {
+ "qcom,x1e80100",
+ "qcom,x1p42100",
+ "qcom,hamoa",
+ "qcom,purwa",
+ NULL,
+};
+
struct ps883x_retimer {
struct i2c_client *client;
struct gpio_desc *reset_gpio;
@@ -63,8 +80,21 @@ struct ps883x_retimer {
enum typec_orientation orientation;
bool in_reset;
+ bool disable_usb4;
};
+static bool ps883x_should_disable_usb4(void)
+{
+ const char * const *compat;
+
+ for (compat = ps883x_disable_usb4_compats; *compat; compat++) {
+ if (of_machine_is_compatible(*compat))
+ return true;
+ }
+
+ return false;
+}
+
static int ps883x_enable_vregs(struct ps883x_retimer *retimer)
{
struct device *dev = &retimer->client->dev;
@@ -260,6 +290,9 @@ 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)
+ return -EOPNOTSUPP;
+
eudo_data = state->data;
cfg2 |= CONN_STATUS_2_USB4_CONNECTED;
@@ -389,6 +422,10 @@ static int ps883x_retimer_probe(struct i2c_client *client)
retimer->client = client;
+ retimer->disable_usb4 = ps883x_should_disable_usb4();
+ if (retimer->disable_usb4)
+ dev_info(dev, "USB4 disabled until platform USB4 support is complete\n");
+
mutex_init(&retimer->lock);
retimer->regmap = devm_regmap_init_i2c(client, &ps883x_retimer_regmap);
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F
2026-09-16 19:36 ` [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
@ 2026-09-18 9:55 ` Heikki Krogerus
0 siblings, 0 replies; 7+ messages in thread
From: Heikki Krogerus @ 2026-09-18 9:55 UTC (permalink / raw)
To: jens.glathe
Cc: Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson, Konrad Dybcio,
Sebastian Reichel, linux-usb, linux-kernel, linux-arm-msm,
stable, Dr. David Alan Gilbert, Dmitry Baryshkov
On Wed, Sep 16, 2026 at 09:36:32PM +0200, Jens Glathe via B4 Relay wrote:
> 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).
>
> Group it with TYPEC_DP_STATE_D.
>
> Assisted-by: Grok(xAI):4.6
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/mux/ps883x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
> index 64e0a61b776a1..a5696aef054ee 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
> @@ -207,6 +207,7 @@ static int ps883x_set(struct ps883x_retimer *retimer, struct typec_retimer_state
>
> switch (state->mode) {
> case TYPEC_DP_STATE_D:
> + case TYPEC_DP_STATE_F:
> cfg0 |= CONN_STATUS_0_USB_3_1_CONNECTED;
> fallthrough;
> case TYPEC_DP_STATE_C:
>
> --
> 2.53.0
>
--
heikki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs
2026-09-16 19:36 ` [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
@ 2026-09-18 9:55 ` Heikki Krogerus
0 siblings, 0 replies; 7+ messages in thread
From: Heikki Krogerus @ 2026-09-18 9:55 UTC (permalink / raw)
To: jens.glathe
Cc: Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson, Konrad Dybcio,
Sebastian Reichel, linux-usb, linux-kernel, linux-arm-msm,
stable, Dr. David Alan Gilbert, Dmitry Baryshkov
On Wed, Sep 16, 2026 at 09:36:33PM +0200, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
>
> The connection-status registers need time to propagate through the
> analog front-end (PLLs, lane training) after they are written. A 30 ms
> delay after ps883x_configure() brings DisplayPort Alt Mode hotplug on
> the Lenovo 40B0 to a reliable success rate.
>
> Tested with T14s G6 and IdeaCentre Mini with the 40B0 dock on the HDMI
> port with a Type-C host cable. Qualcomm firmware that programs this
> retimer from an MCU uses a similar post-config delay.
>
> Assisted-by: Grok(xAI):4.6
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> 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 a5696aef054ee..15aee1d613b1a 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
> @@ -7,6 +7,7 @@
>
> #include <drm/bridge/aux-bridge.h>
> #include <linux/clk.h>
> +#include <linux/delay.h>
> #include <linux/gpio/consumer.h>
> #include <linux/i2c.h>
> #include <linux/kernel.h>
> @@ -184,6 +185,15 @@ static int ps883x_configure(struct ps883x_retimer *retimer, int cfg0,
> return ret;
> }
>
> + /*
> + * The retimer needs time after the connection-status registers are
> + * written for the analog front-end (PLLs, lane training) to settle.
> + * Without this, DisplayPort Alt Mode hotplug is unreliable on some
> + * docks (e.g. Lenovo 40B0). Qualcomm firmware on platforms that
> + * program this chip from an MCU uses a similar post-config delay.
> + */
> + fsleep(30000);
> +
> return 0;
> }
>
>
> --
> 2.53.0
>
--
heikki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms
2026-09-16 19:36 ` [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms Jens Glathe via B4 Relay
@ 2026-09-18 9:56 ` Heikki Krogerus
0 siblings, 0 replies; 7+ messages in thread
From: Heikki Krogerus @ 2026-09-18 9:56 UTC (permalink / raw)
To: jens.glathe
Cc: Greg Kroah-Hartman, Abel Vesa, Bjorn Andersson, Konrad Dybcio,
Sebastian Reichel, linux-usb, linux-kernel, linux-arm-msm,
stable, Dr. David Alan Gilbert, Dmitry Baryshkov
On Wed, Sep 16, 2026 at 09:36:34PM +0200, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
>
> On Qualcomm X1E80100 / X1P42100 platforms using the Parade PS883x
> retimer, hotplugging USB4-capable docks such as the Lenovo 40B0 can
> result in working USB but no DisplayPort output.
>
> When the dock negotiates USB4, the retimer receives TYPEC_MODE_USB4
> and forwards it via typec_mux_set(). The qmp-combo PHY then selects
> USB3-only because no classic DP altmode SVID is present in the state,
> leaving the DP transmitter and AUX channel disabled.
>
> Reject USB4 with -EOPNOTSUPP on platforms whose USB4 / DP-tunneling
> stack is not ready yet. The Type-C stack then falls back to USB3 + DP
> Alt Mode. DP altmode configuration continues to use the existing
> ps883x_set() path.
>
> Use a machine-compatible table rather than a DT property so the quirk
> stays inside the kernel and can be removed later without creating ABI.
>
> Link: https://patch.msgid.link/20260312101431.2375709-1-krishna.kurapati@oss.qualcomm.com
> Assisted-by: Grok(xAI):4.6
> Tested-by: Dr. David Alan Gilbert <dave@treblig.org>
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/mux/ps883x.c | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
> index 15aee1d613b1a..2ec57cfe748a9 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
> @@ -13,6 +13,7 @@
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/mutex.h>
> +#include <linux/of.h>
> #include <linux/regmap.h>
> #include <linux/regulator/consumer.h>
> #include <linux/usb/pd.h>
> @@ -42,6 +43,22 @@
> #define CONN_STATUS_2_TBT_UNIDIR_LSRX_ACT_LT BIT(4)
> #define CONN_STATUS_2_USB4_CONNECTED BIT(7)
>
> +/*
> + * Platforms where the USB4 / DP-tunneling stack is not ready yet. Rejecting
> + * USB4 here lets the Type-C stack fall back to USB3 + DP Alt Mode instead of
> + * negotiating USB4 and then failing to drive DisplayPort.
> + *
> + * This is a temporary, kernel-contained quirk (not DT ABI). Drop the entries
> + * once the corresponding USB4 support is complete.
> + */
> +static const char * const ps883x_disable_usb4_compats[] = {
> + "qcom,x1e80100",
> + "qcom,x1p42100",
> + "qcom,hamoa",
> + "qcom,purwa",
> + NULL,
> +};
> +
> struct ps883x_retimer {
> struct i2c_client *client;
> struct gpio_desc *reset_gpio;
> @@ -63,8 +80,21 @@ struct ps883x_retimer {
>
> enum typec_orientation orientation;
> bool in_reset;
> + bool disable_usb4;
> };
>
> +static bool ps883x_should_disable_usb4(void)
> +{
> + const char * const *compat;
> +
> + for (compat = ps883x_disable_usb4_compats; *compat; compat++) {
> + if (of_machine_is_compatible(*compat))
> + return true;
> + }
> +
> + return false;
> +}
> +
> static int ps883x_enable_vregs(struct ps883x_retimer *retimer)
> {
> struct device *dev = &retimer->client->dev;
> @@ -260,6 +290,9 @@ 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)
> + return -EOPNOTSUPP;
> +
> eudo_data = state->data;
>
> cfg2 |= CONN_STATUS_2_USB4_CONNECTED;
> @@ -389,6 +422,10 @@ static int ps883x_retimer_probe(struct i2c_client *client)
>
> retimer->client = client;
>
> + retimer->disable_usb4 = ps883x_should_disable_usb4();
> + if (retimer->disable_usb4)
> + dev_info(dev, "USB4 disabled until platform USB4 support is complete\n");
> +
> mutex_init(&retimer->lock);
>
> retimer->regmap = devm_regmap_init_i2c(client, &ps883x_retimer_regmap);
>
> --
> 2.53.0
>
--
heikki
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-18 9:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 19:36 [PATCH v3 0/3] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
2026-09-16 19:36 ` [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
2026-09-18 9:55 ` Heikki Krogerus
2026-09-16 19:36 ` [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
2026-09-18 9:55 ` Heikki Krogerus
2026-09-16 19:36 ` [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms Jens Glathe via B4 Relay
2026-09-18 9:56 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®