From nobody Sun Oct 5 05:28:58 2025 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 1B74926CE29; Thu, 7 Aug 2025 16:33:31 +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=1754584412; cv=none; b=YblEg85fmNOJ8wiWStEnALA3iLT1BKACNLMjEEfSb4Qp0KTk63asl2/oKnE2Ftecavk03Xjq8NK3fTqlNLn6o8JMXxTQ0cqilkFpQOkXiyoZHrsW2R82/iM80ZlO+3Xl4K+0j2WHIB35qmEaShY4x8gAfQPvXYHexw/7UixOD/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754584412; c=relaxed/simple; bh=FOL0w7DOfieRoHaB9Ul78LDBqcess9+ToUcE7ykpAjE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XbciYunAViouJOcT/BT+tZWlrNNNgVfJ52VT3qt1XoQyh5gfGcGDOmbPF48jYlHPA5c5gyn0XaFzBr2hes1pRuM2GNwSmNfKUMqZLcEh73o+VpQF98FyrTMqZ+1ZxnoBTQZrzQDiqPbWeusb0OkR1olkN240sokwPXNiwwB+mtQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y0rf1jvE; 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="Y0rf1jvE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3280CC4CEF6; Thu, 7 Aug 2025 16:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754584411; bh=FOL0w7DOfieRoHaB9Ul78LDBqcess9+ToUcE7ykpAjE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Y0rf1jvEePu0QXxOhXR1SdRP5SKyROhFHVQppBqQt17nwA9+kcZfjObXJU9jVrvYA VKGScnIORIlYBVT5Uv1dx2lPgyUPUlet+YXwUwpx2mnTTOuijETwzdesxpyjOZmX7q 59dvl24bSHQyOXRdoUCKpHvsIjPv5MxdYKsxRbRN9S+Rjgmn0kckgCLVoYotlYNnOT 61jlcDLB3cE0hdfIbthS4yKZgcJGBi7RxGeVaxUl+Ppv53hLwoSVfJwpHIDZLTihWI okZJNk7Z71Z7hxZgvBhkTUKuLvXNEhs3wbhwy3ntKhWpo0AojampzCcEsIjKw2jJVT ZZyS5ok3TSKzA== From: Konrad Dybcio Date: Thu, 07 Aug 2025 18:33:19 +0200 Subject: [PATCH v4 1/6] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Reference usb-switch.yaml to allow mode-switch 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: <20250807-topic-4ln_dp_respin-v4-1-43272d6eca92@oss.qualcomm.com> References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754584403; l=1691; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=OavRSmJV+Lo9KCyA/cX+W+bVR/yk4ys3JG3suJf8dkc=; b=Iafcr1U2bjgUJpEYLDgsUhD1dl27BHIaVCsIxR10n1ssD+yiCBI5ZwHQaqBesxQ2wtL+48XE7 NYq52AnNE2lAOhFGc1AD1g4wEQdVZ8hUNZo64GTwc/cLT1I9djRHC3M X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Neil Armstrong The QMP USB3/DP Combo PHY can work in 3 modes: - DisplayPort Only - USB3 Only - USB3 + DisplayPort Combo mode In order to switch between those modes, the PHY needs to receive Type-C events, allow marking to the phy with the mode-switch property in order to allow the PHY to Type-C events. Reference usb-switch.yaml as a simpler way to allow the mode-switch property instead of duplicating the property definition. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Tested-by: Neil Armstrong # on Lenovo Thinkpad = T14S --- .../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 7 +++= ---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43d= p-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43d= p-phy.yaml index 38ce04c35d945d0d8d319191c241920810ee9005..c8bc512df08b5694c8599f475de= 78679a4438449 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.y= aml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.y= aml @@ -73,10 +73,8 @@ properties: description: See include/dt-bindings/phy/phy-qcom-qmp.h =20 - orientation-switch: - description: - Flag the PHY as possible handler of USB Type-C orientation switching - type: boolean + mode-switch: true + orientation-switch: true =20 ports: $ref: /schemas/graph.yaml#/properties/ports @@ -106,6 +104,7 @@ required: - "#phy-cells" =20 allOf: + - $ref: /schemas/usb/usb-switch.yaml# - if: properties: compatible: --=20 2.50.1 From nobody Sun Oct 5 05:28:58 2025 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 2B1151E5207; Thu, 7 Aug 2025 16:33:35 +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=1754584416; cv=none; b=U+xPip90cbgaw0/ztfY4Lep9MXGjsnhEEqvXUFglS+xdcl6NSqJoezgCddXFoj90a/cHbmJnGF5Fm6mnDe2Mgm0pcboblWy0ql5YDOOvJzQSjW9TQHTjHt0xoByZARFUk/3MGD6cFumHPDFxTDWQkyIdL/PMwHp0CuPE/6NNhSQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754584416; c=relaxed/simple; bh=pA19sZ42BZajVjYKOabBiRIt+Rnz8rtfme/PEUxiTnA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PpAoA/Dns/IX7WAgq/PwZVnK0htrs/8H4ex9GopMwsBA47KSv4M3y1FD7xwr6eWjE+jINJDpVjSDqBxvoGeOvnXhBF9o5EH2/8ff4P/2ZpCijPZQA6Smh4LYdvEFt6kCbdRCN/2pKcznjHvf+xyiOuGPAz3QFlDsm8+QcjcSp5c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QVqX96ba; 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="QVqX96ba" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30C90C4CEEB; Thu, 7 Aug 2025 16:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754584415; bh=pA19sZ42BZajVjYKOabBiRIt+Rnz8rtfme/PEUxiTnA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QVqX96baNidINxbX0llwlb7Ty5zXd1G8jLebOWqs5ipFzhLVpGA+VXar+fHNTz/1p XKl98sxLevpGcgpFuj7pbxWKVnazD0p5CqvuhYh5/ge00l6ELdsdCgvOn4+vBgIiaN DQLK8pZitPydHmzBO/+UH0PQZjdHO1uYhbJYAxadvbEb+z0R8bxrpGu3lWt3vBxfUG MeXLO+umGa1/SaqOXYScwKjxcMek3FL0g00DvHIdMftEFfKIcfD8EA2ZLQ78wNaKzN mxSb6HFERb76z7SkwtlYxqScKo4Zhqq/oxDDng/73Koqo6+6Jvpi0VCU/Ofkpvm2G2 HFDi7uirGa2QA== From: Konrad Dybcio Date: Thu, 07 Aug 2025 18:33:20 +0200 Subject: [PATCH v4 2/6] phy: qcom: qmp-combo: Rename 'mode' to 'phy_mode' 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: <20250807-topic-4ln_dp_respin-v4-2-43272d6eca92@oss.qualcomm.com> References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754584403; l=2402; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=kCUGw2ZG4jADwmyw1DR7mxx+tUirNJ8dufluE/gZfMU=; b=RVFvlh2VFtFHI/0LV1PdsnCTQLkqID5tl54VfFMW9rq5TP6hD0LXShLfOWFj6SNoblpQz8SuU 8Zd2z5bMnCLBZoEIJrVTnBjaCmPru/NBLw9KhKD8ezHNg0mz69yZz10 X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio There are a numbers of ""modes"" involved: USB mode, Type-C mode (with its altmodes), phy_mode and QMP_PHY mode (DP/combo/USB/off). Rename the generic sounding 'mode' to 'phy_mode' to hopefully make the code easier to follow. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on Lenovo Thinkpad = T14S --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index f07d097b129fb7b3fad003103b7468b16c1c4390..30749943f66280c3aa9e9673466= f6f736d1adbc8 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -1846,7 +1846,7 @@ struct qmp_combo { int init_count; =20 struct phy *usb_phy; - enum phy_mode mode; + enum phy_mode phy_mode; unsigned int usb_init_count; =20 struct phy *dp_phy; @@ -3282,7 +3282,7 @@ static int qmp_combo_usb_set_mode(struct phy *phy, en= um phy_mode mode, int submo { struct qmp_combo *qmp =3D phy_get_drvdata(phy); =20 - qmp->mode =3D mode; + qmp->phy_mode =3D mode; =20 return 0; } @@ -3311,8 +3311,8 @@ static void qmp_combo_enable_autonomous_mode(struct q= mp_combo *qmp) void __iomem *pcs_misc =3D qmp->pcs_misc; u32 intr_mask; =20 - if (qmp->mode =3D=3D PHY_MODE_USB_HOST_SS || - qmp->mode =3D=3D PHY_MODE_USB_DEVICE_SS) + if (qmp->phy_mode =3D=3D PHY_MODE_USB_HOST_SS || + qmp->phy_mode =3D=3D PHY_MODE_USB_DEVICE_SS) intr_mask =3D ARCVR_DTCT_EN | ALFPS_DTCT_EN; else intr_mask =3D ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL; @@ -3355,7 +3355,7 @@ static int __maybe_unused qmp_combo_runtime_suspend(s= truct device *dev) { struct qmp_combo *qmp =3D dev_get_drvdata(dev); =20 - dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->mode); + dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->phy_mode); =20 if (!qmp->init_count) { dev_vdbg(dev, "PHY not initialized, bailing out\n"); @@ -3375,7 +3375,7 @@ static int __maybe_unused qmp_combo_runtime_resume(st= ruct device *dev) struct qmp_combo *qmp =3D dev_get_drvdata(dev); int ret =3D 0; =20 - dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qmp->mode); + dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qmp->phy_mode); =20 if (!qmp->init_count) { dev_vdbg(dev, "PHY not initialized, bailing out\n"); --=20 2.50.1 From nobody Sun Oct 5 05:28:58 2025 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 1C9A7269CF0; Thu, 7 Aug 2025 16:33: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=1754584420; cv=none; b=esNl79VxhYAwsBi8jP2K8WqxBjEowNQMGJw0LG2qibebsBQZM3JUrouwzvw6SvTSJ6myyWK7Z/47XHkrEBAoRkDBsaQUDtfOiZ+e6hHNzcBb9hLm8KmWNBZ97Wmh2PFCk/zYwtTDnoooBMqs1AZBuU9zOgHWDNYyqf5G0FUNxy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754584420; c=relaxed/simple; bh=jvWzq/jhwmzxUOYWJiEWx1AbYjz8lwwJJyycnQyUSE0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=G/BVEwY1KQlfQRDhkgqDZaQ5gONy88/3fJhALVWmD7ognE2+0bzGU6YBtNA8/XRhgO2IT7+l0O23aaejt8nIy/ttcOzdVG0wGR3UYIu++Gk9//nZ0LDIHzaH3tCgz4ZphX66HOsIGDUv194b0KbfdP9Z7v6vAUCzNtizczZUqfA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dBHrxj0N; 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="dBHrxj0N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ED5FC4CEF7; Thu, 7 Aug 2025 16:33:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754584419; bh=jvWzq/jhwmzxUOYWJiEWx1AbYjz8lwwJJyycnQyUSE0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dBHrxj0NsrkSB4c4DT9Im33s/MGvLORvJm5GYeSnSSeAJYY7HRr8T6pWdiFRJm5Kb An16m++E8vMn6FIvlfJYZaYyWnWTTBieNOVAmcUOJsDjwG+SxaXjWRT8c6lt+7efZY zZ26F8DSDmcEHjohE3RZT+1dIboO6a56AL8Gw2WSdVR/TBuuao9vufBaJtXJ8CswMX FxfRNINjshIqR3dapAvT8lJCHMU3EXzdfc+glY0NgLS5TPFupbnm+EwjPHtvjtOdy+ o76EYd1VnOD7+qRRxfIve/RwRATI20ru6+wShwwghF1QGwUe193chpf0nxIKSb2BC2 TvyPP6KduFImQ== From: Konrad Dybcio Date: Thu, 07 Aug 2025 18:33:21 +0200 Subject: [PATCH v4 3/6] phy: qcom: qmp-combo: store DP phy power state 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: <20250807-topic-4ln_dp_respin-v4-3-43272d6eca92@oss.qualcomm.com> References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Neil Armstrong , Dmitry Baryshkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754584403; l=1451; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=+D+J82kl0yf0XLZMz4TAWGQQKkf7pfXxbzQ3gQGkHyA=; b=AU+OQLFF8A1GAcGZDKFR80JBuuir7Yo8Y7YbSR24jYhoa5Ct/EOHXPKl7tZ4tZnN7PcI4lNWe /2aPdOIO1LoCzcbu6SFfvnLDJcWMeL31lBdEPxhQKhKeBMZ/lEeWZO8 X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Neil Armstrong Switching the PHY Mode requires the DisplayPort PHY to be powered off, keep track of the DisplayPort phy power state. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Signed-off-by: Konrad Dybcio Tested-by: Neil Armstrong # on Lenovo Thinkpad = T14S --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index 30749943f66280c3aa9e9673466f6f736d1adbc8..8395035754975808ee1b5b9c48d= 046a719e79e60 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -1853,6 +1853,7 @@ struct qmp_combo { unsigned int dp_aux_cfg; struct phy_configure_opts_dp dp_opts; unsigned int dp_init_count; + bool dp_powered_on; =20 struct clk_fixed_rate pipe_clk_fixed; struct clk_hw dp_link_hw; @@ -3133,6 +3134,8 @@ static int qmp_combo_dp_power_on(struct phy *phy) /* Configure link rate, swing, etc. */ cfg->configure_dp_phy(qmp); =20 + qmp->dp_powered_on =3D true; + mutex_unlock(&qmp->phy_mutex); =20 return 0; @@ -3147,6 +3150,8 @@ static int qmp_combo_dp_power_off(struct phy *phy) /* Assert DP PHY power down */ writel(DP_PHY_PD_CTL_PSR_PWRDN, qmp->dp_dp_phy + QSERDES_DP_PHY_PD_CTL); =20 + qmp->dp_powered_on =3D false; + mutex_unlock(&qmp->phy_mutex); =20 return 0; --=20 2.50.1 From nobody Sun Oct 5 05:28:58 2025 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 A14CB270EDF; Thu, 7 Aug 2025 16:33:43 +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=1754584425; cv=none; b=YKdIb7oIIh60QQyLgQBbZf3xRmHSZ1x0fGRQfmaOzIkGNoKgl8LPGXkX3sHGG2qkRLUd0u5U3CM1GVddrP2dVdR5PnIcRrJIfU2/px+xumKPY6blUOkspmtyQnJyOobRnV7onqd6XQNP7MqI+It5lHHwb05FIrssWXyrQdaAbBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754584425; c=relaxed/simple; bh=vH+XAhFoFw8bFy65i97uyeO5sSUgfdapXmGNVliPTCY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DUq7206QIGvGrD67yO7hEihPG0RJNdfvv/XSGR70Zu3mX5l3zrAkG9KDg/2lCpCFaeOYrdges7wG6dzTRUp0MVl2lSLVWSG/Vg/z3IEM2ydHDDY7Mwv8CWd3NGr7KIyiEKBreymCgpFiUhMXBpUZln0nhk1X6Jw29tRkz/l2pWM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=inP1U+j8; 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="inP1U+j8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E8D8C4CEEB; Thu, 7 Aug 2025 16:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754584423; bh=vH+XAhFoFw8bFy65i97uyeO5sSUgfdapXmGNVliPTCY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=inP1U+j8GLuygHdBHyI5g2HB8++hrj50TXnv9YbSqem2vjoV45o8w5WP9IZTMJrZb sLY46LvtRUvmVUq9ZkiZjiSzdbAdWi3VTuntv4XiTIj7c+QOOV3AoaOlg3iuxvstA9 74qcPVw5oUOaBMB0VB5D1rAVtCArHJK13Fb8SIVpHL5yUi8hhaROOsh+Yn3BpkCiin pC/sjvAcdZ52vZQg2iTuvZRJYHBCpxn1VdhY6Huw3vbTkOIJ4TMI3gl6VisCVnxWOA SN8v/Q62sJTiy8iuCBejNQrj8syvCU+fWXBCzTt/oBeeSddmB9jGtkrRw9Rd9wahMw iAp0W6j6lS8jA== From: Konrad Dybcio Date: Thu, 07 Aug 2025 18:33:22 +0200 Subject: [PATCH v4 4/6] phy: qcom: qmp-combo: introduce QMPPHY_MODE 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: <20250807-topic-4ln_dp_respin-v4-4-43272d6eca92@oss.qualcomm.com> References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Neil Armstrong X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754584403; l=3132; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=wwNxslbPGJK/G//pcTLP5e9hP0rnAe22Nbzx6I8BS6A=; b=O3EkWAfpwOBee9+xb4F8ZXG5qiQHu0ZfS1BfuPaHUlsViOcPtkxfqQRmWujBK0WLBPAqRVqN7 8fDIFIGYNwoAYNotjtZ4d1adHE6RtEJ2Q/LPHDE2w610r4MMtX/EPRl X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Neil Armstrong Introduce an enum for the QMP Combo PHY modes, use it in the QMP commmon phy init function and default to COMBO mode. Signed-off-by: Neil Armstrong [konrad: some renaming and rewording] Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Neil Armstrong # on Lenovo Thinkpad = T14S --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 44 +++++++++++++++++++++++++++= ---- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index 8395035754975808ee1b5b9c48d046a719e79e60..c65837fc9e4c38673fc61d3ae66= 072ba5a265a70 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -62,6 +62,12 @@ =20 #define PHY_INIT_COMPLETE_TIMEOUT 10000 =20 +enum qmpphy_mode { + QMPPHY_MODE_USB3DP =3D 0, + QMPPHY_MODE_DP_ONLY, + QMPPHY_MODE_USB3_ONLY, +}; + /* set of registers with offsets different per-PHY */ enum qphy_reg_layout { /* PCS registers */ @@ -1844,6 +1850,7 @@ struct qmp_combo { =20 struct mutex phy_mutex; int init_count; + enum qmpphy_mode qmpphy_mode; =20 struct phy *usb_phy; enum phy_mode phy_mode; @@ -3037,12 +3044,33 @@ static int qmp_combo_com_init(struct qmp_combo *qmp= , bool force) if (qmp->orientation =3D=3D TYPEC_ORIENTATION_REVERSE) val |=3D SW_PORTSELECT_VAL; writel(val, com + QPHY_V3_DP_COM_TYPEC_CTRL); - writel(USB3_MODE | DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL); =20 - /* bring both QMP USB and QMP DP PHYs PCS block out of reset */ - qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, - SW_DPPHY_RESET_MUX | SW_DPPHY_RESET | - SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); + switch (qmp->qmpphy_mode) { + case QMPPHY_MODE_USB3DP: + writel(USB3_MODE | DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL); + + /* bring both QMP USB and QMP DP PHYs PCS block out of reset */ + qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, + SW_DPPHY_RESET_MUX | SW_DPPHY_RESET | + SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); + break; + + case QMPPHY_MODE_DP_ONLY: + writel(DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL); + + /* bring QMP DP PHY PCS block out of reset */ + qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, + SW_DPPHY_RESET_MUX | SW_DPPHY_RESET); + break; + + case QMPPHY_MODE_USB3_ONLY: + writel(USB3_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL); + + /* bring QMP USB PHY PCS block out of reset */ + qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, + SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); + break; + } =20 qphy_clrbits(com, QPHY_V3_DP_COM_SWI_CTRL, 0x03); qphy_clrbits(com, QPHY_V3_DP_COM_SW_RESET, SW_RESET); @@ -4053,6 +4081,12 @@ static int qmp_combo_probe(struct platform_device *p= dev) if (ret) goto err_node_put; =20 + /* + * The hw default is USB3_ONLY, but USB3+DP mode lets us more easily + * check both sub-blocks' init tables for blunders at probe time. + */ + qmp->qmpphy_mode =3D QMPPHY_MODE_USB3DP; + qmp->usb_phy =3D devm_phy_create(dev, usb_np, &qmp_combo_usb_phy_ops); if (IS_ERR(qmp->usb_phy)) { ret =3D PTR_ERR(qmp->usb_phy); --=20 2.50.1 From nobody Sun Oct 5 05:28:58 2025 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 52606273816; Thu, 7 Aug 2025 16:33:47 +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=1754584427; cv=none; b=Ul9pUWkzl8E6d5b4HIpuY28e/ed/I7C4VsDzAJcKRmkpmCcyn/5G98xBy++zJvdympgh3+oAVYWqa8DKdZwcNx7cbXeOkEEBeuPLLvMDr1AIJoPPpmi6TsmlDrsH74YZ/lN3qcaFYRjkweZSZEEqp/kZJF+E1NEUYpfriKXvBHA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754584427; c=relaxed/simple; bh=fegBg5XJiL4auENg2P0V8FBF6syYEdNZYLJxeo4dCHE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dfRYoahejKRh9trBPExZsxP724FSXZDiYUzZfc1iDIp+uYkkNal5yA1DgVUGGL8vBOb73bWWYAeAXW/LcS8XC+TD56Ecqwi8ARXnTpGopWSPK7l2wv2DoLKBEh1jRuON5IRejPhATZy2j7XVPJO+wtDcpfwG0gs0iQoYYZVKJuc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hmoDhUfn; 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="hmoDhUfn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DFDEC4CEF1; Thu, 7 Aug 2025 16:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754584427; bh=fegBg5XJiL4auENg2P0V8FBF6syYEdNZYLJxeo4dCHE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hmoDhUfnA55C1CPX2W8Y6s76AFA2gNgIynRqpivaVXlXnEwqVfwbf5cypItU1GPh3 VABIFhISzjA7QuQBnB+spoR0dPBGLwxc4hsAAJ82S43ouyD2FNs847ZDtPpH7hXY/d NMkIFLr2vINDigkrcC80XKmSknQBY2nGjze67xGW9Gu4/JNtWxcltRUyODCeP7EOwP uyKaCSlPrbjZ1SVcRv6iaQ5U5fhwsrIpFSWrlNFQ5POUYOH8wHD/Uz5Mw1XdioF7tp X8YWA4HnmJF7v3tJwmRik7uqNcyZ0D1idr9uH5y6D8fss9MZGgam8Sbyu+NwR2aFKY kPY3FJ6CIN4iA== From: Konrad Dybcio Date: Thu, 07 Aug 2025 18:33:23 +0200 Subject: [PATCH v4 5/6] phy: qcom: qmp-combo: register a typec mux to change the QMPPHY_MODE 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: <20250807-topic-4ln_dp_respin-v4-5-43272d6eca92@oss.qualcomm.com> References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Neil Armstrong X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754584403; l=5551; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=QJc4KFJBoEuj4vbKzU7XavNaZXgyWM9KB1yFQkVjnoY=; b=5UwFM3vdPxfpCiL4Tuxf2i9Z2zhVyy6AfDtdz3kvlhGkXse2upjGHu7XfbI9+tLtgKfp+cZeT SEZFvsuyEQFANBwl7lri2sIkeK+2J029BDEmNAEqBB7RN1jz+XJoaTm X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Neil Armstrong Register a typec mux in order to change the PHY mode on the Type-C mux events depending on the mode and the svid when in Altmode setup. The DisplayPort phy should be left enabled if is still powered on by the DRM DisplayPort controller, so bail out until the DisplayPort PHY is not powered off. The Type-C Mode/SVID only changes on plug/unplug, and USB SAFE states will be set in between of USB-Only, Combo and DisplayPort Only so this will leave enough time to the DRM DisplayPort controller to turn of the DisplayPort PHY. Signed-off-by: Neil Armstrong [konrad: renaming, rewording, bug fixes] Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Neil Armstrong # on Lenovo Thinkpad = T14S --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 118 ++++++++++++++++++++++++++= ++-- 1 file changed, 113 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index c65837fc9e4c38673fc61d3ae66072ba5a265a70..7b5af30f1d028c592500e723ecd= 27b54ed554709 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -19,6 +19,7 @@ #include #include #include +#include #include =20 #include @@ -1868,6 +1869,8 @@ struct qmp_combo { =20 struct typec_switch_dev *sw; enum typec_orientation orientation; + + struct typec_mux_dev *mux; }; =20 static void qmp_v3_dp_aux_init(struct qmp_combo *qmp); @@ -3802,17 +3805,109 @@ static int qmp_combo_typec_switch_set(struct typec= _switch_dev *sw, return 0; } =20 -static void qmp_combo_typec_unregister(void *data) +static int qmp_combo_typec_mux_set(struct typec_mux_dev *mux, struct typec= _mux_state *state) +{ + struct qmp_combo *qmp =3D typec_mux_get_drvdata(mux); + const struct qmp_phy_cfg *cfg =3D qmp->cfg; + enum qmpphy_mode new_mode; + unsigned int svid; + + guard(mutex)(&qmp->phy_mutex); + + if (state->alt) + svid =3D state->alt->svid; + else + svid =3D 0; + + if (svid =3D=3D USB_TYPEC_DP_SID) { + switch (state->mode) { + /* DP Only */ + case TYPEC_DP_STATE_C: + case TYPEC_DP_STATE_E: + new_mode =3D QMPPHY_MODE_DP_ONLY; + break; + + /* DP + USB */ + case TYPEC_DP_STATE_D: + case TYPEC_DP_STATE_F: + + /* Safe fallback...*/ + default: + new_mode =3D QMPPHY_MODE_USB3DP; + break; + } + } else { + /* No DP SVID =3D> don't care, assume it's just USB3 */ + new_mode =3D QMPPHY_MODE_USB3_ONLY; + } + + if (new_mode =3D=3D qmp->qmpphy_mode) { + dev_dbg(qmp->dev, "typec_mux_set: same qmpphy mode, bail out\n"); + return 0; + } + + if (qmp->qmpphy_mode !=3D QMPPHY_MODE_USB3_ONLY && qmp->dp_powered_on) { + dev_dbg(qmp->dev, "typec_mux_set: DP PHY is still in use, delaying switc= h\n"); + return 0; + } + + dev_dbg(qmp->dev, "typec_mux_set: switching from qmpphy mode %d to %d\n", + qmp->qmpphy_mode, new_mode); + + qmp->qmpphy_mode =3D new_mode; + + if (qmp->init_count) { + if (qmp->usb_init_count) + qmp_combo_usb_power_off(qmp->usb_phy); + + if (qmp->dp_init_count) + writel(DP_PHY_PD_CTL_PSR_PWRDN, qmp->dp_dp_phy + QSERDES_DP_PHY_PD_CTL); + + qmp_combo_com_exit(qmp, true); + + /* Now everything's powered down, power up the right PHYs */ + qmp_combo_com_init(qmp, true); + + if (new_mode =3D=3D QMPPHY_MODE_DP_ONLY) { + if (qmp->usb_init_count) + qmp->usb_init_count--; + } + + if (new_mode =3D=3D QMPPHY_MODE_USB3DP || new_mode =3D=3D QMPPHY_MODE_US= B3_ONLY) { + qmp_combo_usb_power_on(qmp->usb_phy); + if (!qmp->usb_init_count) + qmp->usb_init_count++; + } + + if (new_mode =3D=3D QMPPHY_MODE_DP_ONLY || new_mode =3D=3D QMPPHY_MODE_U= SB3DP) { + if (qmp->dp_init_count) + cfg->dp_aux_init(qmp); + } + } + + return 0; +} + +static void qmp_combo_typec_switch_unregister(void *data) { struct qmp_combo *qmp =3D data; =20 typec_switch_unregister(qmp->sw); } =20 -static int qmp_combo_typec_switch_register(struct qmp_combo *qmp) +static void qmp_combo_typec_mux_unregister(void *data) +{ + struct qmp_combo *qmp =3D data; + + typec_mux_unregister(qmp->mux); +} + +static int qmp_combo_typec_register(struct qmp_combo *qmp) { struct typec_switch_desc sw_desc =3D {}; + struct typec_mux_desc mux_desc =3D { }; struct device *dev =3D qmp->dev; + int ret; =20 sw_desc.drvdata =3D qmp; sw_desc.fwnode =3D dev->fwnode; @@ -3823,10 +3918,23 @@ static int qmp_combo_typec_switch_register(struct q= mp_combo *qmp) return PTR_ERR(qmp->sw); } =20 - return devm_add_action_or_reset(dev, qmp_combo_typec_unregister, qmp); + ret =3D devm_add_action_or_reset(dev, qmp_combo_typec_switch_unregister, = qmp); + if (ret) + return ret; + + mux_desc.drvdata =3D qmp; + mux_desc.fwnode =3D dev->fwnode; + mux_desc.set =3D qmp_combo_typec_mux_set; + qmp->mux =3D typec_mux_register(dev, &mux_desc); + if (IS_ERR(qmp->mux)) { + dev_err(dev, "Unable to register typec mux: %pe\n", qmp->mux); + return PTR_ERR(qmp->mux); + } + + return devm_add_action_or_reset(dev, qmp_combo_typec_mux_unregister, qmp); } #else -static int qmp_combo_typec_switch_register(struct qmp_combo *qmp) +static int qmp_combo_typec_register(struct qmp_combo *qmp) { return 0; } @@ -4059,7 +4167,7 @@ static int qmp_combo_probe(struct platform_device *pd= ev) if (ret) goto err_node_put; =20 - ret =3D qmp_combo_typec_switch_register(qmp); + ret =3D qmp_combo_typec_register(qmp); if (ret) goto err_node_put; =20 --=20 2.50.1 From nobody Sun Oct 5 05:28:58 2025 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 67EDF2701C3; Thu, 7 Aug 2025 16:33:52 +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=1754584432; cv=none; b=BpGbnYzErZCJ0lV62wh2yIoP7DXvS+oloqsrU+1RbAl9yjlta+JqnRlICYffdi8pS3NhRhuJjvAIrgB3RzU1EVGSP4d+V9yzl1rvZ8j+a/DB8dAUk6qk+ResbnlLmaiBoSxKiFKfJgMSOwRLNKFlP9pmzG6dyTrAjNkRo3lzlkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754584432; c=relaxed/simple; bh=Ab/Ah5RUXiTyINsI8I1OGN6wqisIn1u/rAQpJWs7vE0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jI5ZqXJMiYLx6k7UGp2TTKk+/0nO0vfuTlcVMiL3igcUL/Aqk5mHaw9ONbvHjUWt3aFz9uipVUAsK+dhbDYWehZdToqvMgoYv+NraWBEdfVDwDjviZdZKC3VP7uOTfH2/gSJj9TEtuqQ1YqeKGg1YH2KBPKZBsy/TdLOSxiggBE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m+2RoI+c; 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="m+2RoI+c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBFCAC4CEF1; Thu, 7 Aug 2025 16:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754584431; bh=Ab/Ah5RUXiTyINsI8I1OGN6wqisIn1u/rAQpJWs7vE0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=m+2RoI+cFka6dYRS1AJnE/6VrN5i6v4VyoZIVMn/3hMloFoMUsN3dq7tidXoVIQZ5 jZux80Ih73hfD2Nt3P97N3NjR+Y2OwLwWZ+K0AjAsepbPERzLMHB0Z5K+jiO6IQ3g8 eeAagWCZzrc9p+gGmXEcrsUOsYTld2oQYx0hs1Vu8jNAc381AGGOrT/+F+t9NkpAGQ Xt11NbBFdEuoum64oMh++EGN6LJRrRUIS3aVXuDwxH0/yZvU4Nll/l/tZsx2rqxVYn JHzWPAgSQzhxgZYU9Zlq06tl3oP6d74z7nAalYoNscP1Ckt6CCQiJc40sC5uoYx1Sh oyhW+yFUPV2dA== From: Konrad Dybcio Date: Thu, 07 Aug 2025 18:33:24 +0200 Subject: [PATCH v4 6/6] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13: Set up 4-lane DP 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: <20250807-topic-4ln_dp_respin-v4-6-43272d6eca92@oss.qualcomm.com> References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Neil Armstrong , Dmitry Baryshkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754584403; l=1518; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=fpPnWdsJhI/IO7HnqnWUuSXUlLyBucXjVncZV83CkyU=; b=5ncn1mUnlV92O1tj3/FTe+weymWpPODxEKbJ0u5j7X+ZRUDTt5bd46Y34DmDQ2fEd78FaZLYe W2tgmWFbAjBC4v8W3dNvdLHqVqqw3Loj2mJLn7d3sgcmFVSgstbvaEP X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Neil Armstrong Allow up to 4 lanes for the DisplayPort link from the PHYs to the controllers and allow mode-switch events to reach the QMP Combo PHYs. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov [konrad: reword] Signed-off-by: Konrad Dybcio Tested-by: Neil Armstrong # on Lenovo Thinkpad = T14S --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/a= rch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index cefecb7a23cf579b1f62ef6fccf9a27a6ea92ac4..b298ec1162357f7f273cb603465= dab8388d4b38c 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -726,7 +726,7 @@ &mdss0_dp0 { }; =20 &mdss0_dp0_out { - data-lanes =3D <0 1>; + data-lanes =3D <0 1 2 3>; remote-endpoint =3D <&usb_0_qmpphy_dp_in>; }; =20 @@ -735,7 +735,7 @@ &mdss0_dp1 { }; =20 &mdss0_dp1_out { - data-lanes =3D <0 1>; + data-lanes =3D <0 1 2 3>; remote-endpoint =3D <&usb_1_qmpphy_dp_in>; }; =20 @@ -1360,6 +1360,7 @@ &usb_0_qmpphy { vdda-phy-supply =3D <&vreg_l9d>; vdda-pll-supply =3D <&vreg_l4d>; =20 + mode-switch; orientation-switch; =20 status =3D "okay"; @@ -1397,6 +1398,7 @@ &usb_1_qmpphy { vdda-phy-supply =3D <&vreg_l4b>; vdda-pll-supply =3D <&vreg_l3b>; =20 + mode-switch; orientation-switch; =20 status =3D "okay"; --=20 2.50.1