summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-05-10 15:35:07 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-05-13 12:00:21 -0700
commit5550ae7f8d1c34ff9f15bab0d54cb87e4059c9be (patch)
tree18544f916edc6ec513bd01b6beb1a9daff2de58c
parent74b5a2ccb58739d4e21fdeb36e40fe01c0ca7ede (diff)
downloadchrome-ec-5550ae7f8d1c34ff9f15bab0d54cb87e4059c9be.tar.gz
bip: update flash script to use dut_i2c_mux
Bip has an I2C mux that we need to set before we can program the ITE8320 chip. Set the dut's i2c mux to pass through to the EC. BRANCH=none BUG=b:79533605 TEST=flash bip and reef_it8320 CQ-DEPEND=CL:1054559 Change-Id: I690aa253c757c37dfb276d5be897b92a9aa1545e Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1054560 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Nick Sanders <nsanders@chromium.org>
-rwxr-xr-xutil/flash_ec21
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