1*4882a593SmuzhiyunNVIDIA Tegra PCIe controller (Synopsys DesignWare Core based) 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis PCIe controller is based on the Synopsis Designware PCIe IP 4*4882a593Smuzhiyunand thus inherits all the common properties defined in designware-pcie.txt. 5*4882a593SmuzhiyunSome of the controller instances are dual mode where in they can work either 6*4882a593Smuzhiyunin root port mode or endpoint mode but one at a time. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunRequired properties: 9*4882a593Smuzhiyun- power-domains: A phandle to the node that controls power to the respective 10*4882a593Smuzhiyun PCIe controller and a specifier name for the PCIe controller. Following are 11*4882a593Smuzhiyun the specifiers for the different PCIe controllers 12*4882a593Smuzhiyun TEGRA194_POWER_DOMAIN_PCIEX8B: C0 13*4882a593Smuzhiyun TEGRA194_POWER_DOMAIN_PCIEX1A: C1 14*4882a593Smuzhiyun TEGRA194_POWER_DOMAIN_PCIEX1A: C2 15*4882a593Smuzhiyun TEGRA194_POWER_DOMAIN_PCIEX1A: C3 16*4882a593Smuzhiyun TEGRA194_POWER_DOMAIN_PCIEX4A: C4 17*4882a593Smuzhiyun TEGRA194_POWER_DOMAIN_PCIEX8A: C5 18*4882a593Smuzhiyun these specifiers are defined in 19*4882a593Smuzhiyun "include/dt-bindings/power/tegra194-powergate.h" file. 20*4882a593Smuzhiyun- reg: A list of physical base address and length pairs for each set of 21*4882a593Smuzhiyun controller registers. Must contain an entry for each entry in the reg-names 22*4882a593Smuzhiyun property. 23*4882a593Smuzhiyun- reg-names: Must include the following entries: 24*4882a593Smuzhiyun "appl": Controller's application logic registers 25*4882a593Smuzhiyun "config": As per the definition in designware-pcie.txt 26*4882a593Smuzhiyun "atu_dma": iATU and DMA registers. This is where the iATU (internal Address 27*4882a593Smuzhiyun Translation Unit) registers of the PCIe core are made available 28*4882a593Smuzhiyun for SW access. 29*4882a593Smuzhiyun "dbi": The aperture where root port's own configuration registers are 30*4882a593Smuzhiyun available 31*4882a593Smuzhiyun- interrupts: A list of interrupt outputs of the controller. Must contain an 32*4882a593Smuzhiyun entry for each entry in the interrupt-names property. 33*4882a593Smuzhiyun- interrupt-names: Must include the following entries: 34*4882a593Smuzhiyun "intr": The Tegra interrupt that is asserted for controller interrupts 35*4882a593Smuzhiyun- clocks: Must contain an entry for each entry in clock-names. 36*4882a593Smuzhiyun See ../clocks/clock-bindings.txt for details. 37*4882a593Smuzhiyun- clock-names: Must include the following entries: 38*4882a593Smuzhiyun - core 39*4882a593Smuzhiyun- resets: Must contain an entry for each entry in reset-names. 40*4882a593Smuzhiyun See ../reset/reset.txt for details. 41*4882a593Smuzhiyun- reset-names: Must include the following entries: 42*4882a593Smuzhiyun - apb 43*4882a593Smuzhiyun - core 44*4882a593Smuzhiyun- phys: Must contain a phandle to P2U PHY for each entry in phy-names. 45*4882a593Smuzhiyun- phy-names: Must include an entry for each active lane. 46*4882a593Smuzhiyun "p2u-N": where N ranges from 0 to one less than the total number of lanes 47*4882a593Smuzhiyun- nvidia,bpmp: Must contain a pair of phandle to BPMP controller node followed 48*4882a593Smuzhiyun by controller-id. Following are the controller ids for each controller. 49*4882a593Smuzhiyun 0: C0 50*4882a593Smuzhiyun 1: C1 51*4882a593Smuzhiyun 2: C2 52*4882a593Smuzhiyun 3: C3 53*4882a593Smuzhiyun 4: C4 54*4882a593Smuzhiyun 5: C5 55*4882a593Smuzhiyun- vddio-pex-ctl-supply: Regulator supply for PCIe side band signals 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunRC mode: 58*4882a593Smuzhiyun- compatible: Tegra19x must contain "nvidia,tegra194-pcie" 59*4882a593Smuzhiyun- device_type: Must be "pci" for RC mode 60*4882a593Smuzhiyun- interrupt-names: Must include the following entries: 61*4882a593Smuzhiyun "msi": The Tegra interrupt that is asserted when an MSI is received 62*4882a593Smuzhiyun- bus-range: Range of bus numbers associated with this controller 63*4882a593Smuzhiyun- #address-cells: Address representation for root ports (must be 3) 64*4882a593Smuzhiyun - cell 0 specifies the bus and device numbers of the root port: 65*4882a593Smuzhiyun [23:16]: bus number 66*4882a593Smuzhiyun [15:11]: device number 67*4882a593Smuzhiyun - cell 1 denotes the upper 32 address bits and should be 0 68*4882a593Smuzhiyun - cell 2 contains the lower 32 address bits and is used to translate to the 69*4882a593Smuzhiyun CPU address space 70*4882a593Smuzhiyun- #size-cells: Size representation for root ports (must be 2) 71*4882a593Smuzhiyun- ranges: Describes the translation of addresses for root ports and standard 72*4882a593Smuzhiyun PCI regions. The entries must be 7 cells each, where the first three cells 73*4882a593Smuzhiyun correspond to the address as described for the #address-cells property 74*4882a593Smuzhiyun above, the fourth and fifth cells are for the physical CPU address to 75*4882a593Smuzhiyun translate to and the sixth and seventh cells are as described for the 76*4882a593Smuzhiyun #size-cells property above. 77*4882a593Smuzhiyun - Entries setup the mapping for the standard I/O, memory and 78*4882a593Smuzhiyun prefetchable PCI regions. The first cell determines the type of region 79*4882a593Smuzhiyun that is setup: 80*4882a593Smuzhiyun - 0x81000000: I/O memory region 81*4882a593Smuzhiyun - 0x82000000: non-prefetchable memory region 82*4882a593Smuzhiyun - 0xc2000000: prefetchable memory region 83*4882a593Smuzhiyun Please refer to the standard PCI bus binding document for a more detailed 84*4882a593Smuzhiyun explanation. 85*4882a593Smuzhiyun- #interrupt-cells: Size representation for interrupts (must be 1) 86*4882a593Smuzhiyun- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties 87*4882a593Smuzhiyun Please refer to the standard PCI bus binding document for a more detailed 88*4882a593Smuzhiyun explanation. 89*4882a593Smuzhiyun 90*4882a593SmuzhiyunEP mode: 91*4882a593SmuzhiyunIn Tegra194, Only controllers C0, C4 & C5 support EP mode. 92*4882a593Smuzhiyun- compatible: Tegra19x must contain "nvidia,tegra194-pcie-ep" 93*4882a593Smuzhiyun- reg-names: Must include the following entries: 94*4882a593Smuzhiyun "addr_space": Used to map remote RC address space 95*4882a593Smuzhiyun- reset-gpios: Must contain a phandle to a GPIO controller followed by 96*4882a593Smuzhiyun GPIO that is being used as PERST input signal. Please refer to pci.txt 97*4882a593Smuzhiyun document. 98*4882a593Smuzhiyun 99*4882a593SmuzhiyunOptional properties: 100*4882a593Smuzhiyun- pinctrl-names: A list of pinctrl state names. 101*4882a593Smuzhiyun It is mandatory for C5 controller and optional for other controllers. 102*4882a593Smuzhiyun - "default": Configures PCIe I/O for proper operation. 103*4882a593Smuzhiyun- pinctrl-0: phandle for the 'default' state of pin configuration. 104*4882a593Smuzhiyun It is mandatory for C5 controller and optional for other controllers. 105*4882a593Smuzhiyun- supports-clkreq: Refer to Documentation/devicetree/bindings/pci/pci.txt 106*4882a593Smuzhiyun- nvidia,update-fc-fixup: This is a boolean property and needs to be present to 107*4882a593Smuzhiyun improve performance when a platform is designed in such a way that it 108*4882a593Smuzhiyun satisfies at least one of the following conditions thereby enabling root 109*4882a593Smuzhiyun port to exchange optimum number of FC (Flow Control) credits with 110*4882a593Smuzhiyun downstream devices 111*4882a593Smuzhiyun 1. If C0/C4/C5 run at x1/x2 link widths (irrespective of speed and MPS) 112*4882a593Smuzhiyun 2. If C0/C1/C2/C3/C4/C5 operate at their respective max link widths and 113*4882a593Smuzhiyun a) speed is Gen-2 and MPS is 256B 114*4882a593Smuzhiyun b) speed is >= Gen-3 with any MPS 115*4882a593Smuzhiyun- nvidia,aspm-cmrt-us: Common Mode Restore Time for proper operation of ASPM 116*4882a593Smuzhiyun to be specified in microseconds 117*4882a593Smuzhiyun- nvidia,aspm-pwr-on-t-us: Power On time for proper operation of ASPM to be 118*4882a593Smuzhiyun specified in microseconds 119*4882a593Smuzhiyun- nvidia,aspm-l0s-entrance-latency-us: ASPM L0s entrance latency to be 120*4882a593Smuzhiyun specified in microseconds 121*4882a593Smuzhiyun 122*4882a593SmuzhiyunRC mode: 123*4882a593Smuzhiyun- vpcie3v3-supply: A phandle to the regulator node that supplies 3.3V to the slot 124*4882a593Smuzhiyun if the platform has one such slot. (Ex:- x16 slot owned by C5 controller 125*4882a593Smuzhiyun in p2972-0000 platform). 126*4882a593Smuzhiyun- vpcie12v-supply: A phandle to the regulator node that supplies 12V to the slot 127*4882a593Smuzhiyun if the platform has one such slot. (Ex:- x16 slot owned by C5 controller 128*4882a593Smuzhiyun in p2972-0000 platform). 129*4882a593Smuzhiyun 130*4882a593SmuzhiyunEP mode: 131*4882a593Smuzhiyun- nvidia,refclk-select-gpios: Must contain a phandle to a GPIO controller 132*4882a593Smuzhiyun followed by GPIO that is being used to enable REFCLK to controller from host 133*4882a593Smuzhiyun 134*4882a593SmuzhiyunNOTE:- On Tegra194's P2972-0000 platform, only C5 controller can be enabled to 135*4882a593Smuzhiyunoperate in the endpoint mode because of the way the platform is designed. 136*4882a593Smuzhiyun 137*4882a593SmuzhiyunExamples: 138*4882a593Smuzhiyun========= 139*4882a593Smuzhiyun 140*4882a593SmuzhiyunTegra194 RC mode: 141*4882a593Smuzhiyun----------------- 142*4882a593Smuzhiyun 143*4882a593Smuzhiyun pcie@14180000 { 144*4882a593Smuzhiyun compatible = "nvidia,tegra194-pcie"; 145*4882a593Smuzhiyun power-domains = <&bpmp TEGRA194_POWER_DOMAIN_PCIEX8B>; 146*4882a593Smuzhiyun reg = <0x00 0x14180000 0x0 0x00020000 /* appl registers (128K) */ 147*4882a593Smuzhiyun 0x00 0x38000000 0x0 0x00040000 /* configuration space (256K) */ 148*4882a593Smuzhiyun 0x00 0x38040000 0x0 0x00040000>; /* iATU_DMA reg space (256K) */ 149*4882a593Smuzhiyun reg-names = "appl", "config", "atu_dma"; 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun #address-cells = <3>; 152*4882a593Smuzhiyun #size-cells = <2>; 153*4882a593Smuzhiyun device_type = "pci"; 154*4882a593Smuzhiyun num-lanes = <8>; 155*4882a593Smuzhiyun linux,pci-domain = <0>; 156*4882a593Smuzhiyun 157*4882a593Smuzhiyun pinctrl-names = "default"; 158*4882a593Smuzhiyun pinctrl-0 = <&pex_rst_c5_out_state>, <&clkreq_c5_bi_dir_state>; 159*4882a593Smuzhiyun 160*4882a593Smuzhiyun clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_0>; 161*4882a593Smuzhiyun clock-names = "core"; 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun resets = <&bpmp TEGRA194_RESET_PEX0_CORE_0_APB>, 164*4882a593Smuzhiyun <&bpmp TEGRA194_RESET_PEX0_CORE_0>; 165*4882a593Smuzhiyun reset-names = "apb", "core"; 166*4882a593Smuzhiyun 167*4882a593Smuzhiyun interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */ 168*4882a593Smuzhiyun <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ 169*4882a593Smuzhiyun interrupt-names = "intr", "msi"; 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun #interrupt-cells = <1>; 172*4882a593Smuzhiyun interrupt-map-mask = <0 0 0 0>; 173*4882a593Smuzhiyun interrupt-map = <0 0 0 0 &gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 174*4882a593Smuzhiyun 175*4882a593Smuzhiyun nvidia,bpmp = <&bpmp 0>; 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun supports-clkreq; 178*4882a593Smuzhiyun nvidia,aspm-cmrt-us = <60>; 179*4882a593Smuzhiyun nvidia,aspm-pwr-on-t-us = <20>; 180*4882a593Smuzhiyun nvidia,aspm-l0s-entrance-latency-us = <3>; 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun bus-range = <0x0 0xff>; 183*4882a593Smuzhiyun ranges = <0x81000000 0x0 0x38100000 0x0 0x38100000 0x0 0x00100000 /* downstream I/O (1MB) */ 184*4882a593Smuzhiyun 0x82000000 0x0 0x38200000 0x0 0x38200000 0x0 0x01E00000 /* non-prefetchable memory (30MB) */ 185*4882a593Smuzhiyun 0xc2000000 0x18 0x00000000 0x18 0x00000000 0x4 0x00000000>; /* prefetchable memory (16GB) */ 186*4882a593Smuzhiyun 187*4882a593Smuzhiyun vddio-pex-ctl-supply = <&vdd_1v8ao>; 188*4882a593Smuzhiyun vpcie3v3-supply = <&vdd_3v3_pcie>; 189*4882a593Smuzhiyun vpcie12v-supply = <&vdd_12v_pcie>; 190*4882a593Smuzhiyun 191*4882a593Smuzhiyun phys = <&p2u_hsio_2>, <&p2u_hsio_3>, <&p2u_hsio_4>, 192*4882a593Smuzhiyun <&p2u_hsio_5>; 193*4882a593Smuzhiyun phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3"; 194*4882a593Smuzhiyun }; 195*4882a593Smuzhiyun 196*4882a593SmuzhiyunTegra194 EP mode: 197*4882a593Smuzhiyun----------------- 198*4882a593Smuzhiyun 199*4882a593Smuzhiyun pcie_ep@141a0000 { 200*4882a593Smuzhiyun compatible = "nvidia,tegra194-pcie-ep", "snps,dw-pcie-ep"; 201*4882a593Smuzhiyun power-domains = <&bpmp TEGRA194_POWER_DOMAIN_PCIEX8A>; 202*4882a593Smuzhiyun reg = <0x00 0x141a0000 0x0 0x00020000 /* appl registers (128K) */ 203*4882a593Smuzhiyun 0x00 0x3a040000 0x0 0x00040000 /* iATU_DMA reg space (256K) */ 204*4882a593Smuzhiyun 0x00 0x3a080000 0x0 0x00040000 /* DBI reg space (256K) */ 205*4882a593Smuzhiyun 0x1c 0x00000000 0x4 0x00000000>; /* Address Space (16G) */ 206*4882a593Smuzhiyun reg-names = "appl", "atu_dma", "dbi", "addr_space"; 207*4882a593Smuzhiyun 208*4882a593Smuzhiyun num-lanes = <8>; 209*4882a593Smuzhiyun num-ib-windows = <2>; 210*4882a593Smuzhiyun num-ob-windows = <8>; 211*4882a593Smuzhiyun 212*4882a593Smuzhiyun pinctrl-names = "default"; 213*4882a593Smuzhiyun pinctrl-0 = <&clkreq_c5_bi_dir_state>; 214*4882a593Smuzhiyun 215*4882a593Smuzhiyun clocks = <&bpmp TEGRA194_CLK_PEX1_CORE_5>; 216*4882a593Smuzhiyun clock-names = "core"; 217*4882a593Smuzhiyun 218*4882a593Smuzhiyun resets = <&bpmp TEGRA194_RESET_PEX1_CORE_5_APB>, 219*4882a593Smuzhiyun <&bpmp TEGRA194_RESET_PEX1_CORE_5>; 220*4882a593Smuzhiyun reset-names = "apb", "core"; 221*4882a593Smuzhiyun 222*4882a593Smuzhiyun interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */ 223*4882a593Smuzhiyun interrupt-names = "intr"; 224*4882a593Smuzhiyun 225*4882a593Smuzhiyun nvidia,bpmp = <&bpmp 5>; 226*4882a593Smuzhiyun 227*4882a593Smuzhiyun nvidia,aspm-cmrt-us = <60>; 228*4882a593Smuzhiyun nvidia,aspm-pwr-on-t-us = <20>; 229*4882a593Smuzhiyun nvidia,aspm-l0s-entrance-latency-us = <3>; 230*4882a593Smuzhiyun 231*4882a593Smuzhiyun vddio-pex-ctl-supply = <&vdd_1v8ao>; 232*4882a593Smuzhiyun 233*4882a593Smuzhiyun reset-gpios = <&gpio TEGRA194_MAIN_GPIO(GG, 1) GPIO_ACTIVE_LOW>; 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun nvidia,refclk-select-gpios = <&gpio_aon TEGRA194_AON_GPIO(AA, 5) 236*4882a593Smuzhiyun GPIO_ACTIVE_HIGH>; 237*4882a593Smuzhiyun 238*4882a593Smuzhiyun phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>, 239*4882a593Smuzhiyun <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>, 240*4882a593Smuzhiyun <&p2u_nvhs_6>, <&p2u_nvhs_7>; 241*4882a593Smuzhiyun 242*4882a593Smuzhiyun phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4", 243*4882a593Smuzhiyun "p2u-5", "p2u-6", "p2u-7"; 244*4882a593Smuzhiyun }; 245