From 4b8d979d6ee6fbeafaf924b6e9da1903a18b942c Mon Sep 17 00:00:00 2001 From: Adi <39857031+IntrestingBeing@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:34:33 +0000 Subject: [PATCH 1/3] arm64: dts: apple: t600x-j314-j316: Enable dp-altmode per machine Move ENABLE_DCPEXT_TYPEC from the shared t600x-j314-j316.dtsi into each individual machine DTS file (j314s, j316s, j314c, j316c), matching the pattern used by t6020-j474s for the Mac Mini M2 Pro. This enables USB-C DisplayPort alt-mode output on all MacBook Pro 14-inch and 16-inch 2021 models (M1 Pro and M1 Max). The blessed port is the left front USB-C port (typec1 / atcphy1). Tested on MacBook Pro 14-inch M1 Pro (t6000-j314s) with a Dell P2723DE monitor over a direct USB-C cable. Signed-off-by: Adi <39857031+IntrestingBeing@users.noreply.github.com> --- arch/arm64/boot/dts/apple/t6000-j314s.dts | 2 ++ arch/arm64/boot/dts/apple/t6000-j316s.dts | 2 ++ arch/arm64/boot/dts/apple/t6001-j314c.dts | 2 ++ arch/arm64/boot/dts/apple/t6001-j316c.dts | 2 ++ arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 2 -- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6000-j314s.dts b/arch/arm64/boot/dts/apple/t6000-j314s.dts index afa86668440f04..1e50b488bc4006 100644 --- a/arch/arm64/boot/dts/apple/t6000-j314s.dts +++ b/arch/arm64/boot/dts/apple/t6000-j314s.dts @@ -9,6 +9,8 @@ /dts-v1/; +#define ENABLE_DCPEXT_TYPEC + #include "t6000.dtsi" #include "t600x-j314-j316.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6000-j316s.dts b/arch/arm64/boot/dts/apple/t6000-j316s.dts index ddfc3c530923c7..96175af52bbf65 100644 --- a/arch/arm64/boot/dts/apple/t6000-j316s.dts +++ b/arch/arm64/boot/dts/apple/t6000-j316s.dts @@ -9,6 +9,8 @@ /dts-v1/; +#define ENABLE_DCPEXT_TYPEC + #include "t6000.dtsi" #include "t600x-j314-j316.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6001-j314c.dts b/arch/arm64/boot/dts/apple/t6001-j314c.dts index 245df6d03ee422..8e753d3ee676b7 100644 --- a/arch/arm64/boot/dts/apple/t6001-j314c.dts +++ b/arch/arm64/boot/dts/apple/t6001-j314c.dts @@ -9,6 +9,8 @@ /dts-v1/; +#define ENABLE_DCPEXT_TYPEC + #include "t6001.dtsi" #include "t600x-j314-j316.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6001-j316c.dts b/arch/arm64/boot/dts/apple/t6001-j316c.dts index a000d497b705fa..5782f93e496de6 100644 --- a/arch/arm64/boot/dts/apple/t6001-j316c.dts +++ b/arch/arm64/boot/dts/apple/t6001-j316c.dts @@ -9,6 +9,8 @@ /dts-v1/; +#define ENABLE_DCPEXT_TYPEC + #include "t6001.dtsi" #include "t600x-j314-j316.dtsi" diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index e8b58b8e8005d2..52dc74a9935bc2 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -9,8 +9,6 @@ * Copyright The Asahi Linux Contributors */ -#define ENABLE_DCPEXT_TYPEC - #include / { From 7eeff74d22193d0a31753ca524bc31f4535e6ba9 Mon Sep 17 00:00:00 2001 From: Adi <39857031+IntrestingBeing@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:34:57 +0000 Subject: [PATCH 2/3] phy: apple-atc: Increase pipehandler lock timeout for hot-plug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increase PIPEHANDLER_LOCK_ACK_TIMEOUT_US from 1ms to 100ms. The original 1ms timeout is sufficient for cold boot but too tight for USB-C DisplayPort hot-plug scenarios where the PHY state is partially initialized from a previous connection. The timeout is a maximum — readl_poll_timeout polls every 10us and returns immediately on success, so this does not add latency to the normal path. It only gives the hardware more time to respond when re-establishing a DP link after a cable replug. Without this change, hot-plugging a USB-C display reliably fails with "Pipehandler lock not acked" as the PHY cannot re-lock in time, causing the display link to drop seconds after being established. Signed-off-by: Adi <39857031+IntrestingBeing@users.noreply.github.com> --- drivers/phy/apple/atc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c index dc867f368b6874..a76ba21123ab8c 100644 --- a/drivers/phy/apple/atc.c +++ b/drivers/phy/apple/atc.c @@ -459,7 +459,7 @@ enum atcphy_lane_mode { #define PIPEHANDLER_DUMMY_PHY_EN BIT(15) #define PIPEHANDLER_NATIVE_POWER_DOWN GENMASK(3, 0) -#define PIPEHANDLER_LOCK_ACK_TIMEOUT_US 1000 +#define PIPEHANDLER_LOCK_ACK_TIMEOUT_US 100000 /* USB2 PHY regs */ #define USB2PHY_USBCTL 0x00 From c523abc8e5a17f21bb76e6816567b0dd9c8be14b Mon Sep 17 00:00:00 2001 From: Adi <39857031+IntrestingBeing@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:43:26 +0000 Subject: [PATCH 3/3] arm64: dts: apple: t600x-j314-j316: Move blessed port to right USB-C Move the dp-altmode blessed port from the left front USB-C (typec1 / atcphy1) to the right USB-C (typec2 / atcphy2). This frees up both left ports for charging and peripherals while dedicating the right port to display output. Rewires dcpext1 from atcphy1_xbar to atcphy2_xbar and moves the displayport property from the typec1 to typec2 connector. Signed-off-by: Adi <39857031+IntrestingBeing@users.noreply.github.com> --- .../arm64/boot/dts/apple/t600x-j314-j316.dtsi | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index 52dc74a9935bc2..db2a56f40cd5fd 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -189,11 +189,6 @@ power-role = "dual"; data-role = "dual"; -#ifdef ENABLE_DCPEXT_TYPEC - /* hacks */ - displayport = <&dcpext1>; -#endif - ports { #address-cells = <1>; #size-cells = <0>; @@ -226,6 +221,11 @@ power-role = "dual"; data-role = "dual"; +#ifdef ENABLE_DCPEXT_TYPEC + /* hacks */ + displayport = <&dcpext1>; +#endif + ports { #address-cells = <1>; #size-cells = <0>; @@ -278,10 +278,10 @@ apple,connector-type = "DP"; /* hacks */ - apple,dptx-phy = <1>; - phys = <&atcphy1 PHY_TYPE_DP>; + apple,dptx-phy = <2>; + phys = <&atcphy2 PHY_TYPE_DP>; phy-names = "dp-phy"; - mux-controls = <&atcphy1_xbar 0>; + mux-controls = <&atcphy2_xbar 0>; mux-control-names = "dp-xbar"; mux-index = <2>; }; @@ -290,11 +290,11 @@ status = "okay"; }; -&atcphy1_xbar { +&atcphy2_xbar { status = "okay"; }; -&ps_atc1_common { +&ps_atc2_common { apple,always-on; /* Needs to stay on for DP-alt suspend/resume */ }; #endif