mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
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>
This commit is contained in:
@@ -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) */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user