Kconfig 3.2 KB

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