From a5c21c4ffe16eeee3da97b1138aa6b5556983e7d Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 25 Jan 2018 16:07:39 -0700 Subject: [PATCH] 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 Change-Id: Ief0e999ed52f39420eed5f07432273e741a14c7e Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/886833 Reviewed-by: Vincent Palatin Reviewed-by: Shawn N --- common/usb_pd_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 5696f9559c..9aec67cbb6 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1829,9 +1829,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);