Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 1 | config USB_DWC2 |
Dinh Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 2 | tristate "DesignWare USB2 DRD Core Support" |
Geert Uytterhoeven | a057c32 | 2016-02-16 16:10:59 +0100 | [diff] [blame] | 3 | depends on HAS_DMA |
Dinh Nguyen | c3761a7 | 2014-10-21 15:31:42 -0500 | [diff] [blame] | 4 | depends on USB || USB_GADGET |
Vegard Nossum | 89f1ec8 | 2016-02-10 15:29:44 +0100 | [diff] [blame] | 5 | depends on HAS_IOMEM |
Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 6 | help |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 7 | Say Y here if your system has a Dual Role Hi-Speed USB |
| 8 | controller based on the DesignWare HSOTG IP Core. |
Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 9 | |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 10 | 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 Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 15 | dwc2_platform.ko. For all modes(host, gadget and dual-role), there |
| 16 | will be an additional module named dwc2.ko. |
Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 17 | |
| 18 | if USB_DWC2 |
| 19 | |
Dinh Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 20 | choice |
| 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 Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 26 | config USB_DWC2_HOST |
Dinh Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 27 | bool "Host only mode" |
Arnd Bergmann | b7974de8 | 2015-01-28 22:49:00 +0100 | [diff] [blame] | 28 | depends on USB=y || (USB_DWC2=m && USB) |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 29 | help |
| 30 | The Designware USB2.0 high-speed host controller |
Dinh Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 31 | integrated into many SoCs. Select this option if you want the |
| 32 | driver to operate in Host-only mode. |
| 33 | |
| 34 | comment "Gadget/Dual-role mode requires USB Gadget support to be enabled" |
| 35 | |
| 36 | config 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 | |
| 45 | config USB_DWC2_DUAL_ROLE |
| 46 | bool "Dual Role mode" |
Arnd Bergmann | b7974de8 | 2015-01-28 22:49:00 +0100 | [diff] [blame] | 47 | depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET) |
Dinh Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 48 | 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. |
| 53 | endchoice |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 54 | |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 55 | config USB_DWC2_PCI |
Dinh Nguyen | 5ee8070 | 2014-11-11 11:13:40 -0600 | [diff] [blame] | 56 | tristate "DWC2 PCI" |
John Youn | 9024c49 | 2015-03-03 17:17:49 -0800 | [diff] [blame] | 57 | depends on PCI |
Arnd Bergmann | e43470db | 2016-06-24 09:30:26 +0200 | [diff] [blame] | 58 | depends on USB_GADGET || !USB_GADGET |
John Youn | 9024c49 | 2015-03-03 17:17:49 -0800 | [diff] [blame] | 59 | default n |
John Youn | d4ae02c | 2015-03-12 10:04:42 -0700 | [diff] [blame] | 60 | select NOP_USB_XCEIV |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 61 | help |
| 62 | The Designware USB2.0 PCI interface module for controllers |
John Youn | 9024c49 | 2015-03-03 17:17:49 -0800 | [diff] [blame] | 63 | connected to a PCI bus. |
Dinh Nguyen | 47a1685 | 2014-04-14 14:13:34 -0700 | [diff] [blame] | 64 | |
Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 65 | config USB_DWC2_DEBUG |
| 66 | bool "Enable Debugging Messages" |
| 67 | help |
| 68 | Say Y here to enable debugging messages in the DWC2 Driver. |
| 69 | |
| 70 | config USB_DWC2_VERBOSE |
| 71 | bool "Enable Verbose Debugging Messages" |
| 72 | depends on USB_DWC2_DEBUG |
| 73 | help |
| 74 | Say Y here to enable verbose debugging messages in the DWC2 Driver. |
| 75 | WARNING: Enabling this will quickly fill your message log. |
| 76 | If in doubt, say N. |
| 77 | |
| 78 | config USB_DWC2_TRACK_MISSED_SOFS |
| 79 | bool "Enable Missed SOF Tracking" |
| 80 | help |
| 81 | Say Y here to enable logging of missed SOF events to the dmesg log. |
Paul Zimmerman | 0797c3a | 2013-05-22 15:10:15 -0700 | [diff] [blame] | 82 | WARNING: This feature is still experimental. |
Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 83 | If in doubt, say N. |
| 84 | |
Matthijs Kooijman | b49977a | 2013-04-10 09:55:50 +0200 | [diff] [blame] | 85 | config USB_DWC2_DEBUG_PERIODIC |
| 86 | bool "Enable Debugging Messages For Periodic Transfers" |
| 87 | depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE |
| 88 | default y |
| 89 | help |
| 90 | Say N here to disable (verbose) debugging messages to be |
| 91 | logged for periodic transfers. This allows better debugging of |
| 92 | non-periodic transfers, but of course the debug logs will be |
| 93 | incomplete. Note that this also disables some debug messages |
| 94 | for which the transfer type cannot be deduced. |
Paul Zimmerman | 535f60a | 2013-03-11 17:48:02 -0700 | [diff] [blame] | 95 | endif |