@@ -8,7 +8,7 @@ Required properties:
8
8
"mediatek,mt7623-pcie"
9
9
"mediatek,mt7629-pcie"
10
10
- device_type: Must be "pci"
11
- - reg: Base addresses and lengths of the PCIe subsys and root ports.
11
+ - reg: Base addresses and lengths of the root ports.
12
12
- reg-names: Names of the above areas to use during resource lookup.
13
13
- #address-cells: Address representation for root ports (must be 3)
14
14
- #size-cells: Size representation for root ports (must be 2)
@@ -47,9 +47,12 @@ Required properties for MT7623/MT2701:
47
47
- reset-names: Must be "pcie-rst0", "pcie-rst1", "pcie-rstN".. based on the
48
48
number of root ports.
49
49
50
- Required properties for MT2712/MT7622:
50
+ Required properties for MT2712/MT7622/MT7629 :
51
51
-interrupts: A list of interrupt outputs of the controller, must have one
52
52
entry for each PCIe port
53
+ - interrupt-names: Must include the following entries:
54
+ - "pcie_irq": The interrupt that is asserted when an MSI/INTX is received
55
+ - linux,pci-domain: PCI domain ID. Should be unique for each host controller
53
56
54
57
In addition, the device tree node must have sub-nodes describing each
55
58
PCIe port interface, having the following mandatory properties:
@@ -143,130 +146,143 @@ Examples for MT7623:
143
146
144
147
Examples for MT2712:
145
148
146
- pcie : pcie@11700000 {
149
+ pcie1 : pcie@112ff000 {
147
150
compatible = "mediatek,mt2712-pcie";
148
151
device_type = "pci";
149
- reg = <0 0x11700000 0 0x1000>,
150
- <0 0x112ff000 0 0x1000> ;
151
- reg-names = "port0", "port1" ;
152
+ reg = <0 0x112ff000 0 0x1000>;
153
+ reg-names = "port1" ;
154
+ linux,pci-domain = <1> ;
152
155
#address-cells = <3>;
153
156
#size-cells = <2>;
154
- interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
155
- <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
156
- clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
157
- <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
158
- <&pericfg CLK_PERI_PCIE0>,
157
+ interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
158
+ interrupt-names = "pcie_irq";
159
+ clocks = <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
159
160
<&pericfg CLK_PERI_PCIE1>;
160
- clock-names = "sys_ck0", " sys_ck1", "ahb_ck0 ", "ahb_ck1";
161
- phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>;
162
- phy-names = "pcie-phy0", "pcie- phy1";
161
+ clock-names = "sys_ck1", "ahb_ck1";
162
+ phys = <&u3port1 PHY_TYPE_PCIE>;
163
+ phy-names = "pcie-phy1";
163
164
bus-range = <0x00 0xff>;
164
- ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
165
+ ranges = <0x82000000 0 0x11400000 0x0 0x11400000 0 0x300000>;
166
+ status = "disabled";
165
167
166
- pcie0: pcie@0,0 {
167
- reg = <0x0000 0 0 0 0>;
168
- #address-cells = <3>;
169
- #size-cells = <2>;
168
+ #interrupt-cells = <1>;
169
+ interrupt-map-mask = <0 0 0 7>;
170
+ interrupt-map = <0 0 0 1 &pcie_intc1 0>,
171
+ <0 0 0 2 &pcie_intc1 1>,
172
+ <0 0 0 3 &pcie_intc1 2>,
173
+ <0 0 0 4 &pcie_intc1 3>;
174
+ pcie_intc1: interrupt-controller {
175
+ interrupt-controller;
176
+ #address-cells = <0>;
170
177
#interrupt-cells = <1>;
171
- ranges;
172
- interrupt-map-mask = <0 0 0 7>;
173
- interrupt-map = <0 0 0 1 &pcie_intc0 0>,
174
- <0 0 0 2 &pcie_intc0 1>,
175
- <0 0 0 3 &pcie_intc0 2>,
176
- <0 0 0 4 &pcie_intc0 3>;
177
- pcie_intc0: interrupt-controller {
178
- interrupt-controller;
179
- #address-cells = <0>;
180
- #interrupt-cells = <1>;
181
- };
182
178
};
179
+ };
183
180
184
- pcie1: pcie@1,0 {
185
- reg = <0x0800 0 0 0 0>;
186
- #address-cells = <3>;
187
- #size-cells = <2>;
181
+ pcie0: pcie@11700000 {
182
+ compatible = "mediatek,mt2712-pcie";
183
+ device_type = "pci";
184
+ reg = <0 0x11700000 0 0x1000>;
185
+ reg-names = "port0";
186
+ linux,pci-domain = <0>;
187
+ #address-cells = <3>;
188
+ #size-cells = <2>;
189
+ interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
190
+ interrupt-names = "pcie_irq";
191
+ clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
192
+ <&pericfg CLK_PERI_PCIE0>;
193
+ clock-names = "sys_ck0", "ahb_ck0";
194
+ phys = <&u3port0 PHY_TYPE_PCIE>;
195
+ phy-names = "pcie-phy0";
196
+ bus-range = <0x00 0xff>;
197
+ ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
198
+ status = "disabled";
199
+
200
+ #interrupt-cells = <1>;
201
+ interrupt-map-mask = <0 0 0 7>;
202
+ interrupt-map = <0 0 0 1 &pcie_intc0 0>,
203
+ <0 0 0 2 &pcie_intc0 1>,
204
+ <0 0 0 3 &pcie_intc0 2>,
205
+ <0 0 0 4 &pcie_intc0 3>;
206
+ pcie_intc0: interrupt-controller {
207
+ interrupt-controller;
208
+ #address-cells = <0>;
188
209
#interrupt-cells = <1>;
189
- ranges;
190
- interrupt-map-mask = <0 0 0 7>;
191
- interrupt-map = <0 0 0 1 &pcie_intc1 0>,
192
- <0 0 0 2 &pcie_intc1 1>,
193
- <0 0 0 3 &pcie_intc1 2>,
194
- <0 0 0 4 &pcie_intc1 3>;
195
- pcie_intc1: interrupt-controller {
196
- interrupt-controller;
197
- #address-cells = <0>;
198
- #interrupt-cells = <1>;
199
- };
200
210
};
201
211
};
202
212
203
213
Examples for MT7622:
204
214
205
- pcie : pcie@1a140000 {
215
+ pcie0 : pcie@1a143000 {
206
216
compatible = "mediatek,mt7622-pcie";
207
217
device_type = "pci";
208
- reg = <0 0x1a140000 0 0x1000>,
209
- <0 0x1a143000 0 0x1000>,
210
- <0 0x1a145000 0 0x1000>;
211
- reg-names = "subsys", "port0", "port1";
218
+ reg = <0 0x1a143000 0 0x1000>;
219
+ reg-names = "port0";
220
+ linux,pci-domain = <0>;
212
221
#address-cells = <3>;
213
222
#size-cells = <2>;
214
- interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>,
215
- <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW> ;
223
+ interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>;
224
+ interrupt-names = "pcie_irq" ;
216
225
clocks = <&pciesys CLK_PCIE_P0_MAC_EN>,
217
- <&pciesys CLK_PCIE_P1_MAC_EN>,
218
226
<&pciesys CLK_PCIE_P0_AHB_EN>,
219
- <&pciesys CLK_PCIE_P1_AHB_EN>,
220
227
<&pciesys CLK_PCIE_P0_AUX_EN>,
221
- <&pciesys CLK_PCIE_P1_AUX_EN>,
222
228
<&pciesys CLK_PCIE_P0_AXI_EN>,
223
- <&pciesys CLK_PCIE_P1_AXI_EN>,
224
229
<&pciesys CLK_PCIE_P0_OBFF_EN>,
225
- <&pciesys CLK_PCIE_P1_OBFF_EN>,
226
- <&pciesys CLK_PCIE_P0_PIPE_EN>,
227
- <&pciesys CLK_PCIE_P1_PIPE_EN>;
228
- clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1",
229
- "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1",
230
- "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1";
231
- phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>;
232
- phy-names = "pcie-phy0", "pcie-phy1";
230
+ <&pciesys CLK_PCIE_P0_PIPE_EN>;
231
+ clock-names = "sys_ck0", "ahb_ck0", "aux_ck0",
232
+ "axi_ck0", "obff_ck0", "pipe_ck0";
233
+
233
234
power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
234
235
bus-range = <0x00 0xff>;
235
- ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
236
+ ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>;
237
+ status = "disabled";
236
238
237
- pcie0: pcie@0,0 {
238
- reg = <0x0000 0 0 0 0>;
239
- #address-cells = <3>;
240
- #size-cells = <2>;
239
+ #interrupt-cells = <1>;
240
+ interrupt-map-mask = <0 0 0 7>;
241
+ interrupt-map = <0 0 0 1 &pcie_intc0 0>,
242
+ <0 0 0 2 &pcie_intc0 1>,
243
+ <0 0 0 3 &pcie_intc0 2>,
244
+ <0 0 0 4 &pcie_intc0 3>;
245
+ pcie_intc0: interrupt-controller {
246
+ interrupt-controller;
247
+ #address-cells = <0>;
241
248
#interrupt-cells = <1>;
242
- ranges;
243
- interrupt-map-mask = <0 0 0 7>;
244
- interrupt-map = <0 0 0 1 &pcie_intc0 0>,
245
- <0 0 0 2 &pcie_intc0 1>,
246
- <0 0 0 3 &pcie_intc0 2>,
247
- <0 0 0 4 &pcie_intc0 3>;
248
- pcie_intc0: interrupt-controller {
249
- interrupt-controller;
250
- #address-cells = <0>;
251
- #interrupt-cells = <1>;
252
- };
253
249
};
250
+ };
254
251
255
- pcie1: pcie@1,0 {
256
- reg = <0x0800 0 0 0 0>;
257
- #address-cells = <3>;
258
- #size-cells = <2>;
252
+ pcie1: pcie@1a145000 {
253
+ compatible = "mediatek,mt7622-pcie";
254
+ device_type = "pci";
255
+ reg = <0 0x1a145000 0 0x1000>;
256
+ reg-names = "port1";
257
+ linux,pci-domain = <1>;
258
+ #address-cells = <3>;
259
+ #size-cells = <2>;
260
+ interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
261
+ interrupt-names = "pcie_irq";
262
+ clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
263
+ /* designer has connect RC1 with p0_ahb clock */
264
+ <&pciesys CLK_PCIE_P0_AHB_EN>,
265
+ <&pciesys CLK_PCIE_P1_AUX_EN>,
266
+ <&pciesys CLK_PCIE_P1_AXI_EN>,
267
+ <&pciesys CLK_PCIE_P1_OBFF_EN>,
268
+ <&pciesys CLK_PCIE_P1_PIPE_EN>;
269
+ clock-names = "sys_ck1", "ahb_ck1", "aux_ck1",
270
+ "axi_ck1", "obff_ck1", "pipe_ck1";
271
+
272
+ power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
273
+ bus-range = <0x00 0xff>;
274
+ ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>;
275
+ status = "disabled";
276
+
277
+ #interrupt-cells = <1>;
278
+ interrupt-map-mask = <0 0 0 7>;
279
+ interrupt-map = <0 0 0 1 &pcie_intc1 0>,
280
+ <0 0 0 2 &pcie_intc1 1>,
281
+ <0 0 0 3 &pcie_intc1 2>,
282
+ <0 0 0 4 &pcie_intc1 3>;
283
+ pcie_intc1: interrupt-controller {
284
+ interrupt-controller;
285
+ #address-cells = <0>;
259
286
#interrupt-cells = <1>;
260
- ranges;
261
- interrupt-map-mask = <0 0 0 7>;
262
- interrupt-map = <0 0 0 1 &pcie_intc1 0>,
263
- <0 0 0 2 &pcie_intc1 1>,
264
- <0 0 0 3 &pcie_intc1 2>,
265
- <0 0 0 4 &pcie_intc1 3>;
266
- pcie_intc1: interrupt-controller {
267
- interrupt-controller;
268
- #address-cells = <0>;
269
- #interrupt-cells = <1>;
270
- };
271
287
};
272
288
};
0 commit comments