diff options
author | Tommy Chung <tommy.chung@quanta.corp-partner.google.com> | 2023-03-15 21:07:25 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-20 02:08:57 +0000 |
commit | 0ff6f2a982e3d00d04f88cb4daf17af310c16616 (patch) | |
tree | 8b712d1101eca30c528ddb7a037e9fb80f6fca4f | |
parent | b2c9052c7dccdfe7d5a3882816d7d651820375d7 (diff) | |
download | chrome-ec-0ff6f2a982e3d00d04f88cb4daf17af310c16616.tar.gz |
lantis: Add SSFC bitmap for TCPC sources
Adds SSFC bitmap to support additional TCPC sources.
BUG=b:273637804
BRANCH=none
TEST=make BOARD=lantis
Change-Id: I61f70588e292558e7f41641574a1d2089dcd83bf
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4340869
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Devin Lu <devin.lu@quantatw.com>
-rw-r--r-- | board/lantis/cbi_ssfc.c | 5 | ||||
-rw-r--r-- | board/lantis/cbi_ssfc.h | 18 |
2 files changed, 22 insertions, 1 deletions
diff --git a/board/lantis/cbi_ssfc.c b/board/lantis/cbi_ssfc.c index 81f3ee0dad..324ceffb63 100644 --- a/board/lantis/cbi_ssfc.c +++ b/board/lantis/cbi_ssfc.c @@ -34,3 +34,8 @@ enum ec_ssfc_lid_sensor get_cbi_ssfc_lid_sensor(void) { return (enum ec_ssfc_lid_sensor)cached_ssfc.lid_sensor; } + +enum ec_ssfc_tcpc_p1 get_cbi_ssfc_tcpc_p1(void) +{ + return (enum ec_ssfc_tcpc_p1)cached_ssfc.tcpc_type; +} diff --git a/board/lantis/cbi_ssfc.h b/board/lantis/cbi_ssfc.h index e6606e8b1b..626fe62498 100644 --- a/board/lantis/cbi_ssfc.h +++ b/board/lantis/cbi_ssfc.h @@ -33,6 +33,15 @@ enum ec_ssfc_lid_sensor { }; /* + * TCPC Port 1 (Bits 6-7) + */ +enum ec_ssfc_tcpc_p1 { + SSFC_TCPC_P1_DEFAULT, + SSFC_TCPC_P1_PS8705, + SSFC_TCPC_P1_PS8805, +}; + +/* * Audio Codec Source(Bit 8-10) */ enum ec_ssfc_audio_codec_source { @@ -54,7 +63,7 @@ union dedede_cbi_ssfc { struct { uint32_t base_sensor : 3; uint32_t lid_sensor : 3; - uint32_t reserved : 2; + uint32_t tcpc_type : 2; uint32_t audio_codec_source : 3; uint32_t ts_driver_source : 3; uint32_t reserved_2 : 18; @@ -76,4 +85,11 @@ enum ec_ssfc_base_sensor get_cbi_ssfc_base_sensor(void); */ enum ec_ssfc_lid_sensor get_cbi_ssfc_lid_sensor(void); +/** + * Get the TCPC port 1 type from SSFC_CONFIG. + * + * @return the TCPC type. + */ +enum ec_ssfc_tcpc_p1 get_cbi_ssfc_tcpc_p1(void); + #endif /* _DEDEDE_CBI_SSFC__H_ */ |