blob: 1bcb36ae6505afc9cff52f218d396271f763d542 [file] [log] [blame]
Paul Zimmerman535f60a2013-03-11 17:48:02 -07001config USB_DWC2
Dinh Nguyen5ee80702014-11-11 11:13:40 -06002 tristate "DesignWare USB2 DRD Core Support"
Dinh Nguyenc3761a72014-10-21 15:31:42 -05003 depends on USB || USB_GADGET
Paul Zimmerman535f60a2013-03-11 17:48:02 -07004 help
Dinh Nguyen47a16852014-04-14 14:13:34 -07005 Say Y here if your system has a Dual Role Hi-Speed USB
6 controller based on the DesignWare HSOTG IP Core.
Paul Zimmerman535f60a2013-03-11 17:48:02 -07007
Dinh Nguyen47a16852014-04-14 14:13:34 -07008 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
Dinh Nguyen5ee80702014-11-11 11:13:40 -060013 dwc2_platform.ko. For all modes(host, gadget and dual-role), there
14 will be an additional module named dwc2.ko.
Paul Zimmerman535f60a2013-03-11 17:48:02 -070015
16if USB_DWC2
17
Dinh Nguyen5ee80702014-11-11 11:13:40 -060018choice
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
Dinh Nguyen47a16852014-04-14 14:13:34 -070024config USB_DWC2_HOST
Dinh Nguyen5ee80702014-11-11 11:13:40 -060025 bool "Host only mode"
Arnd Bergmannb7974de82015-01-28 22:49:00 +010026 depends on USB=y || (USB_DWC2=m && USB)
Dinh Nguyen47a16852014-04-14 14:13:34 -070027 help
28 The Designware USB2.0 high-speed host controller
Dinh Nguyen5ee80702014-11-11 11:13:40 -060029 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"
Arnd Bergmannb7974de82015-01-28 22:49:00 +010045 depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
Dinh Nguyen5ee80702014-11-11 11:13:40 -060046 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
Dinh Nguyen47a16852014-04-14 14:13:34 -070052
53config USB_DWC2_PLATFORM
Dinh Nguyen5ee80702014-11-11 11:13:40 -060054 tristate "DWC2 Platform"
55 default USB_DWC2_HOST || USB_DWC2_PERIPHERAL
56 help
57 The Designware USB2.0 platform interface module for
58 controllers directly connected to the CPU.
Dinh Nguyen47a16852014-04-14 14:13:34 -070059
60config USB_DWC2_PCI
Dinh Nguyen5ee80702014-11-11 11:13:40 -060061 tristate "DWC2 PCI"
John Youn9024c492015-03-03 17:17:49 -080062 depends on PCI
63 default n
64 select USB_DWC2_PLATFORM
John Yound4ae02c2015-03-12 10:04:42 -070065 select NOP_USB_XCEIV
Dinh Nguyen47a16852014-04-14 14:13:34 -070066 help
67 The Designware USB2.0 PCI interface module for controllers
John Youn9024c492015-03-03 17:17:49 -080068 connected to a PCI bus.
Dinh Nguyen47a16852014-04-14 14:13:34 -070069
Paul Zimmerman535f60a2013-03-11 17:48:02 -070070config USB_DWC2_DEBUG
71 bool "Enable Debugging Messages"
72 help
73 Say Y here to enable debugging messages in the DWC2 Driver.
74
75config USB_DWC2_VERBOSE
76 bool "Enable Verbose Debugging Messages"
77 depends on USB_DWC2_DEBUG
78 help
79 Say Y here to enable verbose debugging messages in the DWC2 Driver.
80 WARNING: Enabling this will quickly fill your message log.
81 If in doubt, say N.
82
83config USB_DWC2_TRACK_MISSED_SOFS
84 bool "Enable Missed SOF Tracking"
85 help
86 Say Y here to enable logging of missed SOF events to the dmesg log.
Paul Zimmerman0797c3a2013-05-22 15:10:15 -070087 WARNING: This feature is still experimental.
Paul Zimmerman535f60a2013-03-11 17:48:02 -070088 If in doubt, say N.
89
Matthijs Kooijmanb49977a2013-04-10 09:55:50 +020090config USB_DWC2_DEBUG_PERIODIC
91 bool "Enable Debugging Messages For Periodic Transfers"
92 depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE
93 default y
94 help
95 Say N here to disable (verbose) debugging messages to be
96 logged for periodic transfers. This allows better debugging of
97 non-periodic transfers, but of course the debug logs will be
98 incomplete. Note that this also disables some debug messages
99 for which the transfer type cannot be deduced.
Paul Zimmerman535f60a2013-03-11 17:48:02 -0700100endif