18c2ecf20Sopenharmony_ciNVIDIA Tegra PCIe controller (Synopsys DesignWare Core based) 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis PCIe controller is based on the Synopsis Designware PCIe IP 48c2ecf20Sopenharmony_ciand thus inherits all the common properties defined in designware-pcie.txt. 58c2ecf20Sopenharmony_ciSome of the controller instances are dual mode where in they can work either 68c2ecf20Sopenharmony_ciin root port mode or endpoint mode but one at a time. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciRequired properties: 98c2ecf20Sopenharmony_ci- power-domains: A phandle to the node that controls power to the respective 108c2ecf20Sopenharmony_ci PCIe controller and a specifier name for the PCIe controller. Following are 118c2ecf20Sopenharmony_ci the specifiers for the different PCIe controllers 128c2ecf20Sopenharmony_ci TEGRA194_POWER_DOMAIN_PCIEX8B: C0 138c2ecf20Sopenharmony_ci TEGRA194_POWER_DOMAIN_PCIEX1A: C1 148c2ecf20Sopenharmony_ci TEGRA194_POWER_DOMAIN_PCIEX1A: C2 158c2ecf20Sopenharmony_ci TEGRA194_POWER_DOMAIN_PCIEX1A: C3 168c2ecf20Sopenharmony_ci TEGRA194_POWER_DOMAIN_PCIEX4A: C4 178c2ecf20Sopenharmony_ci TEGRA194_POWER_DOMAIN_PCIEX8A: C5 188c2ecf20Sopenharmony_ci these specifiers are defined in 198c2ecf20Sopenharmony_ci "include/dt-bindings/power/tegra194-powergate.h" file. 208c2ecf20Sopenharmony_ci- reg: A list of physical base address and length pairs for each set of 218c2ecf20Sopenharmony_ci controller registers. Must contain an entry for each entry in the reg-names 228c2ecf20Sopenharmony_ci property. 238c2ecf20Sopenharmony_ci- reg-names: Must include the following entries: 248c2ecf20Sopenharmony_ci "appl": Controller's application logic registers 258c2ecf20Sopenharmony_ci "config": As per the definition in designware-pcie.txt 268c2ecf20Sopenharmony_ci "atu_dma": iATU and DMA registers. This is where the iATU (internal Address 278c2ecf20Sopenharmony_ci Translation Unit) registers of the PCIe core are made available 288c2ecf20Sopenharmony_ci for SW access. 298c2ecf20Sopenharmony_ci "dbi": The aperture where root port's own configuration registers are 308c2ecf20Sopenharmony_ci available 318c2ecf20Sopenharmony_ci- interrupts: A list of interrupt outputs of the controller. Must contain an 328c2ecf20Sopenharmony_ci entry for each entry in the interrupt-names property. 338c2ecf20Sopenharmony_ci- interrupt-names: Must include the following entries: 348c2ecf20Sopenharmony_ci "intr": The Tegra interrupt that is asserted for controller interrupts 358c2ecf20Sopenharmony_ci- clocks: Must contain an entry for each entry in clock-names. 368c2ecf20Sopenharmony_ci See ../clocks/clock-bindings.txt for details. 378c2ecf20Sopenharmony_ci- clock-names: Must include the following entries: 388c2ecf20Sopenharmony_ci - core 398c2ecf20Sopenharmony_ci- resets: Must contain an entry for each entry in reset-names. 408c2ecf20Sopenharmony_ci See ../reset/reset.txt for details. 418c2ecf20Sopenharmony_ci- reset-names: Must include the following entries: 428c2ecf20Sopenharmony_ci - apb 438c2ecf20Sopenharmony_ci - core 448c2ecf20Sopenharmony_ci- phys: Must contain a phandle to P2U PHY for each entry in phy-names. 458c2ecf20Sopenharmony_ci- phy-names: Must include an entry for each active lane. 468c2ecf20Sopenharmony_ci "p2u-N": where N ranges from 0 to one less than the total number of lanes 478c2ecf20Sopenharmony_ci- nvidia,bpmp: Must contain a pair of phandle to BPMP controller node followed 488c2ecf20Sopenharmony_ci by controller-id. Following are the controller ids for each controller. 498c2ecf20Sopenharmony_ci 0: C0 508c2ecf20Sopenharmony_ci 1: C1 518c2ecf20Sopenharmony_ci 2: C2 528c2ecf20Sopenharmony_ci 3: C3 538c2ecf20Sopenharmony_ci 4: C4 548c2ecf20Sopenharmony_ci 5: C5 558c2ecf20Sopenharmony_ci- vddio-pex-ctl-supply: Regulator supply for PCIe side band signals 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ciRC mode: 588c2ecf20Sopenharmony_ci- compatible: Tegra19x must contain "nvidia,tegra194-pcie" 598c2ecf20Sopenharmony_ci- device_type: Must be "pci" for RC mode 608c2ecf20Sopenharmony_ci- interrupt-names: Must include the following entries: 618c2ecf20Sopenharmony_ci "msi": The Tegra interrupt that is asserted when an MSI is received 628c2ecf20Sopenharmony_ci- bus-range: Range of bus numbers associated with this controller 638c2ecf20Sopenharmony_ci- #address-cells: Address representation for root ports (must be 3) 648c2ecf20Sopenharmony_ci - cell 0 specifies the bus and device numbers of the root port: 658c2ecf20Sopenharmony_ci [23:16]: bus number 668c2ecf20Sopenharmony_ci [15:11]: device number 678c2ecf20Sopenharmony_ci - cell 1 denotes the upper 32 address bits and should be 0 688c2ecf20Sopenharmony_ci - cell 2 contains the lower 32 address bits and is used to translate to the 698c2ecf20Sopenharmony_ci CPU address space 708c2ecf20Sopenharmony_ci- #size-cells: Size representation for root ports (must be 2) 718c2ecf20Sopenharmony_ci- ranges: Describes the translation of addresses for root ports and standard 728c2ecf20Sopenharmony_ci PCI regions. The entries must be 7 cells each, where the first three cells 738c2ecf20Sopenharmony_ci correspond to the address as described for the #address-cells property 748c2ecf20Sopenharmony_ci above, the fourth and fifth cells are for the physical CPU address to 758c2ecf20Sopenharmony_ci translate to and the sixth and seventh cells are as described for the 768c2ecf20Sopenharmony_ci #size-cells property above. 778c2ecf20Sopenharmony_ci - Entries setup the mapping for the standard I/O, memory and 788c2ecf20Sopenharmony_ci prefetchable PCI regions. The first cell determines the type of region 798c2ecf20Sopenharmony_ci that is setup: 808c2ecf20Sopenharmony_ci - 0x81000000: I/O memory region 818c2ecf20Sopenharmony_ci - 0x82000000: non-prefetchable memory region 828c2ecf20Sopenharmony_ci - 0xc2000000: prefetchable memory region 838c2ecf20Sopenharmony_ci Please refer to the standard PCI bus binding document for a more detailed 848c2ecf20Sopenharmony_ci explanation. 858c2ecf20Sopenharmony_ci- #interrupt-cells: Size representation for interrupts (must be 1) 868c2ecf20Sopenharmony_ci- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties 878c2ecf20Sopenharmony_ci Please refer to the standard PCI bus binding document for a more detailed 888c2ecf20Sopenharmony_ci explanation. 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ciEP mode: 918c2ecf20Sopenharmony_ciIn Tegra194, Only controllers C0, C4 & C5 support EP mode. 928c2ecf20Sopenharmony_ci- compatible: Tegra19x must contain "nvidia,tegra194-pcie-ep" 938c2ecf20Sopenharmony_ci- reg-names: Must include the following entries: 948c2ecf20Sopenharmony_ci "addr_space": Used to map remote RC address space 958c2ecf20Sopenharmony_ci- reset-gpios: Must contain a phandle to a GPIO controller followed by 968c2ecf20Sopenharmony_ci GPIO that is being used as PERST input signal. Please refer to pci.txt 978c2ecf20Sopenharmony_ci document. 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ciOptional properties: 1008c2ecf20Sopenharmony_ci- pinctrl-names: A list of pinctrl state names. 1018c2ecf20Sopenharmony_ci It is mandatory for C5 controller and optional for other controllers. 1028c2ecf20Sopenharmony_ci - "default": Configures PCIe I/O for proper operation. 1038c2ecf20Sopenharmony_ci- pinctrl-0: phandle for the 'default' state of pin configuration. 1048c2ecf20Sopenharmony_ci It is mandatory for C5 controller and optional for other controllers. 1058c2ecf20Sopenharmony_ci- supports-clkreq: Refer to Documentation/devicetree/bindings/pci/pci.txt 1068c2ecf20Sopenharmony_ci- nvidia,update-fc-fixup: This is a boolean property and needs to be present to 1078c2ecf20Sopenharmony_ci improve performance when a platform is designed in such a way that it 1088c2ecf20Sopenharmony_ci satisfies at least one of the following conditions thereby enabling root 1098c2ecf20Sopenharmony_ci port to exchange optimum number of FC (Flow Control) credits with 1108c2ecf20Sopenharmony_ci downstream devices 1118c2ecf20Sopenharmony_ci 1. If C0/C4/C5 run at x1/x2 link widths (irrespective of speed and MPS) 1128c2ecf20Sopenharmony_ci 2. If C0/C1/C2/C3/C4/C5 operate at their respective max link widths and 1138c2ecf20Sopenharmony_ci a) speed is Gen-2 and MPS is 256B 1148c2ecf20Sopenharmony_ci b) speed is >= Gen-3 with any MPS 1158c2ecf20Sopenharmony_ci- nvidia,aspm-cmrt-us: Common Mode Restore Time for proper operation of ASPM 1168c2ecf20Sopenharmony_ci to be specified in microseconds 1178c2ecf20Sopenharmony_ci- nvidia,aspm-pwr-on-t-us: Power On time for proper operation of ASPM to be 1188c2ecf20Sopenharmony_ci specified in microseconds 1198c2ecf20Sopenharmony_ci- nvidia,aspm-l0s-entrance-latency-us: ASPM L0s entrance latency to be 1208c2ecf20Sopenharmony_ci specified in microseconds 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ciRC mode: 1238c2ecf20Sopenharmony_ci- vpcie3v3-supply: A phandle to the regulator node that supplies 3.3V to the slot 1248c2ecf20Sopenharmony_ci if the platform has one such slot. (Ex:- x16 slot owned by C5 controller 1258c2ecf20Sopenharmony_ci in p2972-0000 platform). 1268c2ecf20Sopenharmony_ci- vpcie12v-supply: A phandle to the regulator node that supplies 12V to the slot 1278c2ecf20Sopenharmony_ci if the platform has one such slot. (Ex:- x16 slot owned by C5 controller 1288c2ecf20Sopenharmony_ci in p2972-0000 platform). 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ciEP mode: 1318c2ecf20Sopenharmony_ci- nvidia,refclk-select-gpios: Must contain a phandle to a GPIO controller 1328c2ecf20Sopenharmony_ci followed by GPIO that is being used to enable REFCLK to controller from host 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ciNOTE:- On Tegra194's P2972-0000 platform, only C5 controller can be enabled to 1358c2ecf20Sopenharmony_cioperate in the endpoint mode because of the way the platform is designed. 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ciExamples: 1388c2ecf20Sopenharmony_ci========= 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ciTegra194 RC mode: 1418c2ecf20Sopenharmony_ci----------------- 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci pcie@14180000 { 1448c2ecf20Sopenharmony_ci compatible = "nvidia,tegra194-pcie"; 1458c2ecf20Sopenharmony_ci power-domains = <&bpmp TEGRA194_POWER_DOMAIN_PCIEX8B>; 1468c2ecf20Sopenharmony_ci reg = <0x00 0x14180000 0x0 0x00020000 /* appl registers (128K) */ 1478c2ecf20Sopenharmony_ci 0x00 0x38000000 0x0 0x00040000 /* configuration space (256K) */ 1488c2ecf20Sopenharmony_ci 0x00 0x38040000 0x0 0x00040000>; /* iATU_DMA reg space (256K) */ 1498c2ecf20Sopenharmony_ci reg-names = "appl", "config", "atu_dma"; 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci #address-cells = <3>; 1528c2ecf20Sopenharmony_ci #size-cells = <2>; 1538c2ecf20Sopenharmony_ci device_type = "pci"; 1548c2ecf20Sopenharmony_ci num-lanes = <8>; 1558c2ecf20Sopenharmony_ci linux,pci-domain = <0>; 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_ci pinctrl-names = "default"; 1588c2ecf20Sopenharmony_ci pinctrl-0 = <&pex_rst_c5_out_state>, <&clkreq_c5_bi_dir_state>; 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci clocks = <&bpmp TEGRA194_CLK_PEX0_CORE_0>; 1618c2ecf20Sopenharmony_ci clock-names = "core"; 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci resets = <&bpmp TEGRA194_RESET_PEX0_CORE_0_APB>, 1648c2ecf20Sopenharmony_ci <&bpmp TEGRA194_RESET_PEX0_CORE_0>; 1658c2ecf20Sopenharmony_ci reset-names = "apb", "core"; 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */ 1688c2ecf20Sopenharmony_ci <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ 1698c2ecf20Sopenharmony_ci interrupt-names = "intr", "msi"; 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci #interrupt-cells = <1>; 1728c2ecf20Sopenharmony_ci interrupt-map-mask = <0 0 0 0>; 1738c2ecf20Sopenharmony_ci interrupt-map = <0 0 0 0 &gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci nvidia,bpmp = <&bpmp 0>; 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci supports-clkreq; 1788c2ecf20Sopenharmony_ci nvidia,aspm-cmrt-us = <60>; 1798c2ecf20Sopenharmony_ci nvidia,aspm-pwr-on-t-us = <20>; 1808c2ecf20Sopenharmony_ci nvidia,aspm-l0s-entrance-latency-us = <3>; 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci bus-range = <0x0 0xff>; 1838c2ecf20Sopenharmony_ci ranges = <0x81000000 0x0 0x38100000 0x0 0x38100000 0x0 0x00100000 /* downstream I/O (1MB) */ 1848c2ecf20Sopenharmony_ci 0x82000000 0x0 0x38200000 0x0 0x38200000 0x0 0x01E00000 /* non-prefetchable memory (30MB) */ 1858c2ecf20Sopenharmony_ci 0xc2000000 0x18 0x00000000 0x18 0x00000000 0x4 0x00000000>; /* prefetchable memory (16GB) */ 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ci vddio-pex-ctl-supply = <&vdd_1v8ao>; 1888c2ecf20Sopenharmony_ci vpcie3v3-supply = <&vdd_3v3_pcie>; 1898c2ecf20Sopenharmony_ci vpcie12v-supply = <&vdd_12v_pcie>; 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci phys = <&p2u_hsio_2>, <&p2u_hsio_3>, <&p2u_hsio_4>, 1928c2ecf20Sopenharmony_ci <&p2u_hsio_5>; 1938c2ecf20Sopenharmony_ci phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3"; 1948c2ecf20Sopenharmony_ci }; 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ciTegra194 EP mode: 1978c2ecf20Sopenharmony_ci----------------- 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_ci pcie_ep@141a0000 { 2008c2ecf20Sopenharmony_ci compatible = "nvidia,tegra194-pcie-ep", "snps,dw-pcie-ep"; 2018c2ecf20Sopenharmony_ci power-domains = <&bpmp TEGRA194_POWER_DOMAIN_PCIEX8A>; 2028c2ecf20Sopenharmony_ci reg = <0x00 0x141a0000 0x0 0x00020000 /* appl registers (128K) */ 2038c2ecf20Sopenharmony_ci 0x00 0x3a040000 0x0 0x00040000 /* iATU_DMA reg space (256K) */ 2048c2ecf20Sopenharmony_ci 0x00 0x3a080000 0x0 0x00040000 /* DBI reg space (256K) */ 2058c2ecf20Sopenharmony_ci 0x1c 0x00000000 0x4 0x00000000>; /* Address Space (16G) */ 2068c2ecf20Sopenharmony_ci reg-names = "appl", "atu_dma", "dbi", "addr_space"; 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ci num-lanes = <8>; 2098c2ecf20Sopenharmony_ci num-ib-windows = <2>; 2108c2ecf20Sopenharmony_ci num-ob-windows = <8>; 2118c2ecf20Sopenharmony_ci 2128c2ecf20Sopenharmony_ci pinctrl-names = "default"; 2138c2ecf20Sopenharmony_ci pinctrl-0 = <&clkreq_c5_bi_dir_state>; 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_ci clocks = <&bpmp TEGRA194_CLK_PEX1_CORE_5>; 2168c2ecf20Sopenharmony_ci clock-names = "core"; 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci resets = <&bpmp TEGRA194_RESET_PEX1_CORE_5_APB>, 2198c2ecf20Sopenharmony_ci <&bpmp TEGRA194_RESET_PEX1_CORE_5>; 2208c2ecf20Sopenharmony_ci reset-names = "apb", "core"; 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */ 2238c2ecf20Sopenharmony_ci interrupt-names = "intr"; 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci nvidia,bpmp = <&bpmp 5>; 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci nvidia,aspm-cmrt-us = <60>; 2288c2ecf20Sopenharmony_ci nvidia,aspm-pwr-on-t-us = <20>; 2298c2ecf20Sopenharmony_ci nvidia,aspm-l0s-entrance-latency-us = <3>; 2308c2ecf20Sopenharmony_ci 2318c2ecf20Sopenharmony_ci vddio-pex-ctl-supply = <&vdd_1v8ao>; 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci reset-gpios = <&gpio TEGRA194_MAIN_GPIO(GG, 1) GPIO_ACTIVE_LOW>; 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci nvidia,refclk-select-gpios = <&gpio_aon TEGRA194_AON_GPIO(AA, 5) 2368c2ecf20Sopenharmony_ci GPIO_ACTIVE_HIGH>; 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>, 2398c2ecf20Sopenharmony_ci <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>, 2408c2ecf20Sopenharmony_ci <&p2u_nvhs_6>, <&p2u_nvhs_7>; 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ci phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4", 2438c2ecf20Sopenharmony_ci "p2u-5", "p2u-6", "p2u-7"; 2448c2ecf20Sopenharmony_ci }; 245