summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-02-08 21:14:37 -0800
committerCommit Bot <commit-bot@chromium.org>2021-04-02 18:52:00 +0000
commit1c19d95208187998bab51c797f45f688f4bfff1d (patch)
tree029a5420b8c9c2a54bd8484c66f6445793aed2cd
parentac04e07d387782fc91a8758890570c13adfb7d81 (diff)
downloadchrome-ec-1c19d95208187998bab51c797f45f688f4bfff1d.tar.gz
quiche: Add board_set method for ps8822 mux for rx dp eq
This CL adds a method to change Rx DP gain from 12 to 20 dB. This value was requested by the MST vendor. BUG=b:178656398 BRANCH=None TEST=verifed register setting when DP mode is active on quiche Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I6355da1ad88c3e1f29f07ca036adbf8fc9b908ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2686919 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r--board/quiche/board.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/quiche/board.c b/board/quiche/board.c
index 0abb6d76c2..05fc76d132 100644
--- a/board/quiche/board.c
+++ b/board/quiche/board.c
@@ -157,6 +157,22 @@ struct ppc_config_t ppc_chips[] = {
#endif
#ifdef SECTION_IS_RW
+/*
+ * PS8802 set mux board tuning.
+ * Adds in board specific gain and DP lane count configuration
+ */
+static int board_ps8822_mux_set(const struct usb_mux *me,
+ mux_state_t mux_state)
+{
+ int rv = EC_SUCCESS;
+
+ /* DP specific config */
+ if (mux_state & USB_PD_MUX_DP_ENABLED)
+ rv = ps8822_set_dp_rx_eq(me, PS8822_DPEQ_LEVEL_UP_20DB);
+
+ return rv;
+}
+
/* TCPCs */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
[USB_PD_PORT_HOST] = {
@@ -179,6 +195,7 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
.i2c_port = I2C_PORT_I2C1,
.i2c_addr_flags = PS8822_I2C_ADDR3_FLAG,
.driver = &ps8822_usb_mux_driver,
+ .board_set = &board_ps8822_mux_set,
},
[USB_PD_PORT_DP] = {
.usb_port = USB_PD_PORT_DP,