From 0e364a685be9a96ca3be033b24a07246cfa08833 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Wed, 13 Jan 2021 18:21:16 -0800 Subject: OCPC: Init VSYS to VBAT when starting charge In order to prevent high current spikes when the OCPC PID loop runs, this commit sets the initial VSYS voltage to that of the battery. BUG=b:175334490 BRANCH=dedede TEST=Build and flash DUT. Using a Type-C breakout board and a current probe, plug in charger to sub board, verify that no initial current spike exceeds that of the contract. Signed-off-by: Aseda Aboagye Change-Id: Idb6e7d2e51acd0c5279bbb055b75774c6dab6901 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628573 Tested-by: Aseda Aboagye Reviewed-by: Diana Z Commit-Queue: Aseda Aboagye --- include/charge_state_v2.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/charge_state_v2.h') diff --git a/include/charge_state_v2.h b/include/charge_state_v2.h index 84a4b38b20..df2d51cdb1 100644 --- a/include/charge_state_v2.h +++ b/include/charge_state_v2.h @@ -191,4 +191,10 @@ void charge_reset_stable_current_us(uint64_t us); */ bool charge_is_current_stable(void); +/** + * Reset the OCPC internal state data and set the target VSYS to the current + * battery voltage for the auxiliary chargers. + */ +void trigger_ocpc_reset(void); + #endif /* __CROS_EC_CHARGE_STATE_V2_H */ -- cgit v1.2.1