18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciconfig USB_DWC3
48c2ecf20Sopenharmony_ci	tristate "DesignWare USB3 DRD Core Support"
58c2ecf20Sopenharmony_ci	depends on (USB || USB_GADGET) && HAS_DMA
68c2ecf20Sopenharmony_ci	select USB_XHCI_PLATFORM if USB_XHCI_HCD
78c2ecf20Sopenharmony_ci	select USB_ROLE_SWITCH if USB_DWC3_DUAL_ROLE
88c2ecf20Sopenharmony_ci	help
98c2ecf20Sopenharmony_ci	  Say Y or M here if your system has a Dual Role SuperSpeed
108c2ecf20Sopenharmony_ci	  USB controller based on the DesignWare USB3 IP Core.
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci	  If you choose to build this driver is a dynamically linked
138c2ecf20Sopenharmony_ci	  module, the module will be called dwc3.ko.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciif USB_DWC3
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciconfig USB_DWC3_ULPI
188c2ecf20Sopenharmony_ci	bool "Register ULPI PHY Interface"
198c2ecf20Sopenharmony_ci	depends on USB_ULPI_BUS=y || USB_ULPI_BUS=USB_DWC3
208c2ecf20Sopenharmony_ci	help
218c2ecf20Sopenharmony_ci	  Select this if you have ULPI type PHY attached to your DWC3
228c2ecf20Sopenharmony_ci	  controller.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_cichoice
258c2ecf20Sopenharmony_ci	bool "DWC3 Mode Selection"
268c2ecf20Sopenharmony_ci	default USB_DWC3_DUAL_ROLE if (USB && USB_GADGET)
278c2ecf20Sopenharmony_ci	default USB_DWC3_HOST if (USB && !USB_GADGET)
288c2ecf20Sopenharmony_ci	default USB_DWC3_GADGET if (!USB && USB_GADGET)
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciconfig USB_DWC3_HOST
318c2ecf20Sopenharmony_ci	bool "Host only mode"
328c2ecf20Sopenharmony_ci	depends on USB=y || USB=USB_DWC3
338c2ecf20Sopenharmony_ci	help
348c2ecf20Sopenharmony_ci	  Select this when you want to use DWC3 in host mode only,
358c2ecf20Sopenharmony_ci	  thereby the gadget feature will be regressed.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciconfig USB_DWC3_GADGET
388c2ecf20Sopenharmony_ci	bool "Gadget only mode"
398c2ecf20Sopenharmony_ci	depends on USB_GADGET=y || USB_GADGET=USB_DWC3
408c2ecf20Sopenharmony_ci	help
418c2ecf20Sopenharmony_ci	  Select this when you want to use DWC3 in gadget mode only,
428c2ecf20Sopenharmony_ci	  thereby the host feature will be regressed.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciconfig USB_DWC3_DUAL_ROLE
458c2ecf20Sopenharmony_ci	bool "Dual Role mode"
468c2ecf20Sopenharmony_ci	depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))
478c2ecf20Sopenharmony_ci	depends on (EXTCON=y || EXTCON=USB_DWC3)
488c2ecf20Sopenharmony_ci	help
498c2ecf20Sopenharmony_ci	  This is the default mode of working of DWC3 controller where
508c2ecf20Sopenharmony_ci	  both host and gadget features are enabled.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciendchoice
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_cicomment "Platform Glue Driver Support"
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciconfig USB_DWC3_OMAP
578c2ecf20Sopenharmony_ci	tristate "Texas Instruments OMAP5 and similar Platforms"
588c2ecf20Sopenharmony_ci	depends on ARCH_OMAP2PLUS || COMPILE_TEST
598c2ecf20Sopenharmony_ci	depends on EXTCON || !EXTCON
608c2ecf20Sopenharmony_ci	depends on OF
618c2ecf20Sopenharmony_ci	default USB_DWC3
628c2ecf20Sopenharmony_ci	help
638c2ecf20Sopenharmony_ci	  Some platforms from Texas Instruments like OMAP5, DRA7xxx and
648c2ecf20Sopenharmony_ci	  AM437x use this IP for USB2/3 functionality.
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci	  Say 'Y' or 'M' here if you have one such device
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ciconfig USB_DWC3_EXYNOS
698c2ecf20Sopenharmony_ci	tristate "Samsung Exynos Platform"
708c2ecf20Sopenharmony_ci	depends on (ARCH_EXYNOS || COMPILE_TEST) && OF
718c2ecf20Sopenharmony_ci	default USB_DWC3
728c2ecf20Sopenharmony_ci	help
738c2ecf20Sopenharmony_ci	  Recent Exynos5 SoCs ship with one DesignWare Core USB3 IP inside,
748c2ecf20Sopenharmony_ci	  say 'Y' or 'M' if you have one such device.
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ciconfig USB_DWC3_PCI
778c2ecf20Sopenharmony_ci	tristate "PCIe-based Platforms"
788c2ecf20Sopenharmony_ci	depends on USB_PCI && ACPI
798c2ecf20Sopenharmony_ci	default USB_DWC3
808c2ecf20Sopenharmony_ci	help
818c2ecf20Sopenharmony_ci	  If you're using the DesignWare Core IP with a PCIe (but not HAPS
828c2ecf20Sopenharmony_ci	  platform), please say 'Y' or 'M' here.
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ciconfig USB_DWC3_HAPS
858c2ecf20Sopenharmony_ci	tristate "Synopsys PCIe-based HAPS Platforms"
868c2ecf20Sopenharmony_ci	depends on USB_PCI
878c2ecf20Sopenharmony_ci	default USB_DWC3
888c2ecf20Sopenharmony_ci	help
898c2ecf20Sopenharmony_ci	  If you're using the DesignWare Core IP with a Synopsys PCIe HAPS
908c2ecf20Sopenharmony_ci	  platform, please say 'Y' or 'M' here.
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ciconfig USB_DWC3_KEYSTONE
938c2ecf20Sopenharmony_ci	tristate "Texas Instruments Keystone2/AM654 Platforms"
948c2ecf20Sopenharmony_ci	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
958c2ecf20Sopenharmony_ci	default USB_DWC3
968c2ecf20Sopenharmony_ci	help
978c2ecf20Sopenharmony_ci	  Support of USB2/3 functionality in TI Keystone2 and AM654 platforms.
988c2ecf20Sopenharmony_ci	  Say 'Y' or 'M' here if you have one such device
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciconfig USB_DWC3_MESON_G12A
1018c2ecf20Sopenharmony_ci	tristate "Amlogic Meson G12A Platforms"
1028c2ecf20Sopenharmony_ci	depends on OF && COMMON_CLK
1038c2ecf20Sopenharmony_ci	depends on ARCH_MESON || COMPILE_TEST
1048c2ecf20Sopenharmony_ci	default USB_DWC3
1058c2ecf20Sopenharmony_ci	select USB_ROLE_SWITCH
1068c2ecf20Sopenharmony_ci	select REGMAP_MMIO
1078c2ecf20Sopenharmony_ci	help
1088c2ecf20Sopenharmony_ci	  Support USB2/3 functionality in Amlogic G12A platforms.
1098c2ecf20Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ciconfig USB_DWC3_OF_SIMPLE
1128c2ecf20Sopenharmony_ci	tristate "Generic OF Simple Glue Layer"
1138c2ecf20Sopenharmony_ci	depends on OF && COMMON_CLK
1148c2ecf20Sopenharmony_ci	default USB_DWC3
1158c2ecf20Sopenharmony_ci	help
1168c2ecf20Sopenharmony_ci	  Support USB2/3 functionality in simple SoC integrations.
1178c2ecf20Sopenharmony_ci	  Currently supports Xilinx and Qualcomm DWC USB3 IP.
1188c2ecf20Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ciconfig USB_DWC3_ST
1218c2ecf20Sopenharmony_ci	tristate "STMicroelectronics Platforms"
1228c2ecf20Sopenharmony_ci	depends on (ARCH_STI || COMPILE_TEST) && OF
1238c2ecf20Sopenharmony_ci	default USB_DWC3
1248c2ecf20Sopenharmony_ci	help
1258c2ecf20Sopenharmony_ci	  STMicroelectronics SoCs with one DesignWare Core USB3 IP
1268c2ecf20Sopenharmony_ci	  inside (i.e. STiH407).
1278c2ecf20Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ciconfig USB_DWC3_QCOM
1308c2ecf20Sopenharmony_ci	tristate "Qualcomm Platform"
1318c2ecf20Sopenharmony_ci	depends on ARCH_QCOM || COMPILE_TEST
1328c2ecf20Sopenharmony_ci	depends on EXTCON || !EXTCON
1338c2ecf20Sopenharmony_ci	depends on (OF || ACPI)
1348c2ecf20Sopenharmony_ci	default USB_DWC3
1358c2ecf20Sopenharmony_ci	help
1368c2ecf20Sopenharmony_ci	  Some Qualcomm SoCs use DesignWare Core IP for USB2/3
1378c2ecf20Sopenharmony_ci	  functionality.
1388c2ecf20Sopenharmony_ci	  This driver also handles Qscratch wrapper which is needed
1398c2ecf20Sopenharmony_ci	  for peripheral mode support.
1408c2ecf20Sopenharmony_ci	  Say 'Y' or 'M' if you have one such device.
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ciendif
143