From 3f12ec5e8d9876a1a638c45124ae479cf45f01fb Mon Sep 17 00:00:00 2001 From: Mark Zelinski Date: Thu, 5 Nov 2026 18:23:31 +0200 Subject: [PATCH 1/2] arm64: dts: apple: t600x-j314-j316: name the DPIN crossbar controls A Thunderbolt dock carries each display in its own DP tunnel, and the second one arrives on a USB-C port's DPIN1. The M1 Pro/Max laptop device tree only names each port's DP-alt control on dcpext0 and dcpext1, so apple-drm creates no tunnel connector and the second stream fails with "no Type-C connector for the DP tunnel": a dual-stream dock drives only one display. Name typecN-dpin0 and typecN-dpin1 on both external DCPs, as t602x-j414-j416.dtsi does for the M2 Pro/Max laptops. Cell 1 of each port's crossbar selects DPIN0 and cell 2 selects DPIN1. On its own this lets the second display connect but not stay up; t600x also needs the following drm/apple change to keep two tunnels at one link rate. Tested on a MacBook Pro 16" M1 Pro (j316s) with a Dell WD19TB dock and two 1920x1080@60 displays. Not tested on j314s, j314c or j316c. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Mark Zelinski --- arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index a15e5d77a70f52..a32f269b8e2ada 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -142,8 +142,12 @@ <&atcphy1 PHY_TYPE_DP>, <&atcphy2 PHY_TYPE_DP>; phy-names = "dp-phy", "typec0", "typec1", "typec2"; mux-controls = <&atcphy3_xbar 0>, <&atcphy0_xbar 0>, - <&atcphy1_xbar 0>, <&atcphy2_xbar 0>; - mux-control-names = "dp-xbar", "typec0", "typec1", "typec2"; + <&atcphy1_xbar 0>, <&atcphy2_xbar 0>, + <&atcphy0_xbar 1>, <&atcphy1_xbar 1>, <&atcphy2_xbar 1>, + <&atcphy0_xbar 2>, <&atcphy1_xbar 2>, <&atcphy2_xbar 2>; + mux-control-names = "dp-xbar", "typec0", "typec1", "typec2", + "typec0-dpin0", "typec1-dpin0", "typec2-dpin0", + "typec0-dpin1", "typec1-dpin1", "typec2-dpin1"; mux-index = <0>; apple,dptx-phy = <3>; @@ -233,8 +237,12 @@ <&atcphy2 PHY_TYPE_DP>; phy-names = "typec0", "typec1", "typec2"; mux-controls = <&atcphy0_xbar 0>, <&atcphy1_xbar 0>, - <&atcphy2_xbar 0>; - mux-control-names = "typec0", "typec1", "typec2"; + <&atcphy2_xbar 0>, + <&atcphy0_xbar 1>, <&atcphy1_xbar 1>, <&atcphy2_xbar 1>, + <&atcphy0_xbar 2>, <&atcphy1_xbar 2>, <&atcphy2_xbar 2>; + mux-control-names = "typec0", "typec1", "typec2", + "typec0-dpin0", "typec1-dpin0", "typec2-dpin0", + "typec0-dpin1", "typec1-dpin1", "typec2-dpin1"; apple,typec-mux-indices = <2 2 2>; apple,typec-dptx-phys = <0 1 2>; From bac0e09efe27bf2eb4f75ad5476de94b6491f6ec Mon Sep 17 00:00:00 2001 From: Mark Zelinski Date: Thu, 5 Nov 2026 18:23:31 +0200 Subject: [PATCH 2/2] drm/apple: cap t600x Thunderbolt DP tunnels at HBR2 With both DP IN adapters of a port in use, as with a dual-stream dock, only one display stays lit on the M1 Pro/Max. On t600x, atc_tunnel_start_t8103() programs a single tunnel pixel clock selector for PCLK1, PCLK2 and DPRX. When the two streams train at different link rates (here HBR3 x4 for one display and HBR2 x2 for the other), whichever trains second reselects that clock under the first, and the first stream dies with a DPTX FIFO error. Report HBR2 as the maximum link rate for DP tunnels on t6000 and t6001, so both streams train at the same rate and share the clock. HBR2 x4 still covers 4K at 60 Hz with 8-bit colour. Direct DP-alt and HDMI outputs are unaffected. The t600x_tunnel_max_hbr2 module parameter (default on) restores HBR3 for single-display tunnel setups. Giving each DPIN its own selector (DPIN0 -> PCLK1, DPIN1 -> PCLK2, as atc_tunnel_set_t602x() does) was also tried on j316s. With DPRX on either DPIN, the second stream failed link training with firmware link fault 22, so the cap is the fix that works for now. Tested on a MacBook Pro 16" M1 Pro (j316s) with a Dell WD19TB dock: both displays light up together after a reboot and several replugs, with no DPTX FIFO errors. Not tested on M1 Max or M1 Ultra. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Mark Zelinski --- drivers/gpu/drm/apple/dptxep.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/apple/dptxep.c b/drivers/gpu/drm/apple/dptxep.c index 741f40bc8c9ed5..3158cbe3aa6854 100644 --- a/drivers/gpu/drm/apple/dptxep.c +++ b/drivers/gpu/drm/apple/dptxep.c @@ -25,6 +25,14 @@ #include "dptx-j700-training.h" +#include +#include + +static bool t600x_tunnel_max_hbr2 = true; +module_param(t600x_tunnel_max_hbr2, bool, 0644); +MODULE_PARM_DESC(t600x_tunnel_max_hbr2, + "Cap Thunderbolt DP tunnels on M1 Pro/Max at HBR2 so dual-stream docks share one tunnel pixel clock (default: true)"); + struct dcpdptx_connection_cmd { __le32 unk; __le32 target; @@ -337,12 +345,28 @@ static int dptxport_call_get_max_link_rate(struct apple_epic_service *service, void *reply_, size_t reply_size) { struct dptxport_apcall_link_rate *reply = reply_; + struct apple_dcp *dcp = service->ep->dcp; + u32 max_rate = LINK_RATE_HBR3; if (reply_size < sizeof(*reply)) return -EINVAL; + /* + * t600x feeds both Thunderbolt DP IN adapters of a port from one tunnel + * pixel clock (atc_tunnel_start_t8103()). A second stream training at a + * different link rate reselects that clock under the first one, which + * then dies with a DPTX FIFO error. Cap tunnels at HBR2 so both streams + * of a dual-stream dock run at the same rate. + */ + if (t600x_tunnel_max_hbr2 && READ_ONCE(dcp->dptx_tunnel) && + (of_machine_is_compatible("apple,t6000") || + of_machine_is_compatible("apple,t6001"))) { + max_rate = LINK_RATE_HBR2; + dev_dbg(dcp->dev, "DP tunnel: capping max link rate at HBR2 (t600x shared tunnel clock)\n"); + } + reply->retcode = cpu_to_le32(0); - reply->link_rate = cpu_to_le32(LINK_RATE_HBR3); + reply->link_rate = cpu_to_le32(max_rate); return 0; }