Skip to content

Commit d51763c

Browse files
committed
arm64: dts: apple: Move PCIe-GE nodes intro their own file
These are only used on the Mac Pro (M2 Ultra, 2023) so do not bloat all other DTBs. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 522ffc2 commit d51763c

4 files changed

Lines changed: 114 additions & 80 deletions

File tree

arch/arm64/boot/dts/apple/t6022-j180d.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/dts-v1/;
1111

1212
#include "t6022.dtsi"
13+
#include "t6022-pcie-ge.dtsi"
1314
#include "t6022-jxxxd.dtsi"
1415

1516
/ {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Include PCIe-GE nodes presen on both dies of T6022 (M2 Ultra) in the
4+
* Mac Pro (2023).
5+
*
6+
* Copyright The Asahi Linux Contributors
7+
*/
8+
9+
#define DIE
10+
#define DIE_NO 0
11+
12+
&die0 {
13+
#include "t602x-pcie-ge.dtsi"
14+
};
15+
16+
#undef DIE
17+
#undef DIE_NO
18+
19+
#define DIE _die1
20+
#define DIE_NO 1
21+
22+
&die1 {
23+
#include "t602x-pcie-ge.dtsi"
24+
};
25+
26+
#undef DIE
27+
#undef DIE_NO

arch/arm64/boot/dts/apple/t602x-dieX.dtsi

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -671,83 +671,3 @@
671671
power-domains = <&DIE_NODE(ps_atc3_usb)>;
672672
status = "disabled";
673673
};
674-
675-
DIE_NODE(pcie_ge): pcie@1680000000 {
676-
compatible = "apple,t6020-pcie-ge", "apple,t6020-pcie";
677-
device_type = "pci";
678-
679-
reg = <0x16 0x80000000 0x0 0x1000000>, /* config */
680-
<0x16 0x91000000 0x0 0x4000>, /* rc */
681-
<0x16 0x94008000 0x0 0x4000>, /* port0 */
682-
<0x16 0x9e01c000 0x0 0x4000>, /* phy0 */
683-
<0x16 0x9401c000 0x0 0x1000>; /* ltssm0 */
684-
reg-names = "config", "rc", "port0", "phy0", "ltssm0";
685-
686-
interrupt-parent = <&aic>;
687-
interrupts = <AIC_IRQ DIE_NO 1356 IRQ_TYPE_LEVEL_HIGH>;
688-
689-
msi-controller;
690-
msi-parent = <&DIE_NODE(pcie_ge)>;
691-
msi-ranges = <&aic AIC_IRQ DIE_NO 1672 IRQ_TYPE_EDGE_RISING 128>;
692-
693-
iommu-map = <0x000 &DIE_NODE(pcie_ge_dart) 0 0>,
694-
<0x100 &DIE_NODE(pcie_ge_dart) 1 1>,
695-
<0x200 &DIE_NODE(pcie_ge_dart) 2 2>,
696-
<0x300 &DIE_NODE(pcie_ge_dart) 3 3>,
697-
<0x400 &DIE_NODE(pcie_ge_dart) 4 4>,
698-
<0x500 &DIE_NODE(pcie_ge_dart) 5 5>,
699-
<0x600 &DIE_NODE(pcie_ge_dart) 6 6>,
700-
<0x700 &DIE_NODE(pcie_ge_dart) 7 7>,
701-
<0x800 &DIE_NODE(pcie_ge_dart) 8 8>,
702-
<0x900 &DIE_NODE(pcie_ge_dart) 9 9>,
703-
<0xa00 &DIE_NODE(pcie_ge_dart) 10 10>,
704-
<0xb00 &DIE_NODE(pcie_ge_dart) 11 11>,
705-
<0xc00 &DIE_NODE(pcie_ge_dart) 12 12>,
706-
<0xd00 &DIE_NODE(pcie_ge_dart) 13 13>,
707-
<0xe00 &DIE_NODE(pcie_ge_dart) 14 14>;
708-
iommu-map-mask = <0xff00>;
709-
710-
bus-range = <0 15>;
711-
#address-cells = <3>;
712-
#size-cells = <2>;
713-
ranges = <0x43000000 0x18 0x00000000 0x18 0x00000000 0x4 0x00000000>,
714-
<0x02000000 0x0 0x80000000 0x17 0x80000000 0x0 0x80000000>;
715-
716-
power-domains = <&DIE_NODE(ps_apcie_ge_sys)>;
717-
pinctrl-0 = <&DIE_NODE(pcie_ge_pins)>;
718-
pinctrl-names = "default";
719-
720-
dma-coherent;
721-
722-
status = "disabled";
723-
724-
DIE_NODE(port_ge00): pci@0,0 {
725-
device_type = "pci";
726-
reg = <0x0 0x0 0x0 0x0 0x0>;
727-
reset-gpios = <&DIE_NODE(pinctrl_ap) 9 GPIO_ACTIVE_LOW>;
728-
729-
#address-cells = <3>;
730-
#size-cells = <2>;
731-
ranges;
732-
733-
interrupt-controller;
734-
#interrupt-cells = <1>;
735-
736-
interrupt-map-mask = <0 0 0 7>;
737-
interrupt-map = <0 0 0 1 &DIE_NODE(port_ge00) 0 0 0 0>,
738-
<0 0 0 2 &DIE_NODE(port_ge00) 0 0 0 1>,
739-
<0 0 0 3 &DIE_NODE(port_ge00) 0 0 0 2>,
740-
<0 0 0 4 &DIE_NODE(port_ge00) 0 0 0 3>;
741-
};
742-
};
743-
744-
DIE_NODE(pcie_ge_dart): iommu@1694000000 {
745-
compatible = "apple,t6020-dart", "apple,t8110-dart";
746-
reg = <0x16 0x94000000 0x0 0x4000>;
747-
#iommu-cells = <1>;
748-
interrupt-parent = <&aic>;
749-
interrupts = <AIC_IRQ DIE_NO 1357 IRQ_TYPE_LEVEL_HIGH>;
750-
power-domains = <&DIE_NODE(ps_apcie_ge_sys)>;
751-
status = "disabled";
752-
};
753-
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* PCIe-GE Nodes present on both dies of a T6022 (M2 Ultra) and M2 Pro/Max but
4+
* only used on T6022 in the Mac Pro (2023).
5+
*
6+
* Copyright The Asahi Linux Contributors
7+
*/
8+
9+
DIE_NODE(pcie_ge): pcie@1680000000 {
10+
compatible = "apple,t6020-pcie-ge", "apple,t6020-pcie";
11+
device_type = "pci";
12+
13+
reg = <0x16 0x80000000 0x0 0x1000000>, /* config */
14+
<0x16 0x91000000 0x0 0x4000>, /* rc */
15+
<0x16 0x94008000 0x0 0x4000>, /* port0 */
16+
<0x16 0x9e01c000 0x0 0x4000>, /* phy0 */
17+
<0x16 0x9401c000 0x0 0x1000>; /* ltssm0 */
18+
reg-names = "config", "rc", "port0", "phy0", "ltssm0";
19+
20+
interrupt-parent = <&aic>;
21+
interrupts = <AIC_IRQ DIE_NO 1356 IRQ_TYPE_LEVEL_HIGH>;
22+
23+
msi-controller;
24+
msi-parent = <&DIE_NODE(pcie_ge)>;
25+
msi-ranges = <&aic AIC_IRQ DIE_NO 1672 IRQ_TYPE_EDGE_RISING 128>;
26+
27+
iommu-map = <0x000 &DIE_NODE(pcie_ge_dart) 0 0>,
28+
<0x100 &DIE_NODE(pcie_ge_dart) 1 1>,
29+
<0x200 &DIE_NODE(pcie_ge_dart) 2 2>,
30+
<0x300 &DIE_NODE(pcie_ge_dart) 3 3>,
31+
<0x400 &DIE_NODE(pcie_ge_dart) 4 4>,
32+
<0x500 &DIE_NODE(pcie_ge_dart) 5 5>,
33+
<0x600 &DIE_NODE(pcie_ge_dart) 6 6>,
34+
<0x700 &DIE_NODE(pcie_ge_dart) 7 7>,
35+
<0x800 &DIE_NODE(pcie_ge_dart) 8 8>,
36+
<0x900 &DIE_NODE(pcie_ge_dart) 9 9>,
37+
<0xa00 &DIE_NODE(pcie_ge_dart) 10 10>,
38+
<0xb00 &DIE_NODE(pcie_ge_dart) 11 11>,
39+
<0xc00 &DIE_NODE(pcie_ge_dart) 12 12>,
40+
<0xd00 &DIE_NODE(pcie_ge_dart) 13 13>,
41+
<0xe00 &DIE_NODE(pcie_ge_dart) 14 14>;
42+
iommu-map-mask = <0xff00>;
43+
44+
bus-range = <0 15>;
45+
#address-cells = <3>;
46+
#size-cells = <2>;
47+
ranges = <0x43000000 0x18 0x00000000 0x18 0x00000000 0x4 0x00000000>,
48+
<0x02000000 0x0 0x80000000 0x17 0x80000000 0x0 0x80000000>;
49+
50+
power-domains = <&DIE_NODE(ps_apcie_ge_sys)>;
51+
pinctrl-0 = <&DIE_NODE(pcie_ge_pins)>;
52+
pinctrl-names = "default";
53+
54+
dma-coherent;
55+
56+
status = "disabled";
57+
58+
DIE_NODE(port_ge00): pci@0,0 {
59+
device_type = "pci";
60+
reg = <0x0 0x0 0x0 0x0 0x0>;
61+
reset-gpios = <&DIE_NODE(pinctrl_ap) 9 GPIO_ACTIVE_LOW>;
62+
63+
#address-cells = <3>;
64+
#size-cells = <2>;
65+
ranges;
66+
67+
interrupt-controller;
68+
#interrupt-cells = <1>;
69+
70+
interrupt-map-mask = <0 0 0 7>;
71+
interrupt-map = <0 0 0 1 &DIE_NODE(port_ge00) 0 0 0 0>,
72+
<0 0 0 2 &DIE_NODE(port_ge00) 0 0 0 1>,
73+
<0 0 0 3 &DIE_NODE(port_ge00) 0 0 0 2>,
74+
<0 0 0 4 &DIE_NODE(port_ge00) 0 0 0 3>;
75+
};
76+
};
77+
78+
DIE_NODE(pcie_ge_dart): iommu@1694000000 {
79+
compatible = "apple,t6020-dart", "apple,t8110-dart";
80+
reg = <0x16 0x94000000 0x0 0x4000>;
81+
#iommu-cells = <1>;
82+
interrupt-parent = <&aic>;
83+
interrupts = <AIC_IRQ DIE_NO 1357 IRQ_TYPE_LEVEL_HIGH>;
84+
power-domains = <&DIE_NODE(ps_apcie_ge_sys)>;
85+
status = "disabled";
86+
};

0 commit comments

Comments
 (0)