summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2019-05-10 12:54:18 -0600
committerCommit Bot <commit-bot@chromium.org>2019-07-08 17:16:26 +0000
commite42dd9f65635101d3c66279f134db008b618a695 (patch)
tree49b5c194acd89bfb245992e68ec049a43a46e6f5
parent3c8cb9780264448759702a86ab88b7ed2d3ef7c5 (diff)
downloadchrome-ec-e42dd9f65635101d3c66279f134db008b618a695.tar.gz
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 <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1606742 Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit 6b83e8b1cfbd7a9fd4b7e4e69113348c51efea4f) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1691111
-rw-r--r--board/fleex/board.h10
1 files changed, 10 insertions, 0 deletions
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 */