xref: /kernel/linux/linux-5.10/drivers/usb/dwc2/Kconfig (revision 8c2ecf20)
18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciconfig USB_DWC2
48c2ecf20Sopenharmony_ci	tristate "DesignWare USB2 DRD Core Support"
58c2ecf20Sopenharmony_ci	depends on HAS_DMA
68c2ecf20Sopenharmony_ci	depends on USB || USB_GADGET
78c2ecf20Sopenharmony_ci	depends on HAS_IOMEM
88c2ecf20Sopenharmony_ci	select USB_ROLE_SWITCH
98c2ecf20Sopenharmony_ci	help
108c2ecf20Sopenharmony_ci	  Say Y here if your system has a Dual Role Hi-Speed USB
118c2ecf20Sopenharmony_ci	  controller based on the DesignWare HSOTG IP Core.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci	  For host mode, if you choose to build the driver as dynamically
148c2ecf20Sopenharmony_ci	  linked modules, the core module will be called dwc2.ko, the PCI
158c2ecf20Sopenharmony_ci	  bus interface module (if you have a PCI bus system) will be
168c2ecf20Sopenharmony_ci	  called dwc2_pci.ko, and the platform interface module (for
178c2ecf20Sopenharmony_ci	  controllers directly connected to the CPU) will be called
188c2ecf20Sopenharmony_ci	  dwc2_platform.ko. For all modes(host, gadget and dual-role), there
198c2ecf20Sopenharmony_ci	  will be an additional module named dwc2.ko.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciif USB_DWC2
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cichoice
248c2ecf20Sopenharmony_ci	bool "DWC2 Mode Selection"
258c2ecf20Sopenharmony_ci	default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
268c2ecf20Sopenharmony_ci	default USB_DWC2_HOST if (USB && !USB_GADGET)
278c2ecf20Sopenharmony_ci	default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciconfig USB_DWC2_HOST
308c2ecf20Sopenharmony_ci	bool "Host only mode"
318c2ecf20Sopenharmony_ci	depends on USB=y || (USB_DWC2=m && USB)
328c2ecf20Sopenharmony_ci	help
338c2ecf20Sopenharmony_ci	  The Designware USB2.0 high-speed host controller
348c2ecf20Sopenharmony_ci	  integrated into many SoCs. Select this option if you want the
358c2ecf20Sopenharmony_ci	  driver to operate in Host-only mode.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_cicomment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciconfig USB_DWC2_PERIPHERAL
408c2ecf20Sopenharmony_ci	bool "Gadget only mode"
418c2ecf20Sopenharmony_ci	depends on USB_GADGET=y || USB_GADGET=USB_DWC2
428c2ecf20Sopenharmony_ci	help
438c2ecf20Sopenharmony_ci	  The Designware USB2.0 high-speed gadget controller
448c2ecf20Sopenharmony_ci	  integrated into many SoCs. Select this option if you want the
458c2ecf20Sopenharmony_ci	  driver to operate in Peripheral-only mode. This option requires
468c2ecf20Sopenharmony_ci	  USB_GADGET to be enabled.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciconfig USB_DWC2_DUAL_ROLE
498c2ecf20Sopenharmony_ci	bool "Dual Role mode"
508c2ecf20Sopenharmony_ci	depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
518c2ecf20Sopenharmony_ci	help
528c2ecf20Sopenharmony_ci	  Select this option if you want the driver to work in a dual-role
538c2ecf20Sopenharmony_ci	  mode. In this mode both host and gadget features are enabled, and
548c2ecf20Sopenharmony_ci	  the role will be determined by the cable that gets plugged-in. This
558c2ecf20Sopenharmony_ci	  option requires USB_GADGET to be enabled.
568c2ecf20Sopenharmony_ciendchoice
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciconfig USB_DWC2_PCI
598c2ecf20Sopenharmony_ci	tristate "DWC2 PCI"
608c2ecf20Sopenharmony_ci	depends on USB_PCI
618c2ecf20Sopenharmony_ci	depends on USB_GADGET || !USB_GADGET
628c2ecf20Sopenharmony_ci	select NOP_USB_XCEIV
638c2ecf20Sopenharmony_ci	help
648c2ecf20Sopenharmony_ci	  The Designware USB2.0 PCI interface module for controllers
658c2ecf20Sopenharmony_ci	  connected to a PCI bus.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciconfig USB_DWC2_DEBUG
688c2ecf20Sopenharmony_ci	bool "Enable Debugging Messages"
698c2ecf20Sopenharmony_ci	help
708c2ecf20Sopenharmony_ci	  Say Y here to enable debugging messages in the DWC2 Driver.
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ciconfig USB_DWC2_VERBOSE
738c2ecf20Sopenharmony_ci	bool "Enable Verbose Debugging Messages"
748c2ecf20Sopenharmony_ci	depends on USB_DWC2_DEBUG
758c2ecf20Sopenharmony_ci	help
768c2ecf20Sopenharmony_ci	  Say Y here to enable verbose debugging messages in the DWC2 Driver.
778c2ecf20Sopenharmony_ci	  WARNING: Enabling this will quickly fill your message log.
788c2ecf20Sopenharmony_ci	  If in doubt, say N.
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ciconfig USB_DWC2_TRACK_MISSED_SOFS
818c2ecf20Sopenharmony_ci	bool "Enable Missed SOF Tracking"
828c2ecf20Sopenharmony_ci	help
838c2ecf20Sopenharmony_ci	  Say Y here to enable logging of missed SOF events to the dmesg log.
848c2ecf20Sopenharmony_ci	  WARNING: This feature is still experimental.
858c2ecf20Sopenharmony_ci	  If in doubt, say N.
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ciconfig USB_DWC2_DEBUG_PERIODIC
888c2ecf20Sopenharmony_ci	bool "Enable Debugging Messages For Periodic Transfers"
898c2ecf20Sopenharmony_ci	depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE
908c2ecf20Sopenharmony_ci	default y
918c2ecf20Sopenharmony_ci	help
928c2ecf20Sopenharmony_ci	  Say N here to disable (verbose) debugging messages to be
938c2ecf20Sopenharmony_ci	  logged for periodic transfers. This allows better debugging of
948c2ecf20Sopenharmony_ci	  non-periodic transfers, but of course the debug logs will be
958c2ecf20Sopenharmony_ci	  incomplete. Note that this also disables some debug messages
968c2ecf20Sopenharmony_ci	  for which the transfer type cannot be deduced.
978c2ecf20Sopenharmony_ciendif
98