diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-04-03 17:18:53 -0700 |
---|---|---|
committer | Justin TerAvest <teravest@chromium.org> | 2020-06-02 17:25:42 +0000 |
commit | 7229fab3bb2d4c1983dab388210eb894855aec7d (patch) | |
tree | 2e7dae00b9ed961f5929cc982f8aa0057f918c94 /common/build.mk | |
parent | dba753130cd341c047afd652ab28a2b099dde9ee (diff) | |
download | chrome-ec-7229fab3bb2d4c1983dab388210eb894855aec7d.tar.gz |
OCPC: Configure VSYS via secondary charger IC
This commit adds the bulk of the work in getting OCPC functional.
Since the secondary charger IC cannot directly sense the current
entering the battery, with OCPC, we recruit the EC to do this work
instead.
Essentially, VSYS needs to be chosen such that we induce the desired
current in the battery while also accounting for losses in the system
between the output of the secondary charger IC and the battery.
To start, a board needs to define the following CONFIG_* option:
CONFIG_OCPC_DEF_RBATT_MOHMS
This should be at least the R_ds(on) resistance of the BFET and the
series sense resistance. The board should also define CONFIG_OCPC.
With the combined system resistance, we can calculate the VSYS
required to induce the desired current. However, we will also use a
PID control loop to help drive our VSYS target to what it should
actually be accounting for our error.
The PID constants were found by tuning on a waddledoo board. It
remains to be seen whether or not these will differ on a board to
board basis.
BUG=b:148980016,b:147440290
BRANCH=None
TEST=Enable on waddledoo, verify that we can charge the battery from
the sub-board.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Icd323546836fe41fa1fcc7c3b6071d822663ed05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2135964
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/build.mk')
-rw-r--r-- | common/build.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/build.mk b/common/build.mk index 1bae3bca41..1218c24326 100644 --- a/common/build.mk +++ b/common/build.mk @@ -102,6 +102,7 @@ common-$(CONFIG_HOSTCMD_X86)+=acpi.o port80.o ec_features.o common-$(CONFIG_MAG_CALIBRATE)+= mag_cal.o math_util.o vec3.o mat33.o mat44.o \ kasa.o common-$(CONFIG_MKBP_EVENT)+=mkbp_event.o +common-$(CONFIG_OCPC)+=ocpc.o common-$(CONFIG_ONEWIRE)+=onewire.o common-$(CONFIG_PECI_COMMON)+=peci.o common-$(CONFIG_POWER_BUTTON)+=power_button.o |