summaryrefslogtreecommitdiff
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
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>
-rw-r--r--baseboard/trogdor/usb_pd_policy.c2
-rw-r--r--board/coachz/gpio.inc4
-rw-r--r--board/lazor/gpio.inc4
-rw-r--r--board/pompom/gpio.inc4
-rw-r--r--board/trogdor/gpio.inc4
5 files changed, 10 insertions, 8 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);
diff --git a/board/coachz/gpio.inc b/board/coachz/gpio.inc
index 91446975d3..6d86b7ebb7 100644
--- a/board/coachz/gpio.inc
+++ b/board/coachz/gpio.inc
@@ -84,8 +84,8 @@ GPIO(EN_BASE, PIN(0, 4), GPIO_OUT_LOW) /* Enable power to detach
/* USB-C */
GPIO(USB_C0_PD_RST_L, PIN(F, 1), GPIO_ODR_HIGH) /* Port-0 TCPC chip reset, actaully Open-Drain */
GPIO(USB_C1_PD_RST_L, PIN(E, 4), GPIO_ODR_HIGH) /* Port-1 TCPC chip reset, actually Open-Drain */
-GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_OUT_HIGH) /* DP mux enable */
-GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_HIGH) /* DP mux selection: L:C0, H:C1 */
+GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_ODR_HIGH) /* DP mux enable, actually Open-Drain */
+GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_LOW) /* DP mux selection: L:C0, H:C1 */
GPIO(DP_HOT_PLUG_DET, PIN(9, 5), GPIO_OUT_LOW) /* DP HPD to AP */
/* USB-A */
diff --git a/board/lazor/gpio.inc b/board/lazor/gpio.inc
index bfbea19b15..234a9e2208 100644
--- a/board/lazor/gpio.inc
+++ b/board/lazor/gpio.inc
@@ -81,8 +81,8 @@ GPIO(TRACKPAD_INT_GATE, PIN(7, 4), GPIO_OUT_LOW)
/* USB-C */
GPIO(USB_C0_PD_RST_L, PIN(F, 1), GPIO_ODR_HIGH) /* Port-0 TCPC chip reset, actaully Open-Drain */
GPIO(USB_C1_PD_RST_L, PIN(E, 4), GPIO_ODR_HIGH) /* Port-1 TCPC chip reset, actually Open-Drain */
-GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_OUT_HIGH) /* DP mux enable */
-GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_HIGH) /* DP mux selection: L:C0, H:C1 */
+GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_ODR_HIGH) /* DP mux enable, actually Open-Drain */
+GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_LOW) /* DP mux selection: L:C0, H:C1 */
GPIO(DP_HOT_PLUG_DET, PIN(9, 5), GPIO_OUT_LOW) /* DP HPD to AP */
/* USB-A */
diff --git a/board/pompom/gpio.inc b/board/pompom/gpio.inc
index 4608810c40..4e634ad512 100644
--- a/board/pompom/gpio.inc
+++ b/board/pompom/gpio.inc
@@ -68,8 +68,8 @@ GPIO(TRACKPAD_INT_GATE, PIN(7, 4), GPIO_OUT_LOW)
/* USB-C */
GPIO(USB_C0_PD_RST_L, PIN(F, 1), GPIO_OUT_HIGH) /* Port-0 TCPC chip reset */
-GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_OUT_HIGH) /* DP mux enable */
-GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_HIGH) /* DP mux selection: L:C0, H:C1 */
+GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_ODR_HIGH) /* DP mux enable, actually Open-Drain */
+GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_LOW) /* DP mux selection: L:C0, H:C1 */
GPIO(DP_HOT_PLUG_DET, PIN(9, 5), GPIO_OUT_LOW) /* DP HPD to AP */
/* USB-A */
diff --git a/board/trogdor/gpio.inc b/board/trogdor/gpio.inc
index 7239eaa7ad..d543fe5f2f 100644
--- a/board/trogdor/gpio.inc
+++ b/board/trogdor/gpio.inc
@@ -74,8 +74,8 @@ GPIO(TRACKPAD_INT_GATE, PIN(7, 4), GPIO_OUT_LOW)
/* USB-C */
GPIO(USB_C0_PD_RST_L, PIN(F, 1), GPIO_OUT_HIGH) /* Port-0 TCPC chip reset */
GPIO(USB_C1_PD_RST_ODL, PIN(E, 4), GPIO_ODR_HIGH) /* Port-1 TCPC chip reset */
-GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_OUT_HIGH) /* DP mux enable */
-GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_HIGH) /* DP mux selection: L:C0, H:C1 */
+GPIO(DP_MUX_OE_L, PIN(9, 6), GPIO_ODR_HIGH) /* DP mux enable, actually Open-Drain */
+GPIO(DP_MUX_SEL, PIN(4, 5), GPIO_OUT_LOW) /* DP mux selection: L:C0, H:C1 */
GPIO(DP_HOT_PLUG_DET, PIN(9, 5), GPIO_OUT_LOW) /* DP HPD to AP */
/* TODO(waihong): Remove it from schematic. No use. */
GPIO(USBC_MUX_CONF0, PIN(5, 1), GPIO_INPUT)