1d1523b52SThierry RedingNVIDIA Tegra PCIe controller 2d1523b52SThierry Reding 3d1523b52SThierry RedingRequired properties: 4193c9d23SPaul Walmsley- compatible: For Tegra20, must contain "nvidia,tegra20-pcie". For Tegra30, 5193c9d23SPaul Walmsley "nvidia,tegra30-pcie". For Tegra124, must contain "nvidia,tegra124-pcie". 6193c9d23SPaul Walmsley Otherwise, must contain "nvidia,<chip>-pcie", plus one of the above, where 7193c9d23SPaul Walmsley <chip> is tegra132 or tegra210. 8d1523b52SThierry Reding- device_type: Must be "pci" 9d1523b52SThierry Reding- reg: A list of physical base address and length for each set of controller 10d1523b52SThierry Reding registers. Must contain an entry for each entry in the reg-names property. 11d1523b52SThierry Reding- reg-names: Must include the following entries: 12d1523b52SThierry Reding "pads": PADS registers 13d1523b52SThierry Reding "afi": AFI registers 14d1523b52SThierry Reding "cs": configuration space region 15d1523b52SThierry Reding- interrupts: A list of interrupt outputs of the controller. Must contain an 16d1523b52SThierry Reding entry for each entry in the interrupt-names property. 17d1523b52SThierry Reding- interrupt-names: Must include the following entries: 18d1523b52SThierry Reding "intr": The Tegra interrupt that is asserted for controller interrupts 19d1523b52SThierry Reding "msi": The Tegra interrupt that is asserted when an MSI is received 20d1523b52SThierry Reding- bus-range: Range of bus numbers associated with this controller 21d1523b52SThierry Reding- #address-cells: Address representation for root ports (must be 3) 22d1523b52SThierry Reding - cell 0 specifies the bus and device numbers of the root port: 23d1523b52SThierry Reding [23:16]: bus number 24d1523b52SThierry Reding [15:11]: device number 25d1523b52SThierry Reding - cell 1 denotes the upper 32 address bits and should be 0 26d1523b52SThierry Reding - cell 2 contains the lower 32 address bits and is used to translate to the 27d1523b52SThierry Reding CPU address space 28d1523b52SThierry Reding- #size-cells: Size representation for root ports (must be 2) 29d1523b52SThierry Reding- ranges: Describes the translation of addresses for root ports and standard 30d1523b52SThierry Reding PCI regions. The entries must be 6 cells each, where the first three cells 31d1523b52SThierry Reding correspond to the address as described for the #address-cells property 32d1523b52SThierry Reding above, the fourth cell is the physical CPU address to translate to and the 33d1523b52SThierry Reding fifth and six cells are as described for the #size-cells property above. 34d1523b52SThierry Reding - The first two entries are expected to translate the addresses for the root 35d1523b52SThierry Reding port registers, which are referenced by the assigned-addresses property of 36d1523b52SThierry Reding the root port nodes (see below). 37d1523b52SThierry Reding - The remaining entries setup the mapping for the standard I/O, memory and 38d1523b52SThierry Reding prefetchable PCI regions. The first cell determines the type of region 39d1523b52SThierry Reding that is setup: 40d1523b52SThierry Reding - 0x81000000: I/O memory region 41d1523b52SThierry Reding - 0x82000000: non-prefetchable memory region 42d1523b52SThierry Reding - 0xc2000000: prefetchable memory region 43d1523b52SThierry Reding Please refer to the standard PCI bus binding document for a more detailed 44d1523b52SThierry Reding explanation. 4597070bd4SLucas Stach- #interrupt-cells: Size representation for interrupts (must be 1) 4697070bd4SLucas Stach- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties 4797070bd4SLucas Stach Please refer to the standard PCI bus binding document for a more detailed 4897070bd4SLucas Stach explanation. 49d8f64797SStephen Warren- clocks: Must contain an entry for each entry in clock-names. 50d8f64797SStephen Warren See ../clocks/clock-bindings.txt for details. 51d1523b52SThierry Reding- clock-names: Must include the following entries: 52d8f64797SStephen Warren - pex 53d8f64797SStephen Warren - afi 54d8f64797SStephen Warren - pll_e 55d8f64797SStephen Warren - cml (not required for Tegra20) 5607999587SStephen Warren- resets: Must contain an entry for each entry in reset-names. 5707999587SStephen Warren See ../reset/reset.txt for details. 5807999587SStephen Warren- reset-names: Must include the following entries: 5907999587SStephen Warren - pex 6007999587SStephen Warren - afi 6107999587SStephen Warren - pcie_x 62d1523b52SThierry Reding 6313541cc3SThierry RedingRequired properties on Tegra124 and later (deprecated): 647f1f054bSThierry Reding- phys: Must contain an entry for each entry in phy-names. 657f1f054bSThierry Reding- phy-names: Must include the following entries: 667f1f054bSThierry Reding - pcie 677f1f054bSThierry Reding 6813541cc3SThierry RedingThese properties are deprecated in favour of per-lane PHYs define in each of 6913541cc3SThierry Redingthe root ports (see below). 7013541cc3SThierry Reding 71e4958675SThierry RedingPower supplies for Tegra20: 72e4958675SThierry Reding- avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V. 73e4958675SThierry Reding- vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. 74e4958675SThierry Reding- avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must 75e4958675SThierry Reding supply 1.05 V. 76e4958675SThierry Reding- avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must 77e4958675SThierry Reding supply 1.05 V. 78e4958675SThierry Reding- vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V. 79e4958675SThierry Reding 80e4958675SThierry RedingPower supplies for Tegra30: 81e4958675SThierry Reding- Required: 82e4958675SThierry Reding - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must 83e4958675SThierry Reding supply 1.05 V. 84e4958675SThierry Reding - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must 85e4958675SThierry Reding supply 1.05 V. 86e4958675SThierry Reding - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must 87e4958675SThierry Reding supply 1.8 V. 88e4958675SThierry Reding - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks. 89e4958675SThierry Reding Must supply 3.3 V. 90e4958675SThierry Reding- Optional: 91e4958675SThierry Reding - If lanes 0 to 3 are used: 92e4958675SThierry Reding - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V. 93e4958675SThierry Reding - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. 94e4958675SThierry Reding - If lanes 4 or 5 are used: 95e4958675SThierry Reding - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V. 96e4958675SThierry Reding - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. 97e4958675SThierry Reding 987f1f054bSThierry RedingPower supplies for Tegra124: 997f1f054bSThierry Reding- Required: 1007f1f054bSThierry Reding - avddio-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V. 1017f1f054bSThierry Reding - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. 1027f1f054bSThierry Reding - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must 1037f1f054bSThierry Reding supply 1.05 V. 1047f1f054bSThierry Reding - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks. 1057f1f054bSThierry Reding Must supply 3.3 V. 1067f1f054bSThierry Reding - hvdd-pex-pll-e-supply: High-voltage supply for PLLE (shared with USB3). 1077f1f054bSThierry Reding Must supply 3.3 V. 1087f1f054bSThierry Reding - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must 1097f1f054bSThierry Reding supply 2.8-3.3 V. 1107f1f054bSThierry Reding - avdd-pll-erefe-supply: Power supply for PLLE (shared with USB3). Must 1117f1f054bSThierry Reding supply 1.05 V. 1127f1f054bSThierry Reding 113*528925c4SThierry RedingPower supplies for Tegra210: 114*528925c4SThierry Reding- Required: 115*528925c4SThierry Reding - avdd-pll-uerefe-supply: Power supply for PLLE (shared with USB3). Must 116*528925c4SThierry Reding supply 1.05 V. 117*528925c4SThierry Reding - hvddio-pex-supply: High-voltage supply for PCIe I/O and PCIe output 118*528925c4SThierry Reding clocks. Must supply 1.8 V. 119*528925c4SThierry Reding - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V. 120*528925c4SThierry Reding - dvdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must 121*528925c4SThierry Reding supply 1.05 V. 122*528925c4SThierry Reding - hvdd-pex-pll-e-supply: High-voltage supply for PLLE (shared with USB3). 123*528925c4SThierry Reding Must supply 3.3 V. 124*528925c4SThierry Reding - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must 125*528925c4SThierry Reding supply 1.8 V. 126*528925c4SThierry Reding 127d1523b52SThierry RedingRoot ports are defined as subnodes of the PCIe controller node. 128d1523b52SThierry Reding 129d1523b52SThierry RedingRequired properties: 130d1523b52SThierry Reding- device_type: Must be "pci" 131d1523b52SThierry Reding- assigned-addresses: Address and size of the port configuration registers 132d1523b52SThierry Reding- reg: PCI bus address of the root port 133d1523b52SThierry Reding- #address-cells: Must be 3 134d1523b52SThierry Reding- #size-cells: Must be 2 135d1523b52SThierry Reding- ranges: Sub-ranges distributed from the PCIe controller node. An empty 136d1523b52SThierry Reding property is sufficient. 137d1523b52SThierry Reding- nvidia,num-lanes: Number of lanes to use for this port. Valid combinations 138d1523b52SThierry Reding are: 139d1523b52SThierry Reding - Root port 0 uses 4 lanes, root port 1 is unused. 140d1523b52SThierry Reding - Both root ports use 2 lanes. 141d1523b52SThierry Reding 14213541cc3SThierry RedingRequired properties for Tegra124 and later: 14313541cc3SThierry Reding- phys: Must contain an phandle to a PHY for each entry in phy-names. 14413541cc3SThierry Reding- phy-names: Must include an entry for each active lane. Note that the number 14513541cc3SThierry Reding of entries does not have to (though usually will) be equal to the specified 14613541cc3SThierry Reding number of lanes in the nvidia,num-lanes property. Entries are of the form 14713541cc3SThierry Reding "pcie-N": where N ranges from 0 to the value specified in nvidia,num-lanes. 14813541cc3SThierry Reding 14913541cc3SThierry RedingExamples: 15013541cc3SThierry Reding========= 15113541cc3SThierry Reding 15213541cc3SThierry RedingTegra20: 15313541cc3SThierry Reding-------- 154d1523b52SThierry Reding 155d1523b52SThierry RedingSoC DTSI: 156d1523b52SThierry Reding 15713541cc3SThierry Reding pcie-controller@80003000 { 158d1523b52SThierry Reding compatible = "nvidia,tegra20-pcie"; 159d1523b52SThierry Reding device_type = "pci"; 160d1523b52SThierry Reding reg = <0x80003000 0x00000800 /* PADS registers */ 161d1523b52SThierry Reding 0x80003800 0x00000200 /* AFI registers */ 162d1523b52SThierry Reding 0x90000000 0x10000000>; /* configuration space */ 163d1523b52SThierry Reding reg-names = "pads", "afi", "cs"; 164d1523b52SThierry Reding interrupts = <0 98 0x04 /* controller interrupt */ 165d1523b52SThierry Reding 0 99 0x04>; /* MSI interrupt */ 166d1523b52SThierry Reding interrupt-names = "intr", "msi"; 167d1523b52SThierry Reding 16897070bd4SLucas Stach #interrupt-cells = <1>; 16997070bd4SLucas Stach interrupt-map-mask = <0 0 0 0>; 17097070bd4SLucas Stach interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; 17197070bd4SLucas Stach 172d1523b52SThierry Reding bus-range = <0x00 0xff>; 173d1523b52SThierry Reding #address-cells = <3>; 174d1523b52SThierry Reding #size-cells = <2>; 175d1523b52SThierry Reding 176d1523b52SThierry Reding ranges = <0x82000000 0 0x80000000 0x80000000 0 0x00001000 /* port 0 registers */ 177d1523b52SThierry Reding 0x82000000 0 0x80001000 0x80001000 0 0x00001000 /* port 1 registers */ 178d1523b52SThierry Reding 0x81000000 0 0 0x82000000 0 0x00010000 /* downstream I/O */ 179d1523b52SThierry Reding 0x82000000 0 0xa0000000 0xa0000000 0 0x10000000 /* non-prefetchable memory */ 180d1523b52SThierry Reding 0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */ 181d1523b52SThierry Reding 18207999587SStephen Warren clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 118>; 18307999587SStephen Warren clock-names = "pex", "afi", "pll_e"; 18407999587SStephen Warren resets = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>; 18507999587SStephen Warren reset-names = "pex", "afi", "pcie_x"; 186d1523b52SThierry Reding status = "disabled"; 187d1523b52SThierry Reding 188d1523b52SThierry Reding pci@1,0 { 189d1523b52SThierry Reding device_type = "pci"; 190d1523b52SThierry Reding assigned-addresses = <0x82000800 0 0x80000000 0 0x1000>; 191d1523b52SThierry Reding reg = <0x000800 0 0 0 0>; 192d1523b52SThierry Reding status = "disabled"; 193d1523b52SThierry Reding 194d1523b52SThierry Reding #address-cells = <3>; 195d1523b52SThierry Reding #size-cells = <2>; 196d1523b52SThierry Reding 197d1523b52SThierry Reding ranges; 198d1523b52SThierry Reding 199d1523b52SThierry Reding nvidia,num-lanes = <2>; 200d1523b52SThierry Reding }; 201d1523b52SThierry Reding 202d1523b52SThierry Reding pci@2,0 { 203d1523b52SThierry Reding device_type = "pci"; 204d1523b52SThierry Reding assigned-addresses = <0x82001000 0 0x80001000 0 0x1000>; 205d1523b52SThierry Reding reg = <0x001000 0 0 0 0>; 206d1523b52SThierry Reding status = "disabled"; 207d1523b52SThierry Reding 208d1523b52SThierry Reding #address-cells = <3>; 209d1523b52SThierry Reding #size-cells = <2>; 210d1523b52SThierry Reding 211d1523b52SThierry Reding ranges; 212d1523b52SThierry Reding 213d1523b52SThierry Reding nvidia,num-lanes = <2>; 214d1523b52SThierry Reding }; 215d1523b52SThierry Reding }; 216d1523b52SThierry Reding 217d1523b52SThierry RedingBoard DTS: 218d1523b52SThierry Reding 21913541cc3SThierry Reding pcie-controller@80003000 { 220d1523b52SThierry Reding status = "okay"; 221d1523b52SThierry Reding 222d1523b52SThierry Reding vdd-supply = <&pci_vdd_reg>; 223d1523b52SThierry Reding pex-clk-supply = <&pci_clk_reg>; 224d1523b52SThierry Reding 225d1523b52SThierry Reding /* root port 00:01.0 */ 226d1523b52SThierry Reding pci@1,0 { 227d1523b52SThierry Reding status = "okay"; 228d1523b52SThierry Reding 229d1523b52SThierry Reding /* bridge 01:00.0 (optional) */ 230d1523b52SThierry Reding pci@0,0 { 231d1523b52SThierry Reding reg = <0x010000 0 0 0 0>; 232d1523b52SThierry Reding 233d1523b52SThierry Reding #address-cells = <3>; 234d1523b52SThierry Reding #size-cells = <2>; 235d1523b52SThierry Reding 236d1523b52SThierry Reding device_type = "pci"; 237d1523b52SThierry Reding 238d1523b52SThierry Reding /* endpoint 02:00.0 */ 239d1523b52SThierry Reding pci@0,0 { 240d1523b52SThierry Reding reg = <0x020000 0 0 0 0>; 241d1523b52SThierry Reding }; 242d1523b52SThierry Reding }; 243d1523b52SThierry Reding }; 244d1523b52SThierry Reding }; 245d1523b52SThierry Reding 246d1523b52SThierry RedingNote that devices on the PCI bus are dynamically discovered using PCI's bus 247d1523b52SThierry Redingenumeration and therefore don't need corresponding device nodes in DT. However 248d1523b52SThierry Redingif a device on the PCI bus provides a non-probeable bus such as I2C or SPI, 249d1523b52SThierry Redingdevice nodes need to be added in order to allow the bus' children to be 250d1523b52SThierry Redinginstantiated at the proper location in the operating system's device tree (as 251d1523b52SThierry Redingillustrated by the optional nodes in the example above). 25213541cc3SThierry Reding 25313541cc3SThierry RedingTegra30: 25413541cc3SThierry Reding-------- 25513541cc3SThierry Reding 25613541cc3SThierry RedingSoC DTSI: 25713541cc3SThierry Reding 25813541cc3SThierry Reding pcie-controller@00003000 { 25913541cc3SThierry Reding compatible = "nvidia,tegra30-pcie"; 26013541cc3SThierry Reding device_type = "pci"; 26113541cc3SThierry Reding reg = <0x00003000 0x00000800 /* PADS registers */ 26213541cc3SThierry Reding 0x00003800 0x00000200 /* AFI registers */ 26313541cc3SThierry Reding 0x10000000 0x10000000>; /* configuration space */ 26413541cc3SThierry Reding reg-names = "pads", "afi", "cs"; 26513541cc3SThierry Reding interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH /* controller interrupt */ 26613541cc3SThierry Reding GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ 26713541cc3SThierry Reding interrupt-names = "intr", "msi"; 26813541cc3SThierry Reding 26913541cc3SThierry Reding #interrupt-cells = <1>; 27013541cc3SThierry Reding interrupt-map-mask = <0 0 0 0>; 27113541cc3SThierry Reding interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; 27213541cc3SThierry Reding 27313541cc3SThierry Reding bus-range = <0x00 0xff>; 27413541cc3SThierry Reding #address-cells = <3>; 27513541cc3SThierry Reding #size-cells = <2>; 27613541cc3SThierry Reding 27713541cc3SThierry Reding ranges = <0x82000000 0 0x00000000 0x00000000 0 0x00001000 /* port 0 configuration space */ 27813541cc3SThierry Reding 0x82000000 0 0x00001000 0x00001000 0 0x00001000 /* port 1 configuration space */ 27913541cc3SThierry Reding 0x82000000 0 0x00004000 0x00004000 0 0x00001000 /* port 2 configuration space */ 28013541cc3SThierry Reding 0x81000000 0 0 0x02000000 0 0x00010000 /* downstream I/O */ 28113541cc3SThierry Reding 0x82000000 0 0x20000000 0x20000000 0 0x08000000 /* non-prefetchable memory */ 28213541cc3SThierry Reding 0xc2000000 0 0x28000000 0x28000000 0 0x18000000>; /* prefetchable memory */ 28313541cc3SThierry Reding 28413541cc3SThierry Reding clocks = <&tegra_car TEGRA30_CLK_PCIE>, 28513541cc3SThierry Reding <&tegra_car TEGRA30_CLK_AFI>, 28613541cc3SThierry Reding <&tegra_car TEGRA30_CLK_PLL_E>, 28713541cc3SThierry Reding <&tegra_car TEGRA30_CLK_CML0>; 28813541cc3SThierry Reding clock-names = "pex", "afi", "pll_e", "cml"; 28913541cc3SThierry Reding resets = <&tegra_car 70>, 29013541cc3SThierry Reding <&tegra_car 72>, 29113541cc3SThierry Reding <&tegra_car 74>; 29213541cc3SThierry Reding reset-names = "pex", "afi", "pcie_x"; 29313541cc3SThierry Reding status = "disabled"; 29413541cc3SThierry Reding 29513541cc3SThierry Reding pci@1,0 { 29613541cc3SThierry Reding device_type = "pci"; 29713541cc3SThierry Reding assigned-addresses = <0x82000800 0 0x00000000 0 0x1000>; 29813541cc3SThierry Reding reg = <0x000800 0 0 0 0>; 29913541cc3SThierry Reding status = "disabled"; 30013541cc3SThierry Reding 30113541cc3SThierry Reding #address-cells = <3>; 30213541cc3SThierry Reding #size-cells = <2>; 30313541cc3SThierry Reding ranges; 30413541cc3SThierry Reding 30513541cc3SThierry Reding nvidia,num-lanes = <2>; 30613541cc3SThierry Reding }; 30713541cc3SThierry Reding 30813541cc3SThierry Reding pci@2,0 { 30913541cc3SThierry Reding device_type = "pci"; 31013541cc3SThierry Reding assigned-addresses = <0x82001000 0 0x00001000 0 0x1000>; 31113541cc3SThierry Reding reg = <0x001000 0 0 0 0>; 31213541cc3SThierry Reding status = "disabled"; 31313541cc3SThierry Reding 31413541cc3SThierry Reding #address-cells = <3>; 31513541cc3SThierry Reding #size-cells = <2>; 31613541cc3SThierry Reding ranges; 31713541cc3SThierry Reding 31813541cc3SThierry Reding nvidia,num-lanes = <2>; 31913541cc3SThierry Reding }; 32013541cc3SThierry Reding 32113541cc3SThierry Reding pci@3,0 { 32213541cc3SThierry Reding device_type = "pci"; 32313541cc3SThierry Reding assigned-addresses = <0x82001800 0 0x00004000 0 0x1000>; 32413541cc3SThierry Reding reg = <0x001800 0 0 0 0>; 32513541cc3SThierry Reding status = "disabled"; 32613541cc3SThierry Reding 32713541cc3SThierry Reding #address-cells = <3>; 32813541cc3SThierry Reding #size-cells = <2>; 32913541cc3SThierry Reding ranges; 33013541cc3SThierry Reding 33113541cc3SThierry Reding nvidia,num-lanes = <2>; 33213541cc3SThierry Reding }; 33313541cc3SThierry Reding }; 33413541cc3SThierry Reding 33513541cc3SThierry RedingBoard DTS: 33613541cc3SThierry Reding 33713541cc3SThierry Reding pcie-controller@00003000 { 33813541cc3SThierry Reding status = "okay"; 33913541cc3SThierry Reding 34013541cc3SThierry Reding avdd-pexa-supply = <&ldo1_reg>; 34113541cc3SThierry Reding vdd-pexa-supply = <&ldo1_reg>; 34213541cc3SThierry Reding avdd-pexb-supply = <&ldo1_reg>; 34313541cc3SThierry Reding vdd-pexb-supply = <&ldo1_reg>; 34413541cc3SThierry Reding avdd-pex-pll-supply = <&ldo1_reg>; 34513541cc3SThierry Reding avdd-plle-supply = <&ldo1_reg>; 34613541cc3SThierry Reding vddio-pex-ctl-supply = <&sys_3v3_reg>; 34713541cc3SThierry Reding hvdd-pex-supply = <&sys_3v3_pexs_reg>; 34813541cc3SThierry Reding 34913541cc3SThierry Reding pci@1,0 { 35013541cc3SThierry Reding status = "okay"; 35113541cc3SThierry Reding }; 35213541cc3SThierry Reding 35313541cc3SThierry Reding pci@3,0 { 35413541cc3SThierry Reding status = "okay"; 35513541cc3SThierry Reding }; 35613541cc3SThierry Reding }; 35713541cc3SThierry Reding 35813541cc3SThierry RedingTegra124: 35913541cc3SThierry Reding--------- 36013541cc3SThierry Reding 36113541cc3SThierry RedingSoC DTSI: 36213541cc3SThierry Reding 36313541cc3SThierry Reding pcie-controller@01003000 { 36413541cc3SThierry Reding compatible = "nvidia,tegra124-pcie"; 36513541cc3SThierry Reding device_type = "pci"; 36613541cc3SThierry Reding reg = <0x0 0x01003000 0x0 0x00000800 /* PADS registers */ 36713541cc3SThierry Reding 0x0 0x01003800 0x0 0x00000800 /* AFI registers */ 36813541cc3SThierry Reding 0x0 0x02000000 0x0 0x10000000>; /* configuration space */ 36913541cc3SThierry Reding reg-names = "pads", "afi", "cs"; 37013541cc3SThierry Reding interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */ 37113541cc3SThierry Reding <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ 37213541cc3SThierry Reding interrupt-names = "intr", "msi"; 37313541cc3SThierry Reding 37413541cc3SThierry Reding #interrupt-cells = <1>; 37513541cc3SThierry Reding interrupt-map-mask = <0 0 0 0>; 37613541cc3SThierry Reding interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; 37713541cc3SThierry Reding 37813541cc3SThierry Reding bus-range = <0x00 0xff>; 37913541cc3SThierry Reding #address-cells = <3>; 38013541cc3SThierry Reding #size-cells = <2>; 38113541cc3SThierry Reding 38213541cc3SThierry Reding ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000 /* port 0 configuration space */ 38313541cc3SThierry Reding 0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000 /* port 1 configuration space */ 38413541cc3SThierry Reding 0x81000000 0 0x0 0x0 0x12000000 0 0x00010000 /* downstream I/O (64 KiB) */ 38513541cc3SThierry Reding 0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000 /* non-prefetchable memory (208 MiB) */ 38613541cc3SThierry Reding 0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */ 38713541cc3SThierry Reding 38813541cc3SThierry Reding clocks = <&tegra_car TEGRA124_CLK_PCIE>, 38913541cc3SThierry Reding <&tegra_car TEGRA124_CLK_AFI>, 39013541cc3SThierry Reding <&tegra_car TEGRA124_CLK_PLL_E>, 39113541cc3SThierry Reding <&tegra_car TEGRA124_CLK_CML0>; 39213541cc3SThierry Reding clock-names = "pex", "afi", "pll_e", "cml"; 39313541cc3SThierry Reding resets = <&tegra_car 70>, 39413541cc3SThierry Reding <&tegra_car 72>, 39513541cc3SThierry Reding <&tegra_car 74>; 39613541cc3SThierry Reding reset-names = "pex", "afi", "pcie_x"; 39713541cc3SThierry Reding status = "disabled"; 39813541cc3SThierry Reding 39913541cc3SThierry Reding pci@1,0 { 40013541cc3SThierry Reding device_type = "pci"; 40113541cc3SThierry Reding assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>; 40213541cc3SThierry Reding reg = <0x000800 0 0 0 0>; 40313541cc3SThierry Reding status = "disabled"; 40413541cc3SThierry Reding 40513541cc3SThierry Reding #address-cells = <3>; 40613541cc3SThierry Reding #size-cells = <2>; 40713541cc3SThierry Reding ranges; 40813541cc3SThierry Reding 40913541cc3SThierry Reding nvidia,num-lanes = <2>; 41013541cc3SThierry Reding }; 41113541cc3SThierry Reding 41213541cc3SThierry Reding pci@2,0 { 41313541cc3SThierry Reding device_type = "pci"; 41413541cc3SThierry Reding assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>; 41513541cc3SThierry Reding reg = <0x001000 0 0 0 0>; 41613541cc3SThierry Reding status = "disabled"; 41713541cc3SThierry Reding 41813541cc3SThierry Reding #address-cells = <3>; 41913541cc3SThierry Reding #size-cells = <2>; 42013541cc3SThierry Reding ranges; 42113541cc3SThierry Reding 42213541cc3SThierry Reding nvidia,num-lanes = <1>; 42313541cc3SThierry Reding }; 42413541cc3SThierry Reding }; 42513541cc3SThierry Reding 42613541cc3SThierry RedingBoard DTS: 42713541cc3SThierry Reding 42813541cc3SThierry Reding pcie-controller@01003000 { 42913541cc3SThierry Reding status = "okay"; 43013541cc3SThierry Reding 43113541cc3SThierry Reding avddio-pex-supply = <&vdd_1v05_run>; 43213541cc3SThierry Reding dvddio-pex-supply = <&vdd_1v05_run>; 43313541cc3SThierry Reding avdd-pex-pll-supply = <&vdd_1v05_run>; 43413541cc3SThierry Reding hvdd-pex-supply = <&vdd_3v3_lp0>; 43513541cc3SThierry Reding hvdd-pex-pll-e-supply = <&vdd_3v3_lp0>; 43613541cc3SThierry Reding vddio-pex-ctl-supply = <&vdd_3v3_lp0>; 43713541cc3SThierry Reding avdd-pll-erefe-supply = <&avdd_1v05_run>; 43813541cc3SThierry Reding 43913541cc3SThierry Reding /* Mini PCIe */ 44013541cc3SThierry Reding pci@1,0 { 44113541cc3SThierry Reding phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>; 44213541cc3SThierry Reding phy-names = "pcie-0"; 44313541cc3SThierry Reding status = "okay"; 44413541cc3SThierry Reding }; 44513541cc3SThierry Reding 44613541cc3SThierry Reding /* Gigabit Ethernet */ 44713541cc3SThierry Reding pci@2,0 { 44813541cc3SThierry Reding phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>; 44913541cc3SThierry Reding phy-names = "pcie-0"; 45013541cc3SThierry Reding status = "okay"; 45113541cc3SThierry Reding }; 45213541cc3SThierry Reding }; 453*528925c4SThierry Reding 454*528925c4SThierry RedingTegra210: 455*528925c4SThierry Reding--------- 456*528925c4SThierry Reding 457*528925c4SThierry RedingSoC DTSI: 458*528925c4SThierry Reding 459*528925c4SThierry Reding pcie-controller@01003000 { 460*528925c4SThierry Reding compatible = "nvidia,tegra210-pcie"; 461*528925c4SThierry Reding device_type = "pci"; 462*528925c4SThierry Reding reg = <0x0 0x01003000 0x0 0x00000800 /* PADS registers */ 463*528925c4SThierry Reding 0x0 0x01003800 0x0 0x00000800 /* AFI registers */ 464*528925c4SThierry Reding 0x0 0x02000000 0x0 0x10000000>; /* configuration space */ 465*528925c4SThierry Reding reg-names = "pads", "afi", "cs"; 466*528925c4SThierry Reding interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */ 467*528925c4SThierry Reding <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ 468*528925c4SThierry Reding interrupt-names = "intr", "msi"; 469*528925c4SThierry Reding 470*528925c4SThierry Reding #interrupt-cells = <1>; 471*528925c4SThierry Reding interrupt-map-mask = <0 0 0 0>; 472*528925c4SThierry Reding interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; 473*528925c4SThierry Reding 474*528925c4SThierry Reding bus-range = <0x00 0xff>; 475*528925c4SThierry Reding #address-cells = <3>; 476*528925c4SThierry Reding #size-cells = <2>; 477*528925c4SThierry Reding 478*528925c4SThierry Reding ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000 /* port 0 configuration space */ 479*528925c4SThierry Reding 0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000 /* port 1 configuration space */ 480*528925c4SThierry Reding 0x81000000 0 0x0 0x0 0x12000000 0 0x00010000 /* downstream I/O (64 KiB) */ 481*528925c4SThierry Reding 0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000 /* non-prefetchable memory (208 MiB) */ 482*528925c4SThierry Reding 0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */ 483*528925c4SThierry Reding 484*528925c4SThierry Reding clocks = <&tegra_car TEGRA210_CLK_PCIE>, 485*528925c4SThierry Reding <&tegra_car TEGRA210_CLK_AFI>, 486*528925c4SThierry Reding <&tegra_car TEGRA210_CLK_PLL_E>, 487*528925c4SThierry Reding <&tegra_car TEGRA210_CLK_CML0>; 488*528925c4SThierry Reding clock-names = "pex", "afi", "pll_e", "cml"; 489*528925c4SThierry Reding resets = <&tegra_car 70>, 490*528925c4SThierry Reding <&tegra_car 72>, 491*528925c4SThierry Reding <&tegra_car 74>; 492*528925c4SThierry Reding reset-names = "pex", "afi", "pcie_x"; 493*528925c4SThierry Reding status = "disabled"; 494*528925c4SThierry Reding 495*528925c4SThierry Reding pci@1,0 { 496*528925c4SThierry Reding device_type = "pci"; 497*528925c4SThierry Reding assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>; 498*528925c4SThierry Reding reg = <0x000800 0 0 0 0>; 499*528925c4SThierry Reding status = "disabled"; 500*528925c4SThierry Reding 501*528925c4SThierry Reding #address-cells = <3>; 502*528925c4SThierry Reding #size-cells = <2>; 503*528925c4SThierry Reding ranges; 504*528925c4SThierry Reding 505*528925c4SThierry Reding nvidia,num-lanes = <4>; 506*528925c4SThierry Reding }; 507*528925c4SThierry Reding 508*528925c4SThierry Reding pci@2,0 { 509*528925c4SThierry Reding device_type = "pci"; 510*528925c4SThierry Reding assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>; 511*528925c4SThierry Reding reg = <0x001000 0 0 0 0>; 512*528925c4SThierry Reding status = "disabled"; 513*528925c4SThierry Reding 514*528925c4SThierry Reding #address-cells = <3>; 515*528925c4SThierry Reding #size-cells = <2>; 516*528925c4SThierry Reding ranges; 517*528925c4SThierry Reding 518*528925c4SThierry Reding nvidia,num-lanes = <1>; 519*528925c4SThierry Reding }; 520*528925c4SThierry Reding }; 521*528925c4SThierry Reding 522*528925c4SThierry RedingBoard DTS: 523*528925c4SThierry Reding 524*528925c4SThierry Reding pcie-controller@01003000 { 525*528925c4SThierry Reding status = "okay"; 526*528925c4SThierry Reding 527*528925c4SThierry Reding avdd-pll-uerefe-supply = <&avdd_1v05_pll>; 528*528925c4SThierry Reding hvddio-pex-supply = <&vdd_1v8>; 529*528925c4SThierry Reding dvddio-pex-supply = <&vdd_pex_1v05>; 530*528925c4SThierry Reding dvdd-pex-pll-supply = <&vdd_pex_1v05>; 531*528925c4SThierry Reding hvdd-pex-pll-e-supply = <&vdd_1v8>; 532*528925c4SThierry Reding vddio-pex-ctl-supply = <&vdd_1v8>; 533*528925c4SThierry Reding 534*528925c4SThierry Reding pci@1,0 { 535*528925c4SThierry Reding phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>, 536*528925c4SThierry Reding <&{/padctl@7009f000/pads/pcie/lanes/pcie-1}>, 537*528925c4SThierry Reding <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>, 538*528925c4SThierry Reding <&{/padctl@7009f000/pads/pcie/lanes/pcie-3}>; 539*528925c4SThierry Reding phy-names = "pcie-0", "pcie-1", "pcie-2", "pcie-3"; 540*528925c4SThierry Reding status = "okay"; 541*528925c4SThierry Reding }; 542*528925c4SThierry Reding 543*528925c4SThierry Reding pci@2,0 { 544*528925c4SThierry Reding phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>; 545*528925c4SThierry Reding phy-names = "pcie-0"; 546*528925c4SThierry Reding status = "okay"; 547*528925c4SThierry Reding }; 548*528925c4SThierry Reding }; 549