diff options
author | Divagar Mohandass <divagar.mohandass@intel.com> | 2020-07-17 12:22:02 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-18 06:02:23 +0000 |
commit | 857f966d0a1220ec4c5173513f05f32448a0ac25 (patch) | |
tree | 5745f595b10a778669648953a41a3c2ea4a96561 | |
parent | d9cf2c2ffa2b88c04544d32e26ed1beff1eb5e40 (diff) | |
download | chrome-ec-857f966d0a1220ec4c5173513f05f32448a0ac25.tar.gz |
retimer/tusb544: set the HPD pin for DP/Dock mode
DP lanes are getting disabled if the HPD pin are not set.
Drive the HPD_IN pin in USB type-c DP/Dock mode and clear
it in the no MUX mode.
BRANCH=None
BUG=b:160572502
TEST=Check DP/HDMI display out on Waddledee USB type-c sub board
Signed-off-by: Divagar Mohandass <divagar.mohandass@intel.com>
Change-Id: Ie5a467572a88471155fe84e1054ffe64de5f7964
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2304239
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | driver/retimer/tusb544.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/driver/retimer/tusb544.c b/driver/retimer/tusb544.c index 3c9549c15b..b84c57cf81 100644 --- a/driver/retimer/tusb544.c +++ b/driver/retimer/tusb544.c @@ -33,6 +33,8 @@ static int tusb544_enter_low_power_mode(const struct usb_mux *me) /* Setting CTL_SEL[0,1] to 0 powers down, per Table 5 */ reg &= ~TUSB544_GEN4_CTL_SEL; + /* Clear HPD */ + reg &= ~TUSB544_GEN4_HPDIN; return tusb544_write(me, TUSB544_REG_GENERAL4, reg); } @@ -62,11 +64,13 @@ static int tusb544_set_mux(const struct usb_mux *me, mux_state_t mux_state) reg &= ~TUSB544_GEN4_CTL_SEL; if ((mux_state & USB_PD_MUX_USB_ENABLED) && - (mux_state & USB_PD_MUX_DP_ENABLED)) + (mux_state & USB_PD_MUX_DP_ENABLED)) { reg |= TUSB544_CTL_SEL_DP_USB; - else if (mux_state & USB_PD_MUX_DP_ENABLED) + reg |= TUSB544_GEN4_HPDIN; + } else if (mux_state & USB_PD_MUX_DP_ENABLED) { reg |= TUSB544_CTL_SEL_DP_ONLY; - else if (mux_state & USB_PD_MUX_USB_ENABLED) + reg |= TUSB544_GEN4_HPDIN; + } else if (mux_state & USB_PD_MUX_USB_ENABLED) reg |= TUSB544_CTL_SEL_USB_ONLY; rv = tusb544_write(me, TUSB544_REG_GENERAL4, reg); |