xref: /linux/drivers/pci/controller/dwc/Kconfig (revision 67f8bc848ee31831336bd478e57d2f993551902e)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "DesignWare-based PCIe controllers"
4	depends on PCI
5
6config PCIE_DW
7	bool
8
9config PCIE_DW_DEBUGFS
10	bool "DesignWare PCIe debugfs entries"
11	depends on DEBUG_FS
12	depends on PCIE_DW_HOST || PCIE_DW_EP
13	help
14	  Say Y here to enable debugfs entries for the PCIe controller. These
15	  entries provide various debug features related to the controller and
16	  expose the RAS DES capabilities such as Silicon Debug, Error Injection
17	  and Statistical Counters.
18
19config PCIE_DW_HOST
20	bool
21	select PCIE_DW
22	select IRQ_MSI_LIB
23	select PCI_HOST_COMMON
24
25config PCIE_DW_EP
26	bool
27	select PCIE_DW
28
29config PCIE_AL
30	bool "Amazon Annapurna Labs PCIe controller"
31	depends on OF && (ARM64 || COMPILE_TEST)
32	depends on PCI_MSI
33	select PCIE_DW_HOST
34	select PCI_ECAM
35	help
36	  Say Y here to enable support of the Amazon's Annapurna Labs PCIe
37	  controller IP on Amazon SoCs. The PCIe controller uses the DesignWare
38	  core plus Annapurna Labs proprietary hardware wrappers. This is
39	  required only for DT-based platforms. ACPI platforms with the
40	  Annapurna Labs PCIe controller don't need to enable this.
41
42config PCIE_AMD_MDB
43	bool "AMD MDB Versal2 PCIe controller"
44	depends on OF && (ARM64 || COMPILE_TEST)
45	depends on PCI_MSI
46	select PCIE_DW_HOST
47	help
48	  Say Y here if you want to enable PCIe controller support on AMD
49	  Versal2 SoCs. The AMD MDB Versal2 PCIe controller is based on
50	  DesignWare IP and therefore the driver re-uses the DesignWare
51	  core functions to implement the driver.
52
53config PCI_MESON
54	tristate "Amlogic Meson PCIe controller"
55	default m if ARCH_MESON
56	depends on PCI_MSI
57	select PCIE_DW_HOST
58	help
59	  Say Y here if you want to enable PCI controller support on Amlogic
60	  SoCs. The PCI controller on Amlogic is based on DesignWare hardware
61	  and therefore the driver re-uses the DesignWare core functions to
62	  implement the driver.
63
64config PCIE_ANDES_QILAI
65	tristate "Andes QiLai PCIe controller"
66	depends on ARCH_ANDES || COMPILE_TEST
67	depends on PCI_MSI
68	select PCIE_DW_HOST
69	help
70	  Say Y here to enable PCIe controller support on Andes QiLai SoCs,
71	  which operate in Root Complex mode. The Andes QiLai SoC PCIe
72	  controller is based on DesignWare IP and therefore the driver
73	  re-uses the DesignWare core functions to implement the driver.
74
75config PCIE_ARTPEC6
76	bool
77
78config PCIE_ARTPEC6_HOST
79	bool "Axis ARTPEC-6 PCIe controller (host mode)"
80	depends on MACH_ARTPEC6 || COMPILE_TEST
81	depends on PCI_MSI
82	select PCIE_DW_HOST
83	select PCIE_ARTPEC6
84	help
85	  Enables support for the PCIe controller in the ARTPEC-6 SoC to work in
86	  host mode. This uses the DesignWare core.
87
88config PCIE_ARTPEC6_EP
89	bool "Axis ARTPEC-6 PCIe controller (endpoint mode)"
90	depends on MACH_ARTPEC6 || COMPILE_TEST
91	depends on PCI_ENDPOINT
92	select PCIE_DW_EP
93	select PCIE_ARTPEC6
94	help
95	  Enables support for the PCIe controller in the ARTPEC-6 SoC to work in
96	  endpoint mode. This uses the DesignWare core.
97
98config PCIE_ESWIN
99	tristate "ESWIN PCIe controller"
100	depends on ARCH_ESWIN || COMPILE_TEST
101	depends on PCI_MSI
102	select PCIE_DW_HOST
103	help
104	  Say Y here if you want PCIe controller support for the ESWIN SoCs.
105	  The PCIe controller in ESWIN SoCs is based on DesignWare hardware, and
106	  works only in host mode.
107
108config PCI_IMX6
109	bool
110
111config PCI_IMX6_HOST
112	bool "Freescale i.MX6/7/8 PCIe controller (host mode)"
113	depends on ARCH_MXC || COMPILE_TEST
114	depends on PCI_MSI
115	select PCIE_DW_HOST
116	select PCI_IMX6
117	select PCI_PWRCTRL_GENERIC
118	help
119	  Enables support for the PCIe controller in the i.MX SoCs to
120	  work in Root Complex mode. The PCI controller on i.MX is based
121	  on DesignWare hardware and therefore the driver re-uses the
122	  DesignWare core functions to implement the driver.
123
124config PCI_IMX6_EP
125	bool "Freescale i.MX6/7/8 PCIe controller (endpoint mode)"
126	depends on ARCH_MXC || COMPILE_TEST
127	depends on PCI_ENDPOINT
128	select PCIE_DW_EP
129	select PCI_HOST_COMMON
130	select PCI_IMX6
131	select PCI_PWRCTRL_GENERIC
132	help
133	  Enables support for the PCIe controller in the i.MX SoCs to
134	  work in endpoint mode. The PCI controller on i.MX is based
135	  on DesignWare hardware and therefore the driver re-uses the
136	  DesignWare core functions to implement the driver.
137
138config PCI_LAYERSCAPE
139	tristate "Freescale Layerscape PCIe controller (host mode)"
140	depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST)
141	depends on PCI_MSI
142	select PCIE_DW_HOST
143	select MFD_SYSCON
144	help
145	  Say Y here if you want to enable PCIe controller support on Layerscape
146	  SoCs to work in Host mode.
147	  This controller can work either as EP or RC. The RCW[HOST_AGT_PEX]
148	  determines which PCIe controller works in EP mode and which PCIe
149	  controller works in RC mode.
150
151config PCI_LAYERSCAPE_EP
152	bool "Freescale Layerscape PCIe controller (endpoint mode)"
153	depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST)
154	depends on PCI_ENDPOINT
155	select PCIE_DW_EP
156	help
157	  Say Y here if you want to enable PCIe controller support on Layerscape
158	  SoCs to work in Endpoint mode.
159	  This controller can work either as EP or RC. The RCW[HOST_AGT_PEX]
160	  determines which PCIe controller works in EP mode and which PCIe
161	  controller works in RC mode.
162
163config PCI_HISI
164	depends on OF && (ARM64 || COMPILE_TEST)
165	bool "HiSilicon Hip05 and Hip06 SoCs PCIe controller"
166	depends on PCI_MSI
167	select PCIE_DW_HOST
168	select PCI_HOST_COMMON
169	help
170	  Say Y here if you want PCIe controller support on HiSilicon
171	  Hip05 and Hip06 SoCs
172
173config PCIE_KIRIN
174	depends on OF && (ARM64 || COMPILE_TEST)
175	tristate "HiSilicon Kirin PCIe controller"
176	depends on PCI_MSI
177	select PCIE_DW_HOST
178	select REGMAP_MMIO
179	help
180	  Say Y here if you want PCIe controller support
181	  on HiSilicon Kirin series SoCs.
182
183config PCIE_HISI_STB
184	bool "HiSilicon STB PCIe controller"
185	depends on ARCH_HISI || COMPILE_TEST
186	depends on PCI_MSI
187	select PCIE_DW_HOST
188	help
189	  Say Y here if you want PCIe controller support on HiSilicon STB SoCs
190
191config PCIE_INTEL_GW
192	bool "Intel Gateway PCIe controller "
193	depends on OF && (X86 || COMPILE_TEST)
194	depends on PCI_MSI
195	select PCIE_DW_HOST
196	help
197	  Say 'Y' here to enable PCIe Host controller support on Intel
198	  Gateway SoCs.
199	  The PCIe controller uses the DesignWare core plus Intel-specific
200	  hardware wrappers.
201
202config PCIE_KEEMBAY
203	bool
204
205config PCIE_KEEMBAY_HOST
206	bool "Intel Keem Bay PCIe controller (host mode)"
207	depends on ARCH_KEEMBAY || COMPILE_TEST
208	depends on PCI_MSI
209	select PCIE_DW_HOST
210	select PCIE_KEEMBAY
211	help
212	  Say 'Y' here to enable support for the PCIe controller in Keem Bay
213	  to work in host mode.
214	  The PCIe controller is based on DesignWare Hardware and uses
215	  DesignWare core functions.
216
217config PCIE_KEEMBAY_EP
218	bool "Intel Keem Bay PCIe controller (endpoint mode)"
219	depends on ARCH_KEEMBAY || COMPILE_TEST
220	depends on PCI_MSI
221	depends on PCI_ENDPOINT
222	select PCIE_DW_EP
223	select PCIE_KEEMBAY
224	help
225	  Say 'Y' here to enable support for the PCIe controller in Keem Bay
226	  to work in endpoint mode.
227	  The PCIe controller is based on DesignWare Hardware and uses
228	  DesignWare core functions.
229
230config PCIE_ARMADA_8K
231	bool "Marvell Armada-8K PCIe controller"
232	depends on ARCH_MVEBU || COMPILE_TEST
233	depends on PCI_MSI
234	select PCIE_DW_HOST
235	help
236	  Say Y here if you want to enable PCIe controller support on
237	  Armada-8K SoCs. The PCIe controller on Armada-8K is based on
238	  DesignWare hardware and therefore the driver re-uses the
239	  DesignWare core functions to implement the driver.
240
241config PCIE_TEGRA194
242	tristate
243
244config PCIE_TEGRA194_HOST
245	tristate "NVIDIA Tegra194 (and later) PCIe controller (host mode)"
246	depends on (ARCH_TEGRA && ARM64) || COMPILE_TEST
247	depends on PCI_MSI
248	select PCIE_DW_HOST
249	select PHY_TEGRA194_P2U
250	select PCIE_TEGRA194
251	help
252	  Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
253	  work in host mode. There are two instances of PCIe controllers in
254	  Tegra194. This controller can work either as EP or RC. In order to
255	  enable host-specific features PCIE_TEGRA194_HOST must be selected and
256	  in order to enable device-specific features PCIE_TEGRA194_EP must be
257	  selected. This uses the DesignWare core.
258
259config PCIE_TEGRA194_EP
260	tristate "NVIDIA Tegra194 (and later) PCIe controller (endpoint mode)"
261	depends on (ARCH_TEGRA && ARM64) || COMPILE_TEST
262	depends on PCI_ENDPOINT
263	select PCIE_DW_EP
264	select PHY_TEGRA194_P2U
265	select PCIE_TEGRA194
266	help
267	  Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
268	  work in endpoint mode. There are two instances of PCIe controllers in
269	  Tegra194. This controller can work either as EP or RC. In order to
270	  enable host-specific features PCIE_TEGRA194_HOST must be selected and
271	  in order to enable device-specific features PCIE_TEGRA194_EP must be
272	  selected. This uses the DesignWare core.
273
274config PCIE_NXP_S32G
275	bool "NXP S32G PCIe controller (host mode)"
276	depends on ARCH_S32 || COMPILE_TEST
277	select PCIE_DW_HOST
278	help
279	  Enable support for the PCIe controller in NXP S32G based boards to
280	  work in Host mode. The controller is based on DesignWare IP and
281	  can work either as RC or EP. In order to enable host-specific
282	  features PCIE_NXP_S32G must be selected.
283
284config PCIE_DW_PLAT
285	bool
286
287config PCIE_DW_PLAT_HOST
288	bool "Platform bus based DesignWare PCIe controller (host mode)"
289	depends on PCI_MSI
290	select PCIE_DW_HOST
291	select PCIE_DW_PLAT
292	help
293	  Enables support for the PCIe controller in the Designware IP to
294	  work in host mode. There are two instances of PCIe controller in
295	  Designware IP.
296	  This controller can work either as EP or RC. In order to enable
297	  host-specific features PCIE_DW_PLAT_HOST must be selected and in
298	  order to enable device-specific features PCI_DW_PLAT_EP must be
299	  selected.
300
301config PCIE_DW_PLAT_EP
302	bool "Platform bus based DesignWare PCIe controller (endpoint mode)"
303	depends on PCI && PCI_MSI
304	depends on PCI_ENDPOINT
305	select PCIE_DW_EP
306	select PCIE_DW_PLAT
307	help
308	  Enables support for the PCIe controller in the Designware IP to
309	  work in endpoint mode. There are two instances of PCIe controller
310	  in Designware IP.
311	  This controller can work either as EP or RC. In order to enable
312	  host-specific features PCIE_DW_PLAT_HOST must be selected and in
313	  order to enable device-specific features PCI_DW_PLAT_EP must be
314	  selected.
315
316config PCIE_QCOM_COMMON
317	bool
318
319config PCIE_QCOM
320	bool "Qualcomm PCIe controller (host mode)"
321	depends on OF && (ARCH_QCOM || COMPILE_TEST)
322	depends on PCI_MSI
323	select PCIE_DW_HOST
324	select CRC8
325	select PCIE_QCOM_COMMON
326	select PCI_HOST_COMMON
327	select PCI_PWRCTRL_GENERIC
328	help
329	  Say Y here to enable PCIe controller support on Qualcomm SoCs. The
330	  PCIe controller uses the DesignWare core plus Qualcomm-specific
331	  hardware wrappers.
332
333config PCIE_QCOM_EP
334	tristate "Qualcomm PCIe controller (endpoint mode)"
335	depends on OF && (ARCH_QCOM || COMPILE_TEST)
336	depends on PCI_ENDPOINT
337	select PCIE_DW_EP
338	select PCIE_QCOM_COMMON
339	help
340	  Say Y here to enable support for the PCIe controllers on Qualcomm SoCs
341	  to work in endpoint mode. The PCIe controller uses the DesignWare core
342	  plus Qualcomm-specific hardware wrappers.
343
344config PCIE_RCAR_GEN4
345	tristate
346
347config PCIE_RCAR_GEN4_HOST
348	tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
349	depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
350	depends on PCI_MSI
351	select PCIE_DW_HOST
352	select PCIE_RCAR_GEN4
353	help
354	  Say Y here if you want PCIe controller (host mode) on R-Car Gen4 SoCs.
355	  To compile this driver as a module, choose M here: the module will be
356	  called pcie-rcar-gen4.ko. This uses the DesignWare core.
357
358config PCIE_RCAR_GEN4_EP
359	tristate "Renesas R-Car Gen4 PCIe controller (endpoint mode)"
360	depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
361	depends on PCI_ENDPOINT
362	select PCIE_DW_EP
363	select PCIE_RCAR_GEN4
364	help
365	  Say Y here if you want PCIe controller (endpoint mode) on R-Car Gen4
366	  SoCs. To compile this driver as a module, choose M here: the module
367	  will be called pcie-rcar-gen4.ko. This uses the DesignWare core.
368
369config PCIE_ROCKCHIP_DW
370	bool
371
372config PCIE_ROCKCHIP_DW_HOST
373	bool "Rockchip DesignWare PCIe controller (host mode)"
374	depends on PCI_MSI
375	depends on ARCH_ROCKCHIP || COMPILE_TEST
376	depends on OF
377	select PCIE_DW_HOST
378	select PCIE_ROCKCHIP_DW
379	select PCI_HOST_COMMON
380	help
381	  Enables support for the DesignWare PCIe controller in the
382	  Rockchip SoC (except RK3399) to work in host mode.
383
384config PCIE_ROCKCHIP_DW_EP
385	bool "Rockchip DesignWare PCIe controller (endpoint mode)"
386	depends on ARCH_ROCKCHIP || COMPILE_TEST
387	depends on OF
388	depends on PCI_ENDPOINT
389	select PCIE_DW_EP
390	select PCIE_ROCKCHIP_DW
391	help
392	  Enables support for the DesignWare PCIe controller in the
393	  Rockchip SoC (except RK3399) to work in endpoint mode.
394
395config PCI_EXYNOS
396	tristate "Samsung Exynos PCIe controller"
397	depends on ARCH_EXYNOS || COMPILE_TEST
398	depends on PCI_MSI
399	select PCIE_DW_HOST
400	help
401	  Enables support for the PCIe controller in the Samsung Exynos SoCs
402	  to work in host mode. The PCI controller is based on the DesignWare
403	  hardware and therefore the driver re-uses the DesignWare core
404	  functions to implement the driver.
405
406config PCIE_FU740
407	bool "SiFive FU740 PCIe controller"
408	depends on PCI_MSI
409	depends on ARCH_SIFIVE || COMPILE_TEST
410	select PCIE_DW_HOST
411	help
412	  Say Y here if you want PCIe controller support for the SiFive
413	  FU740.
414
415config PCIE_UNIPHIER
416	bool "Socionext UniPhier PCIe controller (host mode)"
417	depends on ARCH_UNIPHIER || COMPILE_TEST
418	depends on OF && HAS_IOMEM
419	depends on PCI_MSI
420	select PCIE_DW_HOST
421	help
422	  Say Y here if you want PCIe host controller support on UniPhier SoCs.
423	  This driver supports LD20 and PXs3 SoCs.
424
425config PCIE_UNIPHIER_EP
426	bool "Socionext UniPhier PCIe controller (endpoint mode)"
427	depends on ARCH_UNIPHIER || COMPILE_TEST
428	depends on OF && HAS_IOMEM
429	depends on PCI_ENDPOINT
430	select PCIE_DW_EP
431	help
432	  Say Y here if you want PCIe endpoint controller support on
433	  UniPhier SoCs. This driver supports Pro5 SoC.
434
435config PCIE_SOPHGO_DW
436	bool "Sophgo DesignWare PCIe controller (host mode)"
437	depends on ARCH_SOPHGO || COMPILE_TEST
438	depends on PCI_MSI
439	depends on OF
440	select PCIE_DW_HOST
441	help
442	  Say Y here if you want PCIe host controller support on
443	  Sophgo SoCs.
444
445config PCIE_SPACEMIT_K1
446	tristate "SpacemiT K1 PCIe controller (host mode)"
447	depends on ARCH_SPACEMIT || COMPILE_TEST
448	depends on HAS_IOMEM
449	select PCIE_DW_HOST
450	select PCI_PWRCTRL_GENERIC
451	default ARCH_SPACEMIT
452	help
453	  Enables support for the DesignWare based PCIe controller in
454	  the SpacemiT K1 SoC operating in host mode.  Three controllers
455	  are available on the K1 SoC; the first of these shares a PHY
456	  with a USB 3.0 host controller (one or the other can be used).
457
458config PCIE_SPEAR13XX
459	bool "STMicroelectronics SPEAr PCIe controller"
460	depends on ARCH_SPEAR13XX || COMPILE_TEST
461	depends on PCI_MSI
462	select PCIE_DW_HOST
463	help
464	  Say Y here if you want PCIe support on SPEAr13XX SoCs.
465
466config PCIE_STM32_HOST
467	tristate "STMicroelectronics STM32MP25 PCIe Controller (host mode)"
468	depends on ARCH_STM32 || COMPILE_TEST
469	depends on PCI_MSI
470	select PCIE_DW_HOST
471	help
472	  Enables Root Complex (RC) support for the DesignWare core based PCIe
473	  controller found in STM32MP25 SoC.
474
475	  This driver can also be built as a module. If so, the module
476	  will be called pcie-stm32.
477
478config PCIE_STM32_EP
479	tristate "STMicroelectronics STM32MP25 PCIe Controller (endpoint mode)"
480	depends on ARCH_STM32 || COMPILE_TEST
481	depends on PCI_ENDPOINT
482	select PCIE_DW_EP
483	help
484	  Enables Endpoint (EP) support for the DesignWare core based PCIe
485	  controller found in STM32MP25 SoC.
486
487	  This driver can also be built as a module. If so, the module
488	  will be called pcie-stm32-ep.
489
490config PCI_DRA7XX
491	tristate
492
493config PCI_DRA7XX_HOST
494	tristate "TI DRA7xx PCIe controller (host mode)"
495	depends on SOC_DRA7XX || COMPILE_TEST
496	depends on OF && HAS_IOMEM && TI_PIPE3
497	depends on PCI_MSI
498	select PCIE_DW_HOST
499	select PCI_DRA7XX
500	default y if SOC_DRA7XX
501	help
502	  Enables support for the PCIe controller in the DRA7xx SoC to work in
503	  host mode. There are two instances of PCIe controller in DRA7xx.
504	  This controller can work either as EP or RC. In order to enable
505	  host-specific features PCI_DRA7XX_HOST must be selected and in order
506	  to enable device-specific features PCI_DRA7XX_EP must be selected.
507	  This uses the DesignWare core.
508
509config PCI_DRA7XX_EP
510	tristate "TI DRA7xx PCIe controller (endpoint mode)"
511	depends on SOC_DRA7XX || COMPILE_TEST
512	depends on OF && HAS_IOMEM && TI_PIPE3
513	depends on PCI_ENDPOINT
514	select PCIE_DW_EP
515	select PCI_DRA7XX
516	help
517	  Enables support for the PCIe controller in the DRA7xx SoC to work in
518	  endpoint mode. There are two instances of PCIe controller in DRA7xx.
519	  This controller can work either as EP or RC. In order to enable
520	  host-specific features PCI_DRA7XX_HOST must be selected and in order
521	  to enable device-specific features PCI_DRA7XX_EP must be selected.
522	  This uses the DesignWare core.
523
524# ARM32 platforms use hook_fault_code() and cannot support loadable module.
525config PCI_KEYSTONE
526	bool
527
528# On non-ARM32 platforms, loadable module can be supported.
529config PCI_KEYSTONE_TRISTATE
530	tristate
531
532config PCI_KEYSTONE_HOST
533	tristate "TI Keystone PCIe controller (host mode)"
534	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
535	depends on PCI_MSI
536	select PCIE_DW_HOST
537	select PCI_KEYSTONE if ARM
538	select PCI_KEYSTONE_TRISTATE if !ARM
539	help
540	  Enables support for the PCIe controller in the Keystone SoC to
541	  work in host mode. The PCI controller on Keystone is based on
542	  DesignWare hardware and therefore the driver re-uses the
543	  DesignWare core functions to implement the driver.
544
545config PCI_KEYSTONE_EP
546	tristate "TI Keystone PCIe controller (endpoint mode)"
547	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
548	depends on PCI_ENDPOINT
549	select PCIE_DW_EP
550	select PCI_KEYSTONE if ARM
551	select PCI_KEYSTONE_TRISTATE if !ARM
552	help
553	  Enables support for the PCIe controller in the Keystone SoC to
554	  work in endpoint mode. The PCI controller on Keystone is based
555	  on DesignWare hardware and therefore the driver re-uses the
556	  DesignWare core functions to implement the driver.
557
558config PCIE_VISCONTI_HOST
559	bool "Toshiba Visconti PCIe controller"
560	depends on ARCH_VISCONTI || COMPILE_TEST
561	depends on PCI_MSI
562	select PCIE_DW_HOST
563	help
564	  Say Y here if you want PCIe controller support on Toshiba Visconti SoC.
565	  This driver supports TMPV7708 SoC.
566
567config PCIE_ULTRARISC
568	tristate "UltraRISC PCIe host controller"
569	depends on ARCH_ULTRARISC || COMPILE_TEST
570	select PCIE_DW_HOST
571	select PCI_MSI
572	default y if ARCH_ULTRARISC
573	help
574	  Enables support for the PCIe controller in the UltraRISC SoC.
575	  This driver supports UR-DP1000 SoC.
576
577	  By default, this symbol is enabled when ARCH_ULTRARISC is active,
578	  requiring no further configuration on that platform.
579
580endmenu
581