From 5bc9b3280765211deec626e25105c73c2ebb3e94 Mon Sep 17 00:00:00 2001 From: Todd Broch Date: Wed, 12 Aug 2015 20:57:38 -0700 Subject: ryu: Change charger termination current to 192mA. Good rule of thumb for charger current is that it should be set between C/20 & C/50 for the battery of the device. For ryu its presently set at 64mA which may explain why we see charger's status as charging even when battery is full. In any case its well below recommendation so lets change it to something within that. Sampled data (see issue tracker) indicates charging current is ~256mA when battery reaches 100% charged. Setting to 192mA (3 * 64) to error on the side of charging slightly longer. This number is still within termination current recommendation: C/20 > term_current >= C/50 Note, also changing bq2589x default termination to match its POR value of 256 as no other board uses this charger presently. Signed-off-by: Todd Broch BRANCH=smaug BUG=chrome-os-partner:42848 TEST=manual, read charger IC termination register and see termination current set to 192mA Change-Id: I60dbb9326c3abb8091fd9ab18eda08b9eabb197b Reviewed-on: https://chromium-review.googlesource.com/293096 Commit-Ready: Todd Broch Tested-by: Todd Broch Reviewed-by: Vincent Palatin --- board/ryu/board.h | 1 + driver/charger/bq2589x.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/board/ryu/board.h b/board/ryu/board.h index 3b411ffda6..c1649e67fa 100644 --- a/board/ryu/board.h +++ b/board/ryu/board.h @@ -24,6 +24,7 @@ #define CONFIG_CHARGE_MANAGER #define CONFIG_CHARGE_MANAGER_EXTERNAL_POWER_LIMIT #define CONFIG_CHARGE_RAMP_HW +#define CONFIG_CHARGER_TERM_CURRENT_LIMIT (64*3) #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_STM_HWTIMER32 #define CONFIG_USB_CHARGER diff --git a/driver/charger/bq2589x.h b/driver/charger/bq2589x.h index 8678816a6c..970517f116 100644 --- a/driver/charger/bq2589x.h +++ b/driver/charger/bq2589x.h @@ -69,7 +69,7 @@ #define BQ2589X_IR_COMP_DEFAULT (BQ2589X_IR_TREG_120C | BQ2589X_IR_VCLAMP_0MV |\ BQ2589X_IR_BAT_COMP_0MOHM) -#define BQ2589X_TERM_CURRENT_LIMIT_DEFAULT 64 +#define BQ2589X_TERM_CURRENT_LIMIT_DEFAULT 256 /* 5V VBUS Boost settings */ #define BQ2589X_BOOSTV_MV(mv) (((((mv) - 4550)/64) & 0xF) << 4) -- cgit v1.2.1