summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHLin <CHLIN56@nuvoton.com>2018-01-18 18:39:54 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-24 04:36:36 -0800
commit65cc83f7801532797a7c02a723e7dfb3a86e99e4 (patch)
tree0761649b0baf11f6ec92aa31f3d8b34c5a4c12bf
parentb58ceaca340e3baba8f87172109c36a600610570 (diff)
downloadchrome-ec-65cc83f7801532797a7c02a723e7dfb3a86e99e4.tar.gz
npcx7_evb: Define BOARD_VERSION for different npcx7 EVBs
There are two versions of npcx7 EVB. This CL adds the definition BOARD_VERSION (default is 2) in board.h. So we can include different features or set CONFIG_* flags based on the value of BOARD_VERSION to meet the default HW configuration of npcx7 EVBs. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST=Change BOARD_VERSION to 1/2; "BOARD=npcx7_evb make"; Flash the image on EVB 1/2; make sure the EVBs bootup. Change-Id: Id4556f702af8c26778a649addde7cf490b5301fc Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/873510 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/npcx7_evb/board.h22
-rw-r--r--board/npcx7_evb/build.mk10
2 files changed, 27 insertions, 5 deletions
diff --git a/board/npcx7_evb/board.h b/board/npcx7_evb/board.h
index 7e8afa78d8..adff4a9cd7 100644
--- a/board/npcx7_evb/board.h
+++ b/board/npcx7_evb/board.h
@@ -8,12 +8,20 @@
#ifndef __CROS_EC_BOARD_H
#define __CROS_EC_BOARD_H
+/*
+ * npcx7 EVB version:
+ * 1 - for EVB version 1 which supports npcx7m6f/npcx7m6g
+ * 2 - for EVB version 2 which supports npcx7m7w/npcx7m6xb
+ */
+#define BOARD_VERSION 2
+
/* EC modules */
#define CONFIG_ADC
#define CONFIG_PWM
#define CONFIG_SPI
#define CONFIG_LPC
#define CONFIG_I2C
+#undef CONFIG_PECI
/* Features of eSPI */
#define CONFIG_ESPI /* Use eSPI protocol for host interface of x86 CPU */
#define CONFIG_ESPI_VW_SIGNALS /* Use VW signals instead of GPIOs */
@@ -59,11 +67,23 @@
/* 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 */
+#define CONFIG_WAKE_ON_VOICE /* Use Audio front-end for Wake-on-Voice */
+#undef CONFIG_FANS /* Remove fan application */
+#define CONFIG_FANS 0
+#else
#undef CONFIG_HIBERNATE_PSL /* Use PSL (Power Switch Logic) for hibernate */
#undef CONFIG_CLOCK_SRC_EXTERNAL /* Use external 32kHz OSC as LFCLK source */
+#endif
/* Optional feature to configure npcx7 chip */
-#define NPCX_UART_MODULE2 0 /* 0:GPIO10/11 1:GPIO64/65 as UART */
+#if (BOARD_VERSION == 2)
+#define NPCX_UART_MODULE2 1 /* 1:GPIO64/65 as UART1 */
+#else
+#define NPCX_UART_MODULE2 0 /* 0:GPIO10/11 as UART1 */
+#endif
#define NPCX_JTAG_MODULE2 0 /* 0:GPIO21/17/16/20 1:GPIOD5/E2/D4/E5 as JTAG */
#define NPCX_TACH_SEL2 0 /* 0:GPIO40/73 1:GPIO93/A6 as TACH */
#define NPCX7_PWM1_SEL 0 /* 0:GPIOC2 as I2CSCL0 1:as PWM1 (only in npcx7) */
diff --git a/board/npcx7_evb/build.mk b/board/npcx7_evb/build.mk
index 4ef64f71fa..af5c355292 100644
--- a/board/npcx7_evb/build.mk
+++ b/board/npcx7_evb/build.mk
@@ -6,13 +6,15 @@
# Board specific files build
#
-# the IC is Nuvoton NPCX7 M-Series EC (npcx7m6g, npcx7m6f)
+# the IC is Nuvoton NPCX7 M-Series EC (npcx7m6g, npcx7m6f, npcx7m6xb, npcx7m7w)
# CHIP_VARIANT:
-# npcx7m6f - for npcx7 ec with 144 pins package
-# npcx7m6g - for npcx7 ec with 128 pins package
+# npcx7m6f - for npcx7 ec with 144 pins package
+# npcx7m6g - for npcx7 ec with 128 pins package
+# npcx7m6xb - for npcx7 ec with 144 pins package, enhanced features.
+# npcx7m7w - for npcx7 ec with 144 pins package, enhanced features + WOV.
CHIP:=npcx
CHIP_FAMILY:=npcx7
-CHIP_VARIANT:=npcx7m6f
+CHIP_VARIANT:=npcx7m7w
board-y=board.o