Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arch/arm64/boot/dts/apple/adt-coverage/t6040-j616s.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions arch/arm64/boot/dts/apple/t6040-j614s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
};

&usb4_0_acio {
/delete-property/ apple,pcie-tunnel;
status = "okay";
};

Expand Down Expand Up @@ -167,7 +166,6 @@
};

&usb4_1_acio {
/delete-property/ apple,pcie-tunnel;
status = "okay";
};

Expand Down Expand Up @@ -203,7 +201,6 @@
};

&usb4_2_acio {
/delete-property/ apple,pcie-tunnel;
status = "okay";
};

Expand Down
12 changes: 2 additions & 10 deletions arch/arm64/boot/dts/apple/t6040-j616s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,13 @@
sd_card_control: card-control@20 {
compatible = "apple,t6041-sd-card-control", "apple,sd-card-control";
reg = <0x20>;
status = "disabled";
};
};

&i2c8 {
display_pcon: display-converter@8 {
compatible = "apple,t6041-display-pcon", "apple,display-pcon";
reg = <0x8>;
status = "disabled";
};
};

Expand Down Expand Up @@ -178,25 +176,22 @@
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";
};
};

/*
* 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";
Expand All @@ -223,7 +218,6 @@
};

&usb4_0_acio {
/delete-property/ apple,pcie-tunnel;
status = "okay";
};

Expand Down Expand Up @@ -259,7 +253,6 @@
};

&usb4_1_acio {
/delete-property/ apple,pcie-tunnel;
status = "okay";
};

Expand Down Expand Up @@ -295,7 +288,6 @@
};

&usb4_2_acio {
/delete-property/ apple,pcie-tunnel;
status = "okay";
};

Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/apple/t6040-j773s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
status = "okay";
};

/* Mac mini desktop has no battery. */
&battery_monitor {
status = "disabled";
};

&pinctrl {
status = "okay";

Expand Down
106 changes: 106 additions & 0 deletions arch/arm64/boot/dts/apple/t6040-pciec.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* 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. 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), 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:
* - 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 T6040_PCIEC(n) \
&ps_atc##n##_pcie { \
status = "okay"; \
}; \
\
&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>; \
}; \
\
&apciec##n##_piodma { \
status = "okay"; \
};

T6040_PCIEC(0)
T6040_PCIEC(1)
T6040_PCIEC(2)

#undef T6040_PCIEC
50 changes: 1 addition & 49 deletions arch/arm64/boot/dts/apple/t6040-peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
<AIC_IRQ 1030 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 1031 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 1032 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/scaler0. */
Expand Down Expand Up @@ -113,7 +112,6 @@
<0x5 0x085c0000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 635 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/apcie0-piodma. */
Expand All @@ -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 = <AIC_IRQ 1607 IRQ_TYPE_LEVEL_HIGH>;
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 = <AIC_IRQ 1639 IRQ_TYPE_LEVEL_HIGH>;
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 = <AIC_IRQ 1671 IRQ_TYPE_LEVEL_HIGH>;
iommus = <&apciec2_dart 254>;
status = "disabled";
};

/* ADT /arm-io/apr0. */
apr0: video-codec@301000000 {
compatible = "apple,t6041-prores", "apple,prores";
Expand All @@ -200,7 +159,6 @@
reg = <0x3 0x81e50000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 1786 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/atc0-dpin1. */
Expand All @@ -209,7 +167,6 @@
reg = <0x3 0x81e58000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 1787 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/atc1-dpin0. */
Expand All @@ -218,7 +175,6 @@
reg = <0x3 0x89e50000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 1834 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/atc1-dpin1. */
Expand All @@ -227,7 +183,6 @@
reg = <0x3 0x89e58000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 1835 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/atc2-dpin0. */
Expand All @@ -236,7 +191,6 @@
reg = <0x3 0x91e50000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 1882 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

/* ADT /arm-io/atc2-dpin1. */
Expand All @@ -245,7 +199,6 @@
reg = <0x3 0x91e58000 0x0 0x4000>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 1883 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};


Expand Down Expand Up @@ -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";
};
};
Expand All @@ -336,14 +290,12 @@
reg = <0xb SPMI_USID>;
interrupt-parent = <&aon_ptd>;
interrupts = <0x62746d30>, <0x62746d31>;
status = "disabled";
};
};

&aop_spmi0 {
radio_pmu: pmic@e {
compatible = "apple,t6041-radio-pmu", "apple,radio-pmu";
reg = <0xe SPMI_USID>;
status = "disabled";
};
};
3 changes: 0 additions & 3 deletions arch/arm64/boot/dts/apple/t6040-pmgr.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@
#reset-cells = <0>;
label = "uart0";
power-domains = <&ps_uart_p>;
status = "disabled";
};

ps_uart1: power-controller@200 {
Expand Down Expand Up @@ -1466,7 +1465,6 @@
label = "nub_spmi3";
power-domains = <&ps_nub_spmi_ahb>;
apple,always-on;
status = "disabled";
};

ps_nub_spmi4: power-controller@f8 {
Expand All @@ -1477,7 +1475,6 @@
label = "nub_spmi4";
power-domains = <&ps_nub_spmi_ahb>;
apple,always-on;
status = "disabled";
};

ps_nub_fabric: power-controller@100 {
Expand Down
Loading
Loading