xref: /linux/drivers/pci/controller/dwc/Kconfig (revision 4fe60541de1176c55028aedf755a8968bfab1b97)
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_IMX6
130	help
131	  Enables support for the PCIe controller in the i.MX SoCs to
132	  work in endpoint mode. The PCI controller on i.MX is based
133	  on DesignWare hardware and therefore the driver re-uses the
134	  DesignWare core functions to implement the driver.
135
136config PCI_LAYERSCAPE
137	tristate "Freescale Layerscape PCIe controller (host mode)"
138	depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST)
139	depends on PCI_MSI
140	select PCIE_DW_HOST
141	select MFD_SYSCON
142	help
143	  Say Y here if you want to enable PCIe controller support on Layerscape
144	  SoCs to work in Host mode.
145	  This controller can work either as EP or RC. The RCW[HOST_AGT_PEX]
146	  determines which PCIe controller works in EP mode and which PCIe
147	  controller works in RC mode.
148
149config PCI_LAYERSCAPE_EP
150	bool "Freescale Layerscape PCIe controller (endpoint mode)"
151	depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST)
152	depends on PCI_ENDPOINT
153	select PCIE_DW_EP
154	help
155	  Say Y here if you want to enable PCIe controller support on Layerscape
156	  SoCs to work in Endpoint mode.
157	  This controller can work either as EP or RC. The RCW[HOST_AGT_PEX]
158	  determines which PCIe controller works in EP mode and which PCIe
159	  controller works in RC mode.
160
161config PCI_HISI
162	depends on OF && (ARM64 || COMPILE_TEST)
163	bool "HiSilicon Hip05 and Hip06 SoCs PCIe controller"
164	depends on PCI_MSI
165	select PCIE_DW_HOST
166	select PCI_HOST_COMMON
167	help
168	  Say Y here if you want PCIe controller support on HiSilicon
169	  Hip05 and Hip06 SoCs
170
171config PCIE_KIRIN
172	depends on OF && (ARM64 || COMPILE_TEST)
173	tristate "HiSilicon Kirin PCIe controller"
174	depends on PCI_MSI
175	select PCIE_DW_HOST
176	select REGMAP_MMIO
177	help
178	  Say Y here if you want PCIe controller support
179	  on HiSilicon Kirin series SoCs.
180
181config PCIE_HISI_STB
182	bool "HiSilicon STB PCIe controller"
183	depends on ARCH_HISI || COMPILE_TEST
184	depends on PCI_MSI
185	select PCIE_DW_HOST
186	help
187	  Say Y here if you want PCIe controller support on HiSilicon STB SoCs
188
189config PCIE_INTEL_GW
190	bool "Intel Gateway PCIe controller "
191	depends on OF && (X86 || COMPILE_TEST)
192	depends on PCI_MSI
193	select PCIE_DW_HOST
194	help
195	  Say 'Y' here to enable PCIe Host controller support on Intel
196	  Gateway SoCs.
197	  The PCIe controller uses the DesignWare core plus Intel-specific
198	  hardware wrappers.
199
200config PCIE_KEEMBAY
201	bool
202
203config PCIE_KEEMBAY_HOST
204	bool "Intel Keem Bay PCIe controller (host mode)"
205	depends on ARCH_KEEMBAY || COMPILE_TEST
206	depends on PCI_MSI
207	select PCIE_DW_HOST
208	select PCIE_KEEMBAY
209	help
210	  Say 'Y' here to enable support for the PCIe controller in Keem Bay
211	  to work in host mode.
212	  The PCIe controller is based on DesignWare Hardware and uses
213	  DesignWare core functions.
214
215config PCIE_KEEMBAY_EP
216	bool "Intel Keem Bay PCIe controller (endpoint mode)"
217	depends on ARCH_KEEMBAY || COMPILE_TEST
218	depends on PCI_MSI
219	depends on PCI_ENDPOINT
220	select PCIE_DW_EP
221	select PCIE_KEEMBAY
222	help
223	  Say 'Y' here to enable support for the PCIe controller in Keem Bay
224	  to work in endpoint mode.
225	  The PCIe controller is based on DesignWare Hardware and uses
226	  DesignWare core functions.
227
228config PCIE_ARMADA_8K
229	bool "Marvell Armada-8K PCIe controller"
230	depends on ARCH_MVEBU || COMPILE_TEST
231	depends on PCI_MSI
232	select PCIE_DW_HOST
233	help
234	  Say Y here if you want to enable PCIe controller support on
235	  Armada-8K SoCs. The PCIe controller on Armada-8K is based on
236	  DesignWare hardware and therefore the driver re-uses the
237	  DesignWare core functions to implement the driver.
238
239config PCIE_TEGRA194
240	tristate
241
242config PCIE_TEGRA194_HOST
243	tristate "NVIDIA Tegra194 (and later) PCIe controller (host mode)"
244	depends on (ARCH_TEGRA && ARM64) || COMPILE_TEST
245	depends on PCI_MSI
246	select PCIE_DW_HOST
247	select PHY_TEGRA194_P2U
248	select PCIE_TEGRA194
249	help
250	  Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
251	  work in host mode. There are two instances of PCIe controllers in
252	  Tegra194. This controller can work either as EP or RC. In order to
253	  enable host-specific features PCIE_TEGRA194_HOST must be selected and
254	  in order to enable device-specific features PCIE_TEGRA194_EP must be
255	  selected. This uses the DesignWare core.
256
257config PCIE_TEGRA194_EP
258	tristate "NVIDIA Tegra194 (and later) PCIe controller (endpoint mode)"
259	depends on (ARCH_TEGRA && ARM64) || COMPILE_TEST
260	depends on PCI_ENDPOINT
261	select PCIE_DW_EP
262	select PHY_TEGRA194_P2U
263	select PCIE_TEGRA194
264	help
265	  Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
266	  work in endpoint mode. There are two instances of PCIe controllers in
267	  Tegra194. This controller can work either as EP or RC. In order to
268	  enable host-specific features PCIE_TEGRA194_HOST must be selected and
269	  in order to enable device-specific features PCIE_TEGRA194_EP must be
270	  selected. This uses the DesignWare core.
271
272config PCIE_NXP_S32G
273	bool "NXP S32G PCIe controller (host mode)"
274	depends on ARCH_S32 || COMPILE_TEST
275	select PCIE_DW_HOST
276	help
277	  Enable support for the PCIe controller in NXP S32G based boards to
278	  work in Host mode. The controller is based on DesignWare IP and
279	  can work either as RC or EP. In order to enable host-specific
280	  features PCIE_NXP_S32G must be selected.
281
282config PCIE_DW_PLAT
283	bool
284
285config PCIE_DW_PLAT_HOST
286	bool "Platform bus based DesignWare PCIe controller (host mode)"
287	depends on PCI_MSI
288	select PCIE_DW_HOST
289	select PCIE_DW_PLAT
290	help
291	  Enables support for the PCIe controller in the Designware IP to
292	  work in host mode. There are two instances of PCIe controller in
293	  Designware IP.
294	  This controller can work either as EP or RC. In order to enable
295	  host-specific features PCIE_DW_PLAT_HOST must be selected and in
296	  order to enable device-specific features PCI_DW_PLAT_EP must be
297	  selected.
298
299config PCIE_DW_PLAT_EP
300	bool "Platform bus based DesignWare PCIe controller (endpoint mode)"
301	depends on PCI && PCI_MSI
302	depends on PCI_ENDPOINT
303	select PCIE_DW_EP
304	select PCIE_DW_PLAT
305	help
306	  Enables support for the PCIe controller in the Designware IP to
307	  work in endpoint mode. There are two instances of PCIe controller
308	  in Designware IP.
309	  This controller can work either as EP or RC. In order to enable
310	  host-specific features PCIE_DW_PLAT_HOST must be selected and in
311	  order to enable device-specific features PCI_DW_PLAT_EP must be
312	  selected.
313
314config PCIE_QCOM_COMMON
315	bool
316
317config PCIE_QCOM
318	bool "Qualcomm PCIe controller (host mode)"
319	depends on OF && (ARCH_QCOM || COMPILE_TEST)
320	depends on PCI_MSI
321	select PCIE_DW_HOST
322	select CRC8
323	select PCIE_QCOM_COMMON
324	select PCI_HOST_COMMON
325	select PCI_PWRCTRL_GENERIC
326	help
327	  Say Y here to enable PCIe controller support on Qualcomm SoCs. The
328	  PCIe controller uses the DesignWare core plus Qualcomm-specific
329	  hardware wrappers.
330
331config PCIE_QCOM_EP
332	tristate "Qualcomm PCIe controller (endpoint mode)"
333	depends on OF && (ARCH_QCOM || COMPILE_TEST)
334	depends on PCI_ENDPOINT
335	select PCIE_DW_EP
336	select PCIE_QCOM_COMMON
337	help
338	  Say Y here to enable support for the PCIe controllers on Qualcomm SoCs
339	  to work in endpoint mode. The PCIe controller uses the DesignWare core
340	  plus Qualcomm-specific hardware wrappers.
341
342config PCIE_RCAR_GEN4
343	tristate
344
345config PCIE_RCAR_GEN4_HOST
346	tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
347	depends on ARCH_RENESAS || COMPILE_TEST
348	depends on PCI_MSI
349	select PCIE_DW_HOST
350	select PCIE_RCAR_GEN4
351	help
352	  Say Y here if you want PCIe controller (host mode) on R-Car Gen4 SoCs.
353	  To compile this driver as a module, choose M here: the module will be
354	  called pcie-rcar-gen4.ko. This uses the DesignWare core.
355
356config PCIE_RCAR_GEN4_EP
357	tristate "Renesas R-Car Gen4 PCIe controller (endpoint mode)"
358	depends on ARCH_RENESAS || COMPILE_TEST
359	depends on PCI_ENDPOINT
360	select PCIE_DW_EP
361	select PCIE_RCAR_GEN4
362	help
363	  Say Y here if you want PCIe controller (endpoint mode) on R-Car Gen4
364	  SoCs. To compile this driver as a module, choose M here: the module
365	  will be called pcie-rcar-gen4.ko. This uses the DesignWare core.
366
367config PCIE_ROCKCHIP_DW
368	bool
369
370config PCIE_ROCKCHIP_DW_HOST
371	bool "Rockchip DesignWare PCIe controller (host mode)"
372	depends on PCI_MSI
373	depends on ARCH_ROCKCHIP || COMPILE_TEST
374	depends on OF
375	select PCIE_DW_HOST
376	select PCIE_ROCKCHIP_DW
377	select PCI_HOST_COMMON
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