summaryrefslogtreecommitdiff
path: root/zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml
diff options
context:
space:
mode:
authorMichał Barnaś <mb@semihalf.com>2021-08-19 14:41:52 +0200
committerCommit Bot <commit-bot@chromium.org>2021-09-03 21:30:57 +0000
commit970bd536ade4a2f4922a0dc95dfc7a7458ada89a (patch)
treec32e683887843d82de9d2f5c4aa697c2c1bebbf5 /zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml
parent0c0ba0a2b1297fa9bb1c47da95c220ae1df3b9e2 (diff)
downloadchrome-ec-970bd536ade4a2f4922a0dc95dfc7a7458ada89a.tar.gz
zephyr: add batteries to device tree
This commit adds possibility to define board's batteries in device tree. Default battery is defined by adding "default_battery" as node's label. It also adds common batteries definitions that can be used using compatible string. If no 'batteries' node is defined in device tree, custom board's logic must be used and old "named-batteries" should be defined. BRANCH=main BUG=b:183544739 TEST=This commit shouldn't change behaviour of any build. Compiling and flashing CrOS EC and Zephyr should work without problems. Change-Id: I94f0121f45eb061f1358fadbcd7d8006c08b0bea Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107385 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml')
-rw-r--r--zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml b/zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml
new file mode 100644
index 0000000000..fcfff98de1
--- /dev/null
+++ b/zephyr/dts/bindings/battery/panasonic,ap16l5j.yaml
@@ -0,0 +1,49 @@
+description: "Panasonic AP16L5J"
+compatible: "panasonic,ap16l5j"
+
+include: battery-smart.yaml
+
+properties:
+ enum-name:
+ type: string
+ default: "panasonic,ap16l5j"
+
+ # Fuel gauge
+ manuf_name:
+ default: "PANASONIC"
+ device_name:
+ default: "AP16L5J"
+ ship_mode_reg_addr:
+ default: 0x3A
+ ship_mode_reg_data:
+ default: [ 0xC574, 0xC574 ]
+ fet_mfgacc_support:
+ default: 0
+ fet_reg_addr:
+ default: 0x0
+ fet_reg_mask:
+ default: 0x4000
+ fet_disconnect_val:
+ default: 0x0
+
+ # Battery info
+ voltage_max:
+ default: 8800
+ voltage_normal:
+ default: 7700
+ voltage_min:
+ default: 6000
+ precharge_current:
+ default: 256
+ start_charging_min_c:
+ default: 0
+ start_charging_max_c:
+ default: 50
+ charging_min_c:
+ default: 0
+ charging_max_c:
+ default: 60
+ discharging_min_c:
+ default: -20
+ discharging_max_c:
+ default: 75