diff options
author | YongBeum.Ha <ybha@samsung.corp-partner.google.com> | 2020-09-25 13:20:59 +0900 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-23 06:39:24 +0000 |
commit | 59551dcaee6c30b3764a9f00aae8487c0495dfec (patch) | |
tree | e1c7e87f8df8e45d233a74011862c0364943c434 | |
parent | 920dfcab25b3a3a4fbf5404243c3844aabd4ca36 (diff) | |
download | chrome-ec-59551dcaee6c30b3764a9f00aae8487c0495dfec.tar.gz |
Octopus: Add SSFC field for Charger
Casta need to support 2 chargers(ISL9238 & BQ25710)
BUG=b:168122776
BRANCH=firmware-octopus-11297.B
TEST=None
Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Change-Id: I6fdc7fefd5923ee1b168e6f0ec9defa19de7cb81
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428357
Commit-Queue: Marco Chen <marcochen@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | baseboard/octopus/cbi_ssfc.c | 5 | ||||
-rw-r--r-- | baseboard/octopus/cbi_ssfc.h | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/baseboard/octopus/cbi_ssfc.c b/baseboard/octopus/cbi_ssfc.c index ff88d6c47c..e515bf0d6b 100644 --- a/baseboard/octopus/cbi_ssfc.c +++ b/baseboard/octopus/cbi_ssfc.c @@ -37,3 +37,8 @@ enum ssfc_ppc_p1 get_cbi_ssfc_ppc_p1(void) { return ((cached_ssfc & SSFC_PPC_P1_MASK) >> SSFC_PPC_P1_OFFSET); } + +enum ssfc_charger get_cbi_ssfc_charger(void) +{ + return ((cached_ssfc & SSFC_CHARGER_MASK) >> SSFC_CHARGER_OFFSET); +} diff --git a/baseboard/octopus/cbi_ssfc.h b/baseboard/octopus/cbi_ssfc.h index 07ed4c958d..326072f68e 100644 --- a/baseboard/octopus/cbi_ssfc.h +++ b/baseboard/octopus/cbi_ssfc.h @@ -32,7 +32,19 @@ enum ssfc_ppc_p1 { #define SSFC_PPC_P1_OFFSET 3 #define SSFC_PPC_P1_MASK GENMASK(5, 3) +/* + * Charger (Bits 8-6) + */ +enum ssfc_charger { + SSFC_CHARGER_DEFAULT, + SSFC_CHARGER_ISL9238, + SSFC_CHARGER_BQ25710, +}; +#define SSFC_CHARGER_OFFSET 6 +#define SSFC_CHARGER_MASK GENMASK(8, 6) + enum ssfc_tcpc_p1 get_cbi_ssfc_tcpc_p1(void); enum ssfc_ppc_p1 get_cbi_ssfc_ppc_p1(void); +enum ssfc_charger get_cbi_ssfc_charger(void); #endif /* _OCTOPUS_CBI_SSFC__H_ */ |