charging: set register 3250ma when icl >=3A

As TI bq25890 chip accuracy issue, so when policy set icl >=3A,
we need to set 3250ma at register for BQ25890H

Change-Id: I74cd75fdae300b50a8a9581b751dff6890258e11
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2125735
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2021-11-24 11:44:56 +08:00 • committed by Haijian Ma
commit 55c3b6d4b8
2 changed files with 4 additions and 2 deletions

View file

@ -506,7 +506,8 @@ int bq2589x_set_input_current_limit(struct bq2589x *bq, int curr)
if (curr < BQ2589X_IINLIM_BASE)
val = 0;
else if (curr > BQ2589X_IINLIM_MAX)
/*for HW accuracy issue, so icl >= 3A we need to set 0x3F*/
else if (curr >= BQ2589X_IINLIM_MAX)
val = 0x3F;
else
val = (curr - BQ2589X_IINLIM_BASE) / BQ2589X_IINLIM_LSB;

View file

@ -17,7 +17,8 @@
#define BQ2589X_IINLIM_SHIFT 0
#define BQ2589X_IINLIM_BASE 100
#define BQ2589X_IINLIM_LSB 50
#define BQ2589X_IINLIM_MAX 3250
/*for HW accuracy issue, so icl >= 3A we need to set 0x3F*/
#define BQ2589X_IINLIM_MAX 3000
/* Register 01h */
#define BQ2589X_REG_01 0x01