summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-03-27 20:05:00 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-03-28 21:55:20 -0700
commit4e1ddc02c67ba692c459cb0cb49f1e1a6d77543e (patch)
tree57f7ee24baa6e7130faaa6d44c292bc5a8f27716 /util
parentc1acab5888d8ddd4e0eb0012ad3d59b2a1ba9c14 (diff)
downloadchrome-ec-4e1ddc02c67ba692c459cb0cb49f1e1a6d77543e.tar.gz
flash_ec: Add support for kevin
Add support for kevin, which uses external 1.8V SPI. BUG=chrome-os-partner:51722 TEST=Verify kevin EC is flashable. Verify wheatley still uses pp3300 SPI voltage. BRANCH=None Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I13e45e829cdc7b2298715812f5714d5dd806df06 Reviewed-on: https://chromium-review.googlesource.com/335396 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/flash_ec16
1 files changed, 14 insertions, 2 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 90e4e435fd..874e482a97 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -95,6 +95,7 @@ BOARDS_NPCX_5M6G_JTAG=(
)
BOARDS_NPCX_SPI=(
+ kevin
wheatley
)
@@ -110,6 +111,10 @@ BOARDS_MEC1322=(
strago
)
+BOARDS_SPI_1800MV=(
+ kevin
+)
+
# Flags
DEFINE_string board "${DEFAULT_BOARD}" \
"The board to run debugger on."
@@ -401,6 +406,7 @@ function flash_openocd() {
function flash_flashrom() {
TOOL_PATH="${EC_DIR}/build/${BOARD}/util:/usr/sbin/:$PATH"
FLASHROM=$(PATH="${TOOL_PATH}" which flashrom)
+
if on_servov3; then
FLASHROM_PARAM="-p linux_spi"
else
@@ -418,10 +424,16 @@ function flash_flashrom() {
fi
fi
+ if $(in_array "${BOARDS_SPI_1800MV[@]}" "${BOARD}"); then
+ SPI_VOLTAGE="pp1800"
+ else
+ SPI_VOLTAGE="pp3300"
+ fi
+
dut_control cold_reset:on
- # Turn on SPI1 interface on servo for 3.3V SPI Flash Chip
- dut_control spi1_vref:pp3300 spi1_buf_en:on spi1_buf_on_flex_en:on
+ # Turn on SPI1 interface on servo for SPI Flash Chip
+ dut_control spi1_vref:${SPI_VOLTAGE} spi1_buf_en:on spi1_buf_on_flex_en:on
SPI_SIZE=$(sudo ${FLASHROM} ${FLASHROM_PARAM} --get-size 2>/dev/null | tail -n 1)
IMG_SIZE=$(stat -c%s "$IMG")