blob: c1f29caa8990af6e4b9440a5bacb19d0313ced78 [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"
Geert Uytterhoevena057c322016-02-16 16:10:59 +01003 depends on HAS_DMA
Dinh Nguyenc3761a72014-10-21 15:31:42 -05004 depends on USB || USB_GADGET
Vegard Nossum89f1ec82016-02-10 15:29:44 +01005 depends on HAS_IOMEM
Paul Zimmerman535f60a2013-03-11 17:48:02 -07006 help
Dinh Nguyen47a16852014-04-14 14:13:34 -07007 Say Y here if your system has a Dual Role Hi-Speed USB
8 controller based on the DesignWare HSOTG IP Core.
Paul Zimmerman535f60a2013-03-11 17:48:02 -07009
Dinh Nguyen47a16852014-04-14 14:13:34 -070010 For host mode, if you choose to build the driver as dynamically
11 linked modules, the core module will be called dwc2.ko, the PCI
12 bus interface module (if you have a PCI bus system) will be
13 called dwc2_pci.ko, and the platform interface module (for
14 controllers directly connected to the CPU) will be called
Dinh Nguyen5ee80702014-11-11 11:13:40 -060015 dwc2_platform.ko. For all modes(host, gadget and dual-role), there
16 will be an additional module named dwc2.ko.
Paul Zimmerman535f60a2013-03-11 17:48:02 -070017
18if USB_DWC2
19
Dinh Nguyen5ee80702014-11-11 11:13:40 -060020choice
21 bool "DWC2 Mode Selection"
22 default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
23 default USB_DWC2_HOST if (USB && !USB_GADGET)
24 default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
25
Dinh Nguyen47a16852014-04-14 14:13:34 -070026config USB_DWC2_HOST
Dinh Nguyen5ee80702014-11-11 11:13:40 -060027 bool "Host only mode"
Arnd Bergmannb7974de82015-01-28 22:49:00 +010028 depends on USB=y || (USB_DWC2=m && USB)
Dinh Nguyen47a16852014-04-14 14:13:34 -070029 help
30 The Designware USB2.0 high-speed host controller
Dinh Nguyen5ee80702014-11-11 11:13:40 -060031 integrated into many SoCs. Select this option if you want the
32 driver to operate in Host-only mode.
33
34comment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
35
36config USB_DWC2_PERIPHERAL
37 bool "Gadget only mode"
38 depends on USB_GADGET=y || USB_GADGET=USB_DWC2
39 help
40 The Designware USB2.0 high-speed gadget controller
41 integrated into many SoCs. Select this option if you want the
42 driver to operate in Peripheral-only mode. This option requires
43 USB_GADGET to be enabled.
44
45config USB_DWC2_DUAL_ROLE
46 bool "Dual Role mode"
Arnd Bergmannb7974de82015-01-28 22:49:00 +010047 depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
Dinh Nguyen5ee80702014-11-11 11:13:40 -060048 help
49 Select this option if you want the driver to work in a dual-role
50 mode. In this mode both host and gadget features are enabled, and
51 the role will be determined by the cable that gets plugged-in. This
52 option requires USB_GADGET to be enabled.
53endchoice
Dinh Nguyen47a16852014-04-14 14:13:34 -070054
Dinh Nguyen47a16852014-04-14 14:13:34 -070055config USB_DWC2_PCI
Dinh Nguyen5ee80702014-11-11 11:13:40 -060056 tristate "DWC2 PCI"
John Youn9024c492015-03-03 17:17:49 -080057 depends on PCI
58 default n
John Yound4ae02c2015-03-12 10:04:42 -070059 select NOP_USB_XCEIV
Dinh Nguyen47a16852014-04-14 14:13:34 -070060 help
61 The Designware USB2.0 PCI interface module for controllers
John Youn9024c492015-03-03 17:17:49 -080062 connected to a PCI bus.
Dinh Nguyen47a16852014-04-14 14:13:34 -070063
Paul Zimmerman535f60a2013-03-11 17:48:02 -070064config USB_DWC2_DEBUG
65 bool "Enable Debugging Messages"
66 help
67 Say Y here to enable debugging messages in the DWC2 Driver.
68
69config USB_DWC2_VERBOSE
70 bool "Enable Verbose Debugging Messages"
71 depends on USB_DWC2_DEBUG
72 help
73 Say Y here to enable verbose debugging messages in the DWC2 Driver.
74 WARNING: Enabling this will quickly fill your message log.
75 If in doubt, say N.
76
77config USB_DWC2_TRACK_MISSED_SOFS
78 bool "Enable Missed SOF Tracking"
79 help
80 Say Y here to enable logging of missed SOF events to the dmesg log.
Paul Zimmerman0797c3a2013-05-22 15:10:15 -070081 WARNING: This feature is still experimental.
Paul Zimmerman535f60a2013-03-11 17:48:02 -070082 If in doubt, say N.
83
Matthijs Kooijmanb49977a2013-04-10 09:55:50 +020084config USB_DWC2_DEBUG_PERIODIC
85 bool "Enable Debugging Messages For Periodic Transfers"
86 depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE
87 default y
88 help
89 Say N here to disable (verbose) debugging messages to be
90 logged for periodic transfers. This allows better debugging of
91 non-periodic transfers, but of course the debug logs will be
92 incomplete. Note that this also disables some debug messages
93 for which the transfer type cannot be deduced.
Paul Zimmerman535f60a2013-03-11 17:48:02 -070094endif