summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/Kconfig21
-rw-r--r--include/configs/am335x_evm.h1
-rw-r--r--include/configs/am43xx_evm.h5
-rw-r--r--include/configs/baltos.h1
-rw-r--r--include/configs/bav335x.h1
-rw-r--r--include/configs/bcm28155_ap.h1
-rw-r--r--include/configs/cgtqmx6eval.h1
-rw-r--r--include/configs/colibri_vf.h1
-rw-r--r--include/configs/corvus.h1
-rw-r--r--include/configs/dra7xx_evm.h1
-rw-r--r--include/configs/exynos4-common.h1
-rw-r--r--include/configs/gw_ventana.h1
-rw-r--r--include/configs/kc1.h1
-rw-r--r--include/configs/mx6sabre_common.h1
-rw-r--r--include/configs/mx7dsabresd.h1
-rw-r--r--include/configs/nitrogen6x.h1
-rw-r--r--include/configs/odroid_xu3.h1
-rw-r--r--include/configs/omap3_beagle.h1
-rw-r--r--include/configs/omap3_logic.h1
-rw-r--r--include/configs/omap5_uevm.h1
-rw-r--r--include/configs/pengwyn.h1
-rw-r--r--include/configs/s5p_goni.h1
-rw-r--r--include/configs/siemens-am33x-common.h1
-rw-r--r--include/configs/smartweb.h1
-rw-r--r--include/configs/sniper.h1
-rw-r--r--include/configs/socfpga_common.h1
-rw-r--r--include/configs/sunxi-common.h1
-rw-r--r--include/configs/taurus.h1
-rw-r--r--include/configs/tbs2910.h1
-rw-r--r--include/configs/tegra-common-usb-gadget.h1
-rw-r--r--include/configs/warp.h1
-rw-r--r--include/configs/xilinx_zynqmp.h1
-rw-r--r--include/configs/zynq-common.h1
33 files changed, 25 insertions, 32 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index f4698f469e..cfd8ce88ee 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -33,3 +33,24 @@ menuconfig USB_GADGET
a USB peripheral device. Configure one hardware driver for your
peripheral/device side bus controller, and a "gadget driver" for
your peripheral protocol.
+
+if USB_GADGET
+
+config USB_GADGET_VBUS_DRAW
+ int "Maximum VBUS Power usage (2-500 mA)"
+ range 2 500
+ default 2
+ help
+ Some devices need to draw power from USB when they are
+ configured, perhaps to operate circuitry or to recharge
+ batteries. This is in addition to any local power supply,
+ such as an AC adapter or batteries.
+
+ Enter the maximum power your device draws through USB, in
+ milliAmperes. The permitted range of values is 2 - 500 mA;
+ 0 mA would be legal, but can make some hosts misbehave.
+
+ This value will be used except for system-specific gadget
+ drivers that have more specific information.
+
+endif # USB_GADGET
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 29b693a40b..8d68d60520 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -290,7 +290,6 @@
#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index fd3f6a718d..0dd9c7a759 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -122,6 +122,10 @@
#endif
/* USB GADGET */
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT)
+#undef CONFIG_USB_GADGET_VBUS_DRAW
+#endif
+
#if !defined(CONFIG_SPL_BUILD) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT))
#define CONFIG_USB_DWC3_PHY_OMAP
@@ -130,7 +134,6 @@
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index bfe3fa37f4..529cf1c476 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -276,7 +276,6 @@
#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USBDOWNLOAD_GADGET
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_HOST
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index 6c860a6462..82bf92acb4 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -441,7 +441,6 @@ DEFAULT_LINUX_BOOT_ENV \
#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
index cf25bdebe8..387895b3cf 100644
--- a/include/configs/bcm28155_ap.h
+++ b/include/configs/bcm28155_ap.h
@@ -139,7 +139,6 @@
#define CONFIG_FASTBOOT_BUF_SIZE (CONFIG_SYS_SDRAM_SIZE - SZ_1M)
#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_SDRAM_BASE
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
#define CONFIG_USB_GADGET_DWC2_OTG
#define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
#define CONFIG_USB_GADGET_DOWNLOAD
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index 63e3b94bb5..3f3b69df1a 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -93,7 +93,6 @@
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 7f57a54061..63dbe12619 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -235,7 +235,6 @@
/* USB Client Support */
#define CONFIG_CI_UDC
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_TRDX_VID 0x1B67
#define CONFIG_TRDX_PID_COLIBRI_VF50 0x0016
#define CONFIG_TRDX_PID_COLIBRI_VF61 0x0017
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index fcf2bd6d57..b8c441ea26 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -125,7 +125,6 @@
#define CONFIG_USB_FUNCTION_DFU
#define CONFIG_DFU_NAND
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M)
#define DFU_MANIFEST_POLL_TIMEOUT 25000
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 7734e8db94..e9facae6de 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -233,7 +233,6 @@
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
diff --git a/include/configs/exynos4-common.h b/include/configs/exynos4-common.h
index 008d24c417..c8e5397d4e 100644
--- a/include/configs/exynos4-common.h
+++ b/include/configs/exynos4-common.h
@@ -53,7 +53,6 @@
#define CONFIG_USB_GADGET_DWC2_OTG
#define CONFIG_USB_GADGET_DWC2_OTG_PHY
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 793b3fb88e..62f3468189 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -196,7 +196,6 @@
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
/* Netchip IDs */
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
diff --git a/include/configs/kc1.h b/include/configs/kc1.h
index ee7d9ce45a..d8aa182053 100644
--- a/include/configs/kc1.h
+++ b/include/configs/kc1.h
@@ -185,7 +185,6 @@
#define CONFIG_USB_MUSB_OMAP2PLUS
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
/*
* Download
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 3e1b760882..f097176209 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -241,7 +241,6 @@
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index da1d26f350..f9977a2c19 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -264,7 +264,6 @@
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 3604e44c0d..a50829ed55 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -333,7 +333,6 @@
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
/* Netchip IDs */
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index 01d08dc582..e4986b0b18 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -54,7 +54,6 @@
/* USB gadget */
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
/* Downloader */
#define CONFIG_G_DNL_VENDOR_NUM 0x04E8
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 2112d9fe94..17d8a86b4f 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -66,7 +66,6 @@
#define CONFIG_TWL4030_USB 1
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETHER_RNDIS
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 304e1ce31c..7e802e9901 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -85,7 +85,6 @@
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETHER_RNDIS
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index a5cfa0c5ca..09beb74240 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -106,7 +106,6 @@
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
diff --git a/include/configs/pengwyn.h b/include/configs/pengwyn.h
index 1a670cbd63..ec3fcba0a5 100644
--- a/include/configs/pengwyn.h
+++ b/include/configs/pengwyn.h
@@ -200,7 +200,6 @@
#define CONFIG_USB_MUSB_PIO_ONLY
#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 07a5134999..919c60ea5b 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -273,7 +273,6 @@
#define CONFIG_USB_GADGET_DWC2_OTG
#define CONFIG_USB_GADGET_DWC2_OTG_PHY
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index df2a514b51..df4e734573 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -225,7 +225,6 @@
#define CONFIG_USB_MUSB_PIO_ONLY
#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
#undef CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_USB_MUSB_HOST
#define CONFIG_AM335X_USB0
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index db820ba7fe..0586aec791 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -176,7 +176,6 @@
#define CONFIG_USB_FUNCTION_DFU
#define CONFIG_DFU_NAND
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M
#define DFU_MANIFEST_POLL_TIMEOUT 25000
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 18a379d4fd..12090a30e9 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -202,7 +202,6 @@
#define CONFIG_TWL4030_USB
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
/*
* Download
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 3e50892568..bdb06e7e53 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -252,7 +252,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
#define CONFIG_USB_GADGET_DWC2_OTG
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
/* USB Composite download gadget - g_dnl */
#define CONFIG_USB_GADGET_DOWNLOAD
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 8f11eb90c1..b5d05cd735 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -343,7 +343,6 @@ extern int soft_i2c_gpio_scl;
#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_FUNCTION_DFU
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 5b190f6225..0b04b3a697 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -140,7 +140,6 @@
#define CONFIG_USB_FUNCTION_DFU
#define CONFIG_DFU_NAND
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M)
#define DFU_MANIFEST_POLL_TIMEOUT 25000
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 1b5046af2f..715994c3fc 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -132,7 +132,6 @@
#define CONFIG_USBD_HS
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 0
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
diff --git a/include/configs/tegra-common-usb-gadget.h b/include/configs/tegra-common-usb-gadget.h
index c3a01514ca..ec034a1f87 100644
--- a/include/configs/tegra-common-usb-gadget.h
+++ b/include/configs/tegra-common-usb-gadget.h
@@ -10,7 +10,6 @@
#ifndef CONFIG_SPL_BUILD
/* USB gadget mode support*/
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_CI_UDC
#define CONFIG_CI_UDC_HAS_HOSTPC
#define CONFIG_USB_GADGET_DUALSPEED
diff --git a/include/configs/warp.h b/include/configs/warp.h
index cb93629589..80c4e38259 100644
--- a/include/configs/warp.h
+++ b/include/configs/warp.h
@@ -81,7 +81,6 @@
#define CONFIG_CMD_USB_MASS_STORAGE
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_G_DNL_VENDOR_NUM 0x0525
#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index f7b4643708..9493843464 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -127,7 +127,6 @@
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_USB_GADGET_DUALSPEED
-#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_USBDOWNLOAD_GADGET
#define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000
#define DFU_DEFAULT_POLL_TIMEOUT 300
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 49d9fd059f..e4d1111f49 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -105,7 +105,6 @@
# define DFU_DEFAULT_POLL_TIMEOUT 300
# define CONFIG_USB_FUNCTION_DFU
# define CONFIG_DFU_RAM
-# define CONFIG_USB_GADGET_VBUS_DRAW 2
# define CONFIG_G_DNL_VENDOR_NUM 0x03FD
# define CONFIG_G_DNL_PRODUCT_NUM 0x0300
# define CONFIG_G_DNL_MANUFACTURER "Xilinx"