xref: /linux/drivers/usb/dwc2/Kconfig (revision 89f1ec8ee251920dd1bf07abf7a14c62d81d5733)
1197ba5f4SPaul Zimmermanconfig USB_DWC2
25ee80705SDinh Nguyen	tristate "DesignWare USB2 DRD Core Support"
3c3761a79SDinh Nguyen	depends on USB || USB_GADGET
4*89f1ec8eSVegard Nossum	depends on HAS_IOMEM
5197ba5f4SPaul Zimmerman	help
647a1685fSDinh Nguyen	  Say Y here if your system has a Dual Role Hi-Speed USB
747a1685fSDinh Nguyen	  controller based on the DesignWare HSOTG IP Core.
8197ba5f4SPaul Zimmerman
947a1685fSDinh Nguyen	  For host mode, if you choose to build the driver as dynamically
1047a1685fSDinh Nguyen	  linked modules, the core module will be called dwc2.ko, the PCI
1147a1685fSDinh Nguyen	  bus interface module (if you have a PCI bus system) will be
1247a1685fSDinh Nguyen	  called dwc2_pci.ko, and the platform interface module (for
1347a1685fSDinh Nguyen	  controllers directly connected to the CPU) will be called
145ee80705SDinh Nguyen	  dwc2_platform.ko. For all modes(host, gadget and dual-role), there
155ee80705SDinh Nguyen	  will be an additional module named dwc2.ko.
16197ba5f4SPaul Zimmerman
17197ba5f4SPaul Zimmermanif USB_DWC2
18197ba5f4SPaul Zimmerman
195ee80705SDinh Nguyenchoice
205ee80705SDinh Nguyen	bool "DWC2 Mode Selection"
215ee80705SDinh Nguyen	default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
225ee80705SDinh Nguyen	default USB_DWC2_HOST if (USB && !USB_GADGET)
235ee80705SDinh Nguyen	default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
245ee80705SDinh Nguyen
2547a1685fSDinh Nguyenconfig USB_DWC2_HOST
265ee80705SDinh Nguyen	bool "Host only mode"
27b7974de8SArnd Bergmann	depends on USB=y || (USB_DWC2=m && USB)
2847a1685fSDinh Nguyen	help
2947a1685fSDinh Nguyen	  The Designware USB2.0 high-speed host controller
305ee80705SDinh Nguyen	  integrated into many SoCs. Select this option if you want the
315ee80705SDinh Nguyen	  driver to operate in Host-only mode.
325ee80705SDinh Nguyen
335ee80705SDinh Nguyencomment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
345ee80705SDinh Nguyen
355ee80705SDinh Nguyenconfig USB_DWC2_PERIPHERAL
365ee80705SDinh Nguyen	bool "Gadget only mode"
375ee80705SDinh Nguyen	depends on USB_GADGET=y || USB_GADGET=USB_DWC2
385ee80705SDinh Nguyen	help
395ee80705SDinh Nguyen	  The Designware USB2.0 high-speed gadget controller
405ee80705SDinh Nguyen	  integrated into many SoCs. Select this option if you want the
415ee80705SDinh Nguyen	  driver to operate in Peripheral-only mode. This option requires
425ee80705SDinh Nguyen	  USB_GADGET to be enabled.
435ee80705SDinh Nguyen
445ee80705SDinh Nguyenconfig USB_DWC2_DUAL_ROLE
455ee80705SDinh Nguyen	bool "Dual Role mode"
46b7974de8SArnd Bergmann	depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
475ee80705SDinh Nguyen	help
485ee80705SDinh Nguyen	  Select this option if you want the driver to work in a dual-role
495ee80705SDinh Nguyen	  mode. In this mode both host and gadget features are enabled, and
505ee80705SDinh Nguyen	  the role will be determined by the cable that gets plugged-in. This
515ee80705SDinh Nguyen	  option requires USB_GADGET to be enabled.
525ee80705SDinh Nguyenendchoice
5347a1685fSDinh Nguyen
5447a1685fSDinh Nguyenconfig USB_DWC2_PCI
555ee80705SDinh Nguyen	tristate "DWC2 PCI"
569024c495SJohn Youn	depends on PCI
579024c495SJohn Youn	default n
58d4ae02ccSJohn Youn	select NOP_USB_XCEIV
5947a1685fSDinh Nguyen	help
6047a1685fSDinh Nguyen	  The Designware USB2.0 PCI interface module for controllers
619024c495SJohn Youn	  connected to a PCI bus.
6247a1685fSDinh Nguyen
63197ba5f4SPaul Zimmermanconfig USB_DWC2_DEBUG
64197ba5f4SPaul Zimmerman	bool "Enable Debugging Messages"
65197ba5f4SPaul Zimmerman	help
66197ba5f4SPaul Zimmerman	  Say Y here to enable debugging messages in the DWC2 Driver.
67197ba5f4SPaul Zimmerman
68197ba5f4SPaul Zimmermanconfig USB_DWC2_VERBOSE
69197ba5f4SPaul Zimmerman	bool "Enable Verbose Debugging Messages"
70197ba5f4SPaul Zimmerman	depends on USB_DWC2_DEBUG
71197ba5f4SPaul Zimmerman	help
72197ba5f4SPaul Zimmerman	  Say Y here to enable verbose debugging messages in the DWC2 Driver.
73197ba5f4SPaul Zimmerman	  WARNING: Enabling this will quickly fill your message log.
74197ba5f4SPaul Zimmerman	  If in doubt, say N.
75197ba5f4SPaul Zimmerman
76197ba5f4SPaul Zimmermanconfig USB_DWC2_TRACK_MISSED_SOFS
77197ba5f4SPaul Zimmerman	bool "Enable Missed SOF Tracking"
78197ba5f4SPaul Zimmerman	help
79197ba5f4SPaul Zimmerman	  Say Y here to enable logging of missed SOF events to the dmesg log.
80197ba5f4SPaul Zimmerman	  WARNING: This feature is still experimental.
81197ba5f4SPaul Zimmerman	  If in doubt, say N.
82197ba5f4SPaul Zimmerman
83197ba5f4SPaul Zimmermanconfig USB_DWC2_DEBUG_PERIODIC
84197ba5f4SPaul Zimmerman	bool "Enable Debugging Messages For Periodic Transfers"
85197ba5f4SPaul Zimmerman	depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE
86197ba5f4SPaul Zimmerman	default y
87197ba5f4SPaul Zimmerman	help
88197ba5f4SPaul Zimmerman	  Say N here to disable (verbose) debugging messages to be
89197ba5f4SPaul Zimmerman	  logged for periodic transfers. This allows better debugging of
90197ba5f4SPaul Zimmerman	  non-periodic transfers, but of course the debug logs will be
91197ba5f4SPaul Zimmerman	  incomplete. Note that this also disables some debug messages
92197ba5f4SPaul Zimmerman	  for which the transfer type cannot be deduced.
93197ba5f4SPaul Zimmermanendif
94