From bb0d6020d7d9d9f803e9b6e0f22cc4af45c202a1 Mon Sep 17 00:00:00 2001 From: Will Bunting <18180928+wbunting@users.noreply.github.com> Date: Tue, 17 Nov 2026 12:21:57 +0900 Subject: [PATCH 1/3] PCI: apple: accept the T6031 PCIe-C MSI slices T6031 (M3 Max) shares T6030's PCIe-C MSI layout: the ADT gives every apcie and apciec host one 512-vector AIC window, the internal apcie0 takes its first 32 vectors, and each tunnel host owns the next 32-vector slice. Two things differ: the window starts at AIC 1854 instead of 1342, and T6031's AIC takes a four-cell specifier with a die number. Look the window up by SoC in apple_t603x_msi_window(), accept both specifier forms (die 0 only), and treat T6031 like T6030 where apple_pcie_tunnel_prepare() decides whether to keep the t8122 hardware description. T6030 behaviour is unchanged. Tested on a J516C (MacBook Pro 16", M3 Max) with the ATC0 tunnel from the following patch: a Thunderbolt 3 audio interface (Universal Audio Apollo Twin X) enumerates behind its JHL6240 bridges, and its driver's MSI self-test passes with no DART faults. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Will Bunting <18180928+wbunting@users.noreply.github.com> --- drivers/pci/controller/pcie-apple.c | 57 ++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c index 805ff1a8d084f2..d20f5dc8b2bb1a 100644 --- a/drivers/pci/controller/pcie-apple.c +++ b/drivers/pci/controller/pcie-apple.c @@ -1834,11 +1834,25 @@ static const struct msi_parent_ops apple_msi_parent_ops = { .init_dev_msi_info = apple_msi_init_dev_msi_info, }; -/* T6030 has one shared AIC MSI window, partitioned by its ADT bridges. */ -static bool apple_t6030_msi_slice_valid(u32 base, u32 count, u32 aic_irq) +/* + * T6030 and T6031 have one shared 512-vector AIC MSI window, partitioned by + * their ADT bridges. Only its first AIC number differs. Returns 0 on other + * SoCs. + */ +static u32 apple_t603x_msi_window(void) +{ + if (of_machine_is_compatible("apple,t6030")) + return 1342; + if (of_machine_is_compatible("apple,t6031")) + return 1854; + return 0; +} + +static bool apple_t603x_msi_slice_valid(u32 window, u32 base, u32 count, + u32 aic_irq) { return (base == 0x20 || base == 0x40 || base == 0x60) && - count == 32 && aic_irq == 1342 + base; + count == 32 && aic_irq == window + base; } static int apple_msi_init(struct apple_pcie *pcie) @@ -1872,11 +1886,13 @@ static int apple_msi_init(struct apple_pcie *pcie) * entry to the corresponding shared-window vector. */ if (pcie->hw == &t8122_pciec_hw) { + u32 window = apple_t603x_msi_window(); struct resource ecam; + unsigned int irq; u32 expected_base; - /* These ECAM apertures identify the three T6030 ADT bridges. */ - if (!of_machine_is_compatible("apple,t6030") || + /* These ECAM apertures identify the three T6030/T6031 ADT bridges. */ + if (!window || of_address_to_resource(to_of_node(fwnode), 0, &ecam)) goto invalid_slice; switch (ecam.start) { @@ -1892,15 +1908,25 @@ static int apple_msi_init(struct apple_pcie *pcie) default: goto invalid_slice; } - if (args.args_count != 3 || args.args[0] != 0 || - args.args[2] != IRQ_TYPE_EDGE_RISING) + /* + * T6030's AIC takes . T6031's takes + * , and every tunnel host is on die 0. + */ + if (args.args_count == 3) + irq = 1; + else if (args.args_count == 4 && args.args[1] == 0) + irq = 2; + else + goto invalid_slice; + if (args.args[0] != 0 || + args.args[irq + 1] != IRQ_TYPE_EDGE_RISING) goto invalid_slice; ret = of_property_read_u32(to_of_node(fwnode), "apple,msi-vector-base", &pcie->msi_vector_base); if (!of_find_property(to_of_node(fwnode), "apple,msi-vector-base", NULL) && - args.args[1] == 1342 && pcie->nvecs == 512) { + args.args[irq] == window && pcie->nvecs == 512) { /* * Old experimental boot DTs exposed the global window to * each host. Correct it here so old recovery kernels can @@ -1908,15 +1934,15 @@ static int apple_msi_init(struct apple_pcie *pcie) */ pcie->msi_vector_base = expected_base; pcie->nvecs = 32; - args.args[1] += expected_base; + args.args[irq] += expected_base; dev_info(pcie->dev, "correcting legacy MSI window to IRQ %u count 32\n", - args.args[1]); + args.args[irq]); } else if (ret) { goto invalid_slice; } if (pcie->msi_vector_base != expected_base || - !apple_t6030_msi_slice_valid(pcie->msi_vector_base, - pcie->nvecs, args.args[1])) + !apple_t603x_msi_slice_valid(window, pcie->msi_vector_base, + pcie->nvecs, args.args[irq])) goto invalid_slice; } @@ -3246,9 +3272,12 @@ int apple_pcie_tunnel_prepare(struct device *dev, struct device_node *tunnel) pcie->dev = dev; pcie->hw = match->data; - /* Keep the previous fallback on unqualified M3-family machines. */ + /* + * Keep the previous fallback on M3-family machines other than T6030 + * and T6031, the two with a known MSI window. + */ if (pcie->hw == &t8122_pciec_hw && - !of_machine_is_compatible("apple,t6030") && + !apple_t603x_msi_window() && of_device_is_compatible(dev->of_node, "apple,t8103-pciec")) pcie->hw = &t8103_pciec_hw; pcie->kernel_init = kernel_init; From c593b5d2102793a5c05cb66772559eacc68e2794 Mon Sep 17 00:00:00 2001 From: Will Bunting <18180928+wbunting@users.noreply.github.com> Date: Tue, 17 Nov 2026 12:21:57 +0900 Subject: [PATCH 2/3] arm64: dts: apple: t6031-j516c: add the ATC0 USB4 PCIe tunnel Describe ATC0's PCIe-C host, its DART and the apple,pcie-tunnel link in a new t6031-usb4.dtsi, modelled on t6030-usb4.dtsi. Every value is from the J516C ADT (apciec0, dart-apciec0, apciec0-piodma, acio0). The register windows and tunables match T6030. The AIC numbers (1347, 1348) and the MSI slice (AIC 1854 + 0x20, 32 vectors) are T6031's. Add the usb4_0_pcie and usb4_0_pcie_adapter aliases so m1n1 fills the rc, fabric, debug, root port and PCIe adapter tunables. Give the ACIO its PCIe adapter window and its fourth power domain (ps_atc0_pcie). Unlike T6030, leave out the ACIO's "cpu" window: the T6031 ACIO uses the t8103 start sequence. Only ATC0 is described. ATC1 and ATC2 need their own ADT values and testing. Compared with the current t6031-j516c.dtb, only /aliases, the ATC0 ACIO node and the new /usb4-pcie-tunnel-0 subtree change. Tested on a J516C: a Thunderbolt 3 device on the ATC0 port enumerates through the tunnel as 0001:03:00.0 with the PCIe-C link up and no DART faults. Not tested: the J514C (14" M3 Max), suspend/resume, and hot unplug. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Will Bunting <18180928+wbunting@users.noreply.github.com> --- arch/arm64/boot/dts/apple/t6031-j516c.dts | 1 + arch/arm64/boot/dts/apple/t6031-usb4.dtsi | 129 ++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/t6031-usb4.dtsi diff --git a/arch/arm64/boot/dts/apple/t6031-j516c.dts b/arch/arm64/boot/dts/apple/t6031-j516c.dts index 562491755117f1..4d9e71ca938ce5 100644 --- a/arch/arm64/boot/dts/apple/t6031-j516c.dts +++ b/arch/arm64/boot/dts/apple/t6031-j516c.dts @@ -12,6 +12,7 @@ #include "t6031.dtsi" #include "t6031-dcp.dtsi" #include "t603x-j514-j516.dtsi" +#include "t6031-usb4.dtsi" / { compatible = "apple,j516c", "apple,t6031", "apple,arm-platform"; diff --git a/arch/arm64/boot/dts/apple/t6031-usb4.dtsi b/arch/arm64/boot/dts/apple/t6031-usb4.dtsi new file mode 100644 index 00000000000000..616ce180f347cf --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6031-usb4.dtsi @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * T6031 (M3 Max) USB4 PCIe tunnel on ATC0, modelled on t6030-usb4.dtsi. + * + * Every value is from the J516C ADT (/arm-io/apciec0, dart-apciec0, + * apciec0-piodma, acio0). The register windows and tunables match T6030. + * The AIC numbers differ, and T6031 uses the four-cell, die-numbered AIC + * specifier. MSIs come from the ADT's shared window at AIC 1854: the + * internal apcie0 owns its first 32 vectors (t6031-die0.dtsi) and this host + * takes the next 32, at 0x20. + * + * m1n1 fills apple,tunable-{rc,fabric,debug} through the usb4_0_pcie alias, + * the root port's apple,tunable, and apple,tunable-pcie-adapter through + * usb4_0_pcie_adapter. No bootloader fills the DART and OE fabric tunables, + * so they are carried here. + */ + +/ { + aliases { + usb4_0_pcie = &usb4_0_pcie; + usb4_0_pcie_adapter = &usb4_0_acio; + }; +}; + +&usb4_0_acio { + /* + * ADT acio0 reg[5] is the PCIe adapter window m1n1 tunes. Unlike + * T6030 there is no "cpu" window: the T6031 ACIO uses the t8103 + * start sequence. + */ + reg = <0x7 0x01ac0000 0x0 0xc000>, + <0x7 0x01080000 0x0 0x20000>, + <0x7 0x01e44000 0x0 0x4000>; + reg-names = "rc", "sram", "pcie-adapter"; + power-domains = <&ps_atc0_cio>, <&ps_atc0_cio_pcie>, + <&ps_atc0_cio_usb>, <&ps_atc0_pcie>; + post-init-providers = <&ps_atc0_cio>, <&ps_atc0_cio_pcie>, + <&ps_atc0_cio_usb>, <&ps_atc0_pcie>; + apple,pcie-tunnel = <&usb4_0_pcie_tunnel>; +}; + +/ { + usb4_0_pcie_tunnel: usb4-pcie-tunnel-0 { + #address-cells = <2>; + #size-cells = <2>; + ranges; + nonposted-mmio; + /* Preserve the SoC DMA window after moving the virtual container. */ + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; + + usb4_0_pcie_dart: iommu@721008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x7 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + /* ADT dart-apciec0 dart-tunables-instance-0 */ + apple,tunable = + <0x20c 0x800001b7 0x800001b7>, + <0x220 0xf0f0f 0xf0f0f>, + <0x224 0xffffff 0x80808>, + <0x300 0x1f31 0x1>, + <0x308 0x3ffffffc 0x10000000>, + <0x310 0x3ffffffc 0x3ffffffc>, + <0x318 0x1f31 0x1>, + <0x320 0x3ffffffc 0x1f00000>, + <0x328 0x3ffffffc 0x1f0bffc>; + }; + + usb4_0_pcie: pcie@730000000 { + compatible = "apple,t8122-pciec", "apple,t8103-pciec"; + device_type = "pci"; + reg = <0x7 0x30000000 0x0 0x10000000>, + <0x7 0x20000000 0x0 0x4000>, + <0x7 0x21000000 0x0 0x8000>, + <0x7 0x20004000 0x0 0x4000>, + <0x7 0x20200000 0x0 0x4000>, + <0x7 0x21010000 0x0 0x4000>, + <0x7 0x20008000 0x0 0x4000>, + <0x7 0x2100c000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "fabric", + "debug", "ltssm", "oe-fabric", "intr2axi"; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_atc0_cio_pcie>; + apple,pciec-kernel-init; + /* ADT apciec0-piodma atc-apcie-oe-fabric-tunables */ + apple,tunable-oe-fabric = + <0x4 0x70007 0x40004>, + <0x8 0x1 0x1>, + <0xc 0x1 0x1>, + <0x10 0x801f 0x4>, + <0x18 0x801f 0x4>, + <0x20 0x801f 0x4>; + msi-controller; + msi-parent = <&usb4_0_pcie>; + msi-ranges = <&aic AIC_IRQ 0 (1854 + 0x20) IRQ_TYPE_EDGE_RISING 32>; + apple,msi-vector-base = <0x20>; + iommu-map = <0x0 &usb4_0_pcie_dart 0x0 0x40>; + iommu-map-mask = <0x3f>; + bus-range = <0x0 0x7f>; + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x43000000 0x8 0x0 + 0x8 0x0 0x2 0x0>, + <0x02000000 0x0 0x100000 + 0xa 0x100000 0x0 0x3ff00000>, + <0x42000000 0x0 0x40000000 + 0xa 0x40000000 0x0 0x40000000>; + + usb4_0_pcie_port: pci@0,0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + external-facing; + /* apple,tunable is filled by the bootloader */ + #address-cells = <3>; + #size-cells = <2>; + ranges; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &usb4_0_pcie_port 0 0 0 0>, + <0 0 0 2 &usb4_0_pcie_port 0 0 0 1>, + <0 0 0 3 &usb4_0_pcie_port 0 0 0 2>, + <0 0 0 4 &usb4_0_pcie_port 0 0 0 3>; + }; + }; + }; +}; From 0254919d64521923d1daa0532754514341bd00d1 Mon Sep 17 00:00:00 2001 From: Will Bunting <18180928+wbunting@users.noreply.github.com> Date: Mon, 23 Nov 2026 20:52:15 +0900 Subject: [PATCH 3/3] arm64: dts: apple: t6031-j516c: add the ATC1 and ATC2 USB4 PCIe tunnels Only ATC0 (USB-C Left Back) had a PCIe tunnel, so a Thunderbolt PCIe device on USB-C Left Front or USB-C Right linked at the Thunderbolt level but never appeared on the PCI bus. Describe the tunnel hosts behind ATC1 and ATC2 the same way. Every value is from the J516C ADT (apciec1/2, dart-apciec1/2, apciec1/2-piodma): the register windows sit at 0xb/0xf instead of 0x7, the controller and DART interrupts are 1375/1376 and 1403/1404, the MSI slices are 0x40 and 0x60 of the shared window (the slices the driver already expects for these ECAM apertures), and the DART and OE fabric tunables are identical to ATC0's. m1n1 fills the per-port tunables through the usb4_N_pcie and usb4_N_pcie_adapter aliases. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Will Bunting <18180928+wbunting@users.noreply.github.com> --- arch/arm64/boot/dts/apple/t6031-usb4.dtsi | 233 +++++++++++++++++++++- 1 file changed, 225 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6031-usb4.dtsi b/arch/arm64/boot/dts/apple/t6031-usb4.dtsi index 616ce180f347cf..5194596d33599b 100644 --- a/arch/arm64/boot/dts/apple/t6031-usb4.dtsi +++ b/arch/arm64/boot/dts/apple/t6031-usb4.dtsi @@ -1,17 +1,18 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * T6031 (M3 Max) USB4 PCIe tunnel on ATC0, modelled on t6030-usb4.dtsi. + * T6031 (M3 Max) USB4 PCIe tunnels on ATC0, ATC1 and ATC2, modelled on + * t6030-usb4.dtsi. * - * Every value is from the J516C ADT (/arm-io/apciec0, dart-apciec0, - * apciec0-piodma, acio0). The register windows and tunables match T6030. + * Every value is from the J516C ADT (/arm-io/apciecN, dart-apciecN, + * apciecN-piodma, acioN). The register windows and tunables match T6030. * The AIC numbers differ, and T6031 uses the four-cell, die-numbered AIC * specifier. MSIs come from the ADT's shared window at AIC 1854: the - * internal apcie0 owns its first 32 vectors (t6031-die0.dtsi) and this host - * takes the next 32, at 0x20. + * internal apcie0 owns its first 32 vectors (t6031-die0.dtsi) and the tunnel + * hosts take the next three 32-vector slices: ATC0 0x20, ATC1 0x40, ATC2 0x60. * - * m1n1 fills apple,tunable-{rc,fabric,debug} through the usb4_0_pcie alias, + * m1n1 fills apple,tunable-{rc,fabric,debug} through the usb4_N_pcie alias, * the root port's apple,tunable, and apple,tunable-pcie-adapter through - * usb4_0_pcie_adapter. No bootloader fills the DART and OE fabric tunables, + * usb4_N_pcie_adapter. No bootloader fills the DART and OE fabric tunables, * so they are carried here. */ @@ -19,12 +20,16 @@ aliases { usb4_0_pcie = &usb4_0_pcie; usb4_0_pcie_adapter = &usb4_0_acio; + usb4_1_pcie = &usb4_1_pcie; + usb4_1_pcie_adapter = &usb4_1_acio; + usb4_2_pcie = &usb4_2_pcie; + usb4_2_pcie_adapter = &usb4_2_acio; }; }; &usb4_0_acio { /* - * ADT acio0 reg[5] is the PCIe adapter window m1n1 tunes. Unlike + * ADT acioN reg[5] is the PCIe adapter window m1n1 tunes. Unlike * T6030 there is no "cpu" window: the T6031 ACIO uses the t8103 * start sequence. */ @@ -39,6 +44,40 @@ apple,pcie-tunnel = <&usb4_0_pcie_tunnel>; }; +&usb4_1_acio { + /* + * ADT acioN reg[5] is the PCIe adapter window m1n1 tunes. Unlike + * T6030 there is no "cpu" window: the T6031 ACIO uses the t8103 + * start sequence. + */ + reg = <0xb 0x01ac0000 0x0 0xc000>, + <0xb 0x01080000 0x0 0x20000>, + <0xb 0x01e44000 0x0 0x4000>; + reg-names = "rc", "sram", "pcie-adapter"; + power-domains = <&ps_atc1_cio>, <&ps_atc1_cio_pcie>, + <&ps_atc1_cio_usb>, <&ps_atc1_pcie>; + post-init-providers = <&ps_atc1_cio>, <&ps_atc1_cio_pcie>, + <&ps_atc1_cio_usb>, <&ps_atc1_pcie>; + apple,pcie-tunnel = <&usb4_1_pcie_tunnel>; +}; + +&usb4_2_acio { + /* + * ADT acioN reg[5] is the PCIe adapter window m1n1 tunes. Unlike + * T6030 there is no "cpu" window: the T6031 ACIO uses the t8103 + * start sequence. + */ + reg = <0xf 0x01ac0000 0x0 0xc000>, + <0xf 0x01080000 0x0 0x20000>, + <0xf 0x01e44000 0x0 0x4000>; + reg-names = "rc", "sram", "pcie-adapter"; + power-domains = <&ps_atc2_cio>, <&ps_atc2_cio_pcie>, + <&ps_atc2_cio_usb>, <&ps_atc2_pcie>; + post-init-providers = <&ps_atc2_cio>, <&ps_atc2_cio_pcie>, + <&ps_atc2_cio_usb>, <&ps_atc2_pcie>; + apple,pcie-tunnel = <&usb4_2_pcie_tunnel>; +}; + / { usb4_0_pcie_tunnel: usb4-pcie-tunnel-0 { #address-cells = <2>; @@ -127,3 +166,181 @@ }; }; }; + +/ { + usb4_1_pcie_tunnel: usb4-pcie-tunnel-1 { + #address-cells = <2>; + #size-cells = <2>; + ranges; + nonposted-mmio; + /* Preserve the SoC DMA window after moving the virtual container. */ + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; + + usb4_1_pcie_dart: iommu@b21008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0xb 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + /* ADT dart-apciec1 dart-tunables-instance-0 */ + apple,tunable = + <0x20c 0x800001b7 0x800001b7>, + <0x220 0xf0f0f 0xf0f0f>, + <0x224 0xffffff 0x80808>, + <0x300 0x1f31 0x1>, + <0x308 0x3ffffffc 0x10000000>, + <0x310 0x3ffffffc 0x3ffffffc>, + <0x318 0x1f31 0x1>, + <0x320 0x3ffffffc 0x1f00000>, + <0x328 0x3ffffffc 0x1f0bffc>; + }; + + usb4_1_pcie: pcie@b30000000 { + compatible = "apple,t8122-pciec", "apple,t8103-pciec"; + device_type = "pci"; + reg = <0xb 0x30000000 0x0 0x10000000>, + <0xb 0x20000000 0x0 0x4000>, + <0xb 0x21000000 0x0 0x8000>, + <0xb 0x20004000 0x0 0x4000>, + <0xb 0x20200000 0x0 0x4000>, + <0xb 0x21010000 0x0 0x4000>, + <0xb 0x20008000 0x0 0x4000>, + <0xb 0x2100c000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "fabric", + "debug", "ltssm", "oe-fabric", "intr2axi"; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_atc1_cio_pcie>; + apple,pciec-kernel-init; + /* ADT apciec1-piodma atc-apcie-oe-fabric-tunables */ + apple,tunable-oe-fabric = + <0x4 0x70007 0x40004>, + <0x8 0x1 0x1>, + <0xc 0x1 0x1>, + <0x10 0x801f 0x4>, + <0x18 0x801f 0x4>, + <0x20 0x801f 0x4>; + msi-controller; + msi-parent = <&usb4_1_pcie>; + msi-ranges = <&aic AIC_IRQ 0 (1854 + 0x40) IRQ_TYPE_EDGE_RISING 32>; + apple,msi-vector-base = <0x40>; + iommu-map = <0x0 &usb4_1_pcie_dart 0x0 0x40>; + iommu-map-mask = <0x3f>; + bus-range = <0x0 0x7f>; + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x43000000 0xc 0x0 + 0xc 0x0 0x2 0x0>, + <0x02000000 0x0 0x100000 + 0xe 0x100000 0x0 0x3ff00000>, + <0x42000000 0x0 0x40000000 + 0xe 0x40000000 0x0 0x40000000>; + + usb4_1_pcie_port: pci@0,0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + external-facing; + /* apple,tunable is filled by the bootloader */ + #address-cells = <3>; + #size-cells = <2>; + ranges; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &usb4_1_pcie_port 0 0 0 0>, + <0 0 0 2 &usb4_1_pcie_port 0 0 0 1>, + <0 0 0 3 &usb4_1_pcie_port 0 0 0 2>, + <0 0 0 4 &usb4_1_pcie_port 0 0 0 3>; + }; + }; + }; +}; + +/ { + usb4_2_pcie_tunnel: usb4-pcie-tunnel-2 { + #address-cells = <2>; + #size-cells = <2>; + ranges; + nonposted-mmio; + /* Preserve the SoC DMA window after moving the virtual container. */ + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; + + usb4_2_pcie_dart: iommu@f21008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0xf 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + /* ADT dart-apciec2 dart-tunables-instance-0 */ + apple,tunable = + <0x20c 0x800001b7 0x800001b7>, + <0x220 0xf0f0f 0xf0f0f>, + <0x224 0xffffff 0x80808>, + <0x300 0x1f31 0x1>, + <0x308 0x3ffffffc 0x10000000>, + <0x310 0x3ffffffc 0x3ffffffc>, + <0x318 0x1f31 0x1>, + <0x320 0x3ffffffc 0x1f00000>, + <0x328 0x3ffffffc 0x1f0bffc>; + }; + + usb4_2_pcie: pcie@f30000000 { + compatible = "apple,t8122-pciec", "apple,t8103-pciec"; + device_type = "pci"; + reg = <0xf 0x30000000 0x0 0x10000000>, + <0xf 0x20000000 0x0 0x4000>, + <0xf 0x21000000 0x0 0x8000>, + <0xf 0x20004000 0x0 0x4000>, + <0xf 0x20200000 0x0 0x4000>, + <0xf 0x21010000 0x0 0x4000>, + <0xf 0x20008000 0x0 0x4000>, + <0xf 0x2100c000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "fabric", + "debug", "ltssm", "oe-fabric", "intr2axi"; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_atc2_cio_pcie>; + apple,pciec-kernel-init; + /* ADT apciec2-piodma atc-apcie-oe-fabric-tunables */ + apple,tunable-oe-fabric = + <0x4 0x70007 0x40004>, + <0x8 0x1 0x1>, + <0xc 0x1 0x1>, + <0x10 0x801f 0x4>, + <0x18 0x801f 0x4>, + <0x20 0x801f 0x4>; + msi-controller; + msi-parent = <&usb4_2_pcie>; + msi-ranges = <&aic AIC_IRQ 0 (1854 + 0x60) IRQ_TYPE_EDGE_RISING 32>; + apple,msi-vector-base = <0x60>; + iommu-map = <0x0 &usb4_2_pcie_dart 0x0 0x40>; + iommu-map-mask = <0x3f>; + bus-range = <0x0 0x7f>; + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x43000000 0x10 0x0 + 0x10 0x0 0x2 0x0>, + <0x02000000 0x0 0x100000 + 0x12 0x100000 0x0 0x3ff00000>, + <0x42000000 0x0 0x40000000 + 0x12 0x40000000 0x0 0x40000000>; + + usb4_2_pcie_port: pci@0,0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + external-facing; + /* apple,tunable is filled by the bootloader */ + #address-cells = <3>; + #size-cells = <2>; + ranges; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &usb4_2_pcie_port 0 0 0 0>, + <0 0 0 2 &usb4_2_pcie_port 0 0 0 1>, + <0 0 0 3 &usb4_2_pcie_port 0 0 0 2>, + <0 0 0 4 &usb4_2_pcie_port 0 0 0 3>; + }; + }; + }; +};