From 069f0fe23aa86f56d861d519f1db4365cb8103ed Mon Sep 17 00:00:00 2001 From: Siyu Qin Date: Tue, 15 Feb 2022 14:20:36 +0800 Subject: homestar/mrbland/wormdingler: Add support PS8755 Import PS8755 as the 2rd source for TCPC chip. BUG=b:218786366 BRANCH=trogdor TEST=make BOARD=homestar/mrbland/wormdingler -j Signed-off-by: Siyu Qin Change-Id: I01185737e55bff93cea65fe0667344841231d30b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3463103 Reviewed-by: wen zhang Reviewed-by: Bob Moragues Reviewed-by: Wai-Hong Tam Commit-Queue: Wai-Hong Tam --- board/homestar/board.c | 3 +-- board/mrbland/board.c | 3 +++ board/wormdingler/board.c | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/board/homestar/board.c b/board/homestar/board.c index 496508fa5a..bf7636aadb 100644 --- a/board/homestar/board.c +++ b/board/homestar/board.c @@ -475,8 +475,7 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); __overridable uint16_t board_get_ps8xxx_product_id(int port) { - /* Check if the chip is PS8755 for rev-0, rev-1 and rev-2 */ - if (system_get_board_version() < 3 && check_ps8755_chip(port)) + if (check_ps8755_chip(port)) return PS8755_PRODUCT_ID; return PS8805_PRODUCT_ID; diff --git a/board/mrbland/board.c b/board/mrbland/board.c index fc791a3a3c..f7fbcf4f97 100644 --- a/board/mrbland/board.c +++ b/board/mrbland/board.c @@ -432,6 +432,9 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); __overridable uint16_t board_get_ps8xxx_product_id(int port) { + if (check_ps8755_chip(port)) + return PS8755_PRODUCT_ID; + return PS8805_PRODUCT_ID; } diff --git a/board/wormdingler/board.c b/board/wormdingler/board.c index cf5b550204..3f44200e44 100644 --- a/board/wormdingler/board.c +++ b/board/wormdingler/board.c @@ -474,6 +474,9 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); __overridable uint16_t board_get_ps8xxx_product_id(int port) { + if (check_ps8755_chip(port)) + return PS8755_PRODUCT_ID; + return PS8805_PRODUCT_ID; } -- cgit v1.2.1