diff options
author | Jett Rink <jettrink@chromium.org> | 2020-05-07 15:31:36 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-26 20:50:45 +0000 |
commit | e6675aae6cf084a80317de56242338d1c5fa79ce (patch) | |
tree | 21a187932d9134a0035b72f9a0faecd94a0ec99d /util | |
parent | ea0c7c6a16e72d5bb59aad936f6c4a082453c006 (diff) | |
download | chrome-ec-e6675aae6cf084a80317de56242338d1c5fa79ce.tar.gz |
flash_ec: keep h1 awake while flashing with c2d2
The H1 controls the DUT-side i2c muxes that the C2D2 programming path
need to stay active. If the H1 goes to sleep during the flash process
the flash will fail.
Use new dut-control for cr50 that will keep the cr50 from going into a
deep low power mode during flashing
Also initialize the c2d2 i2c before turning on the DUT-side i2c muxes;
this is not strictly necessary, but seems prudent to change.
BRANCH=none
BUG=b:153475851
TEST=flash waddledee multiple times without issue
Cq-Depend: chromium:2188853
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I39fac618dc6436f547d723364a2273cc03563593
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2189070
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/flash_ec | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/util/flash_ec b/util/flash_ec index 67800e2c8e..ab7aa8d0d2 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -1227,13 +1227,13 @@ function flash_it83xx() { # Don't let the EC come out of reset after H1 reset dut_control ec_reset:on - # We need to swing the DUT-side muxes to I2C instead of UART. - # This is done by convention with EC_FLASH_SELECT pin from H1 - servo_save_add "ec_flash_select" - dut_control_or_die ec_flash_select:on # Enable i2c bus on C2D2 at 400kbps servo_save_add "i2c_ec_bus_speed" dut_control_or_die i2c_ec_bus_speed:400 + + # We need to swing the DUT-side muxes to I2C instead of UART. + # This is done by convention with EC_FLASH_SELECT pin from H1 + dut_control_or_die ec_flash_select:on fi # Now the we have enabled the I2C mux on the servo to talk to the dut, @@ -1306,6 +1306,14 @@ function flash_it83xx() { echo "${ITEFLASH_ARGS[@]}" fi + # Ensure the CR50 doesn't go into low power while flashing + # otherwise the DUT side muxes will get cut. Note this also needs to + # happen once the CR50 hooks have settled and H1 realizes that the + # "AP [is] Off", since that over writes the idle action with sleep. + if [[ "${SERVO_TYPE}" =~ "c2d2" ]]; then + dut_control cr50_idle_level:active + fi + "${ITEFLASH_ARGS[@]}" || die "${ERROR_MSG}" } |