summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHLin <CHLIN56@nuvoton.com>2018-11-28 11:26:01 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-04 00:11:41 -0800
commitaabbef1336b6707909e14662b56a9741e75a1619 (patch)
treee687f03e1517b3d61ba6d0762b89acf0a78103c7
parent86fc3cec8ad36cee316efbf5226fd5d5f009364a (diff)
downloadchrome-ec-aabbef1336b6707909e14662b56a9741e75a1619.tar.gz
npcx7_evb: illustrate the flash configuration of npcx7m6fc
There are only 512 Kbytes of internal flash in npcx7m6fc, which is different from previous npcx7 chips with internal flash. This CL illustrates how to set the flash type and flash size when chip variant is npcx7m6fc. This CL also sets the BOARD_VERSION number according to the chip variant. Manually changing the BORAD_VERSION number is no longer need when we want to build the npcx7_evb board image of different chip variants. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST=Switch to different chip variant in build.mk; build and flash the image; make sure each EC image can boot up on EVB of different chip variant. Change-Id: I430a39fae8c9516c0f22b0fe9868403a60b80d4a Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/1351918 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--board/npcx7_evb/board.h18
-rw-r--r--board/npcx7_evb/build.mk4
2 files changed, 18 insertions, 4 deletions
diff --git a/board/npcx7_evb/board.h b/board/npcx7_evb/board.h
index 7bdb0d5aa0..a7a5328d17 100644
--- a/board/npcx7_evb/board.h
+++ b/board/npcx7_evb/board.h
@@ -10,10 +10,15 @@
/*
* npcx7 EVB version:
- * 1 - for EVB version 1 which supports npcx7m6f/npcx7m6g
- * 2 - for EVB version 2 which supports npcx7m7wb/npcx7m6fb
+ * 1 - for EVB version 1 which supports npcx7m6g
+ * 2 - for EVB version 2 which supports npcx7m6f/npcx7m6fb/npcx7m6fc/npcx7m7wb
*/
+#if defined(CHIP_VARIANT_NPCX7M6G)
+#define BOARD_VERSION 1
+#elif defined(CHIP_VARIANT_NPCX7M6F) || defined(CHIP_VARIANT_NPCX7M6FB) || \
+ defined(CHIP_VARIANT_NPCX7M6FC) || defined(CHIP_VARIANT_NPCX7M7WB)
#define BOARD_VERSION 2
+#endif
/* EC modules */
#define CONFIG_ADC
@@ -54,18 +59,25 @@
#define CONFIG_FANS 1
/* Internal spi-flash on npcx7 ec */
-#define CONFIG_FLASH_SIZE 0x00100000 /* 1MB internal spi flash */
#define CONFIG_SPI_FLASH_PORT 0
#define CONFIG_SPI_FLASH
#define CONFIG_SPI_FLASH_REGS
+#if defined(CHIP_VARIANT_NPCX7M6FC)
+#define CONFIG_SPI_FLASH_W25Q40 /* Internal spi flash type */
+#define CONFIG_FLASH_SIZE 0x00080000 /* 512 KB internal spi flash */
+#else
#define CONFIG_SPI_FLASH_W25Q80 /* Internal spi flash type */
+#define CONFIG_FLASH_SIZE 0x00100000 /* 1 MB internal spi flash */
+#endif
/* New features on npcx7 ec */
#define CONFIG_KEYBOARD_KSO_HIGH_DRIVE /* Quasi-bidirectional buf for KSOs */
#if (BOARD_VERSION == 2)
#define CONFIG_HIBERNATE_PSL /* Use PSL (Power Switch Logic) for hibernate */
#define CONFIG_CLOCK_SRC_EXTERNAL /* Use external 32kHz OSC as LFCLK source */
+#ifdef CHIP_VARIANT_NPCX7M7WB
#define CONFIG_WAKE_ON_VOICE /* Use Audio front-end for Wake-on-Voice */
+#endif
#undef CONFIG_FANS /* Remove fan application */
#define CONFIG_FANS 0
#else
diff --git a/board/npcx7_evb/build.mk b/board/npcx7_evb/build.mk
index 84c7c83dd0..a2831c0d10 100644
--- a/board/npcx7_evb/build.mk
+++ b/board/npcx7_evb/build.mk
@@ -6,11 +6,13 @@
# Board specific files build
#
-# the IC is Nuvoton NPCX7 M-Series EC (npcx7m6g, npcx7m6f, npcx7m6fb, npcx7m7wb)
+# the IC is Nuvoton NPCX7 M-Series EC (npcx7m6g, npcx7m6f, npcx7m6fb, npcx7m6fc,
+# npcx7m7wb)
# CHIP_VARIANT:
# npcx7m6g - for npcx7 ec without internal flash
# npcx7m6f - for npcx7 ec with internal flash
# npcx7m6fb - for npcx7 ec with internal flash, enhanced features.
+# npcx7m6fc - the same as npcx7m6fb but internal flash size is 512 Kbytes.
# npcx7m7wb - for npcx7 ec with internal flash, enhanced features + WOV.
CHIP:=npcx