From 42a159a4e3d4649d7d7bc16b527df4e491741380 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:25:12 +1100 Subject: [PATCH 1/2] arm64: dts: apple: t6040-j614s/j616s: enable USB4 from the shared file The J614s and J616s each carried the same 108 lines enabling the three USB4 routers, their NHIs, DARTs, mailboxes, ATC CIO power states and the CIO reset controller, while the Type-C to router links of both already lived in t604x-j614-j616-usb4.dtsi. Both ADTs have the same acio0-2, dart-acio0-2 and acio-cpu0-2, so move the enables into that shared file, next to the links they go with. No functional change: the J614s, J616s and J616s-tether DTBs are byte-identical before and after (and the J773s, which does not include the file). Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6040-j614s.dts | 117 ---------------- arch/arm64/boot/dts/apple/t6040-j616s.dts | 115 ---------------- .../boot/dts/apple/t604x-j614-j616-usb4.dtsi | 125 +++++++++++++++++- 3 files changed, 119 insertions(+), 238 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index 2d4bd56b1ba99..4873f5f6d9f3e 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -98,121 +98,4 @@ status = "disabled"; }; -/* - * USB4/Thunderbolt on all three Type-C ports: typec0 (left back, ACIO0), - * typec1 (left front, ACIO1) and typec2 (right, ACIO2), as on the J616s: the - * J614s ADT has the same acio0-2, dart-acio0-2 and acio-cpu0-2. The loader - * hands each router its router, adapter and NHI tuning and its DROM over. No - * PCIe tunnels yet: host-to-host (XDomain, thunderbolt-net) and USB4 links - * only. - */ -&pmgr_cio { - status = "okay"; -}; - -&ps_atc0_cio { - status = "okay"; -}; - -&ps_atc0_pcie { - status = "okay"; -}; - -&ps_atc0_cio_pcie { - status = "okay"; -}; - -&ps_atc0_cio_usb { - status = "okay"; -}; - -&usb4_0_mbox { - status = "okay"; -}; - -&usb4_0_acio { - /delete-property/ apple,pcie-tunnel; - status = "okay"; -}; - -&usb4_0_dart { - /* ADT dart-acio0 vm-base: the NHI addresses its rings below 1 TiB + 4 GiB. */ - apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; - status = "okay"; -}; - -&usb4_0_nhi { - status = "okay"; -}; - -&ps_atc1_cio { - status = "okay"; -}; - -&ps_atc1_pcie { - status = "okay"; -}; - -&ps_atc1_cio_pcie { - status = "okay"; -}; - -&ps_atc1_cio_usb { - status = "okay"; -}; - -&usb4_1_mbox { - status = "okay"; -}; - -&usb4_1_acio { - /delete-property/ apple,pcie-tunnel; - status = "okay"; -}; - -&usb4_1_dart { - /* The same DVA window as the ACIO0 router DART. */ - apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; - status = "okay"; -}; - -&usb4_1_nhi { - status = "okay"; -}; - -&ps_atc2_cio { - status = "okay"; -}; - -&ps_atc2_pcie { - status = "okay"; -}; - -&ps_atc2_cio_pcie { - status = "okay"; -}; - -&ps_atc2_cio_usb { - status = "okay"; -}; - -&usb4_2_mbox { - status = "okay"; -}; - -&usb4_2_acio { - /delete-property/ apple,pcie-tunnel; - status = "okay"; -}; - -&usb4_2_dart { - /* The same DVA window as the ACIO0 router DART. */ - apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; - status = "okay"; -}; - -&usb4_2_nhi { - status = "okay"; -}; - #include "t6040-j614s-extdisp-hdmi.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6040-j616s.dts b/arch/arm64/boot/dts/apple/t6040-j616s.dts index e81fb8b6b5d0d..ccd11ef695907 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -229,121 +229,6 @@ status = "okay"; }; -/* - * USB4/Thunderbolt on all three Type-C ports: typec0 (left back, ACIO0), - * typec1 (left front, ACIO1) and typec2 (right, ACIO2). The loader hands - * each router its router, adapter and NHI tuning and its DROM over. No PCIe - * tunnels yet: host-to-host (XDomain, thunderbolt-net) and USB4 links only. - */ -&pmgr_cio { - status = "okay"; -}; - -&ps_atc0_cio { - status = "okay"; -}; - -&ps_atc0_pcie { - status = "okay"; -}; - -&ps_atc0_cio_pcie { - status = "okay"; -}; - -&ps_atc0_cio_usb { - status = "okay"; -}; - -&usb4_0_mbox { - status = "okay"; -}; - -&usb4_0_acio { - /delete-property/ apple,pcie-tunnel; - status = "okay"; -}; - -&usb4_0_dart { - /* ADT dart-acio0 vm-base: the NHI addresses its rings below 1 TiB + 4 GiB. */ - apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; - status = "okay"; -}; - -&usb4_0_nhi { - status = "okay"; -}; - -&ps_atc1_cio { - status = "okay"; -}; - -&ps_atc1_pcie { - status = "okay"; -}; - -&ps_atc1_cio_pcie { - status = "okay"; -}; - -&ps_atc1_cio_usb { - status = "okay"; -}; - -&usb4_1_mbox { - status = "okay"; -}; - -&usb4_1_acio { - /delete-property/ apple,pcie-tunnel; - status = "okay"; -}; - -&usb4_1_dart { - /* The same DVA window as the ACIO0 router DART. */ - apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; - status = "okay"; -}; - -&usb4_1_nhi { - status = "okay"; -}; - -&ps_atc2_cio { - status = "okay"; -}; - -&ps_atc2_pcie { - status = "okay"; -}; - -&ps_atc2_cio_pcie { - status = "okay"; -}; - -&ps_atc2_cio_usb { - status = "okay"; -}; - -&usb4_2_mbox { - status = "okay"; -}; - -&usb4_2_acio { - /delete-property/ apple,pcie-tunnel; - status = "okay"; -}; - -&usb4_2_dart { - /* The same DVA window as the ACIO0 router DART. */ - apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; - status = "okay"; -}; - -&usb4_2_nhi { - status = "okay"; -}; - /* * The internal PCIe controller (Wi-Fi/Bluetooth, SD reader) needs APCIE_GP, * APCIE_SYS_GP and APCIE_PHY_SW on top of the always-on ANS/APCIE_ST* diff --git a/arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi b/arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi index ec32ca4bf9c03..196577e6e1b79 100644 --- a/arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi +++ b/arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi @@ -1,13 +1,126 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * MacBook Pro (14-inch and 16-inch, M4 Pro) USB4/Thunderbolt: each Type-C - * port's connector is linked to the USB4 router behind the same ATC PHY - * (ADT acioN atc-phy-parent = atc-phyN): typec0 (left back) to ACIO0, - * typec1 (left front) to ACIO1, typec2 (right) to ACIO2. The routers stay - * disabled, and a port controller skips a link to a disabled router, so this - * changes nothing until a board enables them. + * MacBook Pro (14-inch and 16-inch, M4 Pro) USB4/Thunderbolt on all three + * Type-C ports. The J614s and J616s ADTs have the same acio0-2, dart-acio0-2 + * and acio-cpu0-2, and pair each router with the ATC PHY of one port (ADT + * acioN atc-phy-parent = atc-phyN): typec0 (left back) is linked to ACIO0, + * typec1 (left front) to ACIO1, typec2 (right) to ACIO2. + * + * The loader hands each router its router, adapter and NHI tuning and its + * DROM over. No PCIe tunnels yet: host-to-host (XDomain, thunderbolt-net) and + * USB4 links only. */ +&pmgr_cio { + status = "okay"; +}; + +&ps_atc0_cio { + status = "okay"; +}; + +&ps_atc0_pcie { + status = "okay"; +}; + +&ps_atc0_cio_pcie { + status = "okay"; +}; + +&ps_atc0_cio_usb { + status = "okay"; +}; + +&usb4_0_mbox { + status = "okay"; +}; + +&usb4_0_acio { + /delete-property/ apple,pcie-tunnel; + status = "okay"; +}; + +&usb4_0_dart { + /* ADT dart-acio0 vm-base: the NHI addresses its rings below 1 TiB + 4 GiB. */ + apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; + status = "okay"; +}; + +&usb4_0_nhi { + status = "okay"; +}; + +&ps_atc1_cio { + status = "okay"; +}; + +&ps_atc1_pcie { + status = "okay"; +}; + +&ps_atc1_cio_pcie { + status = "okay"; +}; + +&ps_atc1_cio_usb { + status = "okay"; +}; + +&usb4_1_mbox { + status = "okay"; +}; + +&usb4_1_acio { + /delete-property/ apple,pcie-tunnel; + status = "okay"; +}; + +&usb4_1_dart { + /* The same DVA window as the ACIO0 router DART. */ + apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; + status = "okay"; +}; + +&usb4_1_nhi { + status = "okay"; +}; + +&ps_atc2_cio { + status = "okay"; +}; + +&ps_atc2_pcie { + status = "okay"; +}; + +&ps_atc2_cio_pcie { + status = "okay"; +}; + +&ps_atc2_cio_usb { + status = "okay"; +}; + +&usb4_2_mbox { + status = "okay"; +}; + +&usb4_2_acio { + /delete-property/ apple,pcie-tunnel; + status = "okay"; +}; + +&usb4_2_dart { + /* The same DVA window as the ACIO0 router DART. */ + apple,dma-range = <0x100 0x4000 0x0 0xffff0000>; + status = "okay"; +}; + +&usb4_2_nhi { + status = "okay"; +}; + + &usb4_0_acio_tbt { remote-endpoint = <&typec0_con_tbt>; }; From b9bae43a8f7a759b515b94d18434222e4492e844 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:26:17 +1100 Subject: [PATCH 2/2] arm64: dts: apple: t6040-j773s: USB4 on the three back Type-C ports The Mac mini (J773s) left its three USB4 routers disabled and had no links from its Type-C connectors to them, so its back Thunderbolt ports only did USB and DisplayPort alt mode. The links and the router enables lived in a file only the M4 Pro MacBook Pros included, but the J773s has the same wiring: its ADT pairs acio0-2 with atc-phy0-2 and with the port controllers hpm0-2 (back middle, back left, back right), which the board already names typec0-2, and the router, DART (vm-base) and lstx GPIO addresses match the laptops'. Rename t604x-j614-j616-usb4.dtsi to t6040-usb4-typec.dtsi and include it from the J773s as well. The J614s, J616s and J616s-tether DTBs are byte-identical; the J773s gains ACIO0-2 with their NHIs and DARTs, the three router mailboxes, the ATC0-2 CIO/PCIe power states, the CIO reset controller and the port@2 links of typec0-2. PCIe tunnels stay off, as on the laptops. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6040-j773s.dts | 1 + ...x-j614-j616-usb4.dtsi => t6040-usb4-typec.dtsi} | 14 +++++++++----- arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) rename arch/arm64/boot/dts/apple/{t604x-j614-j616-usb4.dtsi => t6040-usb4-typec.dtsi} (80%) diff --git a/arch/arm64/boot/dts/apple/t6040-j773s.dts b/arch/arm64/boot/dts/apple/t6040-j773s.dts index 003cbefd8ba55..587e7c4eedef8 100644 --- a/arch/arm64/boot/dts/apple/t6040-j773s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j773s.dts @@ -797,6 +797,7 @@ #include "t6040-j773s-usb3.dtsi" #include "t6040-j773s-usb-front.dtsi" +#include "t6040-usb4-typec.dtsi" /* The video encoder, its DARTs and its power domains. */ &ps_venc0_sys { diff --git a/arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi b/arch/arm64/boot/dts/apple/t6040-usb4-typec.dtsi similarity index 80% rename from arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi rename to arch/arm64/boot/dts/apple/t6040-usb4-typec.dtsi index 196577e6e1b79..0dacf0569090a 100644 --- a/arch/arm64/boot/dts/apple/t604x-j614-j616-usb4.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-usb4-typec.dtsi @@ -1,10 +1,14 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * MacBook Pro (14-inch and 16-inch, M4 Pro) USB4/Thunderbolt on all three - * Type-C ports. The J614s and J616s ADTs have the same acio0-2, dart-acio0-2 - * and acio-cpu0-2, and pair each router with the ATC PHY of one port (ADT - * acioN atc-phy-parent = atc-phyN): typec0 (left back) is linked to ACIO0, - * typec1 (left front) to ACIO1, typec2 (right) to ACIO2. + * M4 Pro (T6040) USB4/Thunderbolt on every Type-C port. Each port's + * connector is linked to the USB4 router behind the same ATC PHY. Every + * T6040 board's ADT has the same acio0-2, dart-acio0-2 and acio-cpu0-2, pairs + * acioN with atc-phyN (atc-phy-parent) and with the port controller whose + * acio-parent is acioN, and the boards name that connector typecN: + * MacBook Pro 14/16 (J614s, J616s): typec0 left back, typec1 left front, + * typec2 right; + * Mac mini (J773s): typec0 back middle, typec1 back left, typec2 back + * right. * * The loader hands each router its router, adapter and NHI tuning and its * DROM over. No PCIe tunnels yet: host-to-host (XDomain, thunderbolt-net) and diff --git a/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi b/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi index 75df37d6053a6..77be582251596 100644 --- a/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi +++ b/arch/arm64/boot/dts/apple/t604x-j614-j616.dtsi @@ -3481,4 +3481,4 @@ status = "okay"; }; -#include "t604x-j614-j616-usb4.dtsi" +#include "t6040-usb4-typec.dtsi"