diff options
author | Jett Rink <jettrink@chromium.org> | 2018-01-25 16:07:39 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-05-01 15:49:57 +0000 |
commit | 78c4845bd8bca758ad0783033f842a0298fbb9d7 (patch) | |
tree | 82e48e3d4044e2dfbcd0fe6a38f028892c345a1b | |
parent | a19e540ce9508e4bc5e8b4a1e7bb9c081d8a9765 (diff) | |
download | chrome-ec-78c4845bd8bca758ad0783033f842a0298fbb9d7.tar.gz |
usb pd: Increasing delay for Rp time on CC lines
Some chargers don't respect the SRC.Open state within the 20ms allotted by
the usb spec. The LiteOn Charger seems to notice after ~120ms bumping to
200ms so we cutoff Vbus for even ill-behaved chargers. We expect to brown
out in the sleep.
BRANCH=none
TEST=LiteOn charge will disconnect now
BUG=b:72510370
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Commit-Id: a5c21c4ffe16eeee3da97b1138aa6b5556983e7d
Original-Change-Id: Ief0e999ed52f39420eed5f07432273e741a14c7e
Original-Signed-off-by: Jett Rink <jettrink@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/886833
Original-Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Original-Reviewed-by: Shawn N <shawnn@chromium.org>
Original-(cherry picked from commit a5c21c4ffe16eeee3da97b1138aa6b5556983e7d)
Change-Id: If21143912419cdc44f107ea930990a1a65b0593a
Reviewed-on: https://chromium-review.googlesource.com/1036930
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Commit-Queue: Duncan Laurie <dlaurie@google.com>
Tested-by: Duncan Laurie <dlaurie@google.com>
Trybot-Ready: Duncan Laurie <dlaurie@google.com>
-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 f8fbbd6bf3..43f0cf63f8 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1875,9 +1875,9 @@ static void pd_partner_port_reset(int port) (RESET_FLAG_BROWNOUT | RESET_FLAG_POWER_ON)) return; - /* Provide Rp for 100 msec. or until we no longer have VBUS. */ + /* Provide Rp for 200 msec. or until we no longer have VBUS. */ tcpm_set_cc(port, TYPEC_CC_RP); - timeout = get_time().val + 100 * MSEC; + timeout = get_time().val + 200 * MSEC; while (get_time().val < timeout && pd_is_vbus_present(port)) msleep(10); |