summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2023-03-15 13:08:09 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-16 23:27:52 +0000
commit2b6f15f37f9caf75e41c6de63b9855e4ecf6df16 (patch)
tree6d23c567772d191565e9debd31d041270668280a
parentbb6b682c37aa46b9f25c87cafefe4816928f2d68 (diff)
downloadchrome-ec-2b6f15f37f9caf75e41c6de63b9855e4ecf6df16.tar.gz
drawcia: Add SSFC bitmap for TCPC sources
Adds SSFC bitmap to support additional TCPC source. This field will use for the following patch. BUG=b:273188377 BRANCH=none TEST=build Change-Id: I19df1cf1d58c8903505da96dfdc1802995f3bb4c Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4339183 Tested-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Commit-Queue: Devin Lu <devin.lu@quantatw.com>
-rw-r--r--board/drawcia/cbi_ssfc.c5
-rw-r--r--board/drawcia/cbi_ssfc.h18
2 files changed, 22 insertions, 1 deletions
diff --git a/board/drawcia/cbi_ssfc.c b/board/drawcia/cbi_ssfc.c
index 81f3ee0dad..324ceffb63 100644
--- a/board/drawcia/cbi_ssfc.c
+++ b/board/drawcia/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/drawcia/cbi_ssfc.h b/board/drawcia/cbi_ssfc.h
index db1be7b02e..407efaf3f5 100644
--- a/board/drawcia/cbi_ssfc.h
+++ b/board/drawcia/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 {
@@ -45,7 +54,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 reserved_2 : 21;
};
@@ -66,4 +75,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_ */