diff options
Diffstat (limited to 'util/flash_ec')
-rwxr-xr-x | util/flash_ec | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec index a011c4b251..593a4ede1e 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -410,6 +410,20 @@ cleanup() { dut_control --ftdii2c init dut_control --ftdii2c open dut_control --ftdii2c setclock + + # Reset the dut mux if it exists + if dut_control -i dut_i2c_mux 2>/dev/null; then + # Ensure servo i2c mux is on so we can talk to dut + dut_control i2c_mux_en:on + dut_control i2c_mux:remote_adc + + # Turn off dut i2c mux + dut_control dut_i2c_mux:none + + # Turn off servo i2c mux + dut_control i2c_mux_en:off + fi + fi if [[ "${SERVO_TYPE}" =~ "ccd_cr50" ]] ; then dut_control ccd_ec_boot_mode_uut:off @@ -883,6 +897,13 @@ function flash_it83xx() { dut_control i2c_mux_en:on dut_control i2c_mux:remote_adc + # Now the we have enabled the I2C mux on the servo to talk to the dut, + # we need to switch the I2C mux on the dut to allow ec programing (if + # there is a mux on the dut) + if dut_control -i dut_i2c_mux 2>/dev/null; then + dut_control dut_i2c_mux:ec_prog + fi + info "Close connection to ftdi_i2c interface" dut_control --ftdii2c close |