mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
c1acab5888
commit
4e1ddc02c6
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user