arm64: dts: ti: k3-am64-main: Add PCIe DT node
authorKishon Vijay Abraham I <kishon@ti.com>
Thu, 3 Jun 2021 14:22:48 +0000 (19:52 +0530)
committerNishanth Menon <nm@ti.com>
Tue, 8 Jun 2021 14:32:38 +0000 (09:32 -0500)
AM64 has one PCIe instance which can be configured in either
host mode (RC) or device mode (EP). Add PCIe DT node for host
mode and device mode here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20210603142251.14563-3-kishon@ti.com
arch/arm64/boot/dts/ti/k3-am64-main.dtsi

index 312fcf0..effb9d2 100644 (file)
                        #clock-cells = <1>;
                };
        };
+
+       pcie0_rc: pcie@f102000 {
+               compatible = "ti,am64-pcie-host", "ti,j721e-pcie-host";
+               reg = <0x00 0x0f102000 0x00 0x1000>,
+                     <0x00 0x0f100000 0x00 0x400>,
+                     <0x00 0x0d000000 0x00 0x00800000>,
+                     <0x00 0x68000000 0x00 0x00001000>;
+               reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
+               interrupt-names = "link_state";
+               interrupts = <GIC_SPI 203 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ti,syscon-pcie-ctrl = <&main_conf 0x4070>;
+               max-link-speed = <2>;
+               num-lanes = <1>;
+               power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 114 0>, <&serdes0 CDNS_TORRENT_REFCLK_DRIVER>;
+               clock-names = "fck", "pcie_refclk";
+               #address-cells = <3>;
+               #size-cells = <2>;
+               bus-range = <0x0 0xff>;
+               cdns,no-bar-match-nbits = <64>;
+               vendor-id = <0x104c>;
+               device-id = <0xb010>;
+               msi-map = <0x0 &gic_its 0x0 0x10000>;
+               ranges = <0x01000000 0x00 0x68001000  0x00 0x68001000  0x00 0x0010000>,
+                        <0x02000000 0x00 0x68011000  0x00 0x68011000  0x00 0x7fef000>;
+               dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x00000010 0x0>;
+       };
+
+       pcie0_ep: pcie-ep@f102000 {
+               compatible = "ti,am64-pcie-ep", "ti,j721e-pcie-ep";
+               reg = <0x00 0x0f102000 0x00 0x1000>,
+                     <0x00 0x0f100000 0x00 0x400>,
+                     <0x00 0x0d000000 0x00 0x00800000>,
+                     <0x00 0x68000000 0x00 0x08000000>;
+               reg-names = "intd_cfg", "user_cfg", "reg", "mem";
+               interrupt-names = "link_state";
+               interrupts = <GIC_SPI 203 IRQ_TYPE_EDGE_RISING>;
+               ti,syscon-pcie-ctrl = <&main_conf 0x4070>;
+               max-link-speed = <2>;
+               num-lanes = <1>;
+               power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
+               clocks = <&k3_clks 114 0>;
+               clock-names = "fck";
+               max-functions = /bits/ 8 <1>;
+       };
 };