From a0c2fa80cd5e3c8dec89189d5c40075d6d210259 Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Tue, 1 Aug 2017 15:30:54 -0700 Subject: [PATCH] cr50: add delay after soft reset Add a delay to allow the clocks and usb signals to settle. BUG=b:63767046,b:63867566 BRANCH=cr50 TEST=put the eve ec into hibernate, wait until cr50 enters deep sleep, use the uart to wake it up, and verify that it eventually reenters deep sleep Change-Id: I26463ce3e00996368a791a245b0f9de01737478c Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/598448 Reviewed-by: Marius Schilder Reviewed-by: Vadim Bendebury --- chip/g/usb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chip/g/usb.c b/chip/g/usb.c index 7e1d7e75e6..03e26bf589 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -1209,6 +1209,15 @@ static void usb_softreset(void) return; } /* TODO: Wait 3 PHY clocks before returning */ + +#ifdef BOARD_CR50 + /* + * TODO(b/63867566): This delay is added to get usb to suspend after + * resume from deep sleep. Find out what the root cause is and add a + * fix. + */ + usleep(100); +#endif } void usb_connect(void)