diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2020-06-30 13:51:59 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-24 19:22:51 +0000 |
commit | f863427cb86267ff4b36a91c49b2733b071da178 (patch) | |
tree | c0faf6adc50c55853ef4cb86fc92438f5d6be4cc | |
parent | e2fa6c1a1e00b5362c11c3d8653f38cc0d9761d7 (diff) | |
download | chrome-ec-f863427cb86267ff4b36a91c49b2733b071da178.tar.gz |
ps8743: use register control HPD
This patch add HPD control through register but not HW pin.
BUG=b:152841287
BRANCH=none
TEST=verify USBC can display without HW pin on berknip
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I2399f12655096b805c04f26d8e0b510125394205
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2306893
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | driver/usb_mux/ps8743.c | 5 | ||||
-rw-r--r-- | driver/usb_mux/ps8743.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/driver/usb_mux/ps8743.c b/driver/usb_mux/ps8743.c index 982bfbd91e..3a9eb1ae40 100644 --- a/driver/usb_mux/ps8743.c +++ b/driver/usb_mux/ps8743.c @@ -78,14 +78,15 @@ static int ps8743_set_mux(const struct usb_mux *me, mux_state_t mux_state) * For CE_DP, CE_USB, and FLIP, disable pin control and enable I2C * control. */ - uint8_t reg = (PS8743_MODE_DP_REG_CONTROL | + uint8_t reg = (PS8743_MODE_IN_HPD_CONTROL | + PS8743_MODE_DP_REG_CONTROL | PS8743_MODE_USB_REG_CONTROL | PS8743_MODE_FLIP_REG_CONTROL); if (mux_state & USB_PD_MUX_USB_ENABLED) reg |= PS8743_MODE_USB_ENABLE; if (mux_state & USB_PD_MUX_DP_ENABLED) - reg |= PS8743_MODE_DP_ENABLE; + reg |= PS8743_MODE_DP_ENABLE | PS8743_MODE_IN_HPD_ASSERT; if (mux_state & USB_PD_MUX_POLARITY_INVERTED) reg |= PS8743_MODE_FLIP_ENABLE; diff --git a/driver/usb_mux/ps8743.h b/driver/usb_mux/ps8743.h index 23e5c363e5..bd8db20167 100644 --- a/driver/usb_mux/ps8743.h +++ b/driver/usb_mux/ps8743.h @@ -17,6 +17,8 @@ /* Mode register for setting mux */ #define PS8743_REG_MODE 0x00 +#define PS8743_MODE_IN_HPD_ASSERT BIT(0) +#define PS8743_MODE_IN_HPD_CONTROL BIT(1) #define PS8743_MODE_FLIP_ENABLE BIT(2) #define PS8743_MODE_FLIP_REG_CONTROL BIT(3) #define PS8743_MODE_USB_ENABLE BIT(4) |