summaryrefslogtreecommitdiff
path: root/baseboard/octopus
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-10-18 15:27:01 -0600
committerCommit Bot <commit-bot@chromium.org>2021-12-02 23:09:27 +0000
commit18f6c4d3b2a56635ce880788047083115637885c (patch)
treec735046c4f418c6addfd2c6228252a81388f8b4f /baseboard/octopus
parent5175aa6b6d38c1819e3820d889d8f02d7226fac1 (diff)
downloadchrome-ec-18f6c4d3b2a56635ce880788047083115637885c.tar.gz
USB MUX: Wait on ACK for HPD changes when required
In order to correctly sequence HPD sets with the AP, allow the HPD set to wait on an ACK from the AP before proceeding. BRANCH=None BUG=b:202137658 TEST=on brya, validate retimer and virtual mux are kept in sync as expected Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I368c3290b69d627829a70847876d7b47a8c36948 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3232293 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'baseboard/octopus')
-rw-r--r--baseboard/octopus/variant_usbc_ec_tcpcs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/baseboard/octopus/variant_usbc_ec_tcpcs.c b/baseboard/octopus/variant_usbc_ec_tcpcs.c
index 2e3248410f..8fa5f513e3 100644
--- a/baseboard/octopus/variant_usbc_ec_tcpcs.c
+++ b/baseboard/octopus/variant_usbc_ec_tcpcs.c
@@ -49,13 +49,17 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
/* TODO(crbug.com/826441): Consolidate this logic with other impls */
static void board_it83xx_hpd_status(const struct usb_mux *me,
- mux_state_t mux_state)
+ mux_state_t mux_state,
+ bool *ack_required)
{
int hpd_lvl = (mux_state & USB_PD_MUX_HPD_LVL) ? 1 : 0;
int hpd_irq = (mux_state & USB_PD_MUX_HPD_IRQ) ? 1 : 0;
enum gpio_signal gpio = me->usb_port ?
GPIO_USB_C1_HPD_1V8_ODL : GPIO_USB_C0_HPD_1V8_ODL;
+ /* This driver does not use host command ACKs */
+ *ack_required = false;
+
/* Invert HPD level since GPIOs are active low. */
hpd_lvl = !hpd_lvl;