summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Kconfig12
-rw-r--r--common/usb_hub.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 73e3fe36573..439b2198f60 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1099,3 +1099,15 @@ config FDT_SIMPLEFB
config IO_TRACE
bool
+
+config USB_HUB_DEBOUNCE_TIMEOUT
+ int "Timeout in milliseconds for USB HUB connection"
+ depends on USB
+ default 1000
+ help
+ Value in milliseconds of the USB connection timeout, the max delay to
+ wait the hub port status to be connected steadily after being powered
+ off and powered on in the usb hub driver.
+ This define allows to increase the HUB_DEBOUNCE_TIMEOUT default
+ value = 1s because some usb device needs around 1.5s to be initialized
+ and a 2s value should solve detection issue on problematic USB keys.
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 95f1449b5cb..f7fd12c0450 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -47,7 +47,7 @@
#define HUB_SHORT_RESET_TIME 20
#define HUB_LONG_RESET_TIME 200
-#define HUB_DEBOUNCE_TIMEOUT 1000
+#define HUB_DEBOUNCE_TIMEOUT CONFIG_USB_HUB_DEBOUNCE_TIMEOUT
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3