From nobody Fri Sep 25 10:39:16 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1ACC3B71C3; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789365931; cv=none; b=Ro4LLj5S22ZQEYkpH7APFyi6gWGrdYpxFZtzYxG4dm70Nb1eOag6BzYHlmAn1zal01ktKpJyMK1/n+MukkUw/C+WZYljpKnkuSlmS5ce5solrYNWHMUUsrdHg6WGnETgznNKzFw9x4OIIXG7bO8HDexL4grZkkWxX6mUjnGw3GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789365931; c=relaxed/simple; bh=8kG6KLZ/vXkLHtYqW8vR80+dqHlLUX+fn422OiemX+w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jjV13FhZwVZVzy1vRVqAlUXEfTeeDVvyuq8P57htK1gIuj5hfE98j1DLZ0YQg8nyGNSIdjT6mpt/8HD78xWIkyjuzRlkIF2wKfgHgmWy2TLiD2ZdgxDvfpy7kOevPABm+hNO2LcSU9/537x9duvZ8J7UvDWHJF95vbVh4F9HDmQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZeR8//aB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZeR8//aB" Received: by smtp.kernel.org (Postfix) with ESMTPS id 35EA4C2BCB8; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1789365930; bh=8kG6KLZ/vXkLHtYqW8vR80+dqHlLUX+fn422OiemX+w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ZeR8//aBvIreKvftWKGc3/J7wRedhUHJi+mtu2fFXh3DtVLvCtOUnG5LP9XSAP3tW EEMKUgCTJYjJL4jXQas9QyLCwObNObQFJQFxsqgEegLrT4IfsCl+35wXEa87/WQWMU 14UqlC+6EbqRRTYiW+1BkKKTBk+0o+/SU37g2pkQl2jQO8jRgULai+dDQF8dWwbQ+C 4X2EH7mLSqcf/RyqvosopyPv2XdjAGQQWvg+TeQ1sEc5+q5uEgqfZGJb55RVNL2dQN xxYATpB6PMtPSRJiC39S+AuynWyf5cD+PpBr1rTh/VpGGkImB83ggqCVIroPwiqesm dhKP0iuFun1AQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BE90C88E67; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) From: Jens Glathe via B4 Relay Date: Mon, 14 Sep 2026 08:05:01 +0200 Subject: [PATCH v2 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F like qmp-combo Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260914-ps883x-disable-usb4-v2-1-523c32b4e4d7@oldschoolsolutions.biz> References: <20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz> In-Reply-To: <20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz> To: Heikki Krogerus , Greg Kroah-Hartman , Abel Vesa , Bjorn Andersson , Konrad Dybcio , Sebastian Reichel Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stable@vger.kernel.org, "Dr. David Alan Gilbert" , Dmitry Baryshkov , Jens Glathe X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1789365928; l=1579; i=jens.glathe@oldschoolsolutions.biz; s=20240919; h=from:subject:message-id; bh=F2k80G6jUb5W7CRXkl9CEtWdLPEsEUv204R+yHY6szE=; b=YgoeL87oC3PMJdVpB4cGFDkryUSgij3jdjvckuyMrT9R+h7l1ADGu439DHUB47JiQqfMrgcB0 U6HVv9nIdcBCMgGSor9mCFIkwPoznw5mYd1bnrZ5eK0BQ5kItl9iOZb X-Developer-Key: i=jens.glathe@oldschoolsolutions.biz; a=ed25519; pk=JcRJqJc/y8LsxOlPakALD3juGfOKmFBWtO+GfELMJVg= X-Endpoint-Received: by B4 Relay for jens.glathe@oldschoolsolutions.biz/20240919 with auth_id=216 X-Original-From: Jens Glathe Reply-To: jens.glathe@oldschoolsolutions.biz From: Jens Glathe 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). Keep the handling in the existing DP altmode path in ps883x_set() and mirror qcom-qmp-combo: pin C/E are DP-only, pin D/F are USB3 + DP. STATE_E is grouped with STATE_C the same way. Assisted-by: Grok(xAI):4.6 Signed-off-by: Jens Glathe --- drivers/usb/typec/mux/ps883x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c index 64e0a61b776a1..c185d8897e3a4 100644 --- a/drivers/usb/typec/mux/ps883x.c +++ b/drivers/usb/typec/mux/ps883x.c @@ -205,21 +205,24 @@ static int ps883x_set(struct ps883x_retimer *retimer,= struct typec_retimer_state cfg1 |=3D CONN_STATUS_1_DP_CONNECTED | CONN_STATUS_1_DP_HPD_LEVEL; =20 - switch (state->mode) { + switch (state->mode) { + /* DP + USB3 (pin D, and legacy pin F) */ case TYPEC_DP_STATE_D: + case TYPEC_DP_STATE_F: cfg0 |=3D CONN_STATUS_0_USB_3_1_CONNECTED; fallthrough; + /* DP only (pin C, and pin E) */ case TYPEC_DP_STATE_C: + case TYPEC_DP_STATE_E: cfg1 |=3D CONN_STATUS_1_DP_SINK_REQUESTED | CONN_STATUS_1_DP_PIN_ASSIGNMENT_C_D; break; - default: /* MODE_E */ + default: break; } break; case USB_TYPEC_TBT_SID: tb_data =3D state->data; - /* Unconditional */ cfg2 |=3D CONN_STATUS_2_TBT_CONNECTED; =20 --=20 2.53.0 From nobody Fri Sep 25 10:39:16 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F11773B6C1C; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789365931; cv=none; b=uelUM5VMYUv3yM+G0j1eKSlk+oI0xfuBX1GVSmhJ3clTSr+RPpV1uSpO76PfJMEKlVjNpX/nDPjL57ws5Gdj+/uxTNVaUvMiwRqzdkkmxYaX7pFJA0uuH/xuoJtgbhH87FZ5bAsHzL6GLYeEIauLHw+2Gbq26Qp2nQVBbpGzj8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789365931; c=relaxed/simple; bh=koHbA//Hd+oUKb54XBErlAxnAOsqGyqZY8Sh/PB5Tdg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y7Jsaq9PediICep6YXAzE9DoTAe/Y3buwYT/y1G/yrJojPgI65cwkgLa6oHZG3o1ZiZ4kZ0XFWuBSczEYytPqkvRUWGLMvkLUlQBYyr+YI43FNWZWSDWSSYfSK+2UdfZjU0RnfzfcNggf8Pf5Z+mn3Z2areDGx8sRAu1IjDZRvI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PO+OA0+2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PO+OA0+2" Received: by smtp.kernel.org (Postfix) with ESMTPS id 3CC20C4AF09; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1789365930; bh=koHbA//Hd+oUKb54XBErlAxnAOsqGyqZY8Sh/PB5Tdg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=PO+OA0+2YAXDnl9S4oOMmfvGmP9rny4vxyBg29gGjC5Pn2le9YBX5Z7/NfeaNOT9G 4aF9DVGFGo3PrySO81q19JaO6ZcbmXInswFif5/3AE0gkmNdiGr3iR02d2IfB8vDgw 9oh6hn45Dw3iusV0gmOLMZFvKOESvXngLTHiTPjcusMLrTwM1z4F9AqP5CXCY1gvvk o34vKk+uvZUV41Ey9pgbp979ZEFS0Hyn8VSyBsRq9aaaNuMb7sBgQjjOXBc/PxKF04 JOmTNc2Z10nVqKxUfgm63Eqv+2DJ3etJdYNG8TGIgfD3NDvs53pGZt13/SrfHMdtjs z3Wh2T7S8tKOA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA8AC88E6A; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) From: Jens Glathe via B4 Relay Date: Mon, 14 Sep 2026 08:05:02 +0200 Subject: [PATCH v2 2/3] usb: typec: mux: ps883x: add a delay after writing config regs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260914-ps883x-disable-usb4-v2-2-523c32b4e4d7@oldschoolsolutions.biz> References: <20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz> In-Reply-To: <20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz> To: Heikki Krogerus , Greg Kroah-Hartman , Abel Vesa , Bjorn Andersson , Konrad Dybcio , Sebastian Reichel Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stable@vger.kernel.org, "Dr. David Alan Gilbert" , Dmitry Baryshkov , Jens Glathe X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1789365928; l=1571; i=jens.glathe@oldschoolsolutions.biz; s=20240919; h=from:subject:message-id; bh=D8avNZp7mg36tQCbaHtlJAlu07OwE/RGBF2BKM3mSKA=; b=ykLpnS2xe9wbd3cF9M/OrCl8S8CJDgPNPAjC/pE47LWBVSQ2IbnFEFHljr37A5Y1aqSrqUsCk R7MAKqOmctTAaDkeiV0Jp+pwabScLgh/rNUIlMs7J7vjx/Ysi7GALBJ X-Developer-Key: i=jens.glathe@oldschoolsolutions.biz; a=ed25519; pk=JcRJqJc/y8LsxOlPakALD3juGfOKmFBWtO+GfELMJVg= X-Endpoint-Received: by B4 Relay for jens.glathe@oldschoolsolutions.biz/20240919 with auth_id=216 X-Original-From: Jens Glathe Reply-To: jens.glathe@oldschoolsolutions.biz From: Jens Glathe 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 --- 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 c185d8897e3a4..e93e958065f6f 100644 --- a/drivers/usb/typec/mux/ps883x.c +++ b/drivers/usb/typec/mux/ps883x.c @@ -7,6 +7,7 @@ =20 #include #include +#include #include #include #include @@ -184,6 +185,15 @@ static int ps883x_configure(struct ps883x_retimer *ret= imer, int cfg0, return ret; } =20 + /* + * 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; } =20 --=20 2.53.0 From nobody Fri Sep 25 10:39:16 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F12793B71A4; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789365931; cv=none; b=KwodMoBGLuUVtl8voOLouM8SAXzJLY0zyzZe/SlPI46b6xRm07cu4sYt3y1D4yjDnLMn+jOWbWqE4asEfA+CVcTv9+jOTKKBxS3p8uVm1y9BPSAg19CIfUE2A5VEfOsJ55cnHg67/rJ6EtE2zLzmlK9keac/9pDl9DGJje7zNew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789365931; c=relaxed/simple; bh=U1A1gEcdldWjSFjB/80mZnQF0foGfDZaAUpMsrJ03Ow=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RzcnEnVLGjCIGTRJ6DkbNLl3gkxS5wMvOwA80NM4Dfp6ig5McADFw2FWAbC7tBvRq4wcepq3L+JWSwnlo5SvT4SaLSxluWkK+/CrOsrIgXGEimK7kzV+rwYQGtY116cLeFJ9HNYJf+zEgtPs0wxBUMyaXNWp+U1K+wkSK4O29qg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g/Zp/l36; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g/Zp/l36" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4D461C2BD01; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1789365930; bh=U1A1gEcdldWjSFjB/80mZnQF0foGfDZaAUpMsrJ03Ow=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=g/Zp/l36gfuUPD0VlEsFgWhe41JzTU8EoiGpbcNamYemNWhb8ZZtU51ImGWqCPuy8 if4j+taYzW/6JckovIIv+DeirgjNWWr8FPL1QHNU6yCfb1tD2m0vdKb2j3hpy+ZnPH XWYSzARIlevOdCMTBu29kpQ/xrsWfVfN8QTDoQDS8ROMKdzrpOf8u3J8kAVrI7x5tf 4gir41yM/6+rf7cL2OsbaM/b8C6MSFyQ+CThk5sXKg5fKIsSvhU888gWSu3XiF39bu Lh5aqTd9gC1hPB2bJ8Dvvq2J16Qoe60cNW9Y1QfJ97Y4mk0+orJPszi925wDmlAw2p KxsWLaMjCyvkg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C0C8C88E50; Mon, 14 Sep 2026 06:05:30 +0000 (UTC) From: Jens Glathe via B4 Relay Date: Mon, 14 Sep 2026 08:05:03 +0200 Subject: [PATCH v2 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260914-ps883x-disable-usb4-v2-3-523c32b4e4d7@oldschoolsolutions.biz> References: <20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz> In-Reply-To: <20260914-ps883x-disable-usb4-v2-0-523c32b4e4d7@oldschoolsolutions.biz> To: Heikki Krogerus , Greg Kroah-Hartman , Abel Vesa , Bjorn Andersson , Konrad Dybcio , Sebastian Reichel Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stable@vger.kernel.org, "Dr. David Alan Gilbert" , Dmitry Baryshkov , Jens Glathe X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1789365928; l=3509; i=jens.glathe@oldschoolsolutions.biz; s=20240919; h=from:subject:message-id; bh=HRk3TIyrVTGkkKEOnXE4mHkcveZPYCjC1Zdr4f5RWYg=; b=zCUBwAHzk08hBIQU+5xVnHBwU7lTo8jJiVxv48unaNA89Zf54gJQG8W/uOTJL5i7Vxo1o/zl2 jMQw9apC7ERAOlTQ9VBSYzAoghBfoDdpePgJ9sXOR0Ik4di7sSAcRI8 X-Developer-Key: i=jens.glathe@oldschoolsolutions.biz; a=ed25519; pk=JcRJqJc/y8LsxOlPakALD3juGfOKmFBWtO+GfELMJVg= X-Endpoint-Received: by B4 Relay for jens.glathe@oldschoolsolutions.biz/20240919 with auth_id=216 X-Original-From: Jens Glathe Reply-To: jens.glathe@oldschoolsolutions.biz From: Jens Glathe 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@os= s.qualcomm.com Assisted-by: Grok(xAI):4.6 Signed-off-by: Jens Glathe Tested-by: Dr. David Alan Gilbert --- 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 e93e958065f6f..02d6c04d45ae3 100644 --- a/drivers/usb/typec/mux/ps883x.c +++ b/drivers/usb/typec/mux/ps883x.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,22 @@ #define CONN_STATUS_2_TBT_UNIDIR_LSRX_ACT_LT BIT(4) #define CONN_STATUS_2_USB4_CONNECTED BIT(7) =20 +/* + * Platforms where the USB4 / DP-tunneling stack is not ready yet. Rejecti= ng + * 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 entr= ies + * once the corresponding USB4 support is complete. + */ +static const char * const ps883x_disable_usb4_compats[] =3D { + "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 { =20 enum typec_orientation orientation; bool in_reset; + bool disable_usb4; }; =20 +static bool ps883x_should_disable_usb4(void) +{ + const char * const *compat; + + for (compat =3D 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 =3D &retimer->client->dev; @@ -262,6 +292,9 @@ static int ps883x_set(struct ps883x_retimer *retimer, s= truct typec_retimer_state cfg0 |=3D CONN_STATUS_0_USB_3_1_CONNECTED; break; case TYPEC_MODE_USB4: + if (retimer->disable_usb4) + return -EOPNOTSUPP; + eudo_data =3D state->data; =20 cfg2 |=3D CONN_STATUS_2_USB4_CONNECTED; @@ -391,6 +424,10 @@ static int ps883x_retimer_probe(struct i2c_client *cli= ent) =20 retimer->client =3D client; =20 + retimer->disable_usb4 =3D ps883x_should_disable_usb4(); + if (retimer->disable_usb4) + dev_info(dev, "USB4 disabled until platform USB4 support is complete\n"); + mutex_init(&retimer->lock); =20 retimer->regmap =3D devm_regmap_init_i2c(client, &ps883x_retimer_regmap); --=20 2.53.0