diff options
author | Ruibin Chang <ruibin.chang@ite.com.tw> | 2020-03-11 17:00:10 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-12 06:09:33 +0000 |
commit | 3426fb1e93654ff2bba8b7ea7c2e143487462d18 (patch) | |
tree | ea94c1578f33b5446ac78463e5051c93c1cd7165 /util | |
parent | 72c922bd73f22fc1f3cea29d078516017c56e83c (diff) | |
download | chrome-ec-3426fb1e93654ff2bba8b7ea7c2e143487462d18.tar.gz |
baseboard/ite_evb: create ite_evb baseboard
The development board of it83xx and it8xxx2 have common code
and config options which are moved to baseboard ite_evb.
And we create another board for PD EVB based on baseboard ite_evb.
BUG=none
BRANCH=none
TEST=on baseboard ite_evb:
1.test board it83xx_evb and it8xxx2_evb:
successfully Flash EC image and boot on chip it8320 and
it83202.
2.flashrom by ite_spi test:
$ sudo ./util/flash_ec --board=it8xxx2_evb --verbose
INFO: Using servo_v2.
INFO: Using ec image : /mnt/host/source/src/platform/ec/build/
it8xxx2_evb/ec.bin
dut-control --port=9999 i2c_mux_en:on
dut-control --port=9999 i2c_mux:remote_adc
INFO: Flashing chip ite_spi.
dut-control --port=9999 cold_reset:on
dut-control --port=9999 fw_up:on
dut-control --port=9999 cold_reset:off
dut-control --port=9999 fw_up:off
dut-control --port=9999 spi1_vref:pp1800 spi1_buf_en:on
dut-control --port=9999 spi1_buf_on_flex_en:on
INFO: Running flashrom:
sudo /usr/sbin/flashrom -p ft2232_spi:type=servo-v2,port=B,
serial=911416-00012 --flash-size
flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64)
flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64)
INFO: Programming EC firmware image.
INFO: Running flashrom:
/usr/sbin/flashrom -p ft2232_spi:type=servo-v2,port=B,
serial=911416-00012 -w /tmp/flash_spi_6163
flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64)
flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64)
Calibrating delay loop... OK.
Erasing and writing flash chip... Verifying flash... VERIFIED.
SUCCESS
INFO: Flashing done.
INFO: Restoring servo settings...
dut-control --port=9999 cold_reset:off
dut-control --port=9999 i2c_mux_en:on
dut-control --port=9999 i2c_mux:remote_adc
dut-control --port=9999 spi1_vref:off
dut-control --port=9999 spi1_buf_en:off
dut-control --port=9999 spi1_buf_on_flex_en:off
dut-control --port=9999 cold_reset:on
dut-control --port=9999 cold_reset:off
3.test board it8xxx2_pdevb:
successfully Flash EC image and boot on chip it83202.
Connection with adapter and dongle are able to ready state.
Change-Id: Ib6371b61c27980eb9977548177efb8c896e72d47
Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2071551
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/flash_ec | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec index 452aad2d19..13ddfb2f5c 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -51,12 +51,17 @@ die() { BOARDS_IT83XX=( glkrvp_ite it83xx_evb + it8xxx2_pdevb reef_it8320 tglrvpu_ite tglrvpy_ite jslrvp_ite ) +BOARDS_IT83XX_SPI_PROGRAMMING=( + it8xxx2_evb +) + BOARDS_STM32=( bloonchipper chell_pd @@ -281,6 +286,10 @@ if $(in_array "${BOARDS_IT83XX[@]}" "${BOARD}"); then SUPPORTED_CHIPS+=("it83xx") fi +if $(in_array "${BOARDS_IT83XX_SPI_PROGRAMMING[@]}" "${BOARD}"); then + SUPPORTED_CHIPS+=("ite_spi") +fi + if [[ ${#SUPPORTED_CHIPS[@]} -eq 0 && -n "${FLAGS_chip}" ]]; then SUPPORTED_CHIPS+="${FLAGS_chip}" fi @@ -337,7 +346,7 @@ case "${BOARD}" in esac case "${CHIP}" in - "stm32"|"npcx_spi"|"npcx_int_spi"|"it83xx"|"npcx_uut") ;; + "stm32"|"npcx_spi"|"npcx_int_spi"|"it83xx"|"npcx_uut"|"ite_spi") ;; *) if [[ -n "${FLAGS_read}" ]]; then die "The flag is not yet supported on ${CHIP}." @@ -863,6 +872,8 @@ function flash_flashrom() { if ! on_raiden || [[ "${SERVO_TYPE}" =~ "servo_micro" ]] ; then if $(in_array "${BOARDS_SPI_1800MV[@]}" "${BOARD}"); then SPI_VOLTAGE="pp1800" + elif [[ "${CHIP}" == "ite_spi" ]]; then + SPI_VOLTAGE="pp1800" else SPI_VOLTAGE="pp3300" fi @@ -879,6 +890,17 @@ function flash_flashrom() { dut_control cold_reset:off fi + # Enable SPI programming mode. + if [[ "${CHIP}" == "ite_spi" ]]; then + # Set hardware strap pin (GPG6) of SPI programming as low then start ec + dut_control fw_up:on + sleep 0.1 + dut_control cold_reset:off + sleep 0.1 + # We have to release the HW strap pin because it also SPI clock pin. + dut_control fw_up:off + fi + servo_save_add "spi1_vref" "off" servo_save_add "spi1_buf_en" "off" @@ -1262,6 +1284,10 @@ function flash_it83xx() { "${ITEFLASH_ARGS[@]}" || die "${ERROR_MSG}" } +function flash_ite_spi() { + flash_flashrom +} + function flash_lm4() { OCD_CHIP_CFG="lm4_chip.cfg" OCD_CMDS="init; flash_lm4 ${IMG} ${FLAGS_offset}; shutdown;" |