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-10 08:10:17 +0000 |
commit | a96a1570c41a745a95e3a187467a066a1f62c27b (patch) | |
tree | db798faa9ed600ebe181334d099d1ba602ad7d74 /baseboard/octopus | |
parent | af64cc766b654edd8b3bbd71760f8cbd30a68a98 (diff) | |
download | chrome-ec-a96a1570c41a745a95e3a187467a066a1f62c27b.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>
Diffstat (limited to 'baseboard/octopus')
-rw-r--r-- | baseboard/octopus/cbi_ssfc.c | 5 | ||||
-rw-r--r-- | baseboard/octopus/cbi_ssfc.h | 18 |
2 files changed, 20 insertions, 3 deletions
diff --git a/baseboard/octopus/cbi_ssfc.c b/baseboard/octopus/cbi_ssfc.c index e4048e898f..1fa45f7338 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_ */ |