diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-10-16 14:48:33 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-17 05:52:53 +0000 |
commit | 05f37410abac5fce2ff1841b0a05b69e45f04b88 (patch) | |
tree | d6ca8a8f022dafab318b3162e47b6f9f9c4be44b | |
parent | 24699aead9e24f197597dea67b6747f3a9157591 (diff) | |
download | chrome-ec-05f37410abac5fce2ff1841b0a05b69e45f04b88.tar.gz |
pd: update the tPSTransition timeout
The timeout when we are not seeing a PS_READY message has been updated
to 450-550 ms in the PD specification, reflect that change in the code.
In case we are reaching this timeout, we need to send a HARD_RESET.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=none
TEST=plug a PD source with a 300ms delay before PS_READY.
Change-Id: I116a858c42a55f2036b3f2e13730cf29392a3420
Reviewed-on: https://chromium-review.googlesource.com/223785
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | common/usb_pd_protocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 60340767e2..474a031af1 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -164,7 +164,7 @@ static const uint8_t dec4b5b[] = { #define PD_T_SINK_WAIT_CAP (240*MSEC) /* between 210ms and 250ms */ #define PD_T_SOURCE_ACTIVITY (45*MSEC) /* between 40ms and 50ms */ #define PD_T_SENDER_RESPONSE (30*MSEC) /* between 24ms and 30ms */ -#define PD_T_PS_TRANSITION (220*MSEC) /* between 200ms and 220ms */ +#define PD_T_PS_TRANSITION (500*MSEC) /* between 450ms and 550ms */ #define PD_T_DRP_HOLD (120*MSEC) /* between 100ms and 150ms */ #define PD_T_DRP_LOCK (120*MSEC) /* between 100ms and 150ms */ /* DRP_SNK + DRP_SRC must be between 50ms and 100ms with 30%-70% duty cycle */ @@ -1445,7 +1445,7 @@ void pd_task(void) set_state_timeout(port, get_time().val + PD_T_PS_TRANSITION, - PD_STATE_SNK_DISCOVERY); + PD_STATE_HARD_RESET); timeout = 10 * MSEC; break; case PD_STATE_SNK_READY: |