diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-04-10 11:30:43 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-04-11 00:36:08 +0000 |
commit | 72ca4cc9f9460c0637ea786af9f35e64c5b3da12 (patch) | |
tree | 68c6989eebaf70eff236f3ab2be087110b4e376a | |
parent | b5f2ca5daca566a3f8e45f8558b778c00bbbaf36 (diff) | |
download | chrome-ec-72ca4cc9f9460c0637ea786af9f35e64c5b3da12.tar.gz |
util: workaround warm_reset issue in flash_ec
The warm_reset_l signal is an open drain output on the servo side and
its input value can be read back as on (level 0) when the AP power rails
are off on the DUT side and not pulling it up.
So the current mechanism of reading the warm_reset input value with
dut-control at the beginning, then restoring it at the end is sometimes
broken because when the AP is OFF, we are reading input == on (while we
had actually set output to "off" but we have no pull-up) and then
restoring a "hard" on (drive low on the servo side).
In this workaround, just assume we don't want to pull warm_reset after
flashing the EC and restore it to off.
A better solution might be to have a mechanism in dut-control to read
the output register rather than the input value for GPIO, so we can save
and restore them safely.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:30738
TEST=On Ryu P5 with the AP off, run ./util/flash_ec --board=ryu
then boot the AP properly with the power button.
Change-Id: I96e65c2fec5e6d604445af3fe26fce73678b1d3b
Reviewed-on: https://chromium-review.googlesource.com/265223
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
-rwxr-xr-x | util/flash_ec | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/util/flash_ec b/util/flash_ec index 283056511d..aca12e8fc7 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -291,9 +291,6 @@ fi if $(in_array "${BOARDS_PRIVATE_SPI_PP3300[@]}" "${BOARD}"); then servo_VARS+=" spi1_buf_en spi1_buf_on_flex_en spi_hold" fi -if $(servo_has_warm_reset); then - servo_VARS+=" warm_reset" -fi toad_VARS="${MCU}_uart_parity \ ${MCU}_uart_baudrate boot_mode" @@ -376,6 +373,11 @@ function flash_stm32() { ec_reset # Unprotect flash, erase, and write ${STM32MON} -d ${EC_UART} -U -u -e -w "${IMG}" + # Remove the Application processor reset + # TODO(crosbug.com/p/30738): we cannot rely on servo_VARS to restore it + if $(servo_has_warm_reset); then + dut_control warm_reset:off + fi } function flash_stm32_dfu() { |