1c66ec88fSEmmanuel VadotTI PCI Controllers 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotPCIe DesignWare Controller 4c66ec88fSEmmanuel Vadot - compatible: Should be "ti,dra7-pcie" for RC (deprecated) 5c66ec88fSEmmanuel Vadot Should be "ti,dra7-pcie-ep" for EP (deprecated) 6c66ec88fSEmmanuel Vadot Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode 7c66ec88fSEmmanuel Vadot Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode 8c66ec88fSEmmanuel Vadot Should be "ti,dra726-pcie-rc" for dra72x in RC mode 9c66ec88fSEmmanuel Vadot Should be "ti,dra726-pcie-ep" for dra72x in EP mode 10c66ec88fSEmmanuel Vadot - phys : list of PHY specifiers (used by generic PHY framework) 11c66ec88fSEmmanuel Vadot - phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the 12c66ec88fSEmmanuel Vadot number of PHYs as specified in *phys* property. 13c66ec88fSEmmanuel Vadot - ti,hwmods : Name of the hwmod associated to the pcie, "pcie<X>", 14c66ec88fSEmmanuel Vadot where <X> is the instance number of the pcie from the HW spec. 15*354d7675SEmmanuel Vadot - num-lanes as specified in ../snps,dw-pcie.yaml 16c66ec88fSEmmanuel Vadot - ti,syscon-lane-sel : phandle/offset pair. Phandle to the system control 17c66ec88fSEmmanuel Vadot module and the register offset to specify lane 18c66ec88fSEmmanuel Vadot selection. 19c66ec88fSEmmanuel Vadot 20c66ec88fSEmmanuel VadotHOST MODE 21c66ec88fSEmmanuel Vadot========= 22c66ec88fSEmmanuel Vadot - reg : Two register ranges as listed in the reg-names property 23c66ec88fSEmmanuel Vadot - reg-names : The first entry must be "ti-conf" for the TI-specific registers 24c66ec88fSEmmanuel Vadot The second entry must be "rc-dbics" for the DesignWare PCIe 25c66ec88fSEmmanuel Vadot registers 26c66ec88fSEmmanuel Vadot The third entry must be "config" for the PCIe configuration space 27c66ec88fSEmmanuel Vadot - interrupts : Two interrupt entries must be specified. The first one is for 28c66ec88fSEmmanuel Vadot main interrupt line and the second for MSI interrupt line. 29c66ec88fSEmmanuel Vadot - #address-cells, 30c66ec88fSEmmanuel Vadot #size-cells, 31c66ec88fSEmmanuel Vadot #interrupt-cells, 32c66ec88fSEmmanuel Vadot device_type, 33c66ec88fSEmmanuel Vadot ranges, 34c66ec88fSEmmanuel Vadot interrupt-map-mask, 35*354d7675SEmmanuel Vadot interrupt-map : as specified in ../snps,dw-pcie.yaml 36c66ec88fSEmmanuel Vadot - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument 37c66ec88fSEmmanuel Vadot should contain the register offset within syscon 38c66ec88fSEmmanuel Vadot and the 2nd argument should contain the bit field 39c66ec88fSEmmanuel Vadot for setting the bit to enable unaligned 40c66ec88fSEmmanuel Vadot access. 41c66ec88fSEmmanuel Vadot 42c66ec88fSEmmanuel VadotDEVICE MODE 43c66ec88fSEmmanuel Vadot=========== 44c66ec88fSEmmanuel Vadot - reg : Four register ranges as listed in the reg-names property 45c66ec88fSEmmanuel Vadot - reg-names : "ti-conf" for the TI-specific registers 46c66ec88fSEmmanuel Vadot "ep_dbics" for the standard configuration registers as 47c66ec88fSEmmanuel Vadot they are locally accessed within the DIF CS space 48c66ec88fSEmmanuel Vadot "ep_dbics2" for the standard configuration registers as 49c66ec88fSEmmanuel Vadot they are locally accessed within the DIF CS2 space 50c66ec88fSEmmanuel Vadot "addr_space" used to map remote RC address space 51c66ec88fSEmmanuel Vadot - interrupts : one interrupt entries must be specified for main interrupt. 52c66ec88fSEmmanuel Vadot - num-ib-windows : number of inbound address translation windows 53c66ec88fSEmmanuel Vadot - num-ob-windows : number of outbound address translation windows 54c66ec88fSEmmanuel Vadot - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument 55c66ec88fSEmmanuel Vadot should contain the register offset within syscon 56c66ec88fSEmmanuel Vadot and the 2nd argument should contain the bit field 57c66ec88fSEmmanuel Vadot for setting the bit to enable unaligned 58c66ec88fSEmmanuel Vadot access. 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel VadotOptional Property: 61c66ec88fSEmmanuel Vadot - gpios : Should be added if a GPIO line is required to drive PERST# line 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel VadotNOTE: Two DT nodes may be added for each PCI controller; one for host 64c66ec88fSEmmanuel Vadotmode and another for device mode. So in order for PCI to 65c66ec88fSEmmanuel Vadotwork in host mode, EP mode DT node should be disabled and in order to PCI to 66c66ec88fSEmmanuel Vadotwork in EP mode, host mode DT node should be disabled. Host mode and EP 67c66ec88fSEmmanuel Vadotmode are mutually exclusive. 68c66ec88fSEmmanuel Vadot 69c66ec88fSEmmanuel VadotExample: 70c66ec88fSEmmanuel Vadotaxi { 71c66ec88fSEmmanuel Vadot compatible = "simple-bus"; 72c66ec88fSEmmanuel Vadot #size-cells = <1>; 73c66ec88fSEmmanuel Vadot #address-cells = <1>; 74c66ec88fSEmmanuel Vadot ranges = <0x51000000 0x51000000 0x3000 75c66ec88fSEmmanuel Vadot 0x0 0x20000000 0x10000000>; 76c66ec88fSEmmanuel Vadot pcie@51000000 { 77c66ec88fSEmmanuel Vadot compatible = "ti,dra7-pcie"; 78c66ec88fSEmmanuel Vadot reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>; 79c66ec88fSEmmanuel Vadot reg-names = "rc_dbics", "ti_conf", "config"; 80c66ec88fSEmmanuel Vadot interrupts = <0 232 0x4>, <0 233 0x4>; 81c66ec88fSEmmanuel Vadot #address-cells = <3>; 82c66ec88fSEmmanuel Vadot #size-cells = <2>; 83c66ec88fSEmmanuel Vadot device_type = "pci"; 84c66ec88fSEmmanuel Vadot ranges = <0x81000000 0 0 0x03000 0 0x00010000 85c66ec88fSEmmanuel Vadot 0x82000000 0 0x20013000 0x13000 0 0xffed000>; 86c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 87c66ec88fSEmmanuel Vadot num-lanes = <1>; 88c66ec88fSEmmanuel Vadot ti,hwmods = "pcie1"; 89c66ec88fSEmmanuel Vadot phys = <&pcie1_phy>; 90c66ec88fSEmmanuel Vadot phy-names = "pcie-phy0"; 91c66ec88fSEmmanuel Vadot interrupt-map-mask = <0 0 0 7>; 92c66ec88fSEmmanuel Vadot interrupt-map = <0 0 0 1 &pcie_intc 1>, 93c66ec88fSEmmanuel Vadot <0 0 0 2 &pcie_intc 2>, 94c66ec88fSEmmanuel Vadot <0 0 0 3 &pcie_intc 3>, 95c66ec88fSEmmanuel Vadot <0 0 0 4 &pcie_intc 4>; 96c66ec88fSEmmanuel Vadot pcie_intc: interrupt-controller { 97c66ec88fSEmmanuel Vadot interrupt-controller; 98c66ec88fSEmmanuel Vadot #address-cells = <0>; 99c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 100c66ec88fSEmmanuel Vadot }; 101c66ec88fSEmmanuel Vadot }; 102c66ec88fSEmmanuel Vadot}; 103