diff options
author | Craig Hesling <hesling@chromium.org> | 2019-11-19 11:08:51 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-27 20:36:56 +0000 |
commit | 60ee07de99c2d52961cdfcb4132c8330ff089820 (patch) | |
tree | 89da55143e3ee84f11760e82eb1a610a6b772f4f /util | |
parent | e10b6b3c836ac8e0c2cc86e7ea05e15fa39e8526 (diff) | |
download | chrome-ec-60ee07de99c2d52961cdfcb4132c8330ff089820.tar.gz |
flash_fp_mcu: Fix spidev flakiness
This small 100ms sleep is necessary to stabilize the spidev driver.
Without it, we have seen that stm32mon is unable to catch
the stm32h743 bootloader on the first attempt.
This issue became more noticeable with the STM32H743 Rev V.
Among other things, the following log shows test results from before
adding this sleep and the flash_fp_mcu stress test results after
adding this sleep:
https://drive.google.com/open?id=1opJn5fPXxUMjMZz0VDtmqpCXN0mVnBr5
BRANCH=nocturne,hatch
BUG=b:143374692,b:144729003,b:135033816
TEST=# Ensure PS crrev.com/c/1921705 is applied.
# Run http://go/bit/hesling/5791510394044416
TEST=See the testing done in the above Google Drive log.
Change-Id: I1777c894e1dd8911df4d407e33dc677373146eb1
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925174
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/flash_fp_mcu | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu index db9004c3f8..8baebbd6a3 100644 --- a/util/flash_fp_mcu +++ b/util/flash_fp_mcu @@ -179,6 +179,9 @@ flash_fp_mcu_stm32() { # load spidev (fail on cros-ec-spi first to change modalias) echo "${spiid}" > /sys/bus/spi/drivers/cros-ec-spi/bind 2>/dev/null echo "${spiid}" > /sys/bus/spi/drivers/spidev/bind + # The following sleep is a workaround to mitigate the effects of a + # poorly behaved chip select line. See b/145023809. + sleep 0.5 # Release reset as the SPI bus is now ready echo 1 > "/sys/class/gpio/gpio${gpio_nrst}/value" |