Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Vinod Koul <vkoul@kernel.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	 Heiko Stuebner <heiko@sntech.de>,
	Frank Wang <frank.wang@rock-chips.com>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: Andy Yan <andy.yan@rock-chips.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	 Yubing Zhang <yubing.zhang@rock-chips.com>,
	 Alexey Charkov <alchark@flipper.net>,
	Igor Paunovic <royalnet026@gmail.com>,
	 linux-phy@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org,  kernel@collabora.com,
	devicetree@vger.kernel.org,
	 Sebastian Reichel <sebastian.reichel@collabora.com>,
	 Sashiko <sashiko-bot@kernel.org>
Subject: [PATCH v15 06/16] phy: rockchip: usbdp: Drop seamless DP takeover
Date: Tue, 15 Sep 2026 15:49:53 +0200	[thread overview]
Message-ID: <20260915-rockchip-usbdp-cleanup-v15-6-80e2c11d1ce8@collabora.com> (raw)
In-Reply-To: <20260915-rockchip-usbdp-cleanup-v15-0-80e2c11d1ce8@collabora.com>

Right now the DRM drivers do not support seamless DP takeover and I'm
I'm not aware of any bootloader implementing this feature either.

In any case this feature would be limited to boards using the USBDP PHY
for a DP or eDP connection instead of the more commonly USB-C connector.
With USB-C's DP AltMode a seamless DP takeover requires handing over the
state of the TCPM state machine from the bootloader to the kernel. This
in turn requires a huge amount of work to keep the state machine
implementations synchronized. It's very unlikely we will see somebody
implementing that in the foreseeable future.

As the current code is obviously buggy and untested, let's simply drop
support for seamless DP takeover. It can be re-implemented cleanly once
somebody adds all missing bits.

Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/linux-phy/20260612164107.C7DB21F000E9@smtp.kernel.org/
Tested-by: Igor Paunovic <royalnet026@gmail.com> # Orange Pi 5 Plus
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/phy/rockchip/phy-rockchip-usbdp.c | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-usbdp.c b/drivers/phy/rockchip/phy-rockchip-usbdp.c
index 93364728bca4..ce2b74a28801 100644
--- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
+++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
@@ -451,11 +451,6 @@ static int rk_udphy_reset_assert_all(struct rk_udphy *udphy)
 	return reset_control_bulk_assert(udphy->num_rsts, udphy->rsts);
 }
 
-static int rk_udphy_reset_deassert_all(struct rk_udphy *udphy)
-{
-	return reset_control_bulk_deassert(udphy->num_rsts, udphy->rsts);
-}
-
 static int rk_udphy_reset_deassert(struct rk_udphy *udphy, char *name)
 {
 	struct reset_control_bulk_data *list = udphy->rsts;
@@ -923,28 +918,6 @@ static int rk_udphy_parse_lane_mux_data(struct rk_udphy *udphy)
 	return 0;
 }
 
-static int rk_udphy_get_initial_status(struct rk_udphy *udphy)
-{
-	int ret;
-	u32 value;
-
-	ret = clk_bulk_prepare_enable(udphy->num_clks, udphy->clks);
-	if (ret) {
-		dev_err(udphy->dev, "failed to enable clk\n");
-		return ret;
-	}
-
-	rk_udphy_reset_deassert_all(udphy);
-
-	regmap_read(udphy->pma_regmap, CMN_LANE_MUX_AND_EN_OFFSET, &value);
-	if (FIELD_GET(CMN_DP_LANE_MUX_ALL, value) && FIELD_GET(CMN_DP_LANE_EN_ALL, value))
-		udphy->status = UDPHY_MODE_DP;
-	else
-		rk_udphy_disable(udphy);
-
-	return 0;
-}
-
 static int rk_udphy_parse_dt(struct rk_udphy *udphy)
 {
 	struct device *dev = udphy->dev;
@@ -1494,10 +1467,6 @@ static int rk_udphy_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = rk_udphy_get_initial_status(udphy);
-	if (ret)
-		return ret;
-
 	mutex_init(&udphy->mutex);
 	platform_set_drvdata(pdev, udphy);
 

-- 
2.53.0



  parent reply	other threads:[~2026-09-15 13:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 13:49 [PATCH v15 00/16] phy: rockchip: usbdp: Clean up the mess (part 1) Sebastian Reichel
2026-09-15 13:49 ` [PATCH v15 01/16] dt-bindings: phy: rockchip-usbdp: add improved ports scheme Sebastian Reichel
2026-09-15 13:49 ` [PATCH v15 02/16] phy: rockchip: usbdp: Update mode_change after error handling Sebastian Reichel
2026-09-26  3:18   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 03/16] phy: rockchip: usbdp: Do not lose USB3 PHY status Sebastian Reichel
2026-09-26  3:28   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 04/16] phy: rockchip: usbdp: Fix devm_clk_bulk_get_all check Sebastian Reichel
2026-09-26  3:30   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 05/16] phy: rockchip: usbdp: Handle missing clock-names DT property gracefully Sebastian Reichel
2026-09-26  3:32   ` Manivannan Sadhasivam
2026-09-15 13:49 ` Sebastian Reichel [this message]
2026-09-26  3:33   ` [PATCH v15 06/16] phy: rockchip: usbdp: Drop seamless DP takeover Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 07/16] phy: rockchip: usbdp: Keep clocks running on PHY re-init Sebastian Reichel
2026-09-26  3:37   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 08/16] phy: rockchip: usbdp: Amend SSC modulation deviation Sebastian Reichel
2026-09-26  3:59   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 09/16] phy: rockchip: usbdp: Fix LFPS detect threshold control Sebastian Reichel
2026-09-26  4:00   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 10/16] phy: rockchip: usbdp: Add missing mode_change update Sebastian Reichel
2026-09-26  4:01   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 11/16] phy: rockchip: usbdp: Support single-lane DP Sebastian Reichel
2026-09-26  4:03   ` Manivannan Sadhasivam
2026-09-15 13:49 ` [PATCH v15 12/16] phy: rockchip: usbdp: Limit DP lane count to muxed lanes Sebastian Reichel
2026-09-26  4:04   ` Manivannan Sadhasivam
2026-09-15 13:50 ` [PATCH v15 13/16] phy: rockchip: usbdp: Rename DP lane functions Sebastian Reichel
2026-09-26  4:06   ` Manivannan Sadhasivam
2026-09-15 13:50 ` [PATCH v15 14/16] phy: rockchip: usbdp: Use FIELD_PREP_WM16_CONST Sebastian Reichel
2026-09-26  4:10   ` Manivannan Sadhasivam
2026-09-15 13:50 ` [PATCH v15 15/16] phy: rockchip: usbdp: Cleanup DP lane selection function Sebastian Reichel
2026-09-26  4:20   ` Manivannan Sadhasivam
2026-09-15 13:50 ` [PATCH v15 16/16] phy: rockchip: usbdp: Register DP aux bridge Sebastian Reichel
2026-09-26  4:28   ` Manivannan Sadhasivam
2026-10-03  9:36 ` [PATCH v15 00/16] phy: rockchip: usbdp: Clean up the mess (part 1) Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260915-rockchip-usbdp-cleanup-v15-6-80e2c11d1ce8@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=alchark@flipper.net \
    --cc=andy.yan@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frank.wang@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lumag@kernel.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=royalnet026@gmail.com \
    --cc=sashiko-bot@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=yubing.zhang@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox