From nobody Thu Sep 24 15:13:14 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 4F819541E70; Tue, 22 Sep 2026 12:25:39 +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=1790079939; cv=none; b=UC/en+jSxzaOYN88rbqR1wHJH15A4rW+pofMjvxm+ExNRofg+raa8bHwx/4htWWlg7kGXV5c3z/01i4OIzzwP+Voh5grO+ywKg/7Xyu1YxgRuTOz522v87hM6cEHkTktyDznCCRG5U6/i5U7+d82Nxgr6hKXCaJZ3mH/c2Rn3lM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790079939; c=relaxed/simple; bh=clE/Z0GgrzUztm52ZjbOdzeW8qM6TbuOhxaLVgLTrBA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SUjwxjY5liZD7XyTxwvyUBQh/nOR+VUNAr66KpSp0wmrZXh/LNNFUrS3b1Ais+bBafqtzmpYX+mvRusbTVJkgnVpwIrNyJGYNO0JymkkzV+5wZ4m8pgNLoMm1fekcopRXcSJHULak1hiOld48rR48W0vtEMne3AI0JX/5RtBH1k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z4S20sHX; 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="Z4S20sHX" Received: by smtp.kernel.org (Postfix) with ESMTPS id AAEABC2BCFA; Tue, 22 Sep 2026 12:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790079938; bh=clE/Z0GgrzUztm52ZjbOdzeW8qM6TbuOhxaLVgLTrBA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Z4S20sHXNHL5lvdi79UWNyebtzslKhBgmtsZ7JTDq5qUOaECzSK7b5cd52M+Evi1k YYHgAQE/KnyEvB2CUZpMsZmbN9p8C4EgfQZ+2y9CdDp2RqIKKeg9qruCYpjF5gHc3M RZe6Q88v98ST+m7n6hLjFN2BUSnUvYR1RjaOmpBrdej30P6sXSadYRwejTe0ttSRQu nyUitPKtgyFhTuvfaq1sjsai8BF+hFqZROSHskwq7JlP/u9+3ICBm0VD+/cZ32BNv6 G0RJuGFm7M1JRyyXv96jXT+a2i+HR6GO8jWaFl8oWv4m6E7cvEcP5rredmMrk3Re4X 3tdU46DetlsAQ== 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 7DB8FC982FF; Tue, 22 Sep 2026 12:25:38 +0000 (UTC) From: Jens Glathe via B4 Relay Date: Tue, 22 Sep 2026 14:25:29 +0200 Subject: [PATCH v5 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F 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: <20260922-ps883x-disable-usb4-v5-1-02c0414978e6@oldschoolsolutions.biz> References: <20260922-ps883x-disable-usb4-v5-0-02c0414978e6@oldschoolsolutions.biz> In-Reply-To: <20260922-ps883x-disable-usb4-v5-0-02c0414978e6@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=1790079937; l=936; i=jens.glathe@oldschoolsolutions.biz; s=20240919; h=from:subject:message-id; bh=qrj1s2PpCKclh5EwyG0Vo1P7ZOCUq/0XCQs0f4FZ16Q=; b=UsUnJYK41hJDcR8atDqzP2I1B5ohBA6G4f93GKWut/HuRECF/YcpsV+wX3xdtjs/rt7kiwXUh hLM0BL1z4TWAnnDJ5mvYBGfUCIws8YGHSemc+CRe/rPhpthKbdcp12Y 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). Group it with TYPEC_DP_STATE_D. Assisted-by: Grok(xAI):4.6 Acked-by: Heikki Krogerus Signed-off-by: Jens Glathe --- 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, s= truct typec_retimer_state =20 switch (state->mode) { case TYPEC_DP_STATE_D: + case TYPEC_DP_STATE_F: cfg0 |=3D CONN_STATUS_0_USB_3_1_CONNECTED; fallthrough; case TYPEC_DP_STATE_C: --=20 2.53.0 From nobody Thu Sep 24 15:13:14 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 4F68F541E6D; Tue, 22 Sep 2026 12:25:39 +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=1790079939; cv=none; b=FDYwD3B9A+PITY4V+MWHBMYvBcr20pbRpdsXUJRDu/A0KAl7LkkDukfP4fixNRPANtVJNRc84penUCShzwVTua33IMndPtqILIjEeGur5TrnDziE2+ycg5WkglOCHcsgKt46IcIP13r11ecB92GMORFTc7ECn4jo44GtL0IWDWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790079939; c=relaxed/simple; bh=iElfDspKaFxZAER9CiupajWCePulqE1zjuuE149+Hog=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S3RnAKwOEX9fLsIL7oGTfCEROpmN6ED2zt2BSNDghMCW5m8qwfbFeok5rHGLDCYbEr1UqgnnPAEb9S4/jsGENoNrn/GAPT+rMn/jaL/0ixap/isYqgsTF0Ak7U/Ebrs58AhlXRlTXv1fT6ln3YSZy+8JTzNBe/6WPTZILyrUyO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ivYhLQWy; 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="ivYhLQWy" Received: by smtp.kernel.org (Postfix) with ESMTPS id BF41EC2BCFF; Tue, 22 Sep 2026 12:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790079938; bh=iElfDspKaFxZAER9CiupajWCePulqE1zjuuE149+Hog=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ivYhLQWyVYEbwmlrLuRrPeP/td+aPVDq9hrwGfSQkixot9gippoGyPspWcSE9RSsW DcaY9SiQuZwJ4hvCympM3n/KFc2lMoZNI/BINO8yEeNZrs/d2djdDc+COHCfiy19HX bEldzxF0LUx+ja4AgBTp+N3h6+fbOlPeoi8fkxtJLUJY1MV+9AZqk7obqwsgAAOqIH eskvelrZ+WpzPcIfhRWBeyR97HC32Ad8H4mov8LOgXnMoPXRvBM0D0n2O8UYrqpsTt KKpD85DfzCwQNwL+vZMvEsE9cM9ipDyl9To2msZ+UIi9jJunPZKLSm6IdA03trpaKi xUfBRDDDfuzCQ== 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 90F9AC98306; Tue, 22 Sep 2026 12:25:38 +0000 (UTC) From: Jens Glathe via B4 Relay Date: Tue, 22 Sep 2026 14:25:30 +0200 Subject: [PATCH v5 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: <20260922-ps883x-disable-usb4-v5-2-02c0414978e6@oldschoolsolutions.biz> References: <20260922-ps883x-disable-usb4-v5-0-02c0414978e6@oldschoolsolutions.biz> In-Reply-To: <20260922-ps883x-disable-usb4-v5-0-02c0414978e6@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=1790079937; l=1632; i=jens.glathe@oldschoolsolutions.biz; s=20240919; h=from:subject:message-id; bh=bFSHfgooHbrl3Ye8+c5b+paG9lzebtfeVEngyUs0qtU=; b=GhG2+ecP++TW6Mx/ciG9ONWmZN0mDUjY9xapBQOiaf65R7DE/f31PRvGOus1+zFSnWme3Z/Ku 7XMuKIIfkUACsy8Fs32Ag2jQVLR0+klfLHPaHZQ+bQI7MhLbfyW+qbl 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 Acked-by: Heikki Krogerus 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 a5696aef054ee..15aee1d613b1a 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 Thu Sep 24 15:13:14 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 5C60139CD19; Tue, 22 Sep 2026 12:25:39 +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=1790079939; cv=none; b=Jc88wbyE9TmgR83JkVJJppuPsV67CLiZJ/3ZKzHfvF/2kSxcDqD0ywbi/VLeCzPCauwRyT8kejjQ7vtYnDIO011rz1MerTC1hSQReRK4E0+wlYj/vAJ5YmtEsIsq/MZxBdvBgsCwAV+8DQ8557WgAWDrbEY1kW09qYjWbS4khRE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790079939; c=relaxed/simple; bh=K9E3Hume0MDhffQuPWXTK4axi6uJFxaL9cFlT/cexI8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ouYWhUsVHfzzhrwC0X4/28YsYNwHB71oZQ4rd/Ys5eCMOyT3VSQkRrLmjqUd0YxptFzZ3XOWj+I9nLIqc4brKF27nSdh3jXRrdZMf6xDaQwNFqA2FYBervAZKQVMNiVecfo/VBe/c8gP+rn7q7vFFkGTyhe8l1D/p/7sE1wQbRQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rMyl53y6; 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="rMyl53y6" Received: by smtp.kernel.org (Postfix) with ESMTPS id BCF47C2BCFD; Tue, 22 Sep 2026 12:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790079938; bh=K9E3Hume0MDhffQuPWXTK4axi6uJFxaL9cFlT/cexI8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=rMyl53y6Sn3MFZljTUKRwc8Wxp16gKMk8fh1WsZGUS2C4A4wQ8QYaf+hoM3bWmgJi LwXZmmaOQQYACxdscfn/0VA58z3/isaaosMJrA3rHk1Pi4Ma/lex76UCIq7NFLCl9H VZ7AFb3NPXdkbIJf/MmWuaJ70dsJb7/iEDyYp7xs7CWUM3d6VbdDq96AWgSP055oN8 RronGx4bTUaazgSfRlW8U+MTP6Q505bUqlWNknf/9F0XkvYiVmJc/O4NI49JSFPUtK pvpfRRCmknxp/C7gqMRTYyKWBZW3uvyKiFftezMl1Tm6nW0Yml5yp6O/oNNkolVxQN WkJDWFZDKjICg== 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 A53E5C982FA; Tue, 22 Sep 2026 12:25:38 +0000 (UTC) From: Jens Glathe via B4 Relay Date: Tue, 22 Sep 2026 14:25:31 +0200 Subject: [PATCH v5 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: <20260922-ps883x-disable-usb4-v5-3-02c0414978e6@oldschoolsolutions.biz> References: <20260922-ps883x-disable-usb4-v5-0-02c0414978e6@oldschoolsolutions.biz> In-Reply-To: <20260922-ps883x-disable-usb4-v5-0-02c0414978e6@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=1790079937; l=3533; i=jens.glathe@oldschoolsolutions.biz; s=20240919; h=from:subject:message-id; bh=IJn1a2EheO3ZjpVwt5jjaDW809GzOJ6t3d7J87gPtzw=; b=ot0/2N+7+ydQsD6dddRkkNDt8HxG0HETgQ/y+QQSwjkyG9ZfHE9eoGnrTHnZ4sLCDAUyIweqn YWKi+hBCeCmCEbWAjMIpOGlR7n2qrmi1aT/ojsbKBY0oG1XM3kfKBVD 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. Assisted-by: Grok(xAI):4.6 Tested-by: Dr. David Alan Gilbert Acked-by: Heikki Krogerus Signed-off-by: Jens Glathe --- 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 #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; @@ -260,6 +290,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; @@ -389,6 +422,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