Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 
0003 config USB_DWC2
0004         tristate "DesignWare USB2 DRD Core Support"
0005         depends on HAS_DMA
0006         depends on USB || USB_GADGET
0007         depends on HAS_IOMEM
0008         select USB_ROLE_SWITCH
0009         help
0010           Say Y here if your system has a Dual Role Hi-Speed USB
0011           controller based on the DesignWare HSOTG IP Core.
0012 
0013           For host mode, if you choose to build the driver as dynamically
0014           linked modules, the core module will be called dwc2.ko, the PCI
0015           bus interface module (if you have a PCI bus system) will be
0016           called dwc2_pci.ko, and the platform interface module (for
0017           controllers directly connected to the CPU) will be called
0018           dwc2_platform.ko. For all modes(host, gadget and dual-role), there
0019           will be an additional module named dwc2.ko.
0020 
0021 if USB_DWC2
0022 
0023 choice
0024         bool "DWC2 Mode Selection"
0025         default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET)
0026         default USB_DWC2_HOST if (USB && !USB_GADGET)
0027         default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET)
0028 
0029 config USB_DWC2_HOST
0030         bool "Host only mode"
0031         depends on USB=y || (USB_DWC2=m && USB)
0032         help
0033           The Designware USB2.0 high-speed host controller
0034           integrated into many SoCs. Select this option if you want the
0035           driver to operate in Host-only mode.
0036 
0037 comment "Gadget/Dual-role mode requires USB Gadget support to be enabled"
0038 
0039 config USB_DWC2_PERIPHERAL
0040         bool "Gadget only mode"
0041         depends on USB_GADGET=y || USB_GADGET=USB_DWC2
0042         help
0043           The Designware USB2.0 high-speed gadget controller
0044           integrated into many SoCs. Select this option if you want the
0045           driver to operate in Peripheral-only mode. This option requires
0046           USB_GADGET to be enabled.
0047 
0048 config USB_DWC2_DUAL_ROLE
0049         bool "Dual Role mode"
0050         depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET)
0051         help
0052           Select this option if you want the driver to work in a dual-role
0053           mode. In this mode both host and gadget features are enabled, and
0054           the role will be determined by the cable that gets plugged-in. This
0055           option requires USB_GADGET to be enabled.
0056 endchoice
0057 
0058 config USB_DWC2_PCI
0059         tristate "DWC2 PCI"
0060         depends on USB_PCI
0061         depends on USB_GADGET || !USB_GADGET
0062         select NOP_USB_XCEIV
0063         help
0064           The Designware USB2.0 PCI interface module for controllers
0065           connected to a PCI bus.
0066 
0067 config USB_DWC2_DEBUG
0068         bool "Enable Debugging Messages"
0069         help
0070           Say Y here to enable debugging messages in the DWC2 Driver.
0071 
0072 config USB_DWC2_VERBOSE
0073         bool "Enable Verbose Debugging Messages"
0074         depends on USB_DWC2_DEBUG
0075         help
0076           Say Y here to enable verbose debugging messages in the DWC2 Driver.
0077           WARNING: Enabling this will quickly fill your message log.
0078           If in doubt, say N.
0079 
0080 config USB_DWC2_TRACK_MISSED_SOFS
0081         bool "Enable Missed SOF Tracking"
0082         help
0083           Say Y here to enable logging of missed SOF events to the dmesg log.
0084           WARNING: This feature is still experimental.
0085           If in doubt, say N.
0086 
0087 config USB_DWC2_DEBUG_PERIODIC
0088         bool "Enable Debugging Messages For Periodic Transfers"
0089         depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE
0090         default y
0091         help
0092           Say N here to disable (verbose) debugging messages to be
0093           logged for periodic transfers. This allows better debugging of
0094           non-periodic transfers, but of course the debug logs will be
0095           incomplete. Note that this also disables some debug messages
0096           for which the transfer type cannot be deduced.
0097 endif