xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunNVIDIA Tegra PCIe controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible: Must be:
5*4882a593Smuzhiyun  - "nvidia,tegra20-pcie": for Tegra20
6*4882a593Smuzhiyun  - "nvidia,tegra30-pcie": for Tegra30
7*4882a593Smuzhiyun  - "nvidia,tegra124-pcie": for Tegra124 and Tegra132
8*4882a593Smuzhiyun  - "nvidia,tegra210-pcie": for Tegra210
9*4882a593Smuzhiyun  - "nvidia,tegra186-pcie": for Tegra186
10*4882a593Smuzhiyun- power-domains: To ungate power partition by BPMP powergate driver. Must
11*4882a593Smuzhiyun  contain BPMP phandle and PCIe power partition ID. This is required only
12*4882a593Smuzhiyun  for Tegra186.
13*4882a593Smuzhiyun- device_type: Must be "pci"
14*4882a593Smuzhiyun- reg: A list of physical base address and length for each set of controller
15*4882a593Smuzhiyun  registers. Must contain an entry for each entry in the reg-names property.
16*4882a593Smuzhiyun- reg-names: Must include the following entries:
17*4882a593Smuzhiyun  "pads": PADS registers
18*4882a593Smuzhiyun  "afi": AFI registers
19*4882a593Smuzhiyun  "cs": configuration space region
20*4882a593Smuzhiyun- interrupts: A list of interrupt outputs of the controller. Must contain an
21*4882a593Smuzhiyun  entry for each entry in the interrupt-names property.
22*4882a593Smuzhiyun- interrupt-names: Must include the following entries:
23*4882a593Smuzhiyun  "intr": The Tegra interrupt that is asserted for controller interrupts
24*4882a593Smuzhiyun  "msi": The Tegra interrupt that is asserted when an MSI is received
25*4882a593Smuzhiyun- bus-range: Range of bus numbers associated with this controller
26*4882a593Smuzhiyun- #address-cells: Address representation for root ports (must be 3)
27*4882a593Smuzhiyun  - cell 0 specifies the bus and device numbers of the root port:
28*4882a593Smuzhiyun    [23:16]: bus number
29*4882a593Smuzhiyun    [15:11]: device number
30*4882a593Smuzhiyun  - cell 1 denotes the upper 32 address bits and should be 0
31*4882a593Smuzhiyun  - cell 2 contains the lower 32 address bits and is used to translate to the
32*4882a593Smuzhiyun    CPU address space
33*4882a593Smuzhiyun- #size-cells: Size representation for root ports (must be 2)
34*4882a593Smuzhiyun- ranges: Describes the translation of addresses for root ports and standard
35*4882a593Smuzhiyun  PCI regions. The entries must be 6 cells each, where the first three cells
36*4882a593Smuzhiyun  correspond to the address as described for the #address-cells property
37*4882a593Smuzhiyun  above, the fourth cell is the physical CPU address to translate to and the
38*4882a593Smuzhiyun  fifth and six cells are as described for the #size-cells property above.
39*4882a593Smuzhiyun  - The first two entries are expected to translate the addresses for the root
40*4882a593Smuzhiyun    port registers, which are referenced by the assigned-addresses property of
41*4882a593Smuzhiyun    the root port nodes (see below).
42*4882a593Smuzhiyun  - The remaining entries setup the mapping for the standard I/O, memory and
43*4882a593Smuzhiyun    prefetchable PCI regions. The first cell determines the type of region
44*4882a593Smuzhiyun    that is setup:
45*4882a593Smuzhiyun    - 0x81000000: I/O memory region
46*4882a593Smuzhiyun    - 0x82000000: non-prefetchable memory region
47*4882a593Smuzhiyun    - 0xc2000000: prefetchable memory region
48*4882a593Smuzhiyun  Please refer to the standard PCI bus binding document for a more detailed
49*4882a593Smuzhiyun  explanation.
50*4882a593Smuzhiyun- #interrupt-cells: Size representation for interrupts (must be 1)
51*4882a593Smuzhiyun- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties
52*4882a593Smuzhiyun  Please refer to the standard PCI bus binding document for a more detailed
53*4882a593Smuzhiyun  explanation.
54*4882a593Smuzhiyun- clocks: Must contain an entry for each entry in clock-names.
55*4882a593Smuzhiyun  See ../clocks/clock-bindings.txt for details.
56*4882a593Smuzhiyun- clock-names: Must include the following entries:
57*4882a593Smuzhiyun  - pex
58*4882a593Smuzhiyun  - afi
59*4882a593Smuzhiyun  - pll_e
60*4882a593Smuzhiyun  - cml (not required for Tegra20)
61*4882a593Smuzhiyun- resets: Must contain an entry for each entry in reset-names.
62*4882a593Smuzhiyun  See ../reset/reset.txt for details.
63*4882a593Smuzhiyun- reset-names: Must include the following entries:
64*4882a593Smuzhiyun  - pex
65*4882a593Smuzhiyun  - afi
66*4882a593Smuzhiyun  - pcie_x
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunOptional properties:
69*4882a593Smuzhiyun- pinctrl-names: A list of pinctrl state names. Must contain the following
70*4882a593Smuzhiyun  entries:
71*4882a593Smuzhiyun  - "default": active state, puts PCIe I/O out of deep power down state
72*4882a593Smuzhiyun  - "idle": puts PCIe I/O into deep power down state
73*4882a593Smuzhiyun- pinctrl-0: phandle for the default/active state of pin configurations.
74*4882a593Smuzhiyun- pinctrl-1: phandle for the idle state of pin configurations.
75*4882a593Smuzhiyun
76*4882a593SmuzhiyunRequired properties on Tegra124 and later (deprecated):
77*4882a593Smuzhiyun- phys: Must contain an entry for each entry in phy-names.
78*4882a593Smuzhiyun- phy-names: Must include the following entries:
79*4882a593Smuzhiyun  - pcie
80*4882a593Smuzhiyun
81*4882a593SmuzhiyunThese properties are deprecated in favour of per-lane PHYs define in each of
82*4882a593Smuzhiyunthe root ports (see below).
83*4882a593Smuzhiyun
84*4882a593SmuzhiyunPower supplies for Tegra20:
85*4882a593Smuzhiyun- avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
86*4882a593Smuzhiyun- vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
87*4882a593Smuzhiyun- avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
88*4882a593Smuzhiyun  supply 1.05 V.
89*4882a593Smuzhiyun- avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
90*4882a593Smuzhiyun  supply 1.05 V.
91*4882a593Smuzhiyun- vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V.
92*4882a593Smuzhiyun
93*4882a593SmuzhiyunPower supplies for Tegra30:
94*4882a593Smuzhiyun- Required:
95*4882a593Smuzhiyun  - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
96*4882a593Smuzhiyun    supply 1.05 V.
97*4882a593Smuzhiyun  - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
98*4882a593Smuzhiyun    supply 1.05 V.
99*4882a593Smuzhiyun  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
100*4882a593Smuzhiyun    supply 1.8 V.
101*4882a593Smuzhiyun  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
102*4882a593Smuzhiyun    Must supply 3.3 V.
103*4882a593Smuzhiyun- Optional:
104*4882a593Smuzhiyun  - If lanes 0 to 3 are used:
105*4882a593Smuzhiyun    - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
106*4882a593Smuzhiyun    - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
107*4882a593Smuzhiyun  - If lanes 4 or 5 are used:
108*4882a593Smuzhiyun    - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
109*4882a593Smuzhiyun    - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
110*4882a593Smuzhiyun
111*4882a593SmuzhiyunPower supplies for Tegra124:
112*4882a593Smuzhiyun- Required:
113*4882a593Smuzhiyun  - avddio-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
114*4882a593Smuzhiyun  - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
115*4882a593Smuzhiyun  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
116*4882a593Smuzhiyun    Must supply 3.3 V.
117*4882a593Smuzhiyun  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
118*4882a593Smuzhiyun    supply 2.8-3.3 V.
119*4882a593Smuzhiyun
120*4882a593SmuzhiyunPower supplies for Tegra210:
121*4882a593Smuzhiyun- Required:
122*4882a593Smuzhiyun  - hvddio-pex-supply: High-voltage supply for PCIe I/O and PCIe output
123*4882a593Smuzhiyun    clocks. Must supply 1.8 V.
124*4882a593Smuzhiyun  - dvddio-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
125*4882a593Smuzhiyun  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
126*4882a593Smuzhiyun    supply 1.8 V.
127*4882a593Smuzhiyun
128*4882a593SmuzhiyunPower supplies for Tegra186:
129*4882a593Smuzhiyun- Required:
130*4882a593Smuzhiyun  - dvdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
131*4882a593Smuzhiyun  - hvdd-pex-pll-supply: High-voltage supply for PLLE (shared with USB3). Must
132*4882a593Smuzhiyun    supply 1.8 V.
133*4882a593Smuzhiyun  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
134*4882a593Smuzhiyun    Must supply 1.8 V.
135*4882a593Smuzhiyun  - vddio-pexctl-aud-supply: Power supply for PCIe side band signals. Must
136*4882a593Smuzhiyun    supply 1.8 V.
137*4882a593Smuzhiyun
138*4882a593SmuzhiyunRoot ports are defined as subnodes of the PCIe controller node.
139*4882a593Smuzhiyun
140*4882a593SmuzhiyunRequired properties:
141*4882a593Smuzhiyun- device_type: Must be "pci"
142*4882a593Smuzhiyun- assigned-addresses: Address and size of the port configuration registers
143*4882a593Smuzhiyun- reg: PCI bus address of the root port
144*4882a593Smuzhiyun- #address-cells: Must be 3
145*4882a593Smuzhiyun- #size-cells: Must be 2
146*4882a593Smuzhiyun- ranges: Sub-ranges distributed from the PCIe controller node. An empty
147*4882a593Smuzhiyun  property is sufficient.
148*4882a593Smuzhiyun- nvidia,num-lanes: Number of lanes to use for this port. Valid combinations
149*4882a593Smuzhiyun  are:
150*4882a593Smuzhiyun  - Root port 0 uses 4 lanes, root port 1 is unused.
151*4882a593Smuzhiyun  - Both root ports use 2 lanes.
152*4882a593Smuzhiyun
153*4882a593SmuzhiyunRequired properties for Tegra124 and later:
154*4882a593Smuzhiyun- phys: Must contain an phandle to a PHY for each entry in phy-names.
155*4882a593Smuzhiyun- phy-names: Must include an entry for each active lane. Note that the number
156*4882a593Smuzhiyun  of entries does not have to (though usually will) be equal to the specified
157*4882a593Smuzhiyun  number of lanes in the nvidia,num-lanes property. Entries are of the form
158*4882a593Smuzhiyun  "pcie-N": where N ranges from 0 to the value specified in nvidia,num-lanes.
159*4882a593Smuzhiyun
160*4882a593SmuzhiyunExamples:
161*4882a593Smuzhiyun=========
162*4882a593Smuzhiyun
163*4882a593SmuzhiyunTegra20:
164*4882a593Smuzhiyun--------
165*4882a593Smuzhiyun
166*4882a593SmuzhiyunSoC DTSI:
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun	pcie-controller@80003000 {
169*4882a593Smuzhiyun		compatible = "nvidia,tegra20-pcie";
170*4882a593Smuzhiyun		device_type = "pci";
171*4882a593Smuzhiyun		reg = <0x80003000 0x00000800   /* PADS registers */
172*4882a593Smuzhiyun		       0x80003800 0x00000200   /* AFI registers */
173*4882a593Smuzhiyun		       0x90000000 0x10000000>; /* configuration space */
174*4882a593Smuzhiyun		reg-names = "pads", "afi", "cs";
175*4882a593Smuzhiyun		interrupts = <0 98 0x04   /* controller interrupt */
176*4882a593Smuzhiyun		              0 99 0x04>; /* MSI interrupt */
177*4882a593Smuzhiyun		interrupt-names = "intr", "msi";
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun		#interrupt-cells = <1>;
180*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
181*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun		bus-range = <0x00 0xff>;
184*4882a593Smuzhiyun		#address-cells = <3>;
185*4882a593Smuzhiyun		#size-cells = <2>;
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun		ranges = <0x82000000 0 0x80000000 0x80000000 0 0x00001000   /* port 0 registers */
188*4882a593Smuzhiyun			  0x82000000 0 0x80001000 0x80001000 0 0x00001000   /* port 1 registers */
189*4882a593Smuzhiyun			  0x81000000 0 0          0x82000000 0 0x00010000   /* downstream I/O */
190*4882a593Smuzhiyun			  0x82000000 0 0xa0000000 0xa0000000 0 0x10000000   /* non-prefetchable memory */
191*4882a593Smuzhiyun			  0xc2000000 0 0xb0000000 0xb0000000 0 0x10000000>; /* prefetchable memory */
192*4882a593Smuzhiyun
193*4882a593Smuzhiyun		clocks = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 118>;
194*4882a593Smuzhiyun		clock-names = "pex", "afi", "pll_e";
195*4882a593Smuzhiyun		resets = <&tegra_car 70>, <&tegra_car 72>, <&tegra_car 74>;
196*4882a593Smuzhiyun		reset-names = "pex", "afi", "pcie_x";
197*4882a593Smuzhiyun		status = "disabled";
198*4882a593Smuzhiyun
199*4882a593Smuzhiyun		pci@1,0 {
200*4882a593Smuzhiyun			device_type = "pci";
201*4882a593Smuzhiyun			assigned-addresses = <0x82000800 0 0x80000000 0 0x1000>;
202*4882a593Smuzhiyun			reg = <0x000800 0 0 0 0>;
203*4882a593Smuzhiyun			status = "disabled";
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun			#address-cells = <3>;
206*4882a593Smuzhiyun			#size-cells = <2>;
207*4882a593Smuzhiyun
208*4882a593Smuzhiyun			ranges;
209*4882a593Smuzhiyun
210*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
211*4882a593Smuzhiyun		};
212*4882a593Smuzhiyun
213*4882a593Smuzhiyun		pci@2,0 {
214*4882a593Smuzhiyun			device_type = "pci";
215*4882a593Smuzhiyun			assigned-addresses = <0x82001000 0 0x80001000 0 0x1000>;
216*4882a593Smuzhiyun			reg = <0x001000 0 0 0 0>;
217*4882a593Smuzhiyun			status = "disabled";
218*4882a593Smuzhiyun
219*4882a593Smuzhiyun			#address-cells = <3>;
220*4882a593Smuzhiyun			#size-cells = <2>;
221*4882a593Smuzhiyun
222*4882a593Smuzhiyun			ranges;
223*4882a593Smuzhiyun
224*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
225*4882a593Smuzhiyun		};
226*4882a593Smuzhiyun	};
227*4882a593Smuzhiyun
228*4882a593SmuzhiyunBoard DTS:
229*4882a593Smuzhiyun
230*4882a593Smuzhiyun	pcie-controller@80003000 {
231*4882a593Smuzhiyun		status = "okay";
232*4882a593Smuzhiyun
233*4882a593Smuzhiyun		vdd-supply = <&pci_vdd_reg>;
234*4882a593Smuzhiyun		pex-clk-supply = <&pci_clk_reg>;
235*4882a593Smuzhiyun
236*4882a593Smuzhiyun		/* root port 00:01.0 */
237*4882a593Smuzhiyun		pci@1,0 {
238*4882a593Smuzhiyun			status = "okay";
239*4882a593Smuzhiyun
240*4882a593Smuzhiyun			/* bridge 01:00.0 (optional) */
241*4882a593Smuzhiyun			pci@0,0 {
242*4882a593Smuzhiyun				reg = <0x010000 0 0 0 0>;
243*4882a593Smuzhiyun
244*4882a593Smuzhiyun				#address-cells = <3>;
245*4882a593Smuzhiyun				#size-cells = <2>;
246*4882a593Smuzhiyun
247*4882a593Smuzhiyun				device_type = "pci";
248*4882a593Smuzhiyun
249*4882a593Smuzhiyun				/* endpoint 02:00.0 */
250*4882a593Smuzhiyun				pci@0,0 {
251*4882a593Smuzhiyun					reg = <0x020000 0 0 0 0>;
252*4882a593Smuzhiyun				};
253*4882a593Smuzhiyun			};
254*4882a593Smuzhiyun		};
255*4882a593Smuzhiyun	};
256*4882a593Smuzhiyun
257*4882a593SmuzhiyunNote that devices on the PCI bus are dynamically discovered using PCI's bus
258*4882a593Smuzhiyunenumeration and therefore don't need corresponding device nodes in DT. However
259*4882a593Smuzhiyunif a device on the PCI bus provides a non-probeable bus such as I2C or SPI,
260*4882a593Smuzhiyundevice nodes need to be added in order to allow the bus' children to be
261*4882a593Smuzhiyuninstantiated at the proper location in the operating system's device tree (as
262*4882a593Smuzhiyunillustrated by the optional nodes in the example above).
263*4882a593Smuzhiyun
264*4882a593SmuzhiyunTegra30:
265*4882a593Smuzhiyun--------
266*4882a593Smuzhiyun
267*4882a593SmuzhiyunSoC DTSI:
268*4882a593Smuzhiyun
269*4882a593Smuzhiyun	pcie-controller@3000 {
270*4882a593Smuzhiyun		compatible = "nvidia,tegra30-pcie";
271*4882a593Smuzhiyun		device_type = "pci";
272*4882a593Smuzhiyun		reg = <0x00003000 0x00000800   /* PADS registers */
273*4882a593Smuzhiyun		       0x00003800 0x00000200   /* AFI registers */
274*4882a593Smuzhiyun		       0x10000000 0x10000000>; /* configuration space */
275*4882a593Smuzhiyun		reg-names = "pads", "afi", "cs";
276*4882a593Smuzhiyun		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH   /* controller interrupt */
277*4882a593Smuzhiyun			      GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
278*4882a593Smuzhiyun		interrupt-names = "intr", "msi";
279*4882a593Smuzhiyun
280*4882a593Smuzhiyun		#interrupt-cells = <1>;
281*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
282*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
283*4882a593Smuzhiyun
284*4882a593Smuzhiyun		bus-range = <0x00 0xff>;
285*4882a593Smuzhiyun		#address-cells = <3>;
286*4882a593Smuzhiyun		#size-cells = <2>;
287*4882a593Smuzhiyun
288*4882a593Smuzhiyun		ranges = <0x82000000 0 0x00000000 0x00000000 0 0x00001000   /* port 0 configuration space */
289*4882a593Smuzhiyun			  0x82000000 0 0x00001000 0x00001000 0 0x00001000   /* port 1 configuration space */
290*4882a593Smuzhiyun			  0x82000000 0 0x00004000 0x00004000 0 0x00001000   /* port 2 configuration space */
291*4882a593Smuzhiyun			  0x81000000 0 0          0x02000000 0 0x00010000   /* downstream I/O */
292*4882a593Smuzhiyun			  0x82000000 0 0x20000000 0x20000000 0 0x08000000   /* non-prefetchable memory */
293*4882a593Smuzhiyun			  0xc2000000 0 0x28000000 0x28000000 0 0x18000000>; /* prefetchable memory */
294*4882a593Smuzhiyun
295*4882a593Smuzhiyun		clocks = <&tegra_car TEGRA30_CLK_PCIE>,
296*4882a593Smuzhiyun			 <&tegra_car TEGRA30_CLK_AFI>,
297*4882a593Smuzhiyun			 <&tegra_car TEGRA30_CLK_PLL_E>,
298*4882a593Smuzhiyun			 <&tegra_car TEGRA30_CLK_CML0>;
299*4882a593Smuzhiyun		clock-names = "pex", "afi", "pll_e", "cml";
300*4882a593Smuzhiyun		resets = <&tegra_car 70>,
301*4882a593Smuzhiyun			 <&tegra_car 72>,
302*4882a593Smuzhiyun			 <&tegra_car 74>;
303*4882a593Smuzhiyun		reset-names = "pex", "afi", "pcie_x";
304*4882a593Smuzhiyun		status = "disabled";
305*4882a593Smuzhiyun
306*4882a593Smuzhiyun		pci@1,0 {
307*4882a593Smuzhiyun			device_type = "pci";
308*4882a593Smuzhiyun			assigned-addresses = <0x82000800 0 0x00000000 0 0x1000>;
309*4882a593Smuzhiyun			reg = <0x000800 0 0 0 0>;
310*4882a593Smuzhiyun			status = "disabled";
311*4882a593Smuzhiyun
312*4882a593Smuzhiyun			#address-cells = <3>;
313*4882a593Smuzhiyun			#size-cells = <2>;
314*4882a593Smuzhiyun			ranges;
315*4882a593Smuzhiyun
316*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
317*4882a593Smuzhiyun		};
318*4882a593Smuzhiyun
319*4882a593Smuzhiyun		pci@2,0 {
320*4882a593Smuzhiyun			device_type = "pci";
321*4882a593Smuzhiyun			assigned-addresses = <0x82001000 0 0x00001000 0 0x1000>;
322*4882a593Smuzhiyun			reg = <0x001000 0 0 0 0>;
323*4882a593Smuzhiyun			status = "disabled";
324*4882a593Smuzhiyun
325*4882a593Smuzhiyun			#address-cells = <3>;
326*4882a593Smuzhiyun			#size-cells = <2>;
327*4882a593Smuzhiyun			ranges;
328*4882a593Smuzhiyun
329*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
330*4882a593Smuzhiyun		};
331*4882a593Smuzhiyun
332*4882a593Smuzhiyun		pci@3,0 {
333*4882a593Smuzhiyun			device_type = "pci";
334*4882a593Smuzhiyun			assigned-addresses = <0x82001800 0 0x00004000 0 0x1000>;
335*4882a593Smuzhiyun			reg = <0x001800 0 0 0 0>;
336*4882a593Smuzhiyun			status = "disabled";
337*4882a593Smuzhiyun
338*4882a593Smuzhiyun			#address-cells = <3>;
339*4882a593Smuzhiyun			#size-cells = <2>;
340*4882a593Smuzhiyun			ranges;
341*4882a593Smuzhiyun
342*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
343*4882a593Smuzhiyun		};
344*4882a593Smuzhiyun	};
345*4882a593Smuzhiyun
346*4882a593SmuzhiyunBoard DTS:
347*4882a593Smuzhiyun
348*4882a593Smuzhiyun	pcie-controller@3000 {
349*4882a593Smuzhiyun		status = "okay";
350*4882a593Smuzhiyun
351*4882a593Smuzhiyun		avdd-pexa-supply = <&ldo1_reg>;
352*4882a593Smuzhiyun		vdd-pexa-supply = <&ldo1_reg>;
353*4882a593Smuzhiyun		avdd-pexb-supply = <&ldo1_reg>;
354*4882a593Smuzhiyun		vdd-pexb-supply = <&ldo1_reg>;
355*4882a593Smuzhiyun		avdd-pex-pll-supply = <&ldo1_reg>;
356*4882a593Smuzhiyun		avdd-plle-supply = <&ldo1_reg>;
357*4882a593Smuzhiyun		vddio-pex-ctl-supply = <&sys_3v3_reg>;
358*4882a593Smuzhiyun		hvdd-pex-supply = <&sys_3v3_pexs_reg>;
359*4882a593Smuzhiyun
360*4882a593Smuzhiyun		pci@1,0 {
361*4882a593Smuzhiyun			status = "okay";
362*4882a593Smuzhiyun		};
363*4882a593Smuzhiyun
364*4882a593Smuzhiyun		pci@3,0 {
365*4882a593Smuzhiyun			status = "okay";
366*4882a593Smuzhiyun		};
367*4882a593Smuzhiyun	};
368*4882a593Smuzhiyun
369*4882a593SmuzhiyunTegra124:
370*4882a593Smuzhiyun---------
371*4882a593Smuzhiyun
372*4882a593SmuzhiyunSoC DTSI:
373*4882a593Smuzhiyun
374*4882a593Smuzhiyun	pcie-controller@1003000 {
375*4882a593Smuzhiyun		compatible = "nvidia,tegra124-pcie";
376*4882a593Smuzhiyun		device_type = "pci";
377*4882a593Smuzhiyun		reg = <0x0 0x01003000 0x0 0x00000800   /* PADS registers */
378*4882a593Smuzhiyun		       0x0 0x01003800 0x0 0x00000800   /* AFI registers */
379*4882a593Smuzhiyun		       0x0 0x02000000 0x0 0x10000000>; /* configuration space */
380*4882a593Smuzhiyun		reg-names = "pads", "afi", "cs";
381*4882a593Smuzhiyun		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
382*4882a593Smuzhiyun			     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
383*4882a593Smuzhiyun		interrupt-names = "intr", "msi";
384*4882a593Smuzhiyun
385*4882a593Smuzhiyun		#interrupt-cells = <1>;
386*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
387*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
388*4882a593Smuzhiyun
389*4882a593Smuzhiyun		bus-range = <0x00 0xff>;
390*4882a593Smuzhiyun		#address-cells = <3>;
391*4882a593Smuzhiyun		#size-cells = <2>;
392*4882a593Smuzhiyun
393*4882a593Smuzhiyun		ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000   /* port 0 configuration space */
394*4882a593Smuzhiyun			  0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000   /* port 1 configuration space */
395*4882a593Smuzhiyun			  0x81000000 0 0x0        0x0 0x12000000 0 0x00010000   /* downstream I/O (64 KiB) */
396*4882a593Smuzhiyun			  0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000   /* non-prefetchable memory (208 MiB) */
397*4882a593Smuzhiyun			  0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */
398*4882a593Smuzhiyun
399*4882a593Smuzhiyun		clocks = <&tegra_car TEGRA124_CLK_PCIE>,
400*4882a593Smuzhiyun			 <&tegra_car TEGRA124_CLK_AFI>,
401*4882a593Smuzhiyun			 <&tegra_car TEGRA124_CLK_PLL_E>,
402*4882a593Smuzhiyun			 <&tegra_car TEGRA124_CLK_CML0>;
403*4882a593Smuzhiyun		clock-names = "pex", "afi", "pll_e", "cml";
404*4882a593Smuzhiyun		resets = <&tegra_car 70>,
405*4882a593Smuzhiyun			 <&tegra_car 72>,
406*4882a593Smuzhiyun			 <&tegra_car 74>;
407*4882a593Smuzhiyun		reset-names = "pex", "afi", "pcie_x";
408*4882a593Smuzhiyun		status = "disabled";
409*4882a593Smuzhiyun
410*4882a593Smuzhiyun		pci@1,0 {
411*4882a593Smuzhiyun			device_type = "pci";
412*4882a593Smuzhiyun			assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>;
413*4882a593Smuzhiyun			reg = <0x000800 0 0 0 0>;
414*4882a593Smuzhiyun			status = "disabled";
415*4882a593Smuzhiyun
416*4882a593Smuzhiyun			#address-cells = <3>;
417*4882a593Smuzhiyun			#size-cells = <2>;
418*4882a593Smuzhiyun			ranges;
419*4882a593Smuzhiyun
420*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
421*4882a593Smuzhiyun		};
422*4882a593Smuzhiyun
423*4882a593Smuzhiyun		pci@2,0 {
424*4882a593Smuzhiyun			device_type = "pci";
425*4882a593Smuzhiyun			assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>;
426*4882a593Smuzhiyun			reg = <0x001000 0 0 0 0>;
427*4882a593Smuzhiyun			status = "disabled";
428*4882a593Smuzhiyun
429*4882a593Smuzhiyun			#address-cells = <3>;
430*4882a593Smuzhiyun			#size-cells = <2>;
431*4882a593Smuzhiyun			ranges;
432*4882a593Smuzhiyun
433*4882a593Smuzhiyun			nvidia,num-lanes = <1>;
434*4882a593Smuzhiyun		};
435*4882a593Smuzhiyun	};
436*4882a593Smuzhiyun
437*4882a593SmuzhiyunBoard DTS:
438*4882a593Smuzhiyun
439*4882a593Smuzhiyun	pcie-controller@1003000 {
440*4882a593Smuzhiyun		status = "okay";
441*4882a593Smuzhiyun
442*4882a593Smuzhiyun		avddio-pex-supply = <&vdd_1v05_run>;
443*4882a593Smuzhiyun		dvddio-pex-supply = <&vdd_1v05_run>;
444*4882a593Smuzhiyun		avdd-pex-pll-supply = <&vdd_1v05_run>;
445*4882a593Smuzhiyun		hvdd-pex-supply = <&vdd_3v3_lp0>;
446*4882a593Smuzhiyun		hvdd-pex-pll-e-supply = <&vdd_3v3_lp0>;
447*4882a593Smuzhiyun		vddio-pex-ctl-supply = <&vdd_3v3_lp0>;
448*4882a593Smuzhiyun		avdd-pll-erefe-supply = <&avdd_1v05_run>;
449*4882a593Smuzhiyun
450*4882a593Smuzhiyun		/* Mini PCIe */
451*4882a593Smuzhiyun		pci@1,0 {
452*4882a593Smuzhiyun			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
453*4882a593Smuzhiyun			phy-names = "pcie-0";
454*4882a593Smuzhiyun			status = "okay";
455*4882a593Smuzhiyun		};
456*4882a593Smuzhiyun
457*4882a593Smuzhiyun		/* Gigabit Ethernet */
458*4882a593Smuzhiyun		pci@2,0 {
459*4882a593Smuzhiyun			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
460*4882a593Smuzhiyun			phy-names = "pcie-0";
461*4882a593Smuzhiyun			status = "okay";
462*4882a593Smuzhiyun		};
463*4882a593Smuzhiyun	};
464*4882a593Smuzhiyun
465*4882a593SmuzhiyunTegra210:
466*4882a593Smuzhiyun---------
467*4882a593Smuzhiyun
468*4882a593SmuzhiyunSoC DTSI:
469*4882a593Smuzhiyun
470*4882a593Smuzhiyun	pcie-controller@1003000 {
471*4882a593Smuzhiyun		compatible = "nvidia,tegra210-pcie";
472*4882a593Smuzhiyun		device_type = "pci";
473*4882a593Smuzhiyun		reg = <0x0 0x01003000 0x0 0x00000800   /* PADS registers */
474*4882a593Smuzhiyun		       0x0 0x01003800 0x0 0x00000800   /* AFI registers */
475*4882a593Smuzhiyun		       0x0 0x02000000 0x0 0x10000000>; /* configuration space */
476*4882a593Smuzhiyun		reg-names = "pads", "afi", "cs";
477*4882a593Smuzhiyun		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
478*4882a593Smuzhiyun			     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
479*4882a593Smuzhiyun		interrupt-names = "intr", "msi";
480*4882a593Smuzhiyun
481*4882a593Smuzhiyun		#interrupt-cells = <1>;
482*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
483*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
484*4882a593Smuzhiyun
485*4882a593Smuzhiyun		bus-range = <0x00 0xff>;
486*4882a593Smuzhiyun		#address-cells = <3>;
487*4882a593Smuzhiyun		#size-cells = <2>;
488*4882a593Smuzhiyun
489*4882a593Smuzhiyun		ranges = <0x82000000 0 0x01000000 0x0 0x01000000 0 0x00001000   /* port 0 configuration space */
490*4882a593Smuzhiyun			  0x82000000 0 0x01001000 0x0 0x01001000 0 0x00001000   /* port 1 configuration space */
491*4882a593Smuzhiyun			  0x81000000 0 0x0        0x0 0x12000000 0 0x00010000   /* downstream I/O (64 KiB) */
492*4882a593Smuzhiyun			  0x82000000 0 0x13000000 0x0 0x13000000 0 0x0d000000   /* non-prefetchable memory (208 MiB) */
493*4882a593Smuzhiyun			  0xc2000000 0 0x20000000 0x0 0x20000000 0 0x20000000>; /* prefetchable memory (512 MiB) */
494*4882a593Smuzhiyun
495*4882a593Smuzhiyun		clocks = <&tegra_car TEGRA210_CLK_PCIE>,
496*4882a593Smuzhiyun			 <&tegra_car TEGRA210_CLK_AFI>,
497*4882a593Smuzhiyun			 <&tegra_car TEGRA210_CLK_PLL_E>,
498*4882a593Smuzhiyun			 <&tegra_car TEGRA210_CLK_CML0>;
499*4882a593Smuzhiyun		clock-names = "pex", "afi", "pll_e", "cml";
500*4882a593Smuzhiyun		resets = <&tegra_car 70>,
501*4882a593Smuzhiyun			 <&tegra_car 72>,
502*4882a593Smuzhiyun			 <&tegra_car 74>;
503*4882a593Smuzhiyun		reset-names = "pex", "afi", "pcie_x";
504*4882a593Smuzhiyun		status = "disabled";
505*4882a593Smuzhiyun
506*4882a593Smuzhiyun		pci@1,0 {
507*4882a593Smuzhiyun			device_type = "pci";
508*4882a593Smuzhiyun			assigned-addresses = <0x82000800 0 0x01000000 0 0x1000>;
509*4882a593Smuzhiyun			reg = <0x000800 0 0 0 0>;
510*4882a593Smuzhiyun			status = "disabled";
511*4882a593Smuzhiyun
512*4882a593Smuzhiyun			#address-cells = <3>;
513*4882a593Smuzhiyun			#size-cells = <2>;
514*4882a593Smuzhiyun			ranges;
515*4882a593Smuzhiyun
516*4882a593Smuzhiyun			nvidia,num-lanes = <4>;
517*4882a593Smuzhiyun		};
518*4882a593Smuzhiyun
519*4882a593Smuzhiyun		pci@2,0 {
520*4882a593Smuzhiyun			device_type = "pci";
521*4882a593Smuzhiyun			assigned-addresses = <0x82001000 0 0x01001000 0 0x1000>;
522*4882a593Smuzhiyun			reg = <0x001000 0 0 0 0>;
523*4882a593Smuzhiyun			status = "disabled";
524*4882a593Smuzhiyun
525*4882a593Smuzhiyun			#address-cells = <3>;
526*4882a593Smuzhiyun			#size-cells = <2>;
527*4882a593Smuzhiyun			ranges;
528*4882a593Smuzhiyun
529*4882a593Smuzhiyun			nvidia,num-lanes = <1>;
530*4882a593Smuzhiyun		};
531*4882a593Smuzhiyun	};
532*4882a593Smuzhiyun
533*4882a593SmuzhiyunBoard DTS:
534*4882a593Smuzhiyun
535*4882a593Smuzhiyun	pcie-controller@1003000 {
536*4882a593Smuzhiyun		status = "okay";
537*4882a593Smuzhiyun
538*4882a593Smuzhiyun		avdd-pll-uerefe-supply = <&avdd_1v05_pll>;
539*4882a593Smuzhiyun		hvddio-pex-supply = <&vdd_1v8>;
540*4882a593Smuzhiyun		dvddio-pex-supply = <&vdd_pex_1v05>;
541*4882a593Smuzhiyun		dvdd-pex-pll-supply = <&vdd_pex_1v05>;
542*4882a593Smuzhiyun		hvdd-pex-pll-e-supply = <&vdd_1v8>;
543*4882a593Smuzhiyun		vddio-pex-ctl-supply = <&vdd_1v8>;
544*4882a593Smuzhiyun
545*4882a593Smuzhiyun		pci@1,0 {
546*4882a593Smuzhiyun			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>,
547*4882a593Smuzhiyun			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-1}>,
548*4882a593Smuzhiyun			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>,
549*4882a593Smuzhiyun			       <&{/padctl@7009f000/pads/pcie/lanes/pcie-3}>;
550*4882a593Smuzhiyun			phy-names = "pcie-0", "pcie-1", "pcie-2", "pcie-3";
551*4882a593Smuzhiyun			status = "okay";
552*4882a593Smuzhiyun		};
553*4882a593Smuzhiyun
554*4882a593Smuzhiyun		pci@2,0 {
555*4882a593Smuzhiyun			phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
556*4882a593Smuzhiyun			phy-names = "pcie-0";
557*4882a593Smuzhiyun			status = "okay";
558*4882a593Smuzhiyun		};
559*4882a593Smuzhiyun	};
560*4882a593Smuzhiyun
561*4882a593SmuzhiyunTegra186:
562*4882a593Smuzhiyun---------
563*4882a593Smuzhiyun
564*4882a593SmuzhiyunSoC DTSI:
565*4882a593Smuzhiyun
566*4882a593Smuzhiyun	pcie@10003000 {
567*4882a593Smuzhiyun		compatible = "nvidia,tegra186-pcie";
568*4882a593Smuzhiyun		power-domains = <&bpmp TEGRA186_POWER_DOMAIN_PCX>;
569*4882a593Smuzhiyun		device_type = "pci";
570*4882a593Smuzhiyun		reg = <0x0 0x10003000 0x0 0x00000800   /* PADS registers */
571*4882a593Smuzhiyun		       0x0 0x10003800 0x0 0x00000800   /* AFI registers */
572*4882a593Smuzhiyun		       0x0 0x40000000 0x0 0x10000000>; /* configuration space */
573*4882a593Smuzhiyun		reg-names = "pads", "afi", "cs";
574*4882a593Smuzhiyun
575*4882a593Smuzhiyun		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */
576*4882a593Smuzhiyun			     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */
577*4882a593Smuzhiyun		interrupt-names = "intr", "msi";
578*4882a593Smuzhiyun
579*4882a593Smuzhiyun		#interrupt-cells = <1>;
580*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
581*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
582*4882a593Smuzhiyun
583*4882a593Smuzhiyun		bus-range = <0x00 0xff>;
584*4882a593Smuzhiyun		#address-cells = <3>;
585*4882a593Smuzhiyun		#size-cells = <2>;
586*4882a593Smuzhiyun
587*4882a593Smuzhiyun		ranges = <0x82000000 0 0x10000000 0x0 0x10000000 0 0x00001000   /* port 0 configuration space */
588*4882a593Smuzhiyun			  0x82000000 0 0x10001000 0x0 0x10001000 0 0x00001000   /* port 1 configuration space */
589*4882a593Smuzhiyun			  0x82000000 0 0x10004000 0x0 0x10004000 0 0x00001000   /* port 2 configuration space */
590*4882a593Smuzhiyun			  0x81000000 0 0x0        0x0 0x50000000 0 0x00010000   /* downstream I/O (64 KiB) */
591*4882a593Smuzhiyun			  0x82000000 0 0x50100000 0x0 0x50100000 0 0x07F00000   /* non-prefetchable memory (127 MiB) */
592*4882a593Smuzhiyun			  0xc2000000 0 0x58000000 0x0 0x58000000 0 0x28000000>; /* prefetchable memory (640 MiB) */
593*4882a593Smuzhiyun
594*4882a593Smuzhiyun		clocks = <&bpmp TEGRA186_CLK_AFI>,
595*4882a593Smuzhiyun			 <&bpmp TEGRA186_CLK_PCIE>,
596*4882a593Smuzhiyun			 <&bpmp TEGRA186_CLK_PLLE>;
597*4882a593Smuzhiyun		clock-names = "afi", "pex", "pll_e";
598*4882a593Smuzhiyun
599*4882a593Smuzhiyun		resets = <&bpmp TEGRA186_RESET_AFI>,
600*4882a593Smuzhiyun			 <&bpmp TEGRA186_RESET_PCIE>,
601*4882a593Smuzhiyun			 <&bpmp TEGRA186_RESET_PCIEXCLK>;
602*4882a593Smuzhiyun		reset-names = "afi", "pex", "pcie_x";
603*4882a593Smuzhiyun
604*4882a593Smuzhiyun		status = "disabled";
605*4882a593Smuzhiyun
606*4882a593Smuzhiyun		pci@1,0 {
607*4882a593Smuzhiyun			device_type = "pci";
608*4882a593Smuzhiyun			assigned-addresses = <0x82000800 0 0x10000000 0 0x1000>;
609*4882a593Smuzhiyun			reg = <0x000800 0 0 0 0>;
610*4882a593Smuzhiyun			status = "disabled";
611*4882a593Smuzhiyun
612*4882a593Smuzhiyun			#address-cells = <3>;
613*4882a593Smuzhiyun			#size-cells = <2>;
614*4882a593Smuzhiyun			ranges;
615*4882a593Smuzhiyun
616*4882a593Smuzhiyun			nvidia,num-lanes = <2>;
617*4882a593Smuzhiyun		};
618*4882a593Smuzhiyun
619*4882a593Smuzhiyun		pci@2,0 {
620*4882a593Smuzhiyun			device_type = "pci";
621*4882a593Smuzhiyun			assigned-addresses = <0x82001000 0 0x10001000 0 0x1000>;
622*4882a593Smuzhiyun			reg = <0x001000 0 0 0 0>;
623*4882a593Smuzhiyun			status = "disabled";
624*4882a593Smuzhiyun
625*4882a593Smuzhiyun			#address-cells = <3>;
626*4882a593Smuzhiyun			#size-cells = <2>;
627*4882a593Smuzhiyun			ranges;
628*4882a593Smuzhiyun
629*4882a593Smuzhiyun			nvidia,num-lanes = <1>;
630*4882a593Smuzhiyun		};
631*4882a593Smuzhiyun
632*4882a593Smuzhiyun		pci@3,0 {
633*4882a593Smuzhiyun			device_type = "pci";
634*4882a593Smuzhiyun			assigned-addresses = <0x82001800 0 0x10004000 0 0x1000>;
635*4882a593Smuzhiyun			reg = <0x001800 0 0 0 0>;
636*4882a593Smuzhiyun			status = "disabled";
637*4882a593Smuzhiyun
638*4882a593Smuzhiyun			#address-cells = <3>;
639*4882a593Smuzhiyun			#size-cells = <2>;
640*4882a593Smuzhiyun			ranges;
641*4882a593Smuzhiyun
642*4882a593Smuzhiyun			nvidia,num-lanes = <1>;
643*4882a593Smuzhiyun		};
644*4882a593Smuzhiyun	};
645*4882a593Smuzhiyun
646*4882a593SmuzhiyunBoard DTS:
647*4882a593Smuzhiyun
648*4882a593Smuzhiyun	pcie@10003000 {
649*4882a593Smuzhiyun		status = "okay";
650*4882a593Smuzhiyun
651*4882a593Smuzhiyun		dvdd-pex-supply = <&vdd_pex>;
652*4882a593Smuzhiyun		hvdd-pex-pll-supply = <&vdd_1v8>;
653*4882a593Smuzhiyun		hvdd-pex-supply = <&vdd_1v8>;
654*4882a593Smuzhiyun		vddio-pexctl-aud-supply = <&vdd_1v8>;
655*4882a593Smuzhiyun
656*4882a593Smuzhiyun		pci@1,0 {
657*4882a593Smuzhiyun			nvidia,num-lanes = <4>;
658*4882a593Smuzhiyun			status = "okay";
659*4882a593Smuzhiyun		};
660*4882a593Smuzhiyun
661*4882a593Smuzhiyun		pci@2,0 {
662*4882a593Smuzhiyun			nvidia,num-lanes = <0>;
663*4882a593Smuzhiyun			status = "disabled";
664*4882a593Smuzhiyun		};
665*4882a593Smuzhiyun
666*4882a593Smuzhiyun		pci@3,0 {
667*4882a593Smuzhiyun			nvidia,num-lanes = <1>;
668*4882a593Smuzhiyun			status = "disabled";
669*4882a593Smuzhiyun		};
670*4882a593Smuzhiyun	};
671