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