summaryrefslogtreecommitdiff
path: root/board/madoo
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2021-02-09 14:52:32 -0800
committerCommit Bot <commit-bot@chromium.org>2021-02-10 00:20:31 +0000
commit07675ded17776492ceb1100c59d932439e71f0d0 (patch)
tree77ee3644efc6108281d926882945bd17b9c45493 /board/madoo
parented048ab342d0ac52e2c0855eb043b25db52cc54f (diff)
downloadchrome-ec-07675ded17776492ceb1100c59d932439e71f0d0.tar.gz
madoo: Update OCPC PID constants
This commit updates the OCPC constants for madoo such that it meets the criteria at go/ocpc-testing. - Converges around the target current. - Average steady state error is less than 4% of target. - Current is reduced to target level in less than 5s when load is suddenly released. BUG=b:176197658 BRANCH=dedede TEST=Build and flash madoo. Verify that battery can charge to 100%. Verify that it meets or exceeds the constraints above. TEST=Verify that DUT can come out of battery cutoff from sub board. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I257d144598c14414b3c760196af0095ba8a071c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2686255 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/madoo')
-rw-r--r--board/madoo/board.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/board/madoo/board.c b/board/madoo/board.c
index 9ecdd3f407..62724bde05 100644
--- a/board/madoo/board.c
+++ b/board/madoo/board.c
@@ -449,25 +449,12 @@ __override void ocpc_get_pid_constants(int *kp, int *kp_div,
int *ki, int *ki_div,
int *kd, int *kd_div)
{
- /*
- * Early boards need different constants due to a change in charger IC
- * silicon revision.
- */
- if (system_get_board_version() >= 0) {
- *kp = 1;
- *kp_div = 128;
- *ki = 1;
- *ki_div = 1024;
- *kd = 0;
- *kd_div = 1;
- } else {
- *kp = 1;
- *kp_div = 4;
- *ki = 1;
- *ki_div = 15;
- *kd = 1;
- *kd_div = 10;
- }
+ *kp = 1;
+ *kp_div = 20;
+ *ki = 1;
+ *ki_div = 250;
+ *kd = 0;
+ *kd_div = 1;
}
int pd_snk_is_vbus_provided(int port)