xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pci/mvebu-pci.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Marvell EBU PCIe interfaces
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunMandatory properties:
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun- compatible: one of the following values:
6*4882a593Smuzhiyun    marvell,armada-370-pcie
7*4882a593Smuzhiyun    marvell,armada-xp-pcie
8*4882a593Smuzhiyun    marvell,dove-pcie
9*4882a593Smuzhiyun    marvell,kirkwood-pcie
10*4882a593Smuzhiyun- #address-cells, set to <3>
11*4882a593Smuzhiyun- #size-cells, set to <2>
12*4882a593Smuzhiyun- #interrupt-cells, set to <1>
13*4882a593Smuzhiyun- bus-range: PCI bus numbers covered
14*4882a593Smuzhiyun- device_type, set to "pci"
15*4882a593Smuzhiyun- ranges: ranges describing the MMIO registers to control the PCIe
16*4882a593Smuzhiyun  interfaces, and ranges describing the MBus windows needed to access
17*4882a593Smuzhiyun  the memory and I/O regions of each PCIe interface.
18*4882a593Smuzhiyun- msi-parent: Link to the hardware entity that serves as the Message
19*4882a593Smuzhiyun  Signaled Interrupt controller for this PCI controller.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunThe ranges describing the MMIO registers have the following layout:
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun    0x82000000 0 r MBUS_ID(0xf0, 0x01) r 0 s
24*4882a593Smuzhiyun
25*4882a593Smuzhiyunwhere:
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  * r is a 32-bits value that gives the offset of the MMIO
28*4882a593Smuzhiyun  registers of this PCIe interface, from the base of the internal
29*4882a593Smuzhiyun  registers.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun  * s is a 32-bits value that give the size of this MMIO
32*4882a593Smuzhiyun  registers area. This range entry translates the '0x82000000 0 r' PCI
33*4882a593Smuzhiyun  address into the 'MBUS_ID(0xf0, 0x01) r' CPU address, which is part
34*4882a593Smuzhiyun  of the internal register window (as identified by MBUS_ID(0xf0,
35*4882a593Smuzhiyun  0x01)).
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunThe ranges describing the MBus windows have the following layout:
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun    0x8t000000 s 0     MBUS_ID(w, a) 0 1 0
40*4882a593Smuzhiyun
41*4882a593Smuzhiyunwhere:
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun   * t is the type of the MBus window (as defined by the standard PCI DT
44*4882a593Smuzhiyun   bindings), 1 for I/O and 2 for memory.
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun   * s is the PCI slot that corresponds to this PCIe interface
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun   * w is the 'target ID' value for the MBus window
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun   * a the 'attribute' value for the MBus window.
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunSince the location and size of the different MBus windows is not fixed in
53*4882a593Smuzhiyunhardware, and only determined in runtime, those ranges cover the full first
54*4882a593Smuzhiyun4 GB of the physical address space, and do not translate into a valid CPU
55*4882a593Smuzhiyunaddress.
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunIn addition, the device tree node must have sub-nodes describing each
58*4882a593SmuzhiyunPCIe interface, having the following mandatory properties:
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun- reg: used only for interrupt mapping, so only the first four bytes
61*4882a593Smuzhiyun  are used to refer to the correct bus number and device number.
62*4882a593Smuzhiyun- assigned-addresses: reference to the MMIO registers used to control
63*4882a593Smuzhiyun  this PCIe interface.
64*4882a593Smuzhiyun- clocks: the clock associated to this PCIe interface
65*4882a593Smuzhiyun- marvell,pcie-port: the physical PCIe port number
66*4882a593Smuzhiyun- status: either "disabled" or "okay"
67*4882a593Smuzhiyun- device_type, set to "pci"
68*4882a593Smuzhiyun- #address-cells, set to <3>
69*4882a593Smuzhiyun- #size-cells, set to <2>
70*4882a593Smuzhiyun- #interrupt-cells, set to <1>
71*4882a593Smuzhiyun- ranges, translating the MBus windows ranges of the parent node into
72*4882a593Smuzhiyun  standard PCI addresses.
73*4882a593Smuzhiyun- interrupt-map-mask and interrupt-map, standard PCI properties to
74*4882a593Smuzhiyun  define the mapping of the PCIe interface to interrupt numbers.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyunand the following optional properties:
77*4882a593Smuzhiyun- marvell,pcie-lane: the physical PCIe lane number, for ports having
78*4882a593Smuzhiyun  multiple lanes. If this property is not found, we assume that the
79*4882a593Smuzhiyun  value is 0.
80*4882a593Smuzhiyun- reset-gpios: optional GPIO to PERST#
81*4882a593Smuzhiyun- reset-delay-us: delay in us to wait after reset de-assertion, if not
82*4882a593Smuzhiyun  specified will default to 100ms, as required by the PCIe specification.
83*4882a593Smuzhiyun
84*4882a593SmuzhiyunExample:
85*4882a593Smuzhiyun
86*4882a593Smuzhiyunpcie-controller {
87*4882a593Smuzhiyun	compatible = "marvell,armada-xp-pcie";
88*4882a593Smuzhiyun	device_type = "pci";
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun	#address-cells = <3>;
91*4882a593Smuzhiyun	#size-cells = <2>;
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun	bus-range = <0x00 0xff>;
94*4882a593Smuzhiyun	msi-parent = <&mpic>;
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun	ranges =
97*4882a593Smuzhiyun	       <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000	/* Port 0.0 registers */
98*4882a593Smuzhiyun		0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000	/* Port 2.0 registers */
99*4882a593Smuzhiyun		0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000	/* Port 0.1 registers */
100*4882a593Smuzhiyun		0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000	/* Port 0.2 registers */
101*4882a593Smuzhiyun		0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000	/* Port 0.3 registers */
102*4882a593Smuzhiyun		0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000	/* Port 1.0 registers */
103*4882a593Smuzhiyun		0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000	/* Port 3.0 registers */
104*4882a593Smuzhiyun		0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000	/* Port 1.1 registers */
105*4882a593Smuzhiyun		0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000	/* Port 1.2 registers */
106*4882a593Smuzhiyun		0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000	/* Port 1.3 registers */
107*4882a593Smuzhiyun		0x82000000 0x1 0     MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
108*4882a593Smuzhiyun		0x81000000 0x1 0     MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO  */
109*4882a593Smuzhiyun		0x82000000 0x2 0     MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */
110*4882a593Smuzhiyun		0x81000000 0x2 0     MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 0.1 IO  */
111*4882a593Smuzhiyun		0x82000000 0x3 0     MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 0.2 MEM */
112*4882a593Smuzhiyun		0x81000000 0x3 0     MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO  */
113*4882a593Smuzhiyun		0x82000000 0x4 0     MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */
114*4882a593Smuzhiyun		0x81000000 0x4 0     MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO  */
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun		0x82000000 0x5 0     MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
117*4882a593Smuzhiyun		0x81000000 0x5 0     MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO  */
118*4882a593Smuzhiyun		0x82000000 0x6 0     MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */
119*4882a593Smuzhiyun		0x81000000 0x6 0     MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO  */
120*4882a593Smuzhiyun		0x82000000 0x7 0     MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */
121*4882a593Smuzhiyun		0x81000000 0x7 0     MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO  */
122*4882a593Smuzhiyun		0x82000000 0x8 0     MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */
123*4882a593Smuzhiyun		0x81000000 0x8 0     MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO  */
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun		0x82000000 0x9 0     MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
126*4882a593Smuzhiyun		0x81000000 0x9 0     MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO  */
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun		0x82000000 0xa 0     MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */
129*4882a593Smuzhiyun		0x81000000 0xa 0     MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO  */>;
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun	pcie@1,0 {
132*4882a593Smuzhiyun		device_type = "pci";
133*4882a593Smuzhiyun		assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
134*4882a593Smuzhiyun		reg = <0x0800 0 0 0 0>;
135*4882a593Smuzhiyun		#address-cells = <3>;
136*4882a593Smuzhiyun		#size-cells = <2>;
137*4882a593Smuzhiyun		#interrupt-cells = <1>;
138*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
139*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x1 0 1 0>;
140*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
141*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 58>;
142*4882a593Smuzhiyun		marvell,pcie-port = <0>;
143*4882a593Smuzhiyun		marvell,pcie-lane = <0>;
144*4882a593Smuzhiyun		/* low-active PERST# reset on GPIO 25 */
145*4882a593Smuzhiyun		reset-gpios = <&gpio0 25 1>;
146*4882a593Smuzhiyun		/* wait 20ms for device settle after reset deassertion */
147*4882a593Smuzhiyun		reset-delay-us = <20000>;
148*4882a593Smuzhiyun		clocks = <&gateclk 5>;
149*4882a593Smuzhiyun	};
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun	pcie@2,0 {
152*4882a593Smuzhiyun		device_type = "pci";
153*4882a593Smuzhiyun		assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
154*4882a593Smuzhiyun		reg = <0x1000 0 0 0 0>;
155*4882a593Smuzhiyun		#address-cells = <3>;
156*4882a593Smuzhiyun		#size-cells = <2>;
157*4882a593Smuzhiyun		#interrupt-cells = <1>;
158*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
159*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x2 0 1 0>;
160*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
161*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 59>;
162*4882a593Smuzhiyun		marvell,pcie-port = <0>;
163*4882a593Smuzhiyun		marvell,pcie-lane = <1>;
164*4882a593Smuzhiyun		clocks = <&gateclk 6>;
165*4882a593Smuzhiyun	};
166*4882a593Smuzhiyun
167*4882a593Smuzhiyun	pcie@3,0 {
168*4882a593Smuzhiyun		device_type = "pci";
169*4882a593Smuzhiyun		assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
170*4882a593Smuzhiyun		reg = <0x1800 0 0 0 0>;
171*4882a593Smuzhiyun		#address-cells = <3>;
172*4882a593Smuzhiyun		#size-cells = <2>;
173*4882a593Smuzhiyun		#interrupt-cells = <1>;
174*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
175*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x3 0 1 0>;
176*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
177*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 60>;
178*4882a593Smuzhiyun		marvell,pcie-port = <0>;
179*4882a593Smuzhiyun		marvell,pcie-lane = <2>;
180*4882a593Smuzhiyun		clocks = <&gateclk 7>;
181*4882a593Smuzhiyun	};
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun	pcie@4,0 {
184*4882a593Smuzhiyun		device_type = "pci";
185*4882a593Smuzhiyun		assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
186*4882a593Smuzhiyun		reg = <0x2000 0 0 0 0>;
187*4882a593Smuzhiyun		#address-cells = <3>;
188*4882a593Smuzhiyun		#size-cells = <2>;
189*4882a593Smuzhiyun		#interrupt-cells = <1>;
190*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
191*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x4 0 1 0>;
192*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
193*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 61>;
194*4882a593Smuzhiyun		marvell,pcie-port = <0>;
195*4882a593Smuzhiyun		marvell,pcie-lane = <3>;
196*4882a593Smuzhiyun		clocks = <&gateclk 8>;
197*4882a593Smuzhiyun	};
198*4882a593Smuzhiyun
199*4882a593Smuzhiyun	pcie@5,0 {
200*4882a593Smuzhiyun		device_type = "pci";
201*4882a593Smuzhiyun		assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
202*4882a593Smuzhiyun		reg = <0x2800 0 0 0 0>;
203*4882a593Smuzhiyun		#address-cells = <3>;
204*4882a593Smuzhiyun		#size-cells = <2>;
205*4882a593Smuzhiyun		#interrupt-cells = <1>;
206*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0
207*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x5 0 1 0>;
208*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
209*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 62>;
210*4882a593Smuzhiyun		marvell,pcie-port = <1>;
211*4882a593Smuzhiyun		marvell,pcie-lane = <0>;
212*4882a593Smuzhiyun		clocks = <&gateclk 9>;
213*4882a593Smuzhiyun	};
214*4882a593Smuzhiyun
215*4882a593Smuzhiyun	pcie@6,0 {
216*4882a593Smuzhiyun		device_type = "pci";
217*4882a593Smuzhiyun		assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
218*4882a593Smuzhiyun		reg = <0x3000 0 0 0 0>;
219*4882a593Smuzhiyun		#address-cells = <3>;
220*4882a593Smuzhiyun		#size-cells = <2>;
221*4882a593Smuzhiyun		#interrupt-cells = <1>;
222*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0
223*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x6 0 1 0>;
224*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
225*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 63>;
226*4882a593Smuzhiyun		marvell,pcie-port = <1>;
227*4882a593Smuzhiyun		marvell,pcie-lane = <1>;
228*4882a593Smuzhiyun		clocks = <&gateclk 10>;
229*4882a593Smuzhiyun	};
230*4882a593Smuzhiyun
231*4882a593Smuzhiyun	pcie@7,0 {
232*4882a593Smuzhiyun		device_type = "pci";
233*4882a593Smuzhiyun		assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
234*4882a593Smuzhiyun		reg = <0x3800 0 0 0 0>;
235*4882a593Smuzhiyun		#address-cells = <3>;
236*4882a593Smuzhiyun		#size-cells = <2>;
237*4882a593Smuzhiyun		#interrupt-cells = <1>;
238*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0
239*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x7 0 1 0>;
240*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
241*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 64>;
242*4882a593Smuzhiyun		marvell,pcie-port = <1>;
243*4882a593Smuzhiyun		marvell,pcie-lane = <2>;
244*4882a593Smuzhiyun		clocks = <&gateclk 11>;
245*4882a593Smuzhiyun	};
246*4882a593Smuzhiyun
247*4882a593Smuzhiyun	pcie@8,0 {
248*4882a593Smuzhiyun		device_type = "pci";
249*4882a593Smuzhiyun		assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
250*4882a593Smuzhiyun		reg = <0x4000 0 0 0 0>;
251*4882a593Smuzhiyun		#address-cells = <3>;
252*4882a593Smuzhiyun		#size-cells = <2>;
253*4882a593Smuzhiyun		#interrupt-cells = <1>;
254*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0
255*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x8 0 1 0>;
256*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
257*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 65>;
258*4882a593Smuzhiyun		marvell,pcie-port = <1>;
259*4882a593Smuzhiyun		marvell,pcie-lane = <3>;
260*4882a593Smuzhiyun		clocks = <&gateclk 12>;
261*4882a593Smuzhiyun	};
262*4882a593Smuzhiyun
263*4882a593Smuzhiyun	pcie@9,0 {
264*4882a593Smuzhiyun		device_type = "pci";
265*4882a593Smuzhiyun		assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
266*4882a593Smuzhiyun		reg = <0x4800 0 0 0 0>;
267*4882a593Smuzhiyun		#address-cells = <3>;
268*4882a593Smuzhiyun		#size-cells = <2>;
269*4882a593Smuzhiyun		#interrupt-cells = <1>;
270*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
271*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0x9 0 1 0>;
272*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
273*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 99>;
274*4882a593Smuzhiyun		marvell,pcie-port = <2>;
275*4882a593Smuzhiyun		marvell,pcie-lane = <0>;
276*4882a593Smuzhiyun		clocks = <&gateclk 26>;
277*4882a593Smuzhiyun	};
278*4882a593Smuzhiyun
279*4882a593Smuzhiyun	pcie@a,0 {
280*4882a593Smuzhiyun		device_type = "pci";
281*4882a593Smuzhiyun		assigned-addresses = <0x82005000 0 0x82000 0 0x2000>;
282*4882a593Smuzhiyun		reg = <0x5000 0 0 0 0>;
283*4882a593Smuzhiyun		#address-cells = <3>;
284*4882a593Smuzhiyun		#size-cells = <2>;
285*4882a593Smuzhiyun		#interrupt-cells = <1>;
286*4882a593Smuzhiyun		ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0
287*4882a593Smuzhiyun			  0x81000000 0 0 0x81000000 0xa 0 1 0>;
288*4882a593Smuzhiyun		interrupt-map-mask = <0 0 0 0>;
289*4882a593Smuzhiyun		interrupt-map = <0 0 0 0 &mpic 103>;
290*4882a593Smuzhiyun		marvell,pcie-port = <3>;
291*4882a593Smuzhiyun		marvell,pcie-lane = <0>;
292*4882a593Smuzhiyun		clocks = <&gateclk 27>;
293*4882a593Smuzhiyun	};
294*4882a593Smuzhiyun};
295