diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2021-01-20 17:32:46 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-20 21:29:58 +0000 |
commit | 5fef5654ceb57364872ab5352eaff6a7f5cae91e (patch) | |
tree | 3cd01a9c9b1561a350f4d24ca0f44e57330fa49c /board/servo_v4p1/chg_control.c | |
parent | 1c0e83be5ef0f03caba062d6045b5ec041a4a78f (diff) | |
download | chrome-ec-5fef5654ceb57364872ab5352eaff6a7f5cae91e.tar.gz |
servo_v4p1: clean-up and USB-C timings
Small clean-ups inherited from Nathan,
the sooner they are pushed the better.
- Fix typos/terminology.
- Use symbolic port names.
- update timings from power supplies to be more tolerant when using an
upstream host charger.
- disable the discharge on the power path at startup as a safety
measure.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=none
BRANCH=servo
TEST=none
Change-Id: If3ca4498b23763ce43371ce9cfe80391b0c1a4b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2640656
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/servo_v4p1/chg_control.c')
-rw-r--r-- | board/servo_v4p1/chg_control.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/board/servo_v4p1/chg_control.c b/board/servo_v4p1/chg_control.c index cddd8efc69..19be03a755 100644 --- a/board/servo_v4p1/chg_control.c +++ b/board/servo_v4p1/chg_control.c @@ -8,6 +8,7 @@ #include "ioexpanders.h" #include "registers.h" #include "timer.h" +#include "usb_pd.h" #define CHG_P5V_POWER 0 #define CHG_VBUS_POWER 1 @@ -20,7 +21,8 @@ void chg_reset(void) /* Disconnect CHG CC1(Rd) and CC2(Rd) */ chg_attach_cc_rds(0); - msleep(100); + /* Give time for CHG to detach, use tErrorRecovery. */ + msleep(PD_T_ERROR_RECOVERY); /* Connect CHG CC1(Rd) and CC2(Rd) to detect charger */ chg_attach_cc_rds(1); |