mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 16:46:23 +00:00
flash_ec: For npcx_uut, use servo to boot EC into the flashing mode
Use servo to boot EC into the flashing mode. Use the unified control ec_boot_mode to do so. CQ-DEPEND=CL:1018206 BRANCH=none BUG=b:68707064 TEST=Ran the flash_ec script on Cheza using servo-micro TEST=Ran the flash_ec script on Meowth using CCD, with some servo overlays to drive the ccd_ec_boot_mode control Change-Id: I32dfe5baa82dd842b5237f38ea971c09e91c47d3 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/1020159 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
This commit is contained in:
@@ -513,6 +513,11 @@ fi
|
||||
if $(in_array "${BOARDS_STM32_PROG_EN[@]}" "${BOARD}"); then
|
||||
servo_v2_VARS+=" prog_en"
|
||||
fi
|
||||
if [ "${CHIP}" = "npcx_uut" ] ; then
|
||||
servo_v2_VARS+=" ${MCU}_boot_mode"
|
||||
servo_micro_VARS+=" ${MCU}_boot_mode"
|
||||
servo_v4_with_ccd_cr50_VARS+=" ccd_${MCU}_boot_mode ccd_keepalive_en"
|
||||
fi
|
||||
toad_VARS="${MCU}_uart_parity ${MCU}_uart_baudrate boot_mode"
|
||||
|
||||
if $(in_array "${BOARDS_NPCX_INT_SPI[@]}" "${BOARD}"); then
|
||||
@@ -944,6 +949,17 @@ function flash_npcx_uut() {
|
||||
info "${MCU} UART pty : ${EC_UART}"
|
||||
claim_pty ${EC_UART}
|
||||
|
||||
if [[ "${SERVO_TYPE}" =~ "ccd_cr50" ]] ; then
|
||||
dut_control ccd_keepalive_en:on
|
||||
fi
|
||||
|
||||
# Force the EC to boot in UART update mode
|
||||
ec_enable_boot0
|
||||
ec_reset
|
||||
|
||||
# Have to wait a bit for EC boot-up
|
||||
sleep 0.1
|
||||
|
||||
# Remove the prefix "/dev/" because uartupdatetool will add it.
|
||||
EC_UART=${EC_UART#/dev/}
|
||||
MON_PARAMS="--port ${EC_UART} --baudrate 115200"
|
||||
|
||||
Reference in New Issue
Block a user