summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-11-17 12:03:26 -0800
committerCommit Bot <commit-bot@chromium.org>2021-11-23 22:33:29 +0000
commit880291e559f418194324c16ab6f6a1951d4b542b (patch)
treebc965813ca489b703abc2512df6a65cdcfc32ced
parent8f9fd8def52833ae6b74d5ac4f97ed8b41060f6a (diff)
downloadchrome-ec-880291e559f418194324c16ab6f6a1951d4b542b.tar.gz
gingerbread: Add DP Rx EQ .board_set method for TUSB1064
This CL adds a .board_set method for the TUSB1064 usb_mux config to control the display port rx EQ gain. Previously, this gain was being applied in the driver init() function. The driver has been modified to remove this default gain setting. So now the gain must be selected by the boards that use the TUSB1064. BUG=b:206059703 BRANCH=none TEST=verified that DP Rx EQ gain is set when the usbc host port is attached. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I4b8e3463aaa216aa1d71aa6a87b9819e6d78121a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3291130 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/gingerbread/board.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/gingerbread/board.c b/board/gingerbread/board.c
index 6a2ae0c683..ce7a18ee4f 100644
--- a/board/gingerbread/board.c
+++ b/board/gingerbread/board.c
@@ -152,6 +152,20 @@ struct ppc_config_t ppc_chips[] = {
#endif
#ifdef SECTION_IS_RW
+
+/* TUSB1064 set mux board tuning for DP Rx path */
+static int board_tusb1064_dp_rx_eq_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 = tusb1064_set_dp_rx_eq(me, TUSB1064_DP_EQ_RX_8_9_DB);
+
+ return rv;
+}
+
/*
* TCPCs: 2 USBC/PD ports
* port 0 -> host port -> STM32G4 UCPD
@@ -178,6 +192,7 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
.i2c_port = I2C_PORT_I2C1,
.i2c_addr_flags = TUSB1064_I2C_ADDR0_FLAGS,
.driver = &tusb1064_usb_mux_driver,
+ .board_set = &board_tusb1064_dp_rx_eq_set,
},
[USB_PD_PORT_DP] = {
.usb_port = USB_PD_PORT_DP,