aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHector Martin2023-10-29 16:09:09 +0900
committerMarek Vasut2023-12-01 14:06:12 +0100
commitb5999f8f6ca89223b70ec3038fcfe9dbb6c67475 (patch)
tree9ca23e0443c4eecaa2bb968da442aabebe1ff1ec /common
parenta14843fdac24bf18bd58152b959ca0425adaa1e4 (diff)
usb: hub: Add missing reset recovery delay
Some devices like YubiKeys need more time before SET_ADDRESS. The spec says we need to wait 10ms. Signed-off-by: Hector Martin <marcan@marcan.st> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/usb_hub.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 85c0822d8b7..70279f301d5 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -395,6 +395,13 @@ int usb_hub_port_connect_change(struct usb_device *dev, int port)
break;
}
+ /*
+ * USB 2.0 7.1.7.5: devices must be able to accept a SetAddress()
+ * request (refer to Section 11.24.2 and Section 9.4 respectively)
+ * after the reset recovery time 10 ms
+ */
+ mdelay(10);
+
#if CONFIG_IS_ENABLED(DM_USB)
struct udevice *child;