162306a36Sopenharmony_ciTI PCI Controllers 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciPCIe DesignWare Controller 462306a36Sopenharmony_ci - compatible: Should be "ti,dra7-pcie" for RC (deprecated) 562306a36Sopenharmony_ci Should be "ti,dra7-pcie-ep" for EP (deprecated) 662306a36Sopenharmony_ci Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode 762306a36Sopenharmony_ci Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode 862306a36Sopenharmony_ci Should be "ti,dra726-pcie-rc" for dra72x in RC mode 962306a36Sopenharmony_ci Should be "ti,dra726-pcie-ep" for dra72x in EP mode 1062306a36Sopenharmony_ci - phys : list of PHY specifiers (used by generic PHY framework) 1162306a36Sopenharmony_ci - phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the 1262306a36Sopenharmony_ci number of PHYs as specified in *phys* property. 1362306a36Sopenharmony_ci - ti,hwmods : Name of the hwmod associated to the pcie, "pcie<X>", 1462306a36Sopenharmony_ci where <X> is the instance number of the pcie from the HW spec. 1562306a36Sopenharmony_ci - num-lanes as specified in ../snps,dw-pcie.yaml 1662306a36Sopenharmony_ci - ti,syscon-lane-sel : phandle/offset pair. Phandle to the system control 1762306a36Sopenharmony_ci module and the register offset to specify lane 1862306a36Sopenharmony_ci selection. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciHOST MODE 2162306a36Sopenharmony_ci========= 2262306a36Sopenharmony_ci - reg : Two register ranges as listed in the reg-names property 2362306a36Sopenharmony_ci - reg-names : The first entry must be "ti-conf" for the TI-specific registers 2462306a36Sopenharmony_ci The second entry must be "rc-dbics" for the DesignWare PCIe 2562306a36Sopenharmony_ci registers 2662306a36Sopenharmony_ci The third entry must be "config" for the PCIe configuration space 2762306a36Sopenharmony_ci - interrupts : Two interrupt entries must be specified. The first one is for 2862306a36Sopenharmony_ci main interrupt line and the second for MSI interrupt line. 2962306a36Sopenharmony_ci - #address-cells, 3062306a36Sopenharmony_ci #size-cells, 3162306a36Sopenharmony_ci #interrupt-cells, 3262306a36Sopenharmony_ci device_type, 3362306a36Sopenharmony_ci ranges, 3462306a36Sopenharmony_ci interrupt-map-mask, 3562306a36Sopenharmony_ci interrupt-map : as specified in ../snps,dw-pcie.yaml 3662306a36Sopenharmony_ci - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument 3762306a36Sopenharmony_ci should contain the register offset within syscon 3862306a36Sopenharmony_ci and the 2nd argument should contain the bit field 3962306a36Sopenharmony_ci for setting the bit to enable unaligned 4062306a36Sopenharmony_ci access. 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciDEVICE MODE 4362306a36Sopenharmony_ci=========== 4462306a36Sopenharmony_ci - reg : Four register ranges as listed in the reg-names property 4562306a36Sopenharmony_ci - reg-names : "ti-conf" for the TI-specific registers 4662306a36Sopenharmony_ci "ep_dbics" for the standard configuration registers as 4762306a36Sopenharmony_ci they are locally accessed within the DIF CS space 4862306a36Sopenharmony_ci "ep_dbics2" for the standard configuration registers as 4962306a36Sopenharmony_ci they are locally accessed within the DIF CS2 space 5062306a36Sopenharmony_ci "addr_space" used to map remote RC address space 5162306a36Sopenharmony_ci - interrupts : one interrupt entries must be specified for main interrupt. 5262306a36Sopenharmony_ci - num-ib-windows : number of inbound address translation windows 5362306a36Sopenharmony_ci - num-ob-windows : number of outbound address translation windows 5462306a36Sopenharmony_ci - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument 5562306a36Sopenharmony_ci should contain the register offset within syscon 5662306a36Sopenharmony_ci and the 2nd argument should contain the bit field 5762306a36Sopenharmony_ci for setting the bit to enable unaligned 5862306a36Sopenharmony_ci access. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ciOptional Property: 6162306a36Sopenharmony_ci - gpios : Should be added if a GPIO line is required to drive PERST# line 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ciNOTE: Two DT nodes may be added for each PCI controller; one for host 6462306a36Sopenharmony_cimode and another for device mode. So in order for PCI to 6562306a36Sopenharmony_ciwork in host mode, EP mode DT node should be disabled and in order to PCI to 6662306a36Sopenharmony_ciwork in EP mode, host mode DT node should be disabled. Host mode and EP 6762306a36Sopenharmony_cimode are mutually exclusive. 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ciExample: 7062306a36Sopenharmony_ciaxi { 7162306a36Sopenharmony_ci compatible = "simple-bus"; 7262306a36Sopenharmony_ci #size-cells = <1>; 7362306a36Sopenharmony_ci #address-cells = <1>; 7462306a36Sopenharmony_ci ranges = <0x51000000 0x51000000 0x3000 7562306a36Sopenharmony_ci 0x0 0x20000000 0x10000000>; 7662306a36Sopenharmony_ci pcie@51000000 { 7762306a36Sopenharmony_ci compatible = "ti,dra7-pcie"; 7862306a36Sopenharmony_ci reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>; 7962306a36Sopenharmony_ci reg-names = "rc_dbics", "ti_conf", "config"; 8062306a36Sopenharmony_ci interrupts = <0 232 0x4>, <0 233 0x4>; 8162306a36Sopenharmony_ci #address-cells = <3>; 8262306a36Sopenharmony_ci #size-cells = <2>; 8362306a36Sopenharmony_ci device_type = "pci"; 8462306a36Sopenharmony_ci ranges = <0x81000000 0 0 0x03000 0 0x00010000 8562306a36Sopenharmony_ci 0x82000000 0 0x20013000 0x13000 0 0xffed000>; 8662306a36Sopenharmony_ci #interrupt-cells = <1>; 8762306a36Sopenharmony_ci num-lanes = <1>; 8862306a36Sopenharmony_ci ti,hwmods = "pcie1"; 8962306a36Sopenharmony_ci phys = <&pcie1_phy>; 9062306a36Sopenharmony_ci phy-names = "pcie-phy0"; 9162306a36Sopenharmony_ci interrupt-map-mask = <0 0 0 7>; 9262306a36Sopenharmony_ci interrupt-map = <0 0 0 1 &pcie_intc 1>, 9362306a36Sopenharmony_ci <0 0 0 2 &pcie_intc 2>, 9462306a36Sopenharmony_ci <0 0 0 3 &pcie_intc 3>, 9562306a36Sopenharmony_ci <0 0 0 4 &pcie_intc 4>; 9662306a36Sopenharmony_ci pcie_intc: interrupt-controller { 9762306a36Sopenharmony_ci interrupt-controller; 9862306a36Sopenharmony_ci #address-cells = <0>; 9962306a36Sopenharmony_ci #interrupt-cells = <1>; 10062306a36Sopenharmony_ci }; 10162306a36Sopenharmony_ci }; 10262306a36Sopenharmony_ci}; 103