summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@google.com>2015-02-06 11:36:04 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-09 02:13:56 +0000
commit0fc37f1291efa2106f7272fee9920bdb6a058202 (patch)
tree46c728a9d134349335067a9dcab2370aa521d1f9
parenteb86f21b05aaed4dc3bfda51a2eba3f53ec16590 (diff)
downloadchrome-ec-stabilize-6771.B.tar.gz
Add flash_ec support for Glowerstabilize-6771.B
Just so that we can program the EC more conveniently. BRANCH=None BUG=chrome-os-partner:35308 TEST=Program a Glower. Change-Id: Iaba0839c4a5b8dee805f7d31e4049198ce43918f Signed-off-by: Vic Yang <victoryang@google.com> Reviewed-on: https://chromium-review.googlesource.com/247142 Tested-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org> Commit-Queue: Vic Yang <victoryang@chromium.org>
-rwxr-xr-xutil/flash_ec19
1 files changed, 18 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 8124781669..47d6318aff 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -82,6 +82,10 @@ BOARDS_STM32=(
zinger
)
+BOARDS_PRIVATE_SPI_PP3300=(
+ glower
+)
+
BOARDS_STM32_PROG_EN=(
plankton
)
@@ -204,7 +208,9 @@ BOARD=${FLAGS_board}
BOARD_ROOT=/build/${BOARD}
# Possible default EC images
-if [ "${FLAGS_ro}" = ${FLAGS_TRUE} ] ; then
+if $(in_array "${BOARDS_PRIVATE_SPI_PP3300[@]}" "${BOARD}"); then
+ EC_FILE=ec.spi.bin
+elif [ "${FLAGS_ro}" = ${FLAGS_TRUE} ] ; then
EC_FILE=ec.RO.flat
else
EC_FILE=ec.bin
@@ -265,6 +271,9 @@ if [[ "${MCU}" == "usbpd" ]] ; then
servo_VARS+=" prog_en"
fi
fi
+if $(in_array "${BOARDS_PRIVATE_SPI_PP3300[@]}" "${BOARD}"); then
+ servo_VARS+=" spi1_buf_en spi1_buf_on_flex_en spi_hold"
+fi
toad_VARS="${MCU}_uart_parity \
${MCU}_uart_baudrate boot_mode"
@@ -447,6 +456,12 @@ function flash_npcx() {
fi
}
+function flash_private_spi_pp3300() {
+ dut_control cold_reset:on spi1_vref:pp3300
+ dut_control spi1_buf_en:on spi1_buf_on_flex_en:on spi_hold:off
+ sudo flashrom -p ft2232_spi:type=servo-v2,port=B -w "${IMG}"
+}
+
if dut_control boot_mode 2>/dev/null ; then
if [[ "${MCU}" != "ec" ]] ; then
die "Toad cable can't support non-ec UARTs"
@@ -478,6 +493,8 @@ elif [ "${BOARD}" == "link" ]; then
flash_link
elif $(in_array "${BOARDS_NPCX[@]}" "${BOARD}"); then
flash_npcx
+elif $(in_array "${BOARDS_PRIVATE_SPI_PP3300[@]}" "${BOARD}"); then
+ flash_private_spi_pp3300
else
die "board ${BOARD} not supported"
fi