diff options
author | Michał Barnaś <mb@semihalf.com> | 2021-08-19 14:41:52 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-03 21:30:57 +0000 |
commit | 970bd536ade4a2f4922a0dc95dfc7a7458ada89a (patch) | |
tree | c32e683887843d82de9d2f5c4aa697c2c1bebbf5 /zephyr/dts/bindings/battery/battery-smart.yaml | |
parent | 0c0ba0a2b1297fa9bb1c47da95c220ae1df3b9e2 (diff) | |
download | chrome-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/battery-smart.yaml')
-rw-r--r-- | zephyr/dts/bindings/battery/battery-smart.yaml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/battery/battery-smart.yaml b/zephyr/dts/bindings/battery/battery-smart.yaml new file mode 100644 index 0000000000..ce0a330077 --- /dev/null +++ b/zephyr/dts/bindings/battery/battery-smart.yaml @@ -0,0 +1,19 @@ +# Copyright 2021 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +compatible: "battery-smart" + +include: [ "base.yaml", "battery-info.yaml", "battery-fuel-gauge.yaml" ] + +properties: + enum-name: + description: Unique value used for creating enum of batteries types + type: string + enum: + - "as3gwrc3ka,c235-41" + - "lgc,ap16l8j" + - "lgc,ap18c8k" + - "murata,ap18c4k" + - "panasonic,ap16l5j" + - "panasonic,ap16l5j-009" |