summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2020-07-28 21:19:34 -0600
committerCommit Bot <commit-bot@chromium.org>2020-08-07 00:05:45 +0000
commit3d414e9ee9df74fb1150708c8e300bd3474ee803 (patch)
tree937ed1baad5136b63e4f3cbe1e380fdfeb6b67f7 /common
parent8d46141f4d45c65712a9ca7509b7b60128fa4d89 (diff)
downloadchrome-ec-3d414e9ee9df74fb1150708c8e300bd3474ee803.tar.gz
volteer: increase TCPC low power mode exit delay
Increase the low power mode exit delay on Volteer to 50ms. The ps8815 TCPC in particular needs this extra time to work consistently with non-PD chargers. This change also ensures the low power mode exit timer is reset anytime the TC enters the TC_LOW_POWER_MODE state. BUG=b:160182500 BRANCH=none TEST=make buildall TEST=Insert 15W non-PD charger on Volteer: repeat 10 times TEST=Insert USB type-A (7.5W advertised) on Volteer: repeat 10 times Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I40fb4990478292e381421ef977f83b871796c130 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2325265 Tested-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index a72b99a155..a27467e4da 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -131,10 +131,13 @@
* This delay is not part of the USB Type-C specification or the USB port
* controller specification. Some TCPCs require extra time before the CC_STATUS
* register is updated when exiting low power mode.
- * The PS8815 TCPC in particular was measured to take 8-10 ms from low power
- * exit before the first update to CC_STATUS.
+ *
+ * This delay can be possibly shortened or removed by checking VBUS state
+ * before trying to re-enter LPM.
+ *
+ * TODO(b/162347811): TCPMv2: Wait for debounce on Vbus and CC lines
*/
-#define PD_LPM_EXIT_DEBOUNCE_US (25*MSEC)
+#define PD_LPM_EXIT_DEBOUNCE_US CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE
/*
* The TypeC state machine uses this bit to disable/enable PD
@@ -2899,6 +2902,7 @@ static void tc_low_power_mode_entry(const int port)
{
print_current_state(port);
tc[port].low_power_time = get_time().val + PD_LPM_DEBOUNCE_US;
+ tc[port].low_power_exit_time = 0;
}
static void tc_low_power_mode_run(const int port)