summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.battery
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-01-08 11:43:40 +1100
committerCommit Bot <commit-bot@chromium.org>2022-01-11 01:25:17 +0000
commitd352006841012ff13b371f444f5b77b11e543da1 (patch)
tree262df1d773472f492e7e5a6313eae4357d195865 /zephyr/Kconfig.battery
parent68bbb09f948665f0328afd23a9d326316b725d4a (diff)
downloadchrome-ec-d352006841012ff13b371f444f5b77b11e543da1.tar.gz
zephyr: Enable multiple chargers (OCPC)
Enable multiple chargers, one charger per type-C port. BUG=b:213530120 TEST=zmake testall; zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I22ed2ea5ea3851d2898312b1a48d0f45ee9d3100 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3374081 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.battery')
-rw-r--r--zephyr/Kconfig.battery37
1 files changed, 37 insertions, 0 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index cfe9dfae6a..3253c39d86 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -119,6 +119,30 @@ menuconfig PLATFORM_EC_CHARGER
if PLATFORM_EC_CHARGER
+choice PLATFORM_EC_CHARGER_TYPE
+ prompt "Select how many chargers are on the board"
+ default PLATFORM_EC_CHARGER_SINGLE_CHIP
+ help
+ Select a single charger or multiple chargers.
+ Multiple chargers imply one charger per type-C port (OCPC).
+
+config PLATFORM_EC_CHARGER_SINGLE_CHIP
+ bool "Board has a single charger"
+ help
+ Enables a single charger for the board, which is assigned
+ index 0.
+
+config PLATFORM_EC_OCPC
+ bool "Board has multiple chargers"
+ help
+ Enables multiple chargers, one for each type-C port (OCPC).
+ The assumption is that that primary charger is index 0 and is the
+ charger IC connected to the battery FET.
+ Additionally, `chgnum` is assumed to be the same as the
+ charge port index.
+
+endchoice # PLATFORM_EC_CHARGER_TYPE
+
config PLATFORM_EC_CHARGE_MANAGER
bool "Charge manager"
default y
@@ -220,6 +244,19 @@ config PLATFORM_EC_CHARGER_RAA489000
Enables the driver for the Renesas RAA489000 battery charger
with integrated USB-C TCPC.
+if PLATFORM_EC_OCPC
+
+config PLATFORM_EC_OCPC_DEF_RBATT_MOHMS
+ int "Resistance between the secondary charger IC and the battery"
+ help
+ Boards using OCPC must define this value in order to seed the
+ starting board battery and system resistance between the secondary
+ charger IC and the battery.
+ This should be at a minimum the Rds(on) resistance of the BFET plus
+ the series sense resistor.
+
+endif # PLATFORM_EC_OCPC
+
config PLATFORM_EC_CHARGER_DISCHARGE_ON_AC
bool "Board supports discharge mode"
help