summaryrefslogtreecommitdiff
path: root/baseboard/trogdor/usb_pd_policy.c
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-10-29 16:47:09 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-31 02:15:46 +0000
commit13f0925ce8c686333a2aaca4db8903c32edf847f (patch)
tree1719c56396ee53c77c8896cbb43a5b073d1f9fce /baseboard/trogdor/usb_pd_policy.c
parent65fcc29f189d5f8b3323ad3cb085dea2fa188991 (diff)
downloadchrome-ec-13f0925ce8c686333a2aaca4db8903c32edf847f.tar.gz
Trogdor: Configure OE_L and SEL of DP muxes to prevent leakage
The OE_L has external pull-up. It is actually an open-drain output. Configuring it to push-pull has leakage through the pull-up to an unpowered rail during EC hibernate. Also configure SEL to output low if OE_L is deasserted. The SEL has no meaning if the muxes are disabled. When EC hibernate, the muxing ICs are unpowered. Outputing low prevents leakage through the muxing ICs. BRANCH=None BUG=b:169595541 TEST=Plugged a HDMI monitor to port-0 and port-1; checked the DP mux settings correctly. Change-Id: Icf0e81172626c09bc556756f1bcdddb83f45ac68 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508864 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'baseboard/trogdor/usb_pd_policy.c')
-rw-r--r--baseboard/trogdor/usb_pd_policy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/baseboard/trogdor/usb_pd_policy.c b/baseboard/trogdor/usb_pd_policy.c
index 56332a3205..ba88236290 100644
--- a/baseboard/trogdor/usb_pd_policy.c
+++ b/baseboard/trogdor/usb_pd_policy.c
@@ -199,6 +199,7 @@ __override int svdm_dp_attention(int port, uint32_t *payload)
} else {
/* Disconnect the DP port selection mux. */
gpio_set_level(GPIO_DP_MUX_OE_L, 1);
+ gpio_set_level(GPIO_DP_MUX_SEL, 0);
/* Disconnect the SBU lines in PPC chip. */
if (IS_ENABLED(CONFIG_USBC_PPC_SBU))
@@ -252,6 +253,7 @@ __override void svdm_exit_dp_mode(int port)
{
/* Disconnect the DP port selection mux. */
gpio_set_level(GPIO_DP_MUX_OE_L, 1);
+ gpio_set_level(GPIO_DP_MUX_SEL, 0);
/* Signal AP for the HPD low event */
usb_mux_hpd_update(port, 0, 0);