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