diff options
author | Devin Lu <devin.lu@quantatw.com> | 2020-09-07 17:41:23 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-11 06:36:39 +0000 |
commit | 7005b9bd0d18b4e04650c6aba8e62c639679a569 (patch) | |
tree | 99e2700192c798d95b19a491f645643db27884de | |
parent | 09abd57fc5ccad76deb25154df48c185f65cbed9 (diff) | |
download | chrome-ec-7005b9bd0d18b4e04650c6aba8e62c639679a569.tar.gz |
Octopus: Add SSFC field for PPC
Octopus already supported SSFC with CL:2377058. This patch extends
SSFC field of CBI for PPC.
BRANCH=firmware-octopus-11297.B
BUG=none
TEST=EC log of Meep device can output value of SSFC in CBI.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I1d0815a29673d535e53fdb7efe6b756999bc9f3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2396096
Reviewed-by: Marco Chen <marcochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2402847
Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r-- | baseboard/octopus/cbi_ssfc.c | 5 | ||||
-rw-r--r-- | baseboard/octopus/cbi_ssfc.h | 18 | ||||
-rw-r--r-- | board/meep/board.c | 6 |
3 files changed, 23 insertions, 6 deletions
diff --git a/baseboard/octopus/cbi_ssfc.c b/baseboard/octopus/cbi_ssfc.c index ccfc7ffe02..ff88d6c47c 100644 --- a/baseboard/octopus/cbi_ssfc.c +++ b/baseboard/octopus/cbi_ssfc.c @@ -32,3 +32,8 @@ enum ssfc_tcpc_p1 get_cbi_ssfc_tcpc_p1(void) { return ((cached_ssfc & SSFC_TCPC_P1_MASK) >> SSFC_TCPC_P1_OFFSET); } + +enum ssfc_ppc_p1 get_cbi_ssfc_ppc_p1(void) +{ + return ((cached_ssfc & SSFC_PPC_P1_MASK) >> SSFC_PPC_P1_OFFSET); +} diff --git a/baseboard/octopus/cbi_ssfc.h b/baseboard/octopus/cbi_ssfc.h index e8ef54e3fc..07ed4c958d 100644 --- a/baseboard/octopus/cbi_ssfc.h +++ b/baseboard/octopus/cbi_ssfc.h @@ -14,13 +14,25 @@ * TCPC Port 1 (Bits 0-2) */ enum ssfc_tcpc_p1 { - TCPC_P1_DEFAULT, - TCPC_P1_PS8751, - TCPC_P1_PS8755, + SSFC_TCPC_P1_DEFAULT, + SSFC_TCPC_P1_PS8751, + SSFC_TCPC_P1_PS8755, }; #define SSFC_TCPC_P1_OFFSET 0 #define SSFC_TCPC_P1_MASK GENMASK(2, 0) +/* + * PPC Port 1 (Bits 3-5) + */ +enum ssfc_ppc_p1 { + SSFC_PPC_P1_DEFAULT, + SSFC_PPC_P1_NX20P348X, + SSFC_PPC_P1_SYV682X, +}; +#define SSFC_PPC_P1_OFFSET 3 +#define SSFC_PPC_P1_MASK GENMASK(5, 3) + enum ssfc_tcpc_p1 get_cbi_ssfc_tcpc_p1(void); +enum ssfc_ppc_p1 get_cbi_ssfc_ppc_p1(void); #endif /* _OCTOPUS_CBI_SSFC__H_ */ diff --git a/board/meep/board.c b/board/meep/board.c index 5b260a6e6a..949ac27d7a 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -360,10 +360,10 @@ __override uint16_t board_get_ps8xxx_product_id(int port) return 0; switch (get_cbi_ssfc_tcpc_p1()) { - case TCPC_P1_PS8755: + case SSFC_TCPC_P1_PS8755: return PS8755_PRODUCT_ID; - case TCPC_P1_DEFAULT: - case TCPC_P1_PS8751: + case SSFC_TCPC_P1_DEFAULT: + case SSFC_TCPC_P1_PS8751: default: return PS8751_PRODUCT_ID; } |