162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciconfig USB_DWC2 462306a36Sopenharmony_ci tristate "DesignWare USB2 DRD Core Support" 562306a36Sopenharmony_ci depends on HAS_DMA 662306a36Sopenharmony_ci depends on USB || USB_GADGET 762306a36Sopenharmony_ci depends on HAS_IOMEM 862306a36Sopenharmony_ci select USB_ROLE_SWITCH 962306a36Sopenharmony_ci help 1062306a36Sopenharmony_ci Say Y here if your system has a Dual Role Hi-Speed USB 1162306a36Sopenharmony_ci controller based on the DesignWare HSOTG IP Core. 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci For host mode, if you choose to build the driver as dynamically 1462306a36Sopenharmony_ci linked modules, the core module will be called dwc2.ko, the PCI 1562306a36Sopenharmony_ci bus interface module (if you have a PCI bus system) will be 1662306a36Sopenharmony_ci called dwc2_pci.ko, and the platform interface module (for 1762306a36Sopenharmony_ci controllers directly connected to the CPU) will be called 1862306a36Sopenharmony_ci dwc2_platform.ko. For all modes(host, gadget and dual-role), there 1962306a36Sopenharmony_ci will be an additional module named dwc2.ko. 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciif USB_DWC2 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_cichoice 2462306a36Sopenharmony_ci bool "DWC2 Mode Selection" 2562306a36Sopenharmony_ci default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET) 2662306a36Sopenharmony_ci default USB_DWC2_HOST if (USB && !USB_GADGET) 2762306a36Sopenharmony_ci default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET) 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciconfig USB_DWC2_HOST 3062306a36Sopenharmony_ci bool "Host only mode" 3162306a36Sopenharmony_ci depends on USB=y || (USB_DWC2=m && USB) 3262306a36Sopenharmony_ci help 3362306a36Sopenharmony_ci The Designware USB2.0 high-speed host controller 3462306a36Sopenharmony_ci integrated into many SoCs. Select this option if you want the 3562306a36Sopenharmony_ci driver to operate in Host-only mode. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_cicomment "Gadget/Dual-role mode requires USB Gadget support to be enabled" 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ciconfig USB_DWC2_PERIPHERAL 4062306a36Sopenharmony_ci bool "Gadget only mode" 4162306a36Sopenharmony_ci depends on USB_GADGET=y || USB_GADGET=USB_DWC2 4262306a36Sopenharmony_ci help 4362306a36Sopenharmony_ci The Designware USB2.0 high-speed gadget controller 4462306a36Sopenharmony_ci integrated into many SoCs. Select this option if you want the 4562306a36Sopenharmony_ci driver to operate in Peripheral-only mode. This option requires 4662306a36Sopenharmony_ci USB_GADGET to be enabled. 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ciconfig USB_DWC2_DUAL_ROLE 4962306a36Sopenharmony_ci bool "Dual Role mode" 5062306a36Sopenharmony_ci depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET) 5162306a36Sopenharmony_ci help 5262306a36Sopenharmony_ci Select this option if you want the driver to work in a dual-role 5362306a36Sopenharmony_ci mode. In this mode both host and gadget features are enabled, and 5462306a36Sopenharmony_ci the role will be determined by the cable that gets plugged-in. This 5562306a36Sopenharmony_ci option requires USB_GADGET to be enabled. 5662306a36Sopenharmony_ciendchoice 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ciconfig USB_DWC2_PCI 5962306a36Sopenharmony_ci tristate "DWC2 PCI" 6062306a36Sopenharmony_ci depends on USB_PCI 6162306a36Sopenharmony_ci depends on USB_GADGET || !USB_GADGET 6262306a36Sopenharmony_ci select NOP_USB_XCEIV 6362306a36Sopenharmony_ci help 6462306a36Sopenharmony_ci The Designware USB2.0 PCI interface module for controllers 6562306a36Sopenharmony_ci connected to a PCI bus. 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ciconfig USB_DWC2_DEBUG 6862306a36Sopenharmony_ci bool "Enable Debugging Messages" 6962306a36Sopenharmony_ci help 7062306a36Sopenharmony_ci Say Y here to enable debugging messages in the DWC2 Driver. 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ciconfig USB_DWC2_VERBOSE 7362306a36Sopenharmony_ci bool "Enable Verbose Debugging Messages" 7462306a36Sopenharmony_ci depends on USB_DWC2_DEBUG 7562306a36Sopenharmony_ci help 7662306a36Sopenharmony_ci Say Y here to enable verbose debugging messages in the DWC2 Driver. 7762306a36Sopenharmony_ci WARNING: Enabling this will quickly fill your message log. 7862306a36Sopenharmony_ci If in doubt, say N. 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ciconfig USB_DWC2_TRACK_MISSED_SOFS 8162306a36Sopenharmony_ci bool "Enable Missed SOF Tracking" 8262306a36Sopenharmony_ci help 8362306a36Sopenharmony_ci Say Y here to enable logging of missed SOF events to the dmesg log. 8462306a36Sopenharmony_ci WARNING: This feature is still experimental. 8562306a36Sopenharmony_ci If in doubt, say N. 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ciconfig USB_DWC2_DEBUG_PERIODIC 8862306a36Sopenharmony_ci bool "Enable Debugging Messages For Periodic Transfers" 8962306a36Sopenharmony_ci depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE 9062306a36Sopenharmony_ci default y 9162306a36Sopenharmony_ci help 9262306a36Sopenharmony_ci Say N here to disable (verbose) debugging messages to be 9362306a36Sopenharmony_ci logged for periodic transfers. This allows better debugging of 9462306a36Sopenharmony_ci non-periodic transfers, but of course the debug logs will be 9562306a36Sopenharmony_ci incomplete. Note that this also disables some debug messages 9662306a36Sopenharmony_ci for which the transfer type cannot be deduced. 9762306a36Sopenharmony_ciendif 98