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