xref: /linux/drivers/pci/controller/dwc/Kconfig (revision d4e0984f12ea958e0f2def90ddb1e193a896932b)
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	help
132	  Enables support for the PCIe controller in the i.MX SoCs to
133	  work in endpoint mode. The PCI controller on i.MX is based
134	  on DesignWare hardware and therefore the driver re-uses the
135	  DesignWare core functions to implement the driver.
136
137config PCI_LAYERSCAPE
138	tristate "Freescale Layerscape PCIe controller (host mode)"
139	depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST)
140	depends on PCI_MSI
141	select PCIE_DW_HOST
142	select MFD_SYSCON
143	help
144	  Say Y here if you want to enable PCIe controller support on Layerscape
145	  SoCs to work in Host mode.
146	  This controller can work either as EP or RC. The RCW[HOST_AGT_PEX]
147	  determines which PCIe controller works in EP mode and which PCIe
148	  controller works in RC mode.
149
150config PCI_LAYERSCAPE_EP
151	bool "Freescale Layerscape PCIe controller (endpoint mode)"
152	depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST)
153	depends on PCI_ENDPOINT
154	select PCIE_DW_EP
155	help
156	  Say Y here if you want to enable PCIe controller support on Layerscape
157	  SoCs to work in Endpoint mode.
158	  This controller can work either as EP or RC. The RCW[HOST_AGT_PEX]
159	  determines which PCIe controller works in EP mode and which PCIe
160	  controller works in RC mode.
161
162config PCI_HISI
163	depends on OF && (ARM64 || COMPILE_TEST)
164	bool "HiSilicon Hip05 and Hip06 SoCs PCIe controller"
165	depends on PCI_MSI
166	select PCIE_DW_HOST
167	select PCI_HOST_COMMON
168	help
169	  Say Y here if you want PCIe controller support on HiSilicon
170	  Hip05 and Hip06 SoCs
171
172config PCIE_KIRIN
173	depends on OF && (ARM64 || COMPILE_TEST)
174	tristate "HiSilicon Kirin PCIe controller"
175	depends on PCI_MSI
176	select PCIE_DW_HOST
177	select REGMAP_MMIO
178	help
179	  Say Y here if you want PCIe controller support
180	  on HiSilicon Kirin series SoCs.
181
182config PCIE_HISI_STB
183	bool "HiSilicon STB PCIe controller"
184	depends on ARCH_HISI || COMPILE_TEST
185	depends on PCI_MSI
186	select PCIE_DW_HOST
187	help
188	  Say Y here if you want PCIe controller support on HiSilicon STB SoCs
189
190config PCIE_INTEL_GW
191	bool "Intel Gateway PCIe controller "
192	depends on OF && (X86 || COMPILE_TEST)
193	depends on PCI_MSI
194	select PCIE_DW_HOST
195	help
196	  Say 'Y' here to enable PCIe Host controller support on Intel
197	  Gateway SoCs.
198	  The PCIe controller uses the DesignWare core plus Intel-specific
199	  hardware wrappers.
200
201config PCIE_KEEMBAY
202	bool
203
204config PCIE_KEEMBAY_HOST
205	bool "Intel Keem Bay PCIe controller (host mode)"
206	depends on ARCH_KEEMBAY || COMPILE_TEST
207	depends on PCI_MSI
208	select PCIE_DW_HOST
209	select PCIE_KEEMBAY
210	help
211	  Say 'Y' here to enable support for the PCIe controller in Keem Bay
212	  to work in host mode.
213	  The PCIe controller is based on DesignWare Hardware and uses
214	  DesignWare core functions.
215
216config PCIE_KEEMBAY_EP
217	bool "Intel Keem Bay PCIe controller (endpoint mode)"
218	depends on ARCH_KEEMBAY || COMPILE_TEST
219	depends on PCI_MSI
220	depends on PCI_ENDPOINT
221	select PCIE_DW_EP
222	select PCIE_KEEMBAY
223	help
224	  Say 'Y' here to enable support for the PCIe controller in Keem Bay
225	  to work in endpoint mode.
226	  The PCIe controller is based on DesignWare Hardware and uses
227	  DesignWare core functions.
228
229config PCIE_ARMADA_8K
230	bool "Marvell Armada-8K PCIe controller"
231	depends on ARCH_MVEBU || COMPILE_TEST
232	depends on PCI_MSI
233	select PCIE_DW_HOST
234	help
235	  Say Y here if you want to enable PCIe controller support on
236	  Armada-8K SoCs. The PCIe controller on Armada-8K is based on
237	  DesignWare hardware and therefore the driver re-uses the
238	  DesignWare core functions to implement the driver.
239
240config PCIE_TEGRA194
241	tristate
242
243config PCIE_TEGRA194_HOST
244	tristate "NVIDIA Tegra194 (and later) PCIe controller (host mode)"
245	depends on (ARCH_TEGRA && ARM64) || COMPILE_TEST
246	depends on PCI_MSI
247	select PCIE_DW_HOST
248	select PHY_TEGRA194_P2U
249	select PCIE_TEGRA194
250	help
251	  Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
252	  work in host mode. There are two instances of PCIe controllers in
253	  Tegra194. This controller can work either as EP or RC. In order to
254	  enable host-specific features PCIE_TEGRA194_HOST must be selected and
255	  in order to enable device-specific features PCIE_TEGRA194_EP must be
256	  selected. This uses the DesignWare core.
257
258config PCIE_TEGRA194_EP
259	tristate "NVIDIA Tegra194 (and later) PCIe controller (endpoint mode)"
260	depends on (ARCH_TEGRA && ARM64) || COMPILE_TEST
261	depends on PCI_ENDPOINT
262	select PCIE_DW_EP
263	select PHY_TEGRA194_P2U
264	select PCIE_TEGRA194
265	help
266	  Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
267	  work in endpoint mode. There are two instances of PCIe controllers in
268	  Tegra194. This controller can work either as EP or RC. In order to
269	  enable host-specific features PCIE_TEGRA194_HOST must be selected and
270	  in order to enable device-specific features PCIE_TEGRA194_EP must be
271	  selected. This uses the DesignWare core.
272
273config PCIE_NXP_S32G
274	bool "NXP S32G PCIe controller (host mode)"
275	depends on ARCH_S32 || COMPILE_TEST
276	select PCIE_DW_HOST
277	help
278	  Enable support for the PCIe controller in NXP S32G based boards to
279	  work in Host mode. The controller is based on DesignWare IP and
280	  can work either as RC or EP. In order to enable host-specific
281	  features PCIE_NXP_S32G must be selected.
282
283config PCIE_DW_PLAT
284	bool
285
286config PCIE_DW_PLAT_HOST
287	bool "Platform bus based DesignWare PCIe controller (host mode)"
288	depends on PCI_MSI
289	select PCIE_DW_HOST
290	select PCIE_DW_PLAT
291	help
292	  Enables support for the PCIe controller in the Designware IP to
293	  work in host mode. There are two instances of PCIe controller in
294	  Designware IP.
295	  This controller can work either as EP or RC. In order to enable
296	  host-specific features PCIE_DW_PLAT_HOST must be selected and in
297	  order to enable device-specific features PCI_DW_PLAT_EP must be
298	  selected.
299
300config PCIE_DW_PLAT_EP
301	bool "Platform bus based DesignWare PCIe controller (endpoint mode)"
302	depends on PCI && PCI_MSI
303	depends on PCI_ENDPOINT
304	select PCIE_DW_EP
305	select PCIE_DW_PLAT
306	help
307	  Enables support for the PCIe controller in the Designware IP to
308	  work in endpoint mode. There are two instances of PCIe controller
309	  in Designware IP.
310	  This controller can work either as EP or RC. In order to enable
311	  host-specific features PCIE_DW_PLAT_HOST must be selected and in
312	  order to enable device-specific features PCI_DW_PLAT_EP must be
313	  selected.
314
315config PCIE_QCOM_COMMON
316	bool
317
318config PCIE_QCOM
319	bool "Qualcomm PCIe controller (host mode)"
320	depends on OF && (ARCH_QCOM || COMPILE_TEST)
321	depends on PCI_MSI
322	select PCIE_DW_HOST
323	select CRC8
324	select PCIE_QCOM_COMMON
325	select PCI_HOST_COMMON
326	select PCI_PWRCTRL_GENERIC
327	help
328	  Say Y here to enable PCIe controller support on Qualcomm SoCs. The
329	  PCIe controller uses the DesignWare core plus Qualcomm-specific
330	  hardware wrappers.
331
332config PCIE_QCOM_EP
333	tristate "Qualcomm PCIe controller (endpoint mode)"
334	depends on OF && (ARCH_QCOM || COMPILE_TEST)
335	depends on PCI_ENDPOINT
336	select PCIE_DW_EP
337	select PCIE_QCOM_COMMON
338	help
339	  Say Y here to enable support for the PCIe controllers on Qualcomm SoCs
340	  to work in endpoint mode. The PCIe controller uses the DesignWare core
341	  plus Qualcomm-specific hardware wrappers.
342
343config PCIE_RCAR_GEN4
344	tristate
345
346config PCIE_RCAR_GEN4_HOST
347	tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
348	depends on ARCH_RENESAS || COMPILE_TEST
349	depends on PCI_MSI
350	select PCIE_DW_HOST
351	select PCIE_RCAR_GEN4
352	help
353	  Say Y here if you want PCIe controller (host mode) on R-Car Gen4 SoCs.
354	  To compile this driver as a module, choose M here: the module will be
355	  called pcie-rcar-gen4.ko. This uses the DesignWare core.
356
357config PCIE_RCAR_GEN4_EP
358	tristate "Renesas R-Car Gen4 PCIe controller (endpoint mode)"
359	depends on ARCH_RENESAS || COMPILE_TEST
360	depends on PCI_ENDPOINT
361	select PCIE_DW_EP
362	select PCIE_RCAR_GEN4
363	help
364	  Say Y here if you want PCIe controller (endpoint mode) on R-Car Gen4
365	  SoCs. To compile this driver as a module, choose M here: the module
366	  will be called pcie-rcar-gen4.ko. This uses the DesignWare core.
367
368config PCIE_ROCKCHIP_DW
369	bool
370
371config PCIE_ROCKCHIP_DW_HOST
372	bool "Rockchip DesignWare PCIe controller (host mode)"
373	depends on PCI_MSI
374	depends on ARCH_ROCKCHIP || COMPILE_TEST
375	depends on OF
376	select PCIE_DW_HOST
377	select PCIE_ROCKCHIP_DW
378	help
379	  Enables support for the DesignWare PCIe controller in the
380	  Rockchip SoC (except RK3399) to work in host mode.
381
382config PCIE_ROCKCHIP_DW_EP
383	bool "Rockchip DesignWare PCIe controller (endpoint mode)"
384	depends on ARCH_ROCKCHIP || COMPILE_TEST
385	depends on OF
386	depends on PCI_ENDPOINT
387	select PCIE_DW_EP
388	select PCIE_ROCKCHIP_DW
389	help
390	  Enables support for the DesignWare PCIe controller in the
391	  Rockchip SoC (except RK3399) to work in endpoint mode.
392
393config PCI_EXYNOS
394	tristate "Samsung Exynos PCIe controller"
395	depends on ARCH_EXYNOS || COMPILE_TEST
396	depends on PCI_MSI
397	select PCIE_DW_HOST
398	help
399	  Enables support for the PCIe controller in the Samsung Exynos SoCs
400	  to work in host mode. The PCI controller is based on the DesignWare
401	  hardware and therefore the driver re-uses the DesignWare core
402	  functions to implement the driver.
403
404config PCIE_FU740
405	bool "SiFive FU740 PCIe controller"
406	depends on PCI_MSI
407	depends on ARCH_SIFIVE || COMPILE_TEST
408	select PCIE_DW_HOST
409	help
410	  Say Y here if you want PCIe controller support for the SiFive
411	  FU740.
412
413config PCIE_UNIPHIER
414	bool "Socionext UniPhier PCIe controller (host mode)"
415	depends on ARCH_UNIPHIER || COMPILE_TEST
416	depends on OF && HAS_IOMEM
417	depends on PCI_MSI
418	select PCIE_DW_HOST
419	help
420	  Say Y here if you want PCIe host controller support on UniPhier SoCs.
421	  This driver supports LD20 and PXs3 SoCs.
422
423config PCIE_UNIPHIER_EP
424	bool "Socionext UniPhier PCIe controller (endpoint mode)"
425	depends on ARCH_UNIPHIER || COMPILE_TEST
426	depends on OF && HAS_IOMEM
427	depends on PCI_ENDPOINT
428	select PCIE_DW_EP
429	help
430	  Say Y here if you want PCIe endpoint controller support on
431	  UniPhier SoCs. This driver supports Pro5 SoC.
432
433config PCIE_SOPHGO_DW
434	bool "Sophgo DesignWare PCIe controller (host mode)"
435	depends on ARCH_SOPHGO || COMPILE_TEST
436	depends on PCI_MSI
437	depends on OF
438	select PCIE_DW_HOST
439	help
440	  Say Y here if you want PCIe host controller support on
441	  Sophgo SoCs.
442
443config PCIE_SPACEMIT_K1
444	tristate "SpacemiT K1 PCIe controller (host mode)"
445	depends on ARCH_SPACEMIT || COMPILE_TEST
446	depends on HAS_IOMEM
447	select PCIE_DW_HOST
448	select PCI_PWRCTRL_GENERIC
449	default ARCH_SPACEMIT
450	help
451	  Enables support for the DesignWare based PCIe controller in
452	  the SpacemiT K1 SoC operating in host mode.  Three controllers
453	  are available on the K1 SoC; the first of these shares a PHY
454	  with a USB 3.0 host controller (one or the other can be used).
455
456config PCIE_SPEAR13XX
457	bool "STMicroelectronics SPEAr PCIe controller"
458	depends on ARCH_SPEAR13XX || COMPILE_TEST
459	depends on PCI_MSI
460	select PCIE_DW_HOST
461	help
462	  Say Y here if you want PCIe support on SPEAr13XX SoCs.
463
464config PCIE_STM32_HOST
465	tristate "STMicroelectronics STM32MP25 PCIe Controller (host mode)"
466	depends on ARCH_STM32 || COMPILE_TEST
467	depends on PCI_MSI
468	select PCIE_DW_HOST
469	help
470	  Enables Root Complex (RC) support for the DesignWare core based PCIe
471	  controller found in STM32MP25 SoC.
472
473	  This driver can also be built as a module. If so, the module
474	  will be called pcie-stm32.
475
476config PCIE_STM32_EP
477	tristate "STMicroelectronics STM32MP25 PCIe Controller (endpoint mode)"
478	depends on ARCH_STM32 || COMPILE_TEST
479	depends on PCI_ENDPOINT
480	select PCIE_DW_EP
481	help
482	  Enables Endpoint (EP) support for the DesignWare core based PCIe
483	  controller found in STM32MP25 SoC.
484
485	  This driver can also be built as a module. If so, the module
486	  will be called pcie-stm32-ep.
487
488config PCI_DRA7XX
489	tristate
490
491config PCI_DRA7XX_HOST
492	tristate "TI DRA7xx PCIe controller (host mode)"
493	depends on SOC_DRA7XX || COMPILE_TEST
494	depends on OF && HAS_IOMEM && TI_PIPE3
495	depends on PCI_MSI
496	select PCIE_DW_HOST
497	select PCI_DRA7XX
498	default y if SOC_DRA7XX
499	help
500	  Enables support for the PCIe controller in the DRA7xx SoC to work in
501	  host mode. There are two instances of PCIe controller in DRA7xx.
502	  This controller can work either as EP or RC. In order to enable
503	  host-specific features PCI_DRA7XX_HOST must be selected and in order
504	  to enable device-specific features PCI_DRA7XX_EP must be selected.
505	  This uses the DesignWare core.
506
507config PCI_DRA7XX_EP
508	tristate "TI DRA7xx PCIe controller (endpoint mode)"
509	depends on SOC_DRA7XX || COMPILE_TEST
510	depends on OF && HAS_IOMEM && TI_PIPE3
511	depends on PCI_ENDPOINT
512	select PCIE_DW_EP
513	select PCI_DRA7XX
514	help
515	  Enables support for the PCIe controller in the DRA7xx SoC to work in
516	  endpoint mode. There are two instances of PCIe controller in DRA7xx.
517	  This controller can work either as EP or RC. In order to enable
518	  host-specific features PCI_DRA7XX_HOST must be selected and in order
519	  to enable device-specific features PCI_DRA7XX_EP must be selected.
520	  This uses the DesignWare core.
521
522# ARM32 platforms use hook_fault_code() and cannot support loadable module.
523config PCI_KEYSTONE
524	bool
525
526# On non-ARM32 platforms, loadable module can be supported.
527config PCI_KEYSTONE_TRISTATE
528	tristate
529
530config PCI_KEYSTONE_HOST
531	tristate "TI Keystone PCIe controller (host mode)"
532	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
533	depends on PCI_MSI
534	select PCIE_DW_HOST
535	select PCI_KEYSTONE if ARM
536	select PCI_KEYSTONE_TRISTATE if !ARM
537	help
538	  Enables support for the PCIe controller in the Keystone SoC to
539	  work in host mode. The PCI controller on Keystone is based on
540	  DesignWare hardware and therefore the driver re-uses the
541	  DesignWare core functions to implement the driver.
542
543config PCI_KEYSTONE_EP
544	tristate "TI Keystone PCIe controller (endpoint mode)"
545	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
546	depends on PCI_ENDPOINT
547	select PCIE_DW_EP
548	select PCI_KEYSTONE if ARM
549	select PCI_KEYSTONE_TRISTATE if !ARM
550	help
551	  Enables support for the PCIe controller in the Keystone SoC to
552	  work in endpoint mode. The PCI controller on Keystone is based
553	  on DesignWare hardware and therefore the driver re-uses the
554	  DesignWare core functions to implement the driver.
555
556config PCIE_VISCONTI_HOST
557	bool "Toshiba Visconti PCIe controller"
558	depends on ARCH_VISCONTI || COMPILE_TEST
559	depends on PCI_MSI
560	select PCIE_DW_HOST
561	help
562	  Say Y here if you want PCIe controller support on Toshiba Visconti SoC.
563	  This driver supports TMPV7708 SoC.
564
565config PCIE_ULTRARISC
566	tristate "UltraRISC PCIe host controller"
567	depends on ARCH_ULTRARISC || COMPILE_TEST
568	select PCIE_DW_HOST
569	select PCI_MSI
570	default y if ARCH_ULTRARISC
571	help
572	  Enables support for the PCIe controller in the UltraRISC SoC.
573	  This driver supports UR-DP1000 SoC.
574
575	  By default, this symbol is enabled when ARCH_ULTRARISC is active,
576	  requiring no further configuration on that platform.
577
578endmenu
579