From d5703118e09750449d0135fa46a59975c7a8d943 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Sun, 15 Nov 2026 18:52:36 -0500 Subject: [PATCH] phy: apple: atc: leave a tunnel PHY of another driver unopened off t600x Every DisplayPort tunnel on the J714s dock logs a failed PHY open: apple-dcp 2b2e00000.dcp: allocated Type-C DPTX PHY 2 apple-dcp 2b2e00000.dcp: DP tunnel PHY open failed: -22 apple-dcp 2b2e00000.dcp: display routed to Thunderbolt DP tunnel dpin0 apple-dcp 392e00000.dcp: allocated Type-C DPTX PHY 2 apple-dcp 392e00000.dcp: DP tunnel PHY open failed: -22 dcp_tunnel_prepare() calls apple_atc_dp_tunnel_open() for every tunnel and ignores -EOPNOTSUPP, the function's documented answer on every SoC but t600x, where the rate call alone starts the clock path. It checks the PHY's ops first, though, and a T6050 route's PHY is provided by atc-t6050-dp.c, not by this driver, so it returns -EINVAL before it gets to say so. Nothing is lost on T6050: the tunnel clocks start from the link rate in apple_t6050_dp_tunnel_clock() (clock dpin + 1), and both displays above train and get their mode. The warning only reads like a reason for a dark display. Check the SoC first and the PHY after, so that every SoC but t600x gets -EOPNOTSUPP whichever driver provides the PHY; t600x still refuses a PHY that is not one of its own. Signed-off-by: Diljit Singh --- drivers/phy/apple/atc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c index 414ce695f37a2..2d6c9f4bc7d89 100644 --- a/drivers/phy/apple/atc.c +++ b/drivers/phy/apple/atc.c @@ -5125,10 +5125,17 @@ int apple_atc_dp_tunnel_open(struct phy *phy) { struct apple_atcphy *atcphy; - if (!phy || phy->ops != &apple_atc_dp_phy_ops) + if (!phy) return -EINVAL; + /* + * Everything but t600x has nothing to open, whichever driver provides + * the PHY: T6050's tunnel clocks belong to atc-t6050-dp.c, whose PHY + * this driver does not know, and start from the link rate alone. + */ if (!apple_atc_tunnel_is_t600x()) return -EOPNOTSUPP; + if (phy->ops != &apple_atc_dp_phy_ops) + return -EINVAL; atcphy = phy_get_drvdata(phy); guard(mutex)(&atcphy->lock); if (atcphy->mode != APPLE_ATCPHY_MODE_USB4 && atcphy->mode != APPLE_ATCPHY_MODE_TBT)