summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-11-18 18:44:41 -0800
committerCommit Bot <commit-bot@chromium.org>2020-11-20 20:43:32 +0000
commit5ff8db10799fb15dff6ef9d39880faeddc7c234f (patch)
tree107ea800075ba2f22fae9ca1c2f679f335fe0f14
parent33836f429071522699ca0ab4279b678522843408 (diff)
downloadchrome-ec-5ff8db10799fb15dff6ef9d39880faeddc7c234f.tar.gz
dedede/raa48900 boards: Apply 4% ICL reduction
The RAA48900 charger IC seems to over draw its contract by roughly 4%. This commit simply modifies our input current limit to account for that. BUG=b:147463641 BRANCH=dedede TEST=Build and flash waddledoo, verify that input current limit is reduced and is under the contract. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I70ab15ea24d789a7a1696217efae784f537ca014 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548692 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/boten/board.c5
-rw-r--r--board/madoo/board.c6
-rw-r--r--board/magolor/board.c5
-rw-r--r--board/metaknight/board.c5
-rw-r--r--board/waddledoo/board.c5
5 files changed, 16 insertions, 10 deletions
diff --git a/board/boten/board.c b/board/boten/board.c
index 0e82934373..1b6d1a8080 100644
--- a/board/boten/board.c
+++ b/board/boten/board.c
@@ -203,9 +203,10 @@ void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
/*
- * TODO(b/151955431): Characterize the input current limit in case a
- * scaling needs to be applied here
+ * b/147463641: The charger IC seems to overdraw ~4%, therefore we
+ * reduce our target accordingly.
*/
+ icl = icl * 96 / 100;
charge_set_input_current_limit(icl, charge_mv);
}
diff --git a/board/madoo/board.c b/board/madoo/board.c
index b1198b28a4..390b6bf5c6 100644
--- a/board/madoo/board.c
+++ b/board/madoo/board.c
@@ -292,9 +292,11 @@ void board_set_charge_limit(int port, int supplier, int charge_ma,
int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
/*
- * TODO(b:147463641): Characterize the input current limit in case that
- * a scaling needs to be applied here.
+ * b/147463641: The charger IC seems to overdraw ~4%, therefore we
+ reduce
+ * our target accordingly.
*/
+ icl = icl * 96 / 100;
charge_set_input_current_limit(icl, charge_mv);
}
diff --git a/board/magolor/board.c b/board/magolor/board.c
index 8f3485b121..9a2c19cf1c 100644
--- a/board/magolor/board.c
+++ b/board/magolor/board.c
@@ -320,9 +320,10 @@ void board_set_charge_limit(int port, int supplier, int charge_ma,
int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
/*
- * TODO(b:147463641): Characterize the input current limit in case that
- * a scaling needs to be applied here.
+ * b/147463641: The charger IC seems to overdraw ~4%, therefore we
+ * reduce our target accordingly.
*/
+ icl = icl * 96 / 100;
charge_set_input_current_limit(icl, charge_mv);
}
diff --git a/board/metaknight/board.c b/board/metaknight/board.c
index 79347ead32..45496c2992 100644
--- a/board/metaknight/board.c
+++ b/board/metaknight/board.c
@@ -346,9 +346,10 @@ void board_set_charge_limit(int port, int supplier, int charge_ma,
int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
/*
- * TODO(b:147463641): Characterize the input current limit in case that
- * a scaling needs to be applied here.
+ * b/147463641: The charger IC seems to overdraw ~4%, therefore we
+ * reduce our target accordingly.
*/
+ icl = icl * 96 / 100;
charge_set_input_current_limit(icl, charge_mv);
}
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index 1e658d65f2..4ce4deff8f 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -340,9 +340,10 @@ void board_set_charge_limit(int port, int supplier, int charge_ma,
int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
/*
- * TODO(b:147463641): Characterize the input current limit in case that
- * a scaling needs to be applied here.
+ * b/147463641: The charger IC seems to overdraw ~4%, therefore we
+ * reduce our target accordingly.
*/
+ icl = icl * 96 / 100;
charge_set_input_current_limit(icl, charge_mv);
}