162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciconfig USB_DWC3
462306a36Sopenharmony_ci	tristate "DesignWare USB3 DRD Core Support"
562306a36Sopenharmony_ci	depends on (USB || USB_GADGET) && HAS_DMA
662306a36Sopenharmony_ci	depends on (EXTCON || EXTCON=n)
762306a36Sopenharmony_ci	select USB_XHCI_PLATFORM if USB_XHCI_HCD
862306a36Sopenharmony_ci	select USB_ROLE_SWITCH if USB_DWC3_DUAL_ROLE
962306a36Sopenharmony_ci	help
1062306a36Sopenharmony_ci	  Say Y or M here if your system has a Dual Role SuperSpeed
1162306a36Sopenharmony_ci	  USB controller based on the DesignWare USB3 IP Core.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci	  If you choose to build this driver as a dynamically linked
1462306a36Sopenharmony_ci	  module, the module will be called dwc3.ko.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciif USB_DWC3
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciconfig USB_DWC3_ULPI
1962306a36Sopenharmony_ci	bool "Register ULPI PHY Interface"
2062306a36Sopenharmony_ci	depends on USB_ULPI_BUS=y || USB_ULPI_BUS=USB_DWC3
2162306a36Sopenharmony_ci	help
2262306a36Sopenharmony_ci	  Select this if you have ULPI type PHY attached to your DWC3
2362306a36Sopenharmony_ci	  controller.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_cichoice
2662306a36Sopenharmony_ci	bool "DWC3 Mode Selection"
2762306a36Sopenharmony_ci	default USB_DWC3_DUAL_ROLE if (USB && USB_GADGET)
2862306a36Sopenharmony_ci	default USB_DWC3_HOST if (USB && !USB_GADGET)
2962306a36Sopenharmony_ci	default USB_DWC3_GADGET if (!USB && USB_GADGET)
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciconfig USB_DWC3_HOST
3262306a36Sopenharmony_ci	bool "Host only mode"
3362306a36Sopenharmony_ci	depends on USB=y || USB=USB_DWC3
3462306a36Sopenharmony_ci	help
3562306a36Sopenharmony_ci	  Select this when you want to use DWC3 in host mode only,
3662306a36Sopenharmony_ci	  thereby the gadget feature will be regressed.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciconfig USB_DWC3_GADGET
3962306a36Sopenharmony_ci	bool "Gadget only mode"
4062306a36Sopenharmony_ci	depends on USB_GADGET=y || USB_GADGET=USB_DWC3
4162306a36Sopenharmony_ci	help
4262306a36Sopenharmony_ci	  Select this when you want to use DWC3 in gadget mode only,
4362306a36Sopenharmony_ci	  thereby the host feature will be regressed.
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ciconfig USB_DWC3_DUAL_ROLE
4662306a36Sopenharmony_ci	bool "Dual Role mode"
4762306a36Sopenharmony_ci	depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))
4862306a36Sopenharmony_ci	help
4962306a36Sopenharmony_ci	  This is the default mode of working of DWC3 controller where
5062306a36Sopenharmony_ci	  both host and gadget features are enabled.
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ciendchoice
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_cicomment "Platform Glue Driver Support"
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciconfig USB_DWC3_OMAP
5762306a36Sopenharmony_ci	tristate "Texas Instruments OMAP5 and similar Platforms"
5862306a36Sopenharmony_ci	depends on ARCH_OMAP2PLUS || COMPILE_TEST
5962306a36Sopenharmony_ci	depends on EXTCON || !EXTCON
6062306a36Sopenharmony_ci	depends on OF
6162306a36Sopenharmony_ci	default USB_DWC3
6262306a36Sopenharmony_ci	help
6362306a36Sopenharmony_ci	  Some platforms from Texas Instruments like OMAP5, DRA7xxx and
6462306a36Sopenharmony_ci	  AM437x use this IP for USB2/3 functionality.
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci	  Say 'Y' or 'M' here if you have one such device
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ciconfig USB_DWC3_EXYNOS
6962306a36Sopenharmony_ci	tristate "Samsung Exynos SoC Platform"
7062306a36Sopenharmony_ci	depends on (ARCH_EXYNOS || COMPILE_TEST) && OF
7162306a36Sopenharmony_ci	default USB_DWC3
7262306a36Sopenharmony_ci	help
7362306a36Sopenharmony_ci	  Recent Samsung Exynos SoCs (Exynos5250, Exynos5410, Exynos542x,
7462306a36Sopenharmony_ci	  Exynos5800, Exynos5433, Exynos7) ship with one DesignWare Core USB3
7562306a36Sopenharmony_ci	  IP inside, say 'Y' or 'M' if you have one such device.
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciconfig USB_DWC3_PCI
7862306a36Sopenharmony_ci	tristate "PCIe-based Platforms"
7962306a36Sopenharmony_ci	depends on USB_PCI && ACPI
8062306a36Sopenharmony_ci	default USB_DWC3
8162306a36Sopenharmony_ci	help
8262306a36Sopenharmony_ci	  If you're using the DesignWare Core IP with a PCIe (but not HAPS
8362306a36Sopenharmony_ci	  platform), please say 'Y' or 'M' here.
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciconfig USB_DWC3_HAPS
8662306a36Sopenharmony_ci	tristate "Synopsys PCIe-based HAPS Platforms"
8762306a36Sopenharmony_ci	depends on USB_PCI
8862306a36Sopenharmony_ci	default USB_DWC3
8962306a36Sopenharmony_ci	help
9062306a36Sopenharmony_ci	  If you're using the DesignWare Core IP with a Synopsys PCIe HAPS
9162306a36Sopenharmony_ci	  platform, please say 'Y' or 'M' here.
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ciconfig USB_DWC3_KEYSTONE
9462306a36Sopenharmony_ci	tristate "Texas Instruments Keystone2/AM654 Platforms"
9562306a36Sopenharmony_ci	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
9662306a36Sopenharmony_ci	default USB_DWC3
9762306a36Sopenharmony_ci	help
9862306a36Sopenharmony_ci	  Support of USB2/3 functionality in TI Keystone2 and AM654 platforms.
9962306a36Sopenharmony_ci	  Say 'Y' or 'M' here if you have one such device
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ciconfig USB_DWC3_MESON_G12A
10262306a36Sopenharmony_ci	tristate "Amlogic Meson G12A Platforms"
10362306a36Sopenharmony_ci	depends on OF && COMMON_CLK
10462306a36Sopenharmony_ci	depends on ARCH_MESON || COMPILE_TEST
10562306a36Sopenharmony_ci	default USB_DWC3
10662306a36Sopenharmony_ci	select USB_ROLE_SWITCH
10762306a36Sopenharmony_ci	select REGMAP_MMIO
10862306a36Sopenharmony_ci	help
10962306a36Sopenharmony_ci	  Support USB2/3 functionality in Amlogic G12A platforms.
11062306a36Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ciconfig USB_DWC3_OF_SIMPLE
11362306a36Sopenharmony_ci	tristate "Generic OF Simple Glue Layer"
11462306a36Sopenharmony_ci	depends on OF && COMMON_CLK
11562306a36Sopenharmony_ci	default USB_DWC3
11662306a36Sopenharmony_ci	help
11762306a36Sopenharmony_ci	  Support USB2/3 functionality in simple SoC integrations.
11862306a36Sopenharmony_ci	  Currently supports Xilinx and Qualcomm DWC USB3 IP.
11962306a36Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ciconfig USB_DWC3_ST
12262306a36Sopenharmony_ci	tristate "STMicroelectronics Platforms"
12362306a36Sopenharmony_ci	depends on (ARCH_STI || COMPILE_TEST) && OF
12462306a36Sopenharmony_ci	default USB_DWC3
12562306a36Sopenharmony_ci	help
12662306a36Sopenharmony_ci	  STMicroelectronics SoCs with one DesignWare Core USB3 IP
12762306a36Sopenharmony_ci	  inside (i.e. STiH407).
12862306a36Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ciconfig USB_DWC3_QCOM
13162306a36Sopenharmony_ci	tristate "Qualcomm Platform"
13262306a36Sopenharmony_ci	depends on ARCH_QCOM || COMPILE_TEST
13362306a36Sopenharmony_ci	depends on EXTCON || !EXTCON
13462306a36Sopenharmony_ci	depends on (OF || ACPI)
13562306a36Sopenharmony_ci	default USB_DWC3
13662306a36Sopenharmony_ci	help
13762306a36Sopenharmony_ci	  Some Qualcomm SoCs use DesignWare Core IP for USB2/3
13862306a36Sopenharmony_ci	  functionality.
13962306a36Sopenharmony_ci	  This driver also handles Qscratch wrapper which is needed
14062306a36Sopenharmony_ci	  for peripheral mode support.
14162306a36Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ciconfig USB_DWC3_IMX8MP
14462306a36Sopenharmony_ci	tristate "NXP iMX8MP Platform"
14562306a36Sopenharmony_ci	depends on OF && COMMON_CLK
14662306a36Sopenharmony_ci	depends on (ARCH_MXC && ARM64) || COMPILE_TEST
14762306a36Sopenharmony_ci	default USB_DWC3
14862306a36Sopenharmony_ci	help
14962306a36Sopenharmony_ci	  NXP iMX8M Plus SoC use DesignWare Core IP for USB2/3
15062306a36Sopenharmony_ci	  functionality.
15162306a36Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ciconfig USB_DWC3_XILINX
15462306a36Sopenharmony_ci	tristate "Xilinx Platforms"
15562306a36Sopenharmony_ci	depends on (ARCH_ZYNQMP || COMPILE_TEST) && OF
15662306a36Sopenharmony_ci	default USB_DWC3
15762306a36Sopenharmony_ci	help
15862306a36Sopenharmony_ci	  Support Xilinx SoCs with DesignWare Core USB3 IP.
15962306a36Sopenharmony_ci	  This driver handles ZynqMP SoC operations.
16062306a36Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ciconfig USB_DWC3_AM62
16362306a36Sopenharmony_ci	tristate "Texas Instruments AM62 Platforms"
16462306a36Sopenharmony_ci	depends on ARCH_K3 || COMPILE_TEST
16562306a36Sopenharmony_ci	default USB_DWC3
16662306a36Sopenharmony_ci	help
16762306a36Sopenharmony_ci	  Support TI's AM62 platforms with DesignWare Core USB3 IP.
16862306a36Sopenharmony_ci	  The Designware Core USB3 IP is programmed to operate in
16962306a36Sopenharmony_ci	  in USB 2.0 mode only.
17062306a36Sopenharmony_ci	  Say 'Y' or 'M' here if you have one such device
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ciconfig USB_DWC3_OCTEON
17362306a36Sopenharmony_ci	tristate "Cavium Octeon Platforms"
17462306a36Sopenharmony_ci	depends on CAVIUM_OCTEON_SOC || COMPILE_TEST
17562306a36Sopenharmony_ci	default USB_DWC3
17662306a36Sopenharmony_ci	help
17762306a36Sopenharmony_ci	  Support Cavium Octeon platforms with DesignWare Core USB3 IP.
17862306a36Sopenharmony_ci	  Only the host mode is currently supported.
17962306a36Sopenharmony_ci	  Say 'Y' or 'M' here if you have one such device.
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ciendif
182