From d883f6bb4f50ce626bfee79dbdca36b2c33bffd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0kuta?= <20834920+petrskuta@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:07:08 +0100 Subject: [PATCH 1/8] PCI: apple: T6040 PCIe-C is an Intr2AXI controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit t6040_pciec_hw was modelled on T8132: the kernel_init (oe-fabric) cold init, the T8132 port reset values and SID-indexed RID2SID slots. The ADT's apciec,t6040 has no oe-fabric region (config, rc, port0, fabric, debug, ioa, ltssm, intr2axi), so cold init failed mapping it (-ENODATA). Its fabric, rc, debug, config and DART tunables are T6050's with small value differences. Make it an Intr2AXI controller with T6050's no_port_reset, and allocate RID2SID slots as T6050 does: with iommu-map-mask 0xff the Studio Display's xHCI (RID 0x300) and its Thunderbolt bridge (RID 0x100) share SID 0, and an SID-indexed slot failed the xHCI's enable with a silent -EBUSY ("Can't enable PCI device, BIOS handoff failed"). Tested on the J614s with a Studio Display (2022) on the left port: cold init completes (link up), the display's Titan Ridge bridges and xHCI enumerate and xhci_hcd binds, aurora-silicon/linux#1589. Signed-off-by: Petr Škuta <20834920+petrskuta@users.noreply.github.com> --- drivers/pci/controller/pcie-apple.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c index 824b94d04caa7..bc1106257d11b 100644 --- a/drivers/pci/controller/pcie-apple.c +++ b/drivers/pci/controller/pcie-apple.c @@ -443,6 +443,16 @@ static const struct hw_info t8132_pciec_hw = { .s2idle_hold_domain = true, }; +/* + * T6040 PCIe-C is an Intr2AXI controller like T6050: the ADT + * (apciec,t6040) has no oe-fabric region, and its fabric/rc/debug/config and + * DART tunables are T6050's with small value differences. Cold init therefore + * takes the T6050 path (no port reset sequence, RID2SID cleared only). + * RID2SID slots are allocated as on T6050, not indexed by SID: with + * iommu-map-mask 0xff a device behind the tunnel (e.g. 03:00.0, the + * Studio Display's xHCI) shares SID 0 with 01:00.0, and an indexed slot + * then fails its enable with -EBUSY. + */ static const struct hw_info t6040_pciec_hw = { .port_msiaddr = PORT_MSIADDR, .port_msiaddr_hi = PORT_MSIADDR + 4, @@ -451,9 +461,9 @@ static const struct hw_info t6040_pciec_hw = { .port_msimap = PORT_T602X_MSIMAP, .port_tunctrl = 0x1088, .max_rid2sid = 256, - .sid_indexed_rid2sid = true, .tunneled = true, - .t8132_reset = true, + .tunnel_intr2axi = true, + .no_port_reset = true, .msimap_by_vector = true, .s2idle_hold_domain = true, }; From 242a0404b32ef625db995d914a97e5618d167050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0kuta?= <20834920+petrskuta@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:07:23 +0100 Subject: [PATCH 2/8] arm64: dts: apple: t6040-j614s: PCIe-C on the left Thunderbolt port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable the left port's tunneled PCIe (usb4_0_pcie_tunnel, apciec0_dart, usb4_0_pcie) and keep the ACIO's apple,pcie-tunnel, so a Thunderbolt device's PCIe functions reach a root port. No boot loader hands the port over, so the kernel cold-initializes it (apple,pciec-kernel-init). From the j614s ADT (macOS 26 IODeviceTree) apciec0 and dart-apciec0: - the controller's fabric, rc and debug tunables and the port's config tunables; - the DART's tunables and its DMA window: vm-base 1 TiB + 2 GiB, vm-size 0x7ff00000, the first 16 KiB a dead mapping; - bypass streams 253 and 255 (bypass-253, bypass-255): the port's own writes, its MSIs turned into AIC writes, use them. Without the bypass no MSI arrived (xHCI "Command Aborted") and the DART fault IRQ stormed. As on T6050's PCIe-C DART: full error reporting, CTC flush and the ATC0 PCIe power domain. Tested on the J614s with a Studio Display (2022): its USB2 and USB3 Gen2 hubs, speakers and microphones (snd-usb-audio), camera (uvcvideo), HID and a USB-C port (a USB 3.1 drive at 5 Gb/s) work, aurora-silicon/linux#1589. Signed-off-by: Petr Škuta <20834920+petrskuta@users.noreply.github.com> --- arch/arm64/boot/dts/apple/t6040-j614s.dts | 85 ++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index f2657308aad2e..93b67af36f406 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -131,7 +131,6 @@ }; &usb4_0_acio { - /delete-property/ apple,pcie-tunnel; status = "okay"; }; @@ -146,6 +145,90 @@ status = "okay"; }; +/* + * The left port's PCIe-C (tunneled PCIe), e.g. the Studio Display's xHCI. + * No boot loader hands it over: the kernel cold-initializes it. + */ +&usb4_0_pcie_tunnel { + status = "okay"; +}; + +/* Tunables: the j614s ADT (macOS 26 IODeviceTree) dart-apciec0 and apciec0. */ +&apciec0_dart { + /* + * ADT dart-apciec0 vm-base 1 TiB + 2 GiB, vm-size 0x7ff00000, its first + * 16 KiB a dead mapping: the tunnel's devices address DMA only there. + */ + apple,dma-range = <0x100 0x80004000 0x0 0x7fefc000>; + /* + * As T6050's PCIe-C DART: the port's own writes (MSIs turned into AIC + * writes) use reserved streams 253 and 255 (ADT bypass-253, bypass-255), + * which must bypass; and report every error class. + */ + power-domains = <&ps_atc0_pcie>; + apple,bypass-sids = <253 255>; + apple,full-error-reporting; + apple,ctc-flush; + apple,tunable = <0x20c 0x80000121 0x80000121>, + <0x220 0xf0f0f 0xf0f0f>, + <0x224 0xffffff 0x80808>, + <0x300 0x1f31 0x1>, + <0x308 0x3ffffffc 0x10000000>, + <0x310 0x3ffffffc 0x3ffffffc>; + status = "okay"; +}; + +&usb4_0_pcie { + apple,pciec-kernel-init; + apple,tunable-debug = <0x1000 0x1 0x0>; + apple,tunable-rc = <0x78 0x7000 0x0>, + <0x718 0x7c000 0x0>, + <0x814 0xffffffff 0x2000f060>, + <0x8bc 0x1 0x0>; + apple,tunable-fabric = <0x4 0x1f001f 0x100010>, + <0x8 0x1 0x1>, + <0xc 0x1 0x1>, + <0x10 0x801f 0x4>, + <0x18 0xff 0xe0>, + <0x1c 0x1 0x1>, + <0x20 0x801f 0x4>, + <0x28 0x1f 0x10>, + <0x2c 0x801f 0x4>, + <0x34 0x3f 0x20>, + <0x38 0x801f 0x4>, + <0x40 0x3f 0x20>, + <0x44 0x801f 0x4>, + <0x4c 0x10001 0x10001>, + <0x50 0x1 0x1>, + <0x54 0x1 0x1>, + <0x58 0x801f 0x4>, + <0x60 0x7f007f 0x450045>, + <0x64 0x801f 0x4>, + <0x6c 0x1f001f 0x100010>, + <0x70 0xf1 0x1>, + <0x74 0x801f 0x4>, + <0x7c 0x801f 0x4>, + <0x84 0x1 0x1>, + <0x88 0x1 0x1>, + <0x8c 0x801f 0x4>, + <0x94 0x1 0x1>, + <0x98 0x801f 0x4>, + <0xa0 0x1 0x1>, + <0xa4 0x801f 0x4>, + <0xac 0x1 0x1>, + <0xb0 0x1 0x1>, + <0xb4 0x801f 0x4>, + <0xbc 0x801f 0x4>, + <0xc4 0x801f 0x4>; + status = "okay"; +}; + +&usb4_0_pcie_port { + apple,tunable = <0x140 0x1 0x1>, + <0x2a0 0x7e 0xa>, + <0x1090 0x1 0x0>; +}; + &ps_atc1_cio { status = "okay"; }; From 0c6814f0c1a2913b006bad6148c2b2e98c4a8b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0kuta?= <20834920+petrskuta@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:47:21 +0100 Subject: [PATCH 3/8] arm64: dts: apple: t6040-j614s: PCIe-C on all three Thunderbolt ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ADT's apciec0-2 and dart-apciec0-2 carry identical tunables, DMA windows and bypass streams, so describe the PCIe-C of the left port once in t6040-j614s-pciec.dtsi and use it for all three ports. Port 0 is unchanged; ports 1 and 2 keep their ACIO's apple,pcie-tunnel now. Signed-off-by: Petr Škuta <20834920+petrskuta@users.noreply.github.com> --- .../boot/dts/apple/t6040-j614s-pciec.dtsi | 94 +++++++++++++++++++ arch/arm64/boot/dts/apple/t6040-j614s.dts | 87 +---------------- 2 files changed, 95 insertions(+), 86 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi diff --git a/arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi b/arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi new file mode 100644 index 0000000000000..9e131830b8663 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * J614s: PCIe-C (tunneled PCIe) on the three Thunderbolt ports, e.g. a + * Studio Display's xHCI. No boot loader hands the ports over: the kernel + * cold-initializes them. + * + * From the j614s ADT (macOS 26 IODeviceTree), identical for apciec0-2 and + * dart-apciec0-2: + * - the DART's DMA window: vm-base 1 TiB + 2 GiB, vm-size 0x7ff00000, its + * first 16 KiB a dead mapping; + * - bypass-253 and bypass-255: the port's own writes (MSIs turned into AIC + * writes) use those reserved streams, which must bypass, as on T6050; + * - the DART tunables, the controller's debug, rc and fabric tunables and + * the port's config tunables. + * Full error reporting, CTC flush and the ATC PCIe power domain as on + * T6050's PCIe-C DART. + */ + +#define J614S_PCIEC(n) \ +&usb4_##n##_pcie_tunnel { \ + status = "okay"; \ +}; \ + \ +&apciec##n##_dart { \ + apple,dma-range = <0x100 0x80004000 0x0 0x7fefc000>; \ + power-domains = <&ps_atc##n##_pcie>; \ + apple,bypass-sids = <253 255>; \ + apple,full-error-reporting; \ + apple,ctc-flush; \ + apple,tunable = <0x20c 0x80000121 0x80000121>, \ + <0x220 0xf0f0f 0xf0f0f>, \ + <0x224 0xffffff 0x80808>, \ + <0x300 0x1f31 0x1>, \ + <0x308 0x3ffffffc 0x10000000>, \ + <0x310 0x3ffffffc 0x3ffffffc>; \ + status = "okay"; \ +}; \ + \ +&usb4_##n##_pcie { \ + apple,pciec-kernel-init; \ + apple,tunable-debug = <0x1000 0x1 0x0>; \ + apple,tunable-rc = <0x78 0x7000 0x0>, \ + <0x718 0x7c000 0x0>, \ + <0x814 0xffffffff 0x2000f060>, \ + <0x8bc 0x1 0x0>; \ + apple,tunable-fabric = <0x4 0x1f001f 0x100010>, \ + <0x8 0x1 0x1>, \ + <0xc 0x1 0x1>, \ + <0x10 0x801f 0x4>, \ + <0x18 0xff 0xe0>, \ + <0x1c 0x1 0x1>, \ + <0x20 0x801f 0x4>, \ + <0x28 0x1f 0x10>, \ + <0x2c 0x801f 0x4>, \ + <0x34 0x3f 0x20>, \ + <0x38 0x801f 0x4>, \ + <0x40 0x3f 0x20>, \ + <0x44 0x801f 0x4>, \ + <0x4c 0x10001 0x10001>, \ + <0x50 0x1 0x1>, \ + <0x54 0x1 0x1>, \ + <0x58 0x801f 0x4>, \ + <0x60 0x7f007f 0x450045>, \ + <0x64 0x801f 0x4>, \ + <0x6c 0x1f001f 0x100010>, \ + <0x70 0xf1 0x1>, \ + <0x74 0x801f 0x4>, \ + <0x7c 0x801f 0x4>, \ + <0x84 0x1 0x1>, \ + <0x88 0x1 0x1>, \ + <0x8c 0x801f 0x4>, \ + <0x94 0x1 0x1>, \ + <0x98 0x801f 0x4>, \ + <0xa0 0x1 0x1>, \ + <0xa4 0x801f 0x4>, \ + <0xac 0x1 0x1>, \ + <0xb0 0x1 0x1>, \ + <0xb4 0x801f 0x4>, \ + <0xbc 0x801f 0x4>, \ + <0xc4 0x801f 0x4>; \ + status = "okay"; \ +}; \ + \ +&usb4_##n##_pcie_port { \ + apple,tunable = <0x140 0x1 0x1>, \ + <0x2a0 0x7e 0xa>, \ + <0x1090 0x1 0x0>; \ +}; + +J614S_PCIEC(0) +J614S_PCIEC(1) +J614S_PCIEC(2) + +#undef J614S_PCIEC diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index 93b67af36f406..06220a2ccfaad 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -145,90 +145,6 @@ status = "okay"; }; -/* - * The left port's PCIe-C (tunneled PCIe), e.g. the Studio Display's xHCI. - * No boot loader hands it over: the kernel cold-initializes it. - */ -&usb4_0_pcie_tunnel { - status = "okay"; -}; - -/* Tunables: the j614s ADT (macOS 26 IODeviceTree) dart-apciec0 and apciec0. */ -&apciec0_dart { - /* - * ADT dart-apciec0 vm-base 1 TiB + 2 GiB, vm-size 0x7ff00000, its first - * 16 KiB a dead mapping: the tunnel's devices address DMA only there. - */ - apple,dma-range = <0x100 0x80004000 0x0 0x7fefc000>; - /* - * As T6050's PCIe-C DART: the port's own writes (MSIs turned into AIC - * writes) use reserved streams 253 and 255 (ADT bypass-253, bypass-255), - * which must bypass; and report every error class. - */ - power-domains = <&ps_atc0_pcie>; - apple,bypass-sids = <253 255>; - apple,full-error-reporting; - apple,ctc-flush; - apple,tunable = <0x20c 0x80000121 0x80000121>, - <0x220 0xf0f0f 0xf0f0f>, - <0x224 0xffffff 0x80808>, - <0x300 0x1f31 0x1>, - <0x308 0x3ffffffc 0x10000000>, - <0x310 0x3ffffffc 0x3ffffffc>; - status = "okay"; -}; - -&usb4_0_pcie { - apple,pciec-kernel-init; - apple,tunable-debug = <0x1000 0x1 0x0>; - apple,tunable-rc = <0x78 0x7000 0x0>, - <0x718 0x7c000 0x0>, - <0x814 0xffffffff 0x2000f060>, - <0x8bc 0x1 0x0>; - apple,tunable-fabric = <0x4 0x1f001f 0x100010>, - <0x8 0x1 0x1>, - <0xc 0x1 0x1>, - <0x10 0x801f 0x4>, - <0x18 0xff 0xe0>, - <0x1c 0x1 0x1>, - <0x20 0x801f 0x4>, - <0x28 0x1f 0x10>, - <0x2c 0x801f 0x4>, - <0x34 0x3f 0x20>, - <0x38 0x801f 0x4>, - <0x40 0x3f 0x20>, - <0x44 0x801f 0x4>, - <0x4c 0x10001 0x10001>, - <0x50 0x1 0x1>, - <0x54 0x1 0x1>, - <0x58 0x801f 0x4>, - <0x60 0x7f007f 0x450045>, - <0x64 0x801f 0x4>, - <0x6c 0x1f001f 0x100010>, - <0x70 0xf1 0x1>, - <0x74 0x801f 0x4>, - <0x7c 0x801f 0x4>, - <0x84 0x1 0x1>, - <0x88 0x1 0x1>, - <0x8c 0x801f 0x4>, - <0x94 0x1 0x1>, - <0x98 0x801f 0x4>, - <0xa0 0x1 0x1>, - <0xa4 0x801f 0x4>, - <0xac 0x1 0x1>, - <0xb0 0x1 0x1>, - <0xb4 0x801f 0x4>, - <0xbc 0x801f 0x4>, - <0xc4 0x801f 0x4>; - status = "okay"; -}; - -&usb4_0_pcie_port { - apple,tunable = <0x140 0x1 0x1>, - <0x2a0 0x7e 0xa>, - <0x1090 0x1 0x0>; -}; - &ps_atc1_cio { status = "okay"; }; @@ -250,7 +166,6 @@ }; &usb4_1_acio { - /delete-property/ apple,pcie-tunnel; status = "okay"; }; @@ -286,7 +201,6 @@ }; &usb4_2_acio { - /delete-property/ apple,pcie-tunnel; status = "okay"; }; @@ -302,3 +216,4 @@ }; #include "t6040-j614s-extdisp-hdmi.dtsi" +#include "t6040-j614s-pciec.dtsi" From f5299c07fecb90c8ade59818906c6253aa61d5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0kuta?= <20834920+petrskuta@users.noreply.github.com> Date: Fri, 27 Nov 2026 16:11:09 +0100 Subject: [PATCH 4/8] arm64: dts: apple: t6040: share the PCIe-C description between boards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PCIe-C DART window, bypass streams and the DART, controller and port tunables are T6040 SoC data: the J616s ADT carries the same values as the J614s for apciec0-2 and dart-apciec0-2. Move them from t6040-j614s-pciec.dtsi to t6040-pciec.dtsi, included by t6040.dtsi, so a T6040 board only enables the tunnel, DART and controller of each port. The J614s DTB is unchanged. Other T6040 boards gain the properties on nodes that stay disabled. Signed-off-by: Petr Škuta <20834920+petrskuta@users.noreply.github.com> --- arch/arm64/boot/dts/apple/t6040-j614s.dts | 39 ++++++++++++++++++- ...6040-j614s-pciec.dtsi => t6040-pciec.dtsi} | 25 +++++------- arch/arm64/boot/dts/apple/t6040.dtsi | 1 + 3 files changed, 49 insertions(+), 16 deletions(-) rename arch/arm64/boot/dts/apple/{t6040-j614s-pciec.dtsi => t6040-pciec.dtsi} (86%) diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index 06220a2ccfaad..e785ba990e862 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -215,5 +215,42 @@ status = "okay"; }; +/* PCIe-C (tunneled PCIe) on all three Thunderbolt ports: t6040-pciec.dtsi */ + +&usb4_0_pcie_tunnel { + status = "okay"; +}; + +&apciec0_dart { + status = "okay"; +}; + +&usb4_0_pcie { + status = "okay"; +}; + +&usb4_1_pcie_tunnel { + status = "okay"; +}; + +&apciec1_dart { + status = "okay"; +}; + +&usb4_1_pcie { + status = "okay"; +}; + +&usb4_2_pcie_tunnel { + status = "okay"; +}; + +&apciec2_dart { + status = "okay"; +}; + +&usb4_2_pcie { + status = "okay"; +}; + #include "t6040-j614s-extdisp-hdmi.dtsi" -#include "t6040-j614s-pciec.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi similarity index 86% rename from arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi rename to arch/arm64/boot/dts/apple/t6040-pciec.dtsi index 9e131830b8663..1d714ba9355d8 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s-pciec.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi @@ -1,11 +1,12 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * J614s: PCIe-C (tunneled PCIe) on the three Thunderbolt ports, e.g. a + * T6040 PCIe-C (tunneled PCIe) on the three Thunderbolt ports, e.g. a * Studio Display's xHCI. No boot loader hands the ports over: the kernel - * cold-initializes them. + * cold-initializes them. Boards enable the tunnel, DART and controller of + * each port they wire up. * - * From the j614s ADT (macOS 26 IODeviceTree), identical for apciec0-2 and - * dart-apciec0-2: + * From the ADT (macOS 26 IODeviceTree), identical for apciec0-2 and + * dart-apciec0-2 and between the J614s and J616s: * - the DART's DMA window: vm-base 1 TiB + 2 GiB, vm-size 0x7ff00000, its * first 16 KiB a dead mapping; * - bypass-253 and bypass-255: the port's own writes (MSIs turned into AIC @@ -16,11 +17,7 @@ * T6050's PCIe-C DART. */ -#define J614S_PCIEC(n) \ -&usb4_##n##_pcie_tunnel { \ - status = "okay"; \ -}; \ - \ +#define T6040_PCIEC(n) \ &apciec##n##_dart { \ apple,dma-range = <0x100 0x80004000 0x0 0x7fefc000>; \ power-domains = <&ps_atc##n##_pcie>; \ @@ -33,7 +30,6 @@ <0x300 0x1f31 0x1>, \ <0x308 0x3ffffffc 0x10000000>, \ <0x310 0x3ffffffc 0x3ffffffc>; \ - status = "okay"; \ }; \ \ &usb4_##n##_pcie { \ @@ -78,7 +74,6 @@ <0xb4 0x801f 0x4>, \ <0xbc 0x801f 0x4>, \ <0xc4 0x801f 0x4>; \ - status = "okay"; \ }; \ \ &usb4_##n##_pcie_port { \ @@ -87,8 +82,8 @@ <0x1090 0x1 0x0>; \ }; -J614S_PCIEC(0) -J614S_PCIEC(1) -J614S_PCIEC(2) +T6040_PCIEC(0) +T6040_PCIEC(1) +T6040_PCIEC(2) -#undef J614S_PCIEC +#undef T6040_PCIEC diff --git a/arch/arm64/boot/dts/apple/t6040.dtsi b/arch/arm64/boot/dts/apple/t6040.dtsi index e66c5b8d7739f..f228bb086f7b1 100644 --- a/arch/arm64/boot/dts/apple/t6040.dtsi +++ b/arch/arm64/boot/dts/apple/t6040.dtsi @@ -700,3 +700,4 @@ }; #include "t6040-usb4.dtsi" +#include "t6040-pciec.dtsi" From d20d264fe0cc9b2d5557b61959a260cadf7ad5c1 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Sat, 28 Nov 2026 21:26:39 +1100 Subject: [PATCH 5/8] arm64: dts: apple: t6040: PCIe-C tunnels on every M4 Pro The PCIe-C tunnels (apciec0-2 with dart-apciec0-2) are part of the T6040 and have no board wiring: the J614s, J616s and J773s ADTs all list the same three controllers and DARTs with identical tunables. Enable the tunnel, its DART and its controller in t6040-pciec.dtsi instead of in each board, and stop deleting the routers' apple,pcie-tunnel link on the J616s, which left an enclosure on any of its Thunderbolt ports without PCIe. Nothing comes up on its own: a controller is only populated when its USB4 router, which the board enables, asks for a PCIe tunnel. On boards whose routers are still off (J773s) the nodes stay idle. The J614s and T6041 DTBs are unchanged; the J616s and J616s tether DTBs gain the three tunnels. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6040-j614s.dts | 38 ---------------------- arch/arm64/boot/dts/apple/t6040-j616s.dts | 7 ++-- arch/arm64/boot/dts/apple/t6040-pciec.dtsi | 12 +++++-- 3 files changed, 12 insertions(+), 45 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index e785ba990e862..2d364e9c5ac72 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -215,42 +215,4 @@ status = "okay"; }; -/* PCIe-C (tunneled PCIe) on all three Thunderbolt ports: t6040-pciec.dtsi */ - -&usb4_0_pcie_tunnel { - status = "okay"; -}; - -&apciec0_dart { - status = "okay"; -}; - -&usb4_0_pcie { - status = "okay"; -}; - -&usb4_1_pcie_tunnel { - status = "okay"; -}; - -&apciec1_dart { - status = "okay"; -}; - -&usb4_1_pcie { - status = "okay"; -}; - -&usb4_2_pcie_tunnel { - status = "okay"; -}; - -&apciec2_dart { - status = "okay"; -}; - -&usb4_2_pcie { - 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 021d36eaaafa9..1d022d99b39a0 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -195,8 +195,8 @@ /* * 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. + * each router its router, adapter and NHI tuning and its DROM over. Each + * router carries its PCIe-C tunnel (t6040-pciec.dtsi). */ &pmgr_cio { status = "okay"; @@ -223,7 +223,6 @@ }; &usb4_0_acio { - /delete-property/ apple,pcie-tunnel; status = "okay"; }; @@ -259,7 +258,6 @@ }; &usb4_1_acio { - /delete-property/ apple,pcie-tunnel; status = "okay"; }; @@ -295,7 +293,6 @@ }; &usb4_2_acio { - /delete-property/ apple,pcie-tunnel; status = "okay"; }; diff --git a/arch/arm64/boot/dts/apple/t6040-pciec.dtsi b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi index 1d714ba9355d8..bec4a490a317a 100644 --- a/arch/arm64/boot/dts/apple/t6040-pciec.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi @@ -2,8 +2,10 @@ /* * T6040 PCIe-C (tunneled PCIe) on the three Thunderbolt ports, e.g. a * Studio Display's xHCI. No boot loader hands the ports over: the kernel - * cold-initializes them. Boards enable the tunnel, DART and controller of - * each port they wire up. + * cold-initializes them. The tunnels are part of the SoC and have no board + * wiring, so they are enabled on every T6040 (the ADT of every T6040 Mac + * lists apciec0-2 and dart-apciec0-2). The controller only comes up when its + * USB4 router, which the board enables, asks for a PCIe tunnel. * * From the ADT (macOS 26 IODeviceTree), identical for apciec0-2 and * dart-apciec0-2 and between the J614s and J616s: @@ -18,6 +20,10 @@ */ #define T6040_PCIEC(n) \ +&usb4_##n##_pcie_tunnel { \ + status = "okay"; \ +}; \ + \ &apciec##n##_dart { \ apple,dma-range = <0x100 0x80004000 0x0 0x7fefc000>; \ power-domains = <&ps_atc##n##_pcie>; \ @@ -30,6 +36,7 @@ <0x300 0x1f31 0x1>, \ <0x308 0x3ffffffc 0x10000000>, \ <0x310 0x3ffffffc 0x3ffffffc>; \ + status = "okay"; \ }; \ \ &usb4_##n##_pcie { \ @@ -74,6 +81,7 @@ <0xb4 0x801f 0x4>, \ <0xbc 0x801f 0x4>, \ <0xc4 0x801f 0x4>; \ + status = "okay"; \ }; \ \ &usb4_##n##_pcie_port { \ From 638bd1cb34ba6f2d8afa9092229c2b056c70edfb Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Sat, 28 Nov 2026 23:40:03 +1100 Subject: [PATCH 6/8] arm64: dts: apple: t6040: power the PCIe-C DARTs on every M4 Pro Each PCIe-C DART sits in its port's ATC PCIe power domain. Now that the tunnels are enabled on every T6040 board, enable that domain with them, so a board that does not enable it itself (J773s) does not carry an enabled DART on a disabled domain. The J614s and J616s already enable these domains; their DTBs are unchanged. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6040-pciec.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6040-pciec.dtsi b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi index bec4a490a317a..2c9497bf87aaf 100644 --- a/arch/arm64/boot/dts/apple/t6040-pciec.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi @@ -4,8 +4,9 @@ * Studio Display's xHCI. No boot loader hands the ports over: the kernel * cold-initializes them. The tunnels are part of the SoC and have no board * wiring, so they are enabled on every T6040 (the ADT of every T6040 Mac - * lists apciec0-2 and dart-apciec0-2). The controller only comes up when its - * USB4 router, which the board enables, asks for a PCIe tunnel. + * lists apciec0-2 and dart-apciec0-2), with the ATC PCIe power domain their + * DARTs sit in. The controller only comes up when its USB4 router, which the + * board enables, asks for a PCIe tunnel. * * From the ADT (macOS 26 IODeviceTree), identical for apciec0-2 and * dart-apciec0-2 and between the J614s and J616s: @@ -20,6 +21,10 @@ */ #define T6040_PCIEC(n) \ +&ps_atc##n##_pcie { \ + status = "okay"; \ +}; \ + \ &usb4_##n##_pcie_tunnel { \ status = "okay"; \ }; \ From 7954fa29464a6351a380c008b1ff0cc08f63d98e Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Sun, 29 Nov 2026 01:35:26 +1100 Subject: [PATCH 7/8] arm64: dts: apple: t604x: enable ADT-present peripherals Enable ADT-present peripherals across the T6040 (M4 Pro) and T6041 (M4 Max) shared device trees, and move the T6040 PCIe-C tunnel PIODMA engines into their usb4-pcie-tunnel containers so ACIO populates and tears them down with each tunnel: - t604x.dtsi: enable i2c4, i2c6, and i2c8 (power domains and pinmux already active in shared files). - t6040.dtsi / t6040-pmgr.dtsi: enable pinctrl_smc without interrupt-controller (SMC firmware owns its IRQ groups, matching pinctrl_nub), nub_spmi3/4 with ps_nub_spmi3/4, aop_spmi0, and serial0 with ps_uart0. - t6040-peripherals.dtsi: enable aon_ptd, cpu_debug, atc0..2_dpin0/1, battery_monitor (disabled on desktop t6040-j773s), and radio_pmu; keep peripheral_clocks disabled (no clock provider driver yet). - t6040-usb4.dtsi / t6040-pciec.dtsi / adt-coverage/t6040-j616s.txt: move apciec0..2_piodma into usb4_0..2_pcie_tunnel as dma@ nodes, enable them via T6040_PCIEC(), and update the J616s coverage paths. - t6040-j616s.dts: enable sd_card_control, display_pcon, retimer@18..1a, and the read-only DP855 downstream i2c bus and TMP103 sensors. - t6041.dtsi / t6041-j614-j616-j575-scaler.dtsi: enable aop_spmi0, ps_aes/aes, aon_ptd, ps_scodec/apr0, and shared scaler0/1 plus their DARTs and power domains; keep max_scaler_clocks disabled. Unsafe (dcuart), loader-gated (DCP/DCPEXT/SEP/SIO/AVE1/PMP reports), and unbacked clock providers remain disabled. Signed-off-by: Ryan Murray --- .../dts/apple/adt-coverage/t6040-j616s.txt | 6 +-- arch/arm64/boot/dts/apple/t6040-j616s.dts | 17 ++----- arch/arm64/boot/dts/apple/t6040-j773s.dts | 5 ++ arch/arm64/boot/dts/apple/t6040-pciec.dtsi | 4 ++ .../boot/dts/apple/t6040-peripherals.dtsi | 50 +------------------ arch/arm64/boot/dts/apple/t6040-pmgr.dtsi | 3 -- arch/arm64/boot/dts/apple/t6040-usb4.dtsi | 39 +++++++++++++++ arch/arm64/boot/dts/apple/t6040.dtsi | 20 ++------ .../apple/t6041-j614-j616-j575-scaler.dtsi | 9 +--- arch/arm64/boot/dts/apple/t6041.dtsi | 8 --- arch/arm64/boot/dts/apple/t604x.dtsi | 3 -- 11 files changed, 61 insertions(+), 103 deletions(-) diff --git a/arch/arm64/boot/dts/apple/adt-coverage/t6040-j616s.txt b/arch/arm64/boot/dts/apple/adt-coverage/t6040-j616s.txt index 7dc8aaa51a288..9101ebbee9b20 100644 --- a/arch/arm64/boot/dts/apple/adt-coverage/t6040-j616s.txt +++ b/arch/arm64/boot/dts/apple/adt-coverage/t6040-j616s.txt @@ -97,7 +97,7 @@ /arm-io/apciec0/pcic0-bridge - -> /usb4-pcie-tunnel-0/pcie@1c50000000/pci@0,0 /arm-io/dart-apciec0 0x384000000 -> /usb4-pcie-tunnel-0/iommu@384000000 /arm-io/dart-apciec0/mapper-apciec0-piodma - -> /usb4-pcie-tunnel-0/iommu@384000000 -/arm-io/apciec0-piodma 0x384068000 -> /soc/dma@384068000 +/arm-io/apciec0-piodma 0x384068000 -> /usb4-pcie-tunnel-0/dma@384068000 /arm-io/acio0 0x381f00000 -> /cio@381ac0000/nhi@1f00000 /arm-io/dart-acio0 0x381a80000 -> /cio@381ac0000/iommu@1a80000 /arm-io/dart-acio0/mapper-acio0-tx-0 - -> /cio@381ac0000/iommu@1a80000 @@ -130,7 +130,7 @@ /arm-io/apciec1/pcic1-bridge - -> /usb4-pcie-tunnel-1/pcie@1c60000000/pci@0,0 /arm-io/dart-apciec1 0x38c000000 -> /usb4-pcie-tunnel-1/iommu@38c000000 /arm-io/dart-apciec1/mapper-apciec1-piodma - -> /usb4-pcie-tunnel-1/iommu@38c000000 -/arm-io/apciec1-piodma 0x38c068000 -> /soc/dma@38c068000 +/arm-io/apciec1-piodma 0x38c068000 -> /usb4-pcie-tunnel-1/dma@38c068000 /arm-io/acio1 0x389f00000 -> /cio@389ac0000/nhi@1f00000 /arm-io/dart-acio1 0x389a80000 -> /cio@389ac0000/iommu@1a80000 /arm-io/dart-acio1/mapper-acio1-tx-0 - -> /cio@389ac0000/iommu@1a80000 @@ -163,7 +163,7 @@ /arm-io/apciec2/pcic2-bridge - -> /usb4-pcie-tunnel-2/pcie@1c70000000/pci@0,0 /arm-io/dart-apciec2 0x394000000 -> /usb4-pcie-tunnel-2/iommu@394000000 /arm-io/dart-apciec2/mapper-apciec2-piodma - -> /usb4-pcie-tunnel-2/iommu@394000000 -/arm-io/apciec2-piodma 0x394068000 -> /soc/dma@394068000 +/arm-io/apciec2-piodma 0x394068000 -> /usb4-pcie-tunnel-2/dma@394068000 /arm-io/acio2 0x391f00000 -> /cio@391ac0000/nhi@1f00000 /arm-io/dart-acio2 0x391a80000 -> /cio@391ac0000/iommu@1a80000 /arm-io/dart-acio2/mapper-acio2-tx-0 - -> /cio@391ac0000/iommu@1a80000 diff --git a/arch/arm64/boot/dts/apple/t6040-j616s.dts b/arch/arm64/boot/dts/apple/t6040-j616s.dts index 1d022d99b39a0..9787639c5f7b7 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -106,7 +106,6 @@ sd_card_control: card-control@20 { compatible = "apple,t6041-sd-card-control", "apple,sd-card-control"; reg = <0x20>; - status = "disabled"; }; }; @@ -114,17 +113,16 @@ display_pcon: display-converter@8 { compatible = "apple,t6041-display-pcon", "apple,display-pcon"; reg = <0x8>; - status = "disabled"; }; }; /* * Panel timing controller. Its chip select is AP GPIO 34. * - * The downstream bus stays disabled: with the panel on, the controller - * answers every access request with a refusal (acknowledgment 3), and - * with the panel off its registers read back as zero, so the TMP103 - * panel sensors cannot be reached from the AP. + * The downstream read-only bus and TMP103 sensors match the ADT: neither the + * DP855 adapter nor read-only TMP103 touches the bus at probe time, and on + * demand reads return a normal transfer error if DP855 refuses AP access + * while the panel is on. */ &ps_spi4 { status = "okay"; @@ -144,13 +142,11 @@ i2c { #address-cells = <1>; #size-cells = <0>; - status = "disabled"; temperature-sensor@70 { compatible = "ti,tmp103"; reg = <0x70>; read-only; - status = "disabled"; }; /* @@ -161,14 +157,12 @@ compatible = "ti,tmp103"; reg = <0x71>; read-only; - status = "disabled"; }; temperature-sensor@72 { compatible = "ti,tmp103"; reg = <0x72>; read-only; - status = "disabled"; }; }; }; @@ -178,17 +172,14 @@ retimer@18 { compatible = "apple,t6041-atcrt", "apple,atcrt"; reg = <0x18>; - status = "disabled"; }; retimer@19 { compatible = "apple,t6041-atcrt", "apple,atcrt"; reg = <0x19>; - status = "disabled"; }; retimer@1a { compatible = "apple,t6041-atcrt", "apple,atcrt"; reg = <0x1a>; - status = "disabled"; }; }; diff --git a/arch/arm64/boot/dts/apple/t6040-j773s.dts b/arch/arm64/boot/dts/apple/t6040-j773s.dts index 90da1d0fb1349..eca4763e1cfab 100644 --- a/arch/arm64/boot/dts/apple/t6040-j773s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j773s.dts @@ -193,6 +193,11 @@ status = "okay"; }; +/* Mac mini desktop has no battery. */ +&battery_monitor { + status = "disabled"; +}; + &pinctrl { status = "okay"; diff --git a/arch/arm64/boot/dts/apple/t6040-pciec.dtsi b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi index 2c9497bf87aaf..22a755f51c43e 100644 --- a/arch/arm64/boot/dts/apple/t6040-pciec.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-pciec.dtsi @@ -93,6 +93,10 @@ apple,tunable = <0x140 0x1 0x1>, \ <0x2a0 0x7e 0xa>, \ <0x1090 0x1 0x0>; \ +}; \ + \ +&apciec##n##_piodma { \ + status = "okay"; \ }; T6040_PCIEC(0) diff --git a/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi index babbb53ec0991..3e31fcaf166c0 100644 --- a/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi @@ -78,7 +78,6 @@ , , ; - status = "disabled"; }; /* ADT /arm-io/scaler0. */ @@ -113,7 +112,6 @@ <0x5 0x085c0000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/apcie0-piodma. */ @@ -140,45 +138,6 @@ status = "okay"; }; - /* ADT /arm-io/apciec0-piodma. */ - apciec0_piodma: dma@384068000 { - compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; - reg = <0x3 0x84068000 0x0 0x4000>, - <0x3 0x8406c000 0x0 0x4000>, - <0x3 0x84070000 0x0 0x4000>, - <0x3 0x8403c000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apciec0_dart 254>; - status = "disabled"; - }; - - /* ADT /arm-io/apciec1-piodma. */ - apciec1_piodma: dma@38c068000 { - compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; - reg = <0x3 0x8c068000 0x0 0x4000>, - <0x3 0x8c06c000 0x0 0x4000>, - <0x3 0x8c070000 0x0 0x4000>, - <0x3 0x8c03c000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apciec1_dart 254>; - status = "disabled"; - }; - - /* ADT /arm-io/apciec2-piodma. */ - apciec2_piodma: dma@394068000 { - compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; - reg = <0x3 0x94068000 0x0 0x4000>, - <0x3 0x9406c000 0x0 0x4000>, - <0x3 0x94070000 0x0 0x4000>, - <0x3 0x9403c000 0x0 0x4000>; - interrupt-parent = <&aic>; - interrupts = ; - iommus = <&apciec2_dart 254>; - status = "disabled"; - }; - /* ADT /arm-io/apr0. */ apr0: video-codec@301000000 { compatible = "apple,t6041-prores", "apple,prores"; @@ -200,7 +159,6 @@ reg = <0x3 0x81e50000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/atc0-dpin1. */ @@ -209,7 +167,6 @@ reg = <0x3 0x81e58000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/atc1-dpin0. */ @@ -218,7 +175,6 @@ reg = <0x3 0x89e50000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/atc1-dpin1. */ @@ -227,7 +183,6 @@ reg = <0x3 0x89e58000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/atc2-dpin0. */ @@ -236,7 +191,6 @@ reg = <0x3 0x91e50000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/atc2-dpin1. */ @@ -245,7 +199,6 @@ reg = <0x3 0x91e58000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; @@ -320,6 +273,7 @@ <0x5 0x022a0000 0x0 0x4000>; #clock-cells = <1>; apple,pmgr = <&pmgr>; + /* No Linux clock provider driver yet; enabling defers scaler0. */ status = "disabled"; }; }; @@ -336,7 +290,6 @@ reg = <0xb SPMI_USID>; interrupt-parent = <&aon_ptd>; interrupts = <0x62746d30>, <0x62746d31>; - status = "disabled"; }; }; @@ -344,6 +297,5 @@ radio_pmu: pmic@e { compatible = "apple,t6041-radio-pmu", "apple,radio-pmu"; reg = <0xe SPMI_USID>; - status = "disabled"; }; }; diff --git a/arch/arm64/boot/dts/apple/t6040-pmgr.dtsi b/arch/arm64/boot/dts/apple/t6040-pmgr.dtsi index 4d733110e3527..e608d7d2204f8 100644 --- a/arch/arm64/boot/dts/apple/t6040-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-pmgr.dtsi @@ -176,7 +176,6 @@ #reset-cells = <0>; label = "uart0"; power-domains = <&ps_uart_p>; - status = "disabled"; }; ps_uart1: power-controller@200 { @@ -1466,7 +1465,6 @@ label = "nub_spmi3"; power-domains = <&ps_nub_spmi_ahb>; apple,always-on; - status = "disabled"; }; ps_nub_spmi4: power-controller@f8 { @@ -1477,7 +1475,6 @@ label = "nub_spmi4"; power-domains = <&ps_nub_spmi_ahb>; apple,always-on; - status = "disabled"; }; ps_nub_fabric: power-controller@100 { diff --git a/arch/arm64/boot/dts/apple/t6040-usb4.dtsi b/arch/arm64/boot/dts/apple/t6040-usb4.dtsi index cd3b2c21aca7a..14cf363ca230a 100644 --- a/arch/arm64/boot/dts/apple/t6040-usb4.dtsi +++ b/arch/arm64/boot/dts/apple/t6040-usb4.dtsi @@ -381,6 +381,19 @@ <0 0 0 4 &usb4_0_pcie_port 0 0 0 3>; }; }; + + /* ADT /arm-io/apciec0-piodma. */ + apciec0_piodma: dma@384068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x84068000 0x0 0x4000>, + <0x3 0x8406c000 0x0 0x4000>, + <0x3 0x84070000 0x0 0x4000>, + <0x3 0x8403c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec0_dart 254>; + status = "disabled"; + }; }; usb4_1_pcie_tunnel: usb4-pcie-tunnel-1 { @@ -452,6 +465,19 @@ <0 0 0 4 &usb4_1_pcie_port 0 0 0 3>; }; }; + + /* ADT /arm-io/apciec1-piodma. */ + apciec1_piodma: dma@38c068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x8c068000 0x0 0x4000>, + <0x3 0x8c06c000 0x0 0x4000>, + <0x3 0x8c070000 0x0 0x4000>, + <0x3 0x8c03c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec1_dart 254>; + status = "disabled"; + }; }; usb4_2_pcie_tunnel: usb4-pcie-tunnel-2 { @@ -523,6 +549,19 @@ <0 0 0 4 &usb4_2_pcie_port 0 0 0 3>; }; }; + + /* ADT /arm-io/apciec2-piodma. */ + apciec2_piodma: dma@394068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x94068000 0x0 0x4000>, + <0x3 0x9406c000 0x0 0x4000>, + <0x3 0x94070000 0x0 0x4000>, + <0x3 0x9403c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec2_dart 254>; + status = "disabled"; + }; }; }; diff --git a/arch/arm64/boot/dts/apple/t6040.dtsi b/arch/arm64/boot/dts/apple/t6040.dtsi index 5601257d34d9c..6ccbb43c172bb 100644 --- a/arch/arm64/boot/dts/apple/t6040.dtsi +++ b/arch/arm64/boot/dts/apple/t6040.dtsi @@ -360,6 +360,10 @@ status = "disabled"; }; + /* + * The AP takes none of the SMC bank's interrupts: SMC firmware owns + * its interrupt groups, so expose GPIO pins without a chained handler. + */ pinctrl_smc: pinctrl@50c824000 { compatible = "apple,t6041-pinctrl", "apple,t8103-pinctrl"; reg = <0x5 0x0c824000 0x0 0x4000>; @@ -368,18 +372,6 @@ #gpio-cells = <2>; gpio-ranges = <&pinctrl_smc 0 0 24>; apple,npins = <24>; - interrupt-controller; - #interrupt-cells = <2>; - interrupt-parent = <&aic>; - interrupts = , - , - , - , - , - , - ; - /* Coprocessor pins and interrupt groups need an ownership handoff. */ - status = "disabled"; }; nub_spmi1: spmi@509054000 { @@ -406,7 +398,6 @@ #address-cells = <2>; #size-cells = <0>; power-domains = <&ps_nub_spmi3>; - status = "disabled"; }; nub_spmi4: spmi@509114000 { @@ -415,7 +406,6 @@ #address-cells = <2>; #size-cells = <0>; power-domains = <&ps_nub_spmi4>; - status = "disabled"; }; aop_spmi0: spmi@510914000 { @@ -427,7 +417,6 @@ interrupt-controller; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; spi4: spi@429110000 { @@ -581,7 +570,6 @@ &serial0 { power-domains = <&ps_uart0>; - status = "disabled"; }; &pmc { diff --git a/arch/arm64/boot/dts/apple/t6041-j614-j616-j575-scaler.dtsi b/arch/arm64/boot/dts/apple/t6041-j614-j616-j575-scaler.dtsi index 6140cc718d11c..c5ea02b1314db 100644 --- a/arch/arm64/boot/dts/apple/t6041-j614-j616-j575-scaler.dtsi +++ b/arch/arm64/boot/dts/apple/t6041-j614-j616-j575-scaler.dtsi @@ -10,7 +10,6 @@ #reset-cells = <0>; label = "msr0"; power-domains = <&ps_fab5_soc>; - status = "disabled"; }; }; @@ -22,7 +21,6 @@ #reset-cells = <0>; label = "msr0_ase_core"; power-domains = <&ps_msr0>; - status = "disabled"; }; }; @@ -35,7 +33,6 @@ #reset-cells = <0>; label = "msr1"; power-domains = <&ps_fab6_soc>; - status = "disabled"; }; ps_msr1_ase_core: power-controller@3b8 { @@ -45,7 +42,6 @@ #reset-cells = <0>; label = "msr1_ase_core"; power-domains = <&ps_msr1>; - status = "disabled"; }; }; @@ -58,7 +54,6 @@ interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_msr0_dart>; - status = "disabled"; }; scaler1_dart: iommu@587260000 { @@ -69,7 +64,6 @@ interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_msr1_dart>; - status = "disabled"; }; scaler0: scaler@521000000 { @@ -85,7 +79,6 @@ resets = <&ps_msr0>; iommus = <&scaler0_dart 0>, <&scaler0_dart 1>; clocks = <&max_scaler_clocks 417>; - status = "disabled"; }; scaler1: scaler@587000000 { @@ -101,7 +94,6 @@ resets = <&ps_msr1>; iommus = <&scaler1_dart 0>, <&scaler1_dart 1>; clocks = <&max_scaler_clocks 418>; - status = "disabled"; }; max_scaler_clocks: clock-controller@502800000 { @@ -171,6 +163,7 @@ <0x5 0x022a0000 0x0 0x4000>; #clock-cells = <1>; apple,pmgr = <&pmgr>; + /* No Linux clock provider driver yet; enabling defers scalers. */ status = "disabled"; }; }; diff --git a/arch/arm64/boot/dts/apple/t6041.dtsi b/arch/arm64/boot/dts/apple/t6041.dtsi index 837aeb8177e04..7377af8b47c11 100644 --- a/arch/arm64/boot/dts/apple/t6041.dtsi +++ b/arch/arm64/boot/dts/apple/t6041.dtsi @@ -439,7 +439,6 @@ interrupt-controller; interrupt-parent = <&aic>; interrupts = ; - status = "disabled"; }; /* ADT /arm-io/aes */ @@ -452,7 +451,6 @@ interrupts = ; power-domains = <&ps_aes>; iommus = <&sio_dart 1>; - status = "disabled"; }; /* ADT /arm-io/aon-ptd */ @@ -498,7 +496,6 @@ interrupt-controller; #interrupt-cells = <1>; #address-cells = <0>; - status = "disabled"; }; pmgr_disp: power-management@502290000 { @@ -702,7 +699,6 @@ #reset-cells = <0>; label = "aes"; power-domains = <&ps_sio>; - status = "disabled"; }; }; @@ -953,7 +949,6 @@ #reset-cells = <0>; label = "scodec"; power-domains = <&ps_fab1_soc>; - status = "disabled"; }; ps_scodec_streaming: power-controller@330 { @@ -963,7 +958,6 @@ #reset-cells = <0>; label = "scodec_streaming"; power-domains = <&ps_scodec>; - status = "disabled"; }; }; @@ -979,7 +973,6 @@ power-domains = <&ps_scodec_streaming>; iommus = <&apr0_dart 1>; resets = <&ps_scodec>; - status = "disabled"; }; apr0_dart: iommu@301020000 { @@ -990,7 +983,6 @@ interrupt-parent = <&aic>; interrupts = ; power-domains = <&ps_scodec>; - status = "disabled"; }; }; diff --git a/arch/arm64/boot/dts/apple/t604x.dtsi b/arch/arm64/boot/dts/apple/t604x.dtsi index 4db23b8ba7ff2..4e25d040be20e 100644 --- a/arch/arm64/boot/dts/apple/t604x.dtsi +++ b/arch/arm64/boot/dts/apple/t604x.dtsi @@ -821,7 +821,6 @@ power-domains = <&ps_i2c4>; #address-cells = <1>; #size-cells = <0>; - status = "disabled"; }; i2c6: i2c@429028000 { @@ -835,7 +834,6 @@ power-domains = <&ps_i2c6>; #address-cells = <1>; #size-cells = <0>; - status = "disabled"; }; i2c8: i2c@429030000 { @@ -849,7 +847,6 @@ power-domains = <&ps_i2c8>; #address-cells = <1>; #size-cells = <0>; - status = "disabled"; }; fpwm0: pwm@429040000 { From b4918049efe896715b26cda5afc123626d965263 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Sun, 29 Nov 2026 05:53:25 +1100 Subject: [PATCH 8/8] arm64: dts: apple: t6040: keep dp855 downstream i2c and pinctrl_smc disabled Keep the DP855 downstream i2c bus and its three TMP103 sensors disabled on t6040-j616s (DP855 refuses AP accesses with ack 3 while the panel is on and reads back zeros while off, so exposing hwmon nodes breaks userspace tools) and keep pinctrl_smc disabled with its full hardware interrupt description intact in t6040.dtsi until a consumer and SMC IRQ handoff exist. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6040-j616s.dts | 12 ++++++++---- arch/arm64/boot/dts/apple/t6040.dtsi | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6040-j616s.dts b/arch/arm64/boot/dts/apple/t6040-j616s.dts index 9787639c5f7b7..ae3e2fa2ec547 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -119,10 +119,10 @@ /* * Panel timing controller. Its chip select is AP GPIO 34. * - * The downstream read-only bus and TMP103 sensors match the ADT: neither the - * DP855 adapter nor read-only TMP103 touches the bus at probe time, and on - * demand reads return a normal transfer error if DP855 refuses AP access - * while the panel is on. + * The downstream bus stays disabled: with the panel on, the controller + * answers every access request with a refusal (acknowledgment 3), and + * with the panel off its registers read back as zero, so the TMP103 + * panel sensors cannot be reached from the AP. */ &ps_spi4 { status = "okay"; @@ -142,11 +142,13 @@ i2c { #address-cells = <1>; #size-cells = <0>; + status = "disabled"; temperature-sensor@70 { compatible = "ti,tmp103"; reg = <0x70>; read-only; + status = "disabled"; }; /* @@ -157,12 +159,14 @@ compatible = "ti,tmp103"; reg = <0x71>; read-only; + status = "disabled"; }; temperature-sensor@72 { compatible = "ti,tmp103"; reg = <0x72>; read-only; + status = "disabled"; }; }; }; diff --git a/arch/arm64/boot/dts/apple/t6040.dtsi b/arch/arm64/boot/dts/apple/t6040.dtsi index 6ccbb43c172bb..cecb84545a91c 100644 --- a/arch/arm64/boot/dts/apple/t6040.dtsi +++ b/arch/arm64/boot/dts/apple/t6040.dtsi @@ -360,10 +360,6 @@ status = "disabled"; }; - /* - * The AP takes none of the SMC bank's interrupts: SMC firmware owns - * its interrupt groups, so expose GPIO pins without a chained handler. - */ pinctrl_smc: pinctrl@50c824000 { compatible = "apple,t6041-pinctrl", "apple,t8103-pinctrl"; reg = <0x5 0x0c824000 0x0 0x4000>; @@ -372,6 +368,18 @@ #gpio-cells = <2>; gpio-ranges = <&pinctrl_smc 0 0 24>; apple,npins = <24>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + ; + /* Coprocessor pins and interrupt groups need an ownership handoff. */ + status = "disabled"; }; nub_spmi1: spmi@509054000 {