xref: /openbmc/linux/drivers/usb/dwc2/Kconfig (revision 9cfc5c90)
1config USB_DWC2
2	tristate "DesignWare USB2 DRD Core Support"
3	depends on USB || USB_GADGET
4	help
5	  Say Y here if your system has a Dual Role Hi-Speed USB
6	  controller based on the DesignWare HSOTG IP Core.
7
8	  For host mode, if you choose to build the driver as dynamically
9	  linked modules, the core module will be called dwc2.ko, the PCI
10	  bus interface module (if you have a PCI bus system) will be
11	  called dwc2_pci.ko, and the platform interface module (for
12	  controllers directly connected to the CPU) will be called
13	  dwc2_platform.ko. For all modes(host, gadget and dual-role), there
14	  will be an additional module named dwc2.ko.
15
16if USB_DWC2
17
18choice
19	bool "DWC2 Mode Selection"
20	default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
21	default USB_DWC2_HOST if (USB && !USB_GADGET)
22	default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
23
24config USB_DWC2_HOST
25	bool "Host only mode"
26	depends on USB=y || (USB_DWC2=m && USB)
27	help
28	  The Designware USB2.0 high-speed host controller
29	  integrated into many SoCs. Select this option if you want the
30	  driver to operate in Host-only mode.
31
32comment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
33
34config USB_DWC2_PERIPHERAL
35	bool "Gadget only mode"
36	depends on USB_GADGET=y || USB_GADGET=USB_DWC2
37	help
38	  The Designware USB2.0 high-speed gadget controller
39	  integrated into many SoCs. Select this option if you want the
40	  driver to operate in Peripheral-only mode. This option requires
41	  USB_GADGET to be enabled.
42
43config USB_DWC2_DUAL_ROLE
44	bool "Dual Role mode"
45	depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
46	help
47	  Select this option if you want the driver to work in a dual-role
48	  mode. In this mode both host and gadget features are enabled, and
49	  the role will be determined by the cable that gets plugged-in. This
50	  option requires USB_GADGET to be enabled.
51endchoice
52
53config USB_DWC2_PCI
54	tristate "DWC2 PCI"
55	depends on PCI
56	default n
57	select NOP_USB_XCEIV
58	help
59	  The Designware USB2.0 PCI interface module for controllers
60	  connected to a PCI bus.
61
62config USB_DWC2_DEBUG
63	bool "Enable Debugging Messages"
64	help
65	  Say Y here to enable debugging messages in the DWC2 Driver.
66
67config USB_DWC2_VERBOSE
68	bool "Enable Verbose Debugging Messages"
69	depends on USB_DWC2_DEBUG
70	help
71	  Say Y here to enable verbose debugging messages in the DWC2 Driver.
72	  WARNING: Enabling this will quickly fill your message log.
73	  If in doubt, say N.
74
75config USB_DWC2_TRACK_MISSED_SOFS
76	bool "Enable Missed SOF Tracking"
77	help
78	  Say Y here to enable logging of missed SOF events to the dmesg log.
79	  WARNING: This feature is still experimental.
80	  If in doubt, say N.
81
82config USB_DWC2_DEBUG_PERIODIC
83	bool "Enable Debugging Messages For Periodic Transfers"
84	depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE
85	default y
86	help
87	  Say N here to disable (verbose) debugging messages to be
88	  logged for periodic transfers. This allows better debugging of
89	  non-periodic transfers, but of course the debug logs will be
90	  incomplete. Note that this also disables some debug messages
91	  for which the transfer type cannot be deduced.
92endif
93