flash_ec: Add support for it8xxx2
Add support for it8xxx2, which will eventually replace ite_spi_ccd_i2c.
TEST=Flash nereid
BRANCH=none
@@ -383,7 +383,7 @@ esac
case "${CHIP}" in
"stm32"|"npcx_spi"|"npcx_int_spi"|"it83xx"|"npcx_uut"|"ite_spi"| \
- "ite_spi_ccd_i2c")
+ "ite_spi_ccd_i2c"|"it8xxx2")
;;
*)
if [[ -n "${FLAGS_read}" ]]; then
@@ -972,10 +972,13 @@ function flash_flashrom() {
fi
fi
+ # Eventually remove ite_spi_ccd_i2c once all references are removed
if ! on_raiden || [[ "${SERVO_TYPE}" =~ "servo_micro" ]] ; then
if in_array "${BOARDS_SPI_1800MV[@]}" "${BOARD}"; then
SPI_VOLTAGE="pp1800"
- elif [[ "${CHIP}" == "ite_spi" || "${CHIP}" == "ite_spi_ccd_i2c" ]]; then
+ elif [[ "${CHIP}" == "ite_spi" ||
+ "${CHIP}" == "ite_spi_ccd_i2c" ||
+ "${CHIP}" == "it8xxx2" ]]; then
SPI_VOLTAGE="pp1800"
else
SPI_VOLTAGE="pp3300"
@@ -994,7 +997,9 @@ function flash_flashrom() {
fi
# Enable SPI programming mode.
- if [[ "${CHIP}" == "ite_spi" || "${CHIP}" == "ite_spi_ccd_i2c" ]]; then
+ if [[ "${CHIP}" == "ite_spi" ||
+ "${CHIP}" == "ite_spi_ccd_i2c" ||
+ "${CHIP}" == "it8xxx2" ]]; then
# Set hardware strap pin (GPG6) of SPI programming as low then start ec
dut_control fw_up:on
sleep 0.1
@@ -1060,6 +1065,7 @@ function flash_flashrom() {
if [[ "${CHIP}" =~ ^npcx(|_int)_spi$ ]] || \
[[ "${CHIP}" =~ "ite_spi_ccd_i2c" ]] ||
+ [[ "${CHIP}" =~ "it8xxx2" ]] ||
[[ "${CHIP}" =~ "ite_spi" ]] ; then
{ # Patch temp image up to SPI_SIZE
cat "${IMG}"
@@ -1403,6 +1409,10 @@ function flash_ite_spi_ccd_i2c() {
fi
}
+function flash_it8xxx2() {
+ flash_ite_spi_ccd_i2c
+}
+
function flash_npcx_jtag() {
IMG_PATH="${EC_DIR}/build/${BOARD}"
OCD_CHIP_CFG="npcx_chip.cfg"
