From 52e2bdf4ab5efdfb25c51bf4ca1afeef3a06071f Mon Sep 17 00:00:00 2001 From: raymondchou Date: Thu, 8 Feb 2018 16:45:50 +0800 Subject: [PATCH] Nami: Enable CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD When any of battery cells are near the Cell Under Voltage, battery enters shutdown mode. However, battery cells can continue to discharge due to self discharge. Battery cell vendor defines the minimum acceptable cell voltage. If the cell voltage falls below that value, battery BMS does not close the C-FET and the battery is considered permanently dead. So, every time battery enters shutdown mode, the BMS executes SUV status check to see whether cells are in safe range to charge. Gauge IC turns on C-fet after a 5 sec delay. During this delay, the gauge requests 0mA charging current and 0V charging voltage. During SUV check, battery gauge monitors the external voltage by the charger through "battery present through" setting. If the external voltage is less than the threshold, the BMS goes to shutdown mode again and this repeats. This patch enables CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD so that the EC will supply voltage & current even if the battery requests 0V, 0A at 0% soc, which only happens when the BMS is exiting shutdown mode. Battery gauge IC: TI BQ40Z50 Battery gauge FW version: 1.06 for BYD/ 1.07 for LG and Simplo. BUG=b:73921750 BRANCH=none TEST=Check dead battery can be charged battery to normal mode. Change-Id: Ib7e12a0596d53377c58eb17c980cd7e01576de7c Signed-off-by: raymondchou Signed-off-by: Daisuke Nojiri Reviewed-on: https://chromium-review.googlesource.com/910608 Commit-Ready: Raymond Chou --- board/nami/board.h | 1 + 1 file changed, 1 insertion(+) diff --git a/board/nami/board.h b/board/nami/board.h index fc21c74076..a10f549d1e 100644 --- a/board/nami/board.h +++ b/board/nami/board.h @@ -82,6 +82,7 @@ #define CONFIG_BATTERY_DEVICE_CHEMISTRY "LION" #define CONFIG_BATTERY_SMART #define CONFIG_PWR_STATE_DISCHARGE_FULL +#define CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD /* Charger */ #define CONFIG_CHARGE_MANAGER