summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-10-25 10:20:54 -0600
committerCommit Bot <commit-bot@chromium.org>2019-11-11 23:59:51 +0000
commitee7e8558e7abad9cad5149afb0c14d843343144a (patch)
tree2aea0be9707e66588f5e80b8b04881729956c609
parentcb240acefd5fd3c7484d8721e15ebcf76b446f62 (diff)
downloadchrome-ec-ee7e8558e7abad9cad5149afb0c14d843343144a.tar.gz
flash_ec: enable UUT (UART) programming from micro
CL:1884410 adds the necessary dut control for servo micro that depends on the new servo micro console command (CL:1884190). If you make the appropriate rework on servo micro to control the DIR2 pin on the level shifter for the EC UART with TP1, then flash EC will successfully flash an EC using UUT (UART) with servo micro device. BRANCH=none BUG=b:143163043 TEST=flashed phaser using reworked servo_micro Cq-Depend:chromium:1884410 Change-Id: Ic45abb32d20f5c357d1fef154feea31cabb17672 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1884252 Reviewed-by: Keith Short <keithshort@chromium.org>
-rwxr-xr-xutil/flash_ec27
1 files changed, 27 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec
index e256b9509a..b6bb70600f 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -163,6 +163,8 @@ DEFINE_boolean raiden "${FLAGS_FALSE}" \
DEFINE_string read "" "Pathname of the file to store EC firmware image."
DEFINE_boolean ro "${FLAGS_FALSE}" \
"Write only the read-only partition"
+DEFINE_boolean servo_micro_uart_rx_rework "${FLAGS_FALSE}" \
+ "The servo micro for flashing has b/143163043#comment3 rework"
DEFINE_integer timeout 600 \
"Timeout for flashing the EC, measured in seconds."
DEFINE_boolean verbose "${FLAGS_FALSE}" \
@@ -431,6 +433,29 @@ ccd_ec_boot0() {
dut_control ccd_ec_boot_mode_$2:$1
}
+servo_micro_ec_boot0() {
+ # Some devices (e.g. hatch) control the RX UART pin via an on-board
+ # circuit that is controlled by the EC_FLASH_ODL pin. For those boards,
+ # we want to continue to drive the EC_FLASH_ODL if they do not have the
+ # servo micro rework listed below.
+ if [[ "${FLAGS_servo_micro_uart_rx_rework}" == ${FLAGS_TRUE} ]]; then
+ info "Servo micro $2 mode: $1 (using rx_rework)"
+
+ # Setting the test point allows the EC_TX_SERVO_RX line
+ # to be driven by the servo for 'on' value. 'off' value
+ # lets the EC drive the EC_TX_SERVO_RX net.
+ #
+ # HW Rework (b/143163043#comment3):
+ # - Disconnect U45.1 from ground
+ # - Connected U45.1 to TP1 pad
+ dut_control tp1:$1
+ dut_control servo_micro_ec_boot_mode_$2:$1
+ else
+ info "Servo micro $2 mode: $1 (using FW_UP_L)"
+ dut-control ec_boot_mode:$1
+ fi
+}
+
servo_ec_boot0() {
dut_control ec_boot_mode:$1
}
@@ -453,6 +478,8 @@ ec_switch_boot0() {
fi
if [[ "${SERVO_TYPE}" =~ "ccd_cr50" ]] ; then
stype=ccd
+ elif [[ "${SERVO_TYPE}" =~ "servo_micro" ]] ; then
+ stype=servo_micro
elif [[ "${SERVO_TYPE}" =~ "servo" ]] ; then
stype=servo
else