Skip to content

Commit be1dd96

Browse files
noopwafelIntegralPilot
authored andcommitted
arm64: dts: apple: Add PCIE nodes for t8122
This only includes the first port, because it's the only port that is present on my hardware, and only includes the pwren gpio for J613. Signed-off-by: Alyssa Milburn <[email protected]> Signed-off-by: Michael Reeves <[email protected]>
1 parent 1b5d498 commit be1dd96

2 files changed

Lines changed: 75 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/t8122-j613.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
power-domains = <&ps_disp_cpu>, <&ps_dptx_ext_phy>;
3636
};
3737

38+
&port00 {
39+
bus-range = <1 1>;
40+
pwren-gpios = <&smc_gpio 13 GPIO_ACTIVE_HIGH>;
41+
};
42+
3843
&fpwm1 {
3944
status = "okay";
4045
};

arch/arm64/boot/dts/apple/t8122.dtsi

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,12 @@
559559
<APPLE_PINMUX(148, 1)>;
560560
};
561561

562+
pcie_pins: pcie-pins {
563+
// clkreq pins
564+
pinmux = <APPLE_PINMUX(183, 1)>,
565+
<APPLE_PINMUX(184, 1)>,
566+
<APPLE_PINMUX(185, 1)>;
567+
};
562568
};
563569

564570
pinctrl_nub: pinctrl@2e41f0000 {
@@ -790,6 +796,70 @@
790796
power-domain-names = "ans", "apcie_phy_sw";
791797
resets = <&ps_ans>;
792798
};
799+
800+
pcie0_dart_0: iommu@594000000 {
801+
compatible = "apple,t8122-dart", "apple,t8110-dart";
802+
reg = <0x5 0x94000000 0x0 0x4000>;
803+
#iommu-cells = <1>;
804+
interrupt-parent = <&aic>;
805+
interrupts = <AIC_IRQ 924 IRQ_TYPE_LEVEL_HIGH>;
806+
power-domains = <&ps_apcie_st>;
807+
};
808+
809+
pcie0: pcie@580000000 {
810+
compatible = "apple,t8122-pcie", "apple,pcie";
811+
device_type = "pci";
812+
813+
reg = <0x5 0x80000000 0x0 0x1000000>, /* config */
814+
<0x5 0x91000000 0x0 0x4000>, /* rc */
815+
<0x5 0x94008000 0x0 0x4000>, /* port0 */
816+
<0x5 0x9e008000 0x0 0x4000>; /* phy0 */
817+
reg-names = "config", "rc", "port0", "phy0";
818+
819+
interrupt-parent = <&aic>;
820+
interrupts = <AIC_IRQ 923 IRQ_TYPE_LEVEL_HIGH>,
821+
<AIC_IRQ 932 IRQ_TYPE_LEVEL_HIGH>,
822+
<AIC_IRQ 941 IRQ_TYPE_LEVEL_HIGH>,
823+
<AIC_IRQ 950 IRQ_TYPE_LEVEL_HIGH>;
824+
825+
msi-controller;
826+
msi-parent = <&pcie0>;
827+
msi-ranges = <&aic AIC_IRQ 1075 IRQ_TYPE_EDGE_RISING 32>;
828+
829+
iommu-map = <0x100 &pcie0_dart_0 1 1>;
830+
iommu-map-mask = <0xff00>;
831+
832+
bus-range = <0 4>;
833+
#address-cells = <3>;
834+
#size-cells = <2>;
835+
ranges = <0x43000000 0x5 0xa0000000 0x5 0xa0000000 0x0 0x20000000>,
836+
<0x02000000 0x0 0xc0000000 0x5 0xc0000000 0x0 0x40000000>;
837+
838+
power-domains = <&ps_apcie_gp>;
839+
pinctrl-0 = <&pcie_pins>;
840+
pinctrl-names = "default";
841+
842+
dma-coherent;
843+
844+
port00: pci@0,0 {
845+
device_type = "pci";
846+
reg = <0x0 0x0 0x0 0x0 0x0>;
847+
reset-gpios = <&pinctrl_ap 187 GPIO_ACTIVE_LOW>; // perst
848+
849+
#address-cells = <3>;
850+
#size-cells = <2>;
851+
ranges;
852+
853+
interrupt-controller;
854+
#interrupt-cells = <1>;
855+
856+
interrupt-map-mask = <0 0 0 7>;
857+
interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
858+
<0 0 0 2 &port00 0 0 0 1>,
859+
<0 0 0 3 &port00 0 0 0 2>,
860+
<0 0 0 4 &port00 0 0 0 3>;
861+
};
862+
};
793863
};
794864
};
795865

0 commit comments

Comments
 (0)