summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongBeum.Ha <ybha@samsung.corp-partner.google.com>2021-09-03 14:37:37 +0900
committerCommit Bot <commit-bot@chromium.org>2021-09-24 05:41:38 +0000
commit4214ac2b1d75625c05200d87425256f2b259a240 (patch)
treeefb600506c9414ac062efb4a435db40361ca25f3
parent3859d4f2fa759dc9e3af329b4db2fb37d75bb43a (diff)
downloadchrome-ec-4214ac2b1d75625c05200d87425256f2b259a240.tar.gz
ps8743 : add definition to tune usb mux
add register and value definition to tune usb and dp. BUG=b:198258596 BRANCH=None TEST=make -j BOARD=bugzzy Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: I82808af8c2f53783a3157417063cf40e2df70ad6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3139526 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r--include/driver/usb_mux/ps8743_public.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/driver/usb_mux/ps8743_public.h b/include/driver/usb_mux/ps8743_public.h
index 8a843aaf7f..b0a7ae2eda 100644
--- a/include/driver/usb_mux/ps8743_public.h
+++ b/include/driver/usb_mux/ps8743_public.h
@@ -28,6 +28,24 @@
/* To reset the state machine to default */
#define PS8743_MODE_POWER_DOWN (PS8743_MODE_USB_REG_CONTROL | \
PS8743_MODE_DP_REG_CONTROL)
+/* DP output setting */
+#define PS8743_REG_DP_SETTING 0x07
+#define PS8743_DP_SWG_ADJ_DFLT 0x00
+#define PS8743_DP_SWG_ADJ_N20P 0x40
+#define PS8743_DP_SWG_ADJ_N15P 0x80
+#define PS8743_DP_SWG_ADJ_P15P 0xc0
+#define PS8743_DP_OUT_SWG_400 0x00
+#define PS8743_DP_OUT_SWG_600 0x10
+#define PS8743_DP_OUT_SWG_800 0x20
+#define PS8743_DP_OUT_SWG_1000 0x30
+#define PS8743_DP_OUT_PRE_EM_0_DB 0x00
+#define PS8743_DP_OUT_PRE_EM_3_5_DB 0x04
+#define PS8743_DP_OUT_PRE_EM_6_0_DB 0x08
+#define PS8743_DP_OUT_PRE_EM_9_5_DB 0x0c
+#define PS8743_DP_POST_CUR2_0_DB 0x00
+#define PS8743_DP_POST_CUR2_NEG_0_9_DB 0x01
+#define PS8743_DP_POST_CUR2_NEG_1_9_DB 0x02
+#define PS8743_DP_POST_CUR2_NEG_3_1_DB 0x03
/* USB equalization settings for Host to Mux */
#define PS8743_REG_USB_EQ_TX 0x32
@@ -39,6 +57,15 @@
#define PS8743_USB_EQ_TX_10_9_DB 0xc0
#define PS8743_USB_EQ_TX_4_5_DB 0xe0
+/* USB swing adjust for Mux to Type-C connector */
+#define PS8743_REG_USB_SWING 0x36
+#define PS8743_OUT_SWG_DEFAULT 0x00
+#define PS8743_OUT_SWG_NEG_20 0x40
+#define PS8743_OUT_SWG_NEG_15 0x80
+#define PS8743_OUT_SWG_POS_15 0xc0
+#define PS8743_LFPS_SWG_DEFAULT 0x00
+#define PS8743_LFPS_SWG_TD 0x08
+
/* USB equalization settings for Connector to Mux */
#define PS8743_REG_USB_EQ_RX 0x3b
#define PS8743_USB_EQ_RX_2_4_DB 0x00