summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-09-03 09:48:00 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-10 14:01:46 +0000
commitb16cda06a81d676fb11f02e0a4770c8ac17681c6 (patch)
tree65faccb6c4ee295beecb621cb8e70586cabd2eea
parent9de6cdf9fd0c179d8e20f9811bc1645967621873 (diff)
downloadchrome-ec-b16cda06a81d676fb11f02e0a4770c8ac17681c6.tar.gz
plankton: add flag for prog_en to flash_ec
Add setting of new GPIO, prog_en, to flash_ec to be able to program new plankton boards. This pin must be on for boot0 and nrst to be connected from the FTDI to the MCU. BUG=chrome-os-partner:31633 BRANCH=none TEST=manual, sudo servod -c plankton.xml util/flash_ec --board=plankton CQ-DEPEND=CL:216160 Change-Id: I29f882856e24147a7af283c5e82298c7736b8662 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/216161 Reviewed-by: Todd Broch <tbroch@chromium.org>
-rwxr-xr-xutil/flash_ec11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec
index e5f1c91119..6a38176b1b 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -76,6 +76,10 @@ BOARDS_STM32=(
zinger
)
+BOARDS_STM32_PROG_EN=(
+ plankton
+)
+
BOARDS_STM32_DFU=(
twinkie
hoho
@@ -167,6 +171,10 @@ servo_sh_boot0() {
}
ec_enable_boot0() {
+ # Enable programming GPIOs
+ if $(in_array "${BOARDS_STM32_PROG_EN[@]}" "${BOARD}"); then
+ dut_control prog_en:yes
+ fi
eval ${SERVO_TYPE}_${MCU}_boot0
}
@@ -241,6 +249,9 @@ servo_VARS="${MCU}_uart_en ${MCU}_uart_parity \
${MCU}_uart_baudrate jtag_buf_on_flex_en jtag_buf_en spi1_vref"
if [[ "${MCU}" == "usbpd" ]] ; then
servo_VARS+=" usbpd_boot_mode"
+ if $(in_array "${BOARDS_STM32_PROG_EN[@]}" "${BOARD}"); then
+ servo_VARS+=" prog_en"
+ fi
fi
toad_VARS="${MCU}_uart_parity \
${MCU}_uart_baudrate boot_mode"