1cae8dc3bSGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2cae8dc3bSGreg Kroah-Hartman 3197ba5f4SPaul Zimmermanconfig USB_DWC2 45ee80705SDinh Nguyen tristate "DesignWare USB2 DRD Core Support" 5a057c325SGeert Uytterhoeven depends on HAS_DMA 6c3761a79SDinh Nguyen depends on USB || USB_GADGET 789f1ec8eSVegard Nossum depends on HAS_IOMEM 817f93402SAmelie Delaunay select USB_ROLE_SWITCH 9197ba5f4SPaul Zimmerman help 1047a1685fSDinh Nguyen Say Y here if your system has a Dual Role Hi-Speed USB 1147a1685fSDinh Nguyen controller based on the DesignWare HSOTG IP Core. 12197ba5f4SPaul Zimmerman 1347a1685fSDinh Nguyen For host mode, if you choose to build the driver as dynamically 1447a1685fSDinh Nguyen linked modules, the core module will be called dwc2.ko, the PCI 1547a1685fSDinh Nguyen bus interface module (if you have a PCI bus system) will be 1647a1685fSDinh Nguyen called dwc2_pci.ko, and the platform interface module (for 1747a1685fSDinh Nguyen controllers directly connected to the CPU) will be called 185ee80705SDinh Nguyen dwc2_platform.ko. For all modes(host, gadget and dual-role), there 195ee80705SDinh Nguyen will be an additional module named dwc2.ko. 20197ba5f4SPaul Zimmerman 21197ba5f4SPaul Zimmermanif USB_DWC2 22197ba5f4SPaul Zimmerman 235ee80705SDinh Nguyenchoice 24*b95d0899SMasahiro Yamada prompt "DWC2 Mode Selection" 255ee80705SDinh Nguyen default USB_DWC2_DUAL_ROLE if (USB && USB_GADGET) 265ee80705SDinh Nguyen default USB_DWC2_HOST if (USB && !USB_GADGET) 275ee80705SDinh Nguyen default USB_DWC2_PERIPHERAL if (!USB && USB_GADGET) 285ee80705SDinh Nguyen 2947a1685fSDinh Nguyenconfig USB_DWC2_HOST 305ee80705SDinh Nguyen bool "Host only mode" 31b7974de8SArnd Bergmann depends on USB=y || (USB_DWC2=m && USB) 3247a1685fSDinh Nguyen help 3347a1685fSDinh Nguyen The Designware USB2.0 high-speed host controller 345ee80705SDinh Nguyen integrated into many SoCs. Select this option if you want the 355ee80705SDinh Nguyen driver to operate in Host-only mode. 365ee80705SDinh Nguyen 375ee80705SDinh Nguyencomment "Gadget/Dual-role mode requires USB Gadget support to be enabled" 385ee80705SDinh Nguyen 395ee80705SDinh Nguyenconfig USB_DWC2_PERIPHERAL 405ee80705SDinh Nguyen bool "Gadget only mode" 415ee80705SDinh Nguyen depends on USB_GADGET=y || USB_GADGET=USB_DWC2 425ee80705SDinh Nguyen help 435ee80705SDinh Nguyen The Designware USB2.0 high-speed gadget controller 445ee80705SDinh Nguyen integrated into many SoCs. Select this option if you want the 455ee80705SDinh Nguyen driver to operate in Peripheral-only mode. This option requires 465ee80705SDinh Nguyen USB_GADGET to be enabled. 475ee80705SDinh Nguyen 485ee80705SDinh Nguyenconfig USB_DWC2_DUAL_ROLE 495ee80705SDinh Nguyen bool "Dual Role mode" 50b7974de8SArnd Bergmann depends on (USB=y && USB_GADGET=y) || (USB_DWC2=m && USB && USB_GADGET) 515ee80705SDinh Nguyen help 525ee80705SDinh Nguyen Select this option if you want the driver to work in a dual-role 535ee80705SDinh Nguyen mode. In this mode both host and gadget features are enabled, and 545ee80705SDinh Nguyen the role will be determined by the cable that gets plugged-in. This 555ee80705SDinh Nguyen option requires USB_GADGET to be enabled. 565ee80705SDinh Nguyenendchoice 5747a1685fSDinh Nguyen 5847a1685fSDinh Nguyenconfig USB_DWC2_PCI 595ee80705SDinh Nguyen tristate "DWC2 PCI" 602c93e790Syuan linyu depends on USB_PCI 61e43470dbSArnd Bergmann depends on USB_GADGET || !USB_GADGET 62d4ae02ccSJohn Youn select NOP_USB_XCEIV 6347a1685fSDinh Nguyen help 6447a1685fSDinh Nguyen The Designware USB2.0 PCI interface module for controllers 659024c495SJohn Youn connected to a PCI bus. 6647a1685fSDinh Nguyen 67197ba5f4SPaul Zimmermanconfig USB_DWC2_DEBUG 68197ba5f4SPaul Zimmerman bool "Enable Debugging Messages" 69197ba5f4SPaul Zimmerman help 70197ba5f4SPaul Zimmerman Say Y here to enable debugging messages in the DWC2 Driver. 71197ba5f4SPaul Zimmerman 72197ba5f4SPaul Zimmermanconfig USB_DWC2_VERBOSE 73197ba5f4SPaul Zimmerman bool "Enable Verbose Debugging Messages" 74197ba5f4SPaul Zimmerman depends on USB_DWC2_DEBUG 75197ba5f4SPaul Zimmerman help 76197ba5f4SPaul Zimmerman Say Y here to enable verbose debugging messages in the DWC2 Driver. 77197ba5f4SPaul Zimmerman WARNING: Enabling this will quickly fill your message log. 78197ba5f4SPaul Zimmerman If in doubt, say N. 79197ba5f4SPaul Zimmerman 80197ba5f4SPaul Zimmermanconfig USB_DWC2_TRACK_MISSED_SOFS 81197ba5f4SPaul Zimmerman bool "Enable Missed SOF Tracking" 82197ba5f4SPaul Zimmerman help 83197ba5f4SPaul Zimmerman Say Y here to enable logging of missed SOF events to the dmesg log. 84197ba5f4SPaul Zimmerman WARNING: This feature is still experimental. 85197ba5f4SPaul Zimmerman If in doubt, say N. 86197ba5f4SPaul Zimmerman 87197ba5f4SPaul Zimmermanconfig USB_DWC2_DEBUG_PERIODIC 88197ba5f4SPaul Zimmerman bool "Enable Debugging Messages For Periodic Transfers" 89197ba5f4SPaul Zimmerman depends on USB_DWC2_DEBUG || USB_DWC2_VERBOSE 90197ba5f4SPaul Zimmerman default y 91197ba5f4SPaul Zimmerman help 92197ba5f4SPaul Zimmerman Say N here to disable (verbose) debugging messages to be 93197ba5f4SPaul Zimmerman logged for periodic transfers. This allows better debugging of 94197ba5f4SPaul Zimmerman non-periodic transfers, but of course the debug logs will be 95197ba5f4SPaul Zimmerman incomplete. Note that this also disables some debug messages 96197ba5f4SPaul Zimmerman for which the transfer type cannot be deduced. 97197ba5f4SPaul Zimmermanendif 98