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