// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Device Tree file describing the PCIe IPs found on the LX2160A Rev2 and LX2162A SoCs
//
// Copyright 2026 NXP

&soc {
	pcie1: pcie@3400000 {
		compatible = "fsl,lx2160ar2-pcie", "fsl,ls2088a-pcie";
		reg = <0x00 0x03400000 0x0 0x00100000   /* controller registers */
		       0x80 0x00000000 0x0 0x00002000>; /* configuration space */
		reg-names = "regs", "config";

		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		dma-coherent;
		bus-range = <0x0 0xff>;

		ranges = /* 16-Bit IO Window */
			 <0x81000000 0x00 0x00000000 0x80 0x00010000 0x00 0x00010000>,
			 /* 32-Bit - non-prefetchable */
			 <0x82000000 0x00 0x40000000 0x80 0x40000000 0x00 0x40000000>,
			 /* 64-Bit - prefetchable - 16GB */
			 <0xC3000000 0x84 0x00000000 0x84 0x00000000 0x04 0x00000000>;

		interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "intr";
		msi-parent = <&its 0>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 2 &gic 0 0 GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 3 &gic 0 0 GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 4 &gic 0 0 GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
		iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
		status = "disabled";
	};

	pcie_ep1: pcie-ep@3400000 {
		compatible = "fsl,lx2160ar2-pcie-ep";
		reg = <0x00 0x03400000 0x0 0x00100000
		       0x80 0x00000000 0x8 0x00000000>;
		reg-names = "regs", "addr_space";
		num-ob-windows = <8>;
		num-ib-windows = <8>;
		status = "disabled";
	};

	pcie2: pcie@3500000 {
		compatible = "fsl,lx2160ar2-pcie", "fsl,ls2088a-pcie";
		reg = <0x00 0x03500000 0x0 0x00100000   /* controller registers */
		       0x88 0x00000000 0x0 0x00002000>; /* configuration space */
		reg-names = "regs", "config";

		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		dma-coherent;
		bus-range = <0x0 0xff>;
		ranges = /* 16-Bit IO Window */
			 <0x81000000 0x00 0x00000000 0x88 0x00010000 0x00 0x00010000>,
			 /* 32-Bit - non-prefetchable */
			 <0x82000000 0x00 0x40000000 0x88 0x40000000 0x00 0x40000000>,
			 /* 64-Bit - prefetchable - 16GB */
			 <0xC3000000 0x8c 0x00000000 0x8c 0x00000000 0x04 0x00000000>;

		interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "intr";
		msi-parent = <&its 0>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 2 &gic 0 0 GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 3 &gic 0 0 GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 4 &gic 0 0 GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
		iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
		status = "disabled";
	};

	pcie_ep2: pcie-ep@3500000 {
		compatible = "fsl,lx2160ar2-pcie-ep";
		reg = <0x00 0x03500000 0x0 0x00100000
		       0x88 0x00000000 0x8 0x00000000>;
		reg-names = "regs", "addr_space";
		num-ob-windows = <8>;
		num-ib-windows = <8>;
		status = "disabled";
	};

	pcie3: pcie@3600000 {
		compatible = "fsl,lx2160ar2-pcie", "fsl,ls2088a-pcie";
		reg = <0x00 0x03600000 0x0 0x00100000   /* controller registers */
		       0x90 0x00000000 0x0 0x00002000>; /* configuration space */
		reg-names = "regs", "config";

		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		dma-coherent;
		bus-range = <0x0 0xff>;
		ranges = /* 16-Bit IO Window */
			 <0x81000000 0x00 0x00000000 0x90 0x00010000 0x00 0x00010000>,
			 /* 32-Bit - non-prefetchable */
			 <0x82000000 0x00 0x40000000 0x90 0x40000000 0x00 0x40000000>,
			 /* 64-Bit - prefetchable - 16GB */
			 <0xC3000000 0x94 0x00000000 0x94 0x00000000 0x04 0x00000000>;

		interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "intr";

		msi-parent = <&its 0>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 2 &gic 0 0 GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 3 &gic 0 0 GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 4 &gic 0 0 GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
		iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
		status = "disabled";
	};

	pcie_ep3: pcie-ep@3600000 {
		compatible = "fsl,lx2160ar2-pcie-ep";
		reg = <0x00 0x03600000 0x0 0x00100000
		       0x90 0x00000000 0x8 0x00000000>;
		reg-names = "regs", "addr_space";
		num-ob-windows = <256>;
		num-ib-windows = <24>;
		status = "disabled";
	};

	pcie4: pcie@3700000 {
		compatible = "fsl,lx2160ar2-pcie", "fsl,ls2088a-pcie";
		reg = <0x00 0x03700000 0x0 0x00100000   /* controller registers */
		       0x98 0x00000000 0x0 0x00002000>; /* configuration space */
		reg-names = "regs", "config";

		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		dma-coherent;
		bus-range = <0x0 0xff>;
		ranges = /* 16-Bit IO Window */
			 <0x81000000 0x00 0x00000000 0x98 0x00010000 0x00 0x00010000>,
			 /* 32-Bit - non-prefetchable */
			 <0x82000000 0x00 0x40000000 0x98 0x40000000 0x00 0x40000000>,
			 /* 64-Bit - prefetchable - 16GB */
			 <0xC3000000 0x9c 0x00000000 0x9c 0x00000000 0x04 0x00000000>;

		interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "intr";
		msi-parent = <&its 0>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 2 &gic 0 0 GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 3 &gic 0 0 GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 4 &gic 0 0 GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
		iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
		status = "disabled";
	};

	pcie_ep4: pcie-ep@3700000 {
		compatible = "fsl,lx2160ar2-pcie-ep";
		reg = <0x00 0x03700000 0x0 0x00100000
		       0x98 0x00000000 0x8 0x00000000>;
		reg-names = "regs", "addr_space";
		num-ob-windows = <8>;
		num-ib-windows = <8>;
		status = "disabled";
	};

	pcie5: pcie@3800000 {
		compatible = "fsl,lx2160ar2-pcie", "fsl,ls2088a-pcie";
		reg = <0x00 0x03800000 0x0 0x00100000   /* controller registers */
		       0xa0 0x00000000 0x0 0x00002000>; /* configuration space */
		reg-names = "regs", "config";

		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		dma-coherent;
		bus-range = <0x0 0xff>;

		ranges = /* 16-Bit IO Window */
			 <0x81000000 0x00 0x00000000 0xa0 0x00010000 0x00 0x00010000>,
			 /* 32-Bit - non-prefetchable */
			 <0x82000000 0x00 0x40000000 0xa0 0x40000000 0x00 0x40000000>,
			 /* 64-Bit - prefetchable - 16GB */
			 <0xC3000000 0xa4 0x00000000 0xa4 0x00000000 0x04 0x00000000>;

		interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "intr";
		msi-parent = <&its 0>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 2 &gic 0 0 GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 3 &gic 0 0 GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 4 &gic 0 0 GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
		iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
		status = "disabled";
	};

	pcie_ep5: pcie-ep@3800000 {
		compatible = "fsl,lx2160ar2-pcie-ep";
		reg = <0x00 0x03800000 0x0 0x00100000
		       0xa0 0x00000000 0x8 0x00000000>;
		reg-names = "regs", "addr_space";
		num-ob-windows = <256>;
		num-ib-windows = <24>;
		status = "disabled";
	};

	pcie6: pcie@3900000 {
		compatible = "fsl,lx2160ar2-pcie", "fsl,ls2088a-pcie";
		reg = <0x00 0x03900000 0x0 0x00100000   /* controller registers */
		       0xa8 0x00000000 0x0 0x00002000>; /* configuration space */
		reg-names = "regs", "config";

		#address-cells = <3>;
		#size-cells = <2>;
		device_type = "pci";
		dma-coherent;
		bus-range = <0x0 0xff>;

		ranges = /* 16-Bit IO Window */
			 <0x81000000 0x00 0x00000000 0xa8 0x00010000 0x00 0x00010000>,
			 /* 32-Bit - non-prefetchable */
			 <0x82000000 0x00 0x40000000 0xa8 0x40000000 0x00 0x40000000>,
			 /* 64-Bit - prefetchable - 16GB */
			 <0xC3000000 0xac 0x00000000 0xac 0x00000000 0x04 0x00000000>;

		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "intr";
		msi-parent = <&its 0>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 2 &gic 0 0 GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 3 &gic 0 0 GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
				<0000 0 0 4 &gic 0 0 GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
		iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */
		status = "disabled";
	};

	pcie_ep6: pcie-ep@3900000 {
		compatible = "fsl,lx2160ar2-pcie-ep";
		reg = <0x00 0x03900000 0x0 0x00100000
		       0xa8 0x00000000 0x8 0x00000000>;
		reg-names = "regs", "addr_space";
		num-ob-windows = <8>;
		num-ib-windows = <8>;
		status = "disabled";
	};
};