diff options
author | Denis Brockus <dbrockus@google.com> | 2020-06-30 12:42:04 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-01 23:35:52 +0000 |
commit | dc3e8d69dbffc330a0725eacf00da14f54ac86fc (patch) | |
tree | 30d440d51929310a4936a36c9b0cd50463f561cd /include/usb_pd_tcpm.h | |
parent | e8bd3c057ceb1c881ccd5112b577d94cd730b7d6 (diff) | |
download | chrome-ec-dc3e8d69dbffc330a0725eacf00da14f54ac86fc.tar.gz |
TCPMv2: make sure Vbus is not sourced in AttachWait.SRC
The TCPC on zork appears to enable Vbus sourcing some
of the time when we come out of auto-toggle. It looks
like about a 60ms delay before it is enabled. We then
go to AttachWait.SRC and since the exit condition to
get to Attached.SRC is a debounced/valid Attached.SRC
CC and Safe0V, it has to be disabled manually in order
to move to Attached.SRC
BUG=b:160227699,b:160253746
BRANCH=none
TEST=dut-control servo_v4_role:snk should attach
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I1dfc5d2536aaa4d7a5ffc7bbb52c647b15764196
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276463
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r-- | include/usb_pd_tcpm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index ba7b0ef8aa..fb46d055e7 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -426,12 +426,15 @@ struct tcpm_drv { * Bit 3 --> Set to 1 if TCPC is using TCPCI Revision 2.0 * Bit 4 --> Set to 1 if TCPC is using TCPCI Revision 2.0 but does not support * the vSafe0V bit in the EXTENDED_STATUS_REGISTER + * Bit 5 --> Set to 1 if TCPC some times sets Vbus sourcing enabled on + * auto-toggle and we need to be able to shut it back off. */ #define TCPC_FLAGS_ALERT_ACTIVE_HIGH BIT(0) #define TCPC_FLAGS_ALERT_OD BIT(1) #define TCPC_FLAGS_RESET_ACTIVE_HIGH BIT(2) #define TCPC_FLAGS_TCPCI_REV2_0 BIT(3) #define TCPC_FLAGS_TCPCI_REV2_0_NO_VSAFE0V BIT(4) +#define TCPC_FLAGS_TCPCI_BAD_VBUS_SOURCING BIT(5) struct tcpc_config_t { enum ec_bus_type bus_type; /* enum ec_bus_type */ |