diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-09-17 10:55:29 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-17 22:37:50 +0000 |
commit | d0745052383dcd144ceae6e2f746dfc8c0ec7338 (patch) | |
tree | f618dddf9af10b873859e68ca54b1c68ed064223 | |
parent | be80d749b6bfbc28f19583ad7f6736f7ed76f1d4 (diff) | |
download | chrome-ec-d0745052383dcd144ceae6e2f746dfc8c0ec7338.tar.gz |
Pompom: Change to runtime config for TCPC part
The existing TCPC config is a compile time config. Have to create
different images for different board revs. This CL changes it to
runtime config such that a single image can be used for all board
revs.
BRANCH=none
BUG=b:167476139
TEST=Built and tested the Pompom EC image.
Change-Id: I113e410b9b07232a8a7d2fed9258a041e9117230
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2416991
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
-rw-r--r-- | board/pompom/board.c | 9 | ||||
-rw-r--r-- | board/pompom/board.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/board/pompom/board.c b/board/pompom/board.c index f159b9fa83..a3700d56bc 100644 --- a/board/pompom/board.c +++ b/board/pompom/board.c @@ -221,6 +221,15 @@ static void board_init(void) } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); +__override uint16_t board_get_ps8xxx_product_id(int port) +{ + /* Pompom rev 1+ changes TCPC from PS8751 to PS8805 */ + if (system_get_board_version() == 0) + return PS8751_PRODUCT_ID; + + return PS8805_PRODUCT_ID; +} + void board_tcpc_init(void) { /* Only reset TCPC if not sysjump */ diff --git a/board/pompom/board.h b/board/pompom/board.h index 71d3918c4b..fa5517da74 100644 --- a/board/pompom/board.h +++ b/board/pompom/board.h @@ -30,11 +30,9 @@ #define CONFIG_BC12_DETECT_PI3USB9201 /* USB */ -#if BOARD_REV == POMPOM_REV0 +#define CONFIG_USB_PD_TCPM_MULTI_PS8XXX #define CONFIG_USB_PD_TCPM_PS8751 -#else #define CONFIG_USB_PD_TCPM_PS8805 -#endif #define CONFIG_USBC_PPC_SN5S330 #define CONFIG_USB_PD_PORT_MAX_COUNT 1 |