From 993e6f24fa201e135670457b8c3affe356c951f2 Mon Sep 17 00:00:00 2001 From: Scott Collyer Date: Tue, 2 May 2017 14:25:43 -0700 Subject: [PATCH] eve: Add Simplo battery and change precharge current to 256 mA EVT introduced the Simplo A50 battery pack so need to add this to the list of possible Eve battery types. The precharge current level of the battery type is used to set both the trickle charge and precharge current levels on the Rohm bd9995x charger. Rohm is advising that this value be set to 256 mA. What we observe is that when the charge has to operate in buck mode, that the previous setting of 64 mA is too low. The value of 88 mA was required for the Lishen P1 pack to no trip it's overcurrent limit in precharge mode. BUG=b:37291519 BRANCH=none TEST=Manual With battery pack at low (~4.2 V), connect blackcat charger and verified that the battery begins to charge. Without the precharge current level change, the battery would never charge unless VBUS was set to 5V. Change-Id: Iad155de63c6ad4b342791d7024c44fa208b76ab8 Signed-off-by: Scott Collyer Reviewed-on: https://chromium-review.googlesource.com/494080 Commit-Ready: Scott Collyer Tested-by: Scott Collyer Reviewed-by: Duncan Laurie --- board/eve/battery.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/board/eve/battery.c b/board/eve/battery.c index 31aad580fb..77fb5ca7cf 100644 --- a/board/eve/battery.c +++ b/board/eve/battery.c @@ -25,6 +25,7 @@ enum battery_type { BATTERY_LG, BATTERY_LISHEN, + BATTERY_SIMPLO, BATTERY_TYPE_COUNT, }; @@ -69,7 +70,7 @@ static const struct battery_info batt_info_lishen = { .voltage_max = TARGET_WITH_MARGIN(8750, 5), /* mV */ .voltage_normal = 7700, .voltage_min = 6100, /* Add 100mV for charger accuracy */ - .precharge_current = 88, /* mA */ + .precharge_current = 256, /* mA */ .start_charging_min_c = 0, .start_charging_max_c = 46, .charging_min_c = 10, @@ -89,6 +90,11 @@ static const struct board_batt_params info[] = { .batt_info = &batt_info_lishen, }, + [BATTERY_SIMPLO] = { + .manuf_name = "Simplo A50", + .batt_info = &batt_info_lishen, + }, + }; BUILD_ASSERT(ARRAY_SIZE(info) == BATTERY_TYPE_COUNT);