From e42dd9f65635101d3c66279f134db008b618a695 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Fri, 10 May 2019 12:54:18 -0600 Subject: Fleex: Set minimum battery level for Try.SRC and resets Some battery and fuel gague combinations for fleex are unable to withstand the loss of a charger's Vbus signal when they are reporting 1% charge. This change increases the Try.SRC battery required, and also prevents the PD state machine from starting reset timers until the battery is at 2%. BUG=b:128935567 BRANCH=octopus TEST=verified hard resets don't occur on grabbiter when system is locked and coming back from battery cutoff with low battery, verified soft followed by hard reset later occurs when battery passes config level Change-Id: Ia0eca111daaf6b63f71c397231de4cfa30e34b8c Signed-off-by: Diana Z Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1606742 Reviewed-by: Jett Rink (cherry picked from commit 6b83e8b1cfbd7a9fd4b7e4e69113348c51efea4f) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1691111 --- board/fleex/board.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/fleex/board.h b/board/fleex/board.h index 28504a7f5f..18100386d7 100644 --- a/board/fleex/board.h +++ b/board/fleex/board.h @@ -20,6 +20,16 @@ #define CONFIG_LED_COMMON #define CONFIG_LED_ONOFF_STATES_BAT_LOW 10 +/* + * Some fuel gagues will return 1% immediately, without the battery being + * charged to the point of being able to withstand Vbus loss, so re-set + * allowable Try.SRC level and reset level to 2% + */ +#undef CONFIG_USB_PD_TRY_SRC_MIN_BATT_SOC +#define CONFIG_USB_PD_TRY_SRC_MIN_BATT_SOC 2 + +#define CONFIG_USB_PD_RESET_MIN_BATT_SOC 2 + /* Sensors */ #define CONFIG_ACCEL_LIS2DE /* Lid accel */ #define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */ -- cgit v1.2.1