arm64: dts: apple: t8103: Add PCIe DARTs
authorMarc Zyngier <maz@kernel.org>
Mon, 25 Oct 2021 21:10:16 +0000 (22:10 +0100)
committerHector Martin <marcan@marcan.st>
Wed, 27 Oct 2021 12:12:28 +0000 (21:12 +0900)
PCIe on the Apple M1 (aka t8103) requires the use of IOMMUs (aka
DARTs). Add the three instances that deal with the internal PCIe
ports and route each port's traffic through its DART.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
arch/arm64/boot/dts/apple/t8103.dtsi

index ed562e1..ded82a7 100644 (file)
                                     <AIC_IRQ 397 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               pcie0_dart_0: dart@681008000 {
+                       compatible = "apple,t8103-dart";
+                       reg = <0x6 0x81008000 0x0 0x4000>;
+                       #iommu-cells = <1>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 696 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               pcie0_dart_1: dart@682008000 {
+                       compatible = "apple,t8103-dart";
+                       reg = <0x6 0x82008000 0x0 0x4000>;
+                       #iommu-cells = <1>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 699 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               pcie0_dart_2: dart@683008000 {
+                       compatible = "apple,t8103-dart";
+                       reg = <0x6 0x83008000 0x0 0x4000>;
+                       #iommu-cells = <1>;
+                       interrupt-parent = <&aic>;
+                       interrupts = <AIC_IRQ 702 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
                pcie0: pcie@690000000 {
                        compatible = "apple,t8103-pcie", "apple,pcie";
                        device_type = "pci";
                        msi-parent = <&pcie0>;
                        msi-ranges = <&aic AIC_IRQ 704 IRQ_TYPE_EDGE_RISING 32>;
 
+
+                       iommu-map = <0x100 &pcie0_dart_0 1 1>,
+                                   <0x200 &pcie0_dart_1 1 1>,
+                                   <0x300 &pcie0_dart_2 1 1>;
+                       iommu-map-mask = <0xff00>;
+
                        bus-range = <0 3>;
                        #address-cells = <3>;
                        #size-cells = <2>;