summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/am437x_gp_evm_defconfig1
-rw-r--r--configs/am437x_sk_evm_defconfig1
-rw-r--r--configs/am43xx_evm_defconfig1
-rw-r--r--configs/am43xx_evm_ethboot_defconfig1
-rw-r--r--configs/am43xx_evm_qspiboot_defconfig1
-rw-r--r--configs/am43xx_evm_usbhost_boot_defconfig1
-rw-r--r--configs/dra72_evm_defconfig1
-rw-r--r--configs/dra74_evm_defconfig1
-rw-r--r--configs/dra7xx_evm_defconfig1
-rw-r--r--configs/dra7xx_evm_qspiboot_defconfig1
-rw-r--r--configs/dra7xx_evm_uart3_defconfig1
-rw-r--r--configs/odroid-xu3_defconfig1
-rw-r--r--configs/omap5_uevm_defconfig1
-rw-r--r--configs/xilinx_zynqmp_ep_defconfig1
-rw-r--r--drivers/usb/dwc3/Kconfig23
-rw-r--r--include/configs/am43xx_evm.h2
-rw-r--r--include/configs/dra7xx_evm.h1
-rw-r--r--include/configs/odroid_xu3.h1
-rw-r--r--include/configs/omap5_uevm.h1
-rw-r--r--include/configs/xilinx_zynqmp.h2
20 files changed, 38 insertions, 6 deletions
diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index b02f8ad3964..8dc905e4ad6 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -22,5 +22,6 @@ CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 1960429f758..33cc903a7ef 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -26,5 +26,6 @@ CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 942a6a0eb04..5406bebf298 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig b/configs/am43xx_evm_ethboot_defconfig
index 114d10f9b4a..fa01c754dda 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 52265c340bb..76d2e72c916 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -11,6 +11,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 9166848863c..c437b3a02ea 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index b2276a90c03..9fdd842748e 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -25,5 +25,6 @@ CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 7aa823334e0..810db5b5da1 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -24,5 +24,6 @@ CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 160ce933a56..88bf3797738 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig b/configs/dra7xx_evm_qspiboot_defconfig
index 4b4fd272c91..80961f76368 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig b/configs/dra7xx_evm_uart3_defconfig
index c86cedc37b4..f1870839b57 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -16,6 +16,7 @@ CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index da92b2d1659..cb6035b98bf 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -20,6 +20,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_VIDEO_BRIDGE=y
diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig
index 024de722300..5ab2b9d1a86 100644
--- a/configs/omap5_uevm_defconfig
+++ b/configs/omap5_uevm_defconfig
@@ -9,6 +9,7 @@ CONFIG_CMD_GPIO=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/xilinx_zynqmp_ep_defconfig b/configs/xilinx_zynqmp_ep_defconfig
index 81f59457e62..3bab31c8e8f 100644
--- a/configs/xilinx_zynqmp_ep_defconfig
+++ b/configs/xilinx_zynqmp_ep_defconfig
@@ -39,6 +39,7 @@ CONFIG_DM_ETH=y
CONFIG_ZYNQ_GEM=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
# CONFIG_REGEX is not set
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index debc74baa1e..c0251b1937c 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -5,3 +5,26 @@ config USB_DWC3
help
Say Y here if your system has a Dual Role SuperSpeed
USB controller based on the DesignWare USB3 IP Core.
+
+if USB_DWC3
+
+choice
+ bool "DWC3 Mode Selection"
+
+config USB_DWC3_HOST
+ bool "Host only mode"
+ depends on USB
+ help
+ Select this when you want to use DWC3 in host mode only,
+ thereby the gadget feature will be regressed.
+
+config USB_DWC3_GADGET
+ bool "Gadget only mode"
+ depends on USB_GADGET
+ help
+ Select this when you want to use DWC3 in gadget mode only,
+ thereby the host feature will be regressed.
+
+endchoice
+
+endif
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 3643489b189..5e0f65d58fe 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -124,6 +124,7 @@
/* USB GADGET */
#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT)
#undef CONFIG_USB_DWC3
+#undef CONFIG_USB_DWC3_GADGET
#undef CONFIG_USB_GADGET_DOWNLOAD
#undef CONFIG_USB_GADGET_VBUS_DRAW
@@ -134,7 +135,6 @@
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT))
#define CONFIG_USB_DWC3_PHY_OMAP
#define CONFIG_USB_DWC3_OMAP
-#define CONFIG_USB_DWC3_GADGET
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 70c25bf0e04..3fb97e88439 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -229,7 +229,6 @@
/* USB GADGET */
#define CONFIG_USB_DWC3_PHY_OMAP
#define CONFIG_USB_DWC3_OMAP
-#define CONFIG_USB_DWC3_GADGET
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index 7e91f61eee8..57e20e7e3fc 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -48,7 +48,6 @@
#define CONFIG_USB_EHCI_EXYNOS
/* DWC3 */
-#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_DWC3_PHY_SAMSUNG
/* Downloader */
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index 8a989340206..6853260fd25 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -102,7 +102,6 @@
/* USB GADGET */
#define CONFIG_USB_DWC3_PHY_OMAP
#define CONFIG_USB_DWC3_OMAP
-#define CONFIG_USB_DWC3_GADGET
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index d572b814cb2..63165df18c3 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -122,8 +122,6 @@
#define CONFIG_USB_STORAGE
#define CONFIG_USB_XHCI_ZYNQMP
-#define CONFIG_USB_DWC3_GADGET
-
#define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000
#define DFU_DEFAULT_POLL_TIMEOUT 300
#define CONFIG_USB_FUNCTION_DFU