summaryrefslogtreecommitdiff
path: root/baseboard/octopus
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2018-12-11 14:17:33 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-12-12 17:04:55 -0800
commite95e95a0007fa8e69a002f551c31aee34ae94574 (patch)
tree1d5cb381013c7bf2f0db4c189aa35ed1913b78e6 /baseboard/octopus
parentc65597299e493ac5bbbc668c1fcb4d0530c0b070 (diff)
downloadchrome-ec-e95e95a0007fa8e69a002f551c31aee34ae94574.tar.gz
Octopus: add mux reset when applicable
The ITE based octopus boards have a PS8751 acting as a USB mux on at least one port. Since these boards have GPIOs hooked up to the PS8751 reset pin(s), we should reset the chips on startup. This should help in rare error cases, for example if the chip is hung up. BUG=b:120087080 BRANCH=octopus TEST=loaded onto apel board version 0, ran several EC reboots and verified the DB USB-C and USB-A ports functioned well Change-Id: I04279e5e12996deedf4d22b2be2aa2f9909f4852 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1372028 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'baseboard/octopus')
-rw-r--r--baseboard/octopus/variant_usbc_ec_tcpcs.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/baseboard/octopus/variant_usbc_ec_tcpcs.c b/baseboard/octopus/variant_usbc_ec_tcpcs.c
index cb137ee06f..35365e232b 100644
--- a/baseboard/octopus/variant_usbc_ec_tcpcs.c
+++ b/baseboard/octopus/variant_usbc_ec_tcpcs.c
@@ -118,17 +118,24 @@ uint16_t tcpc_get_alert_status(void)
}
/**
- * Reset all system PD/TCPC MCUs -- currently only called from
- * handle_pending_reboot() in common/power.c just before hard
- * resetting the system. This logic is likely not needed as the
- * PP3300_A rail should be dropped on EC reset.
+ * Reset all system PD/TCPC MCUs -- currently called from both
+ * handle_pending_reboot() in common/system.c and baseboard_tcpc_init() in the
+ * octopus/baseboard.c
*/
void board_reset_pd_mcu(void)
{
/*
* C0 & C1: The internal TCPC on ITE EC does not have a reset signal,
- * but it will get reset when the EC gets reset.
+ * but it will get reset when the EC gets reset. We will, however,
+ * reset the USB muxes here.
*/
+ gpio_set_level(GPIO_USB_C0_PD_RST_ODL, 0);
+ gpio_set_level(GPIO_USB_C1_PD_RST_ODL, 0);
+
+ msleep(PS8XXX_RESET_DELAY_MS);
+
+ gpio_set_level(GPIO_USB_C0_PD_RST_ODL, 1);
+ gpio_set_level(GPIO_USB_C1_PD_RST_ODL, 1);
}
void board_pd_vconn_ctrl(int port, int cc_pin, int enabled)