diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-22 12:46:58 +1300 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-24 03:30:41 +0000 |
commit | 50b2c4deb60575a60f6f58b28d48a1ada595ee65 (patch) | |
tree | 96750e22d99ec03739d6ca540ab0f974dfda2178 /zephyr/dts | |
parent | f15b0fcff7ab0df04279a3480e80bc67b54ebee5 (diff) | |
download | chrome-ec-50b2c4deb60575a60f6f58b28d48a1ada595ee65.tar.gz |
zephyr: Add a binding for named batteries
Each board has its own list of supported batteries, taken from a set
of possible ones. Create a binding for this so we can generate the
enum from the device tree.
We can add new battery types as needed. For now, just include the
battery for volteer.
Add a new header file to generate enum battery_type.
BUG=b:176121284
BRANCH=none
TEST=build zephry for volteer
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I6452705250075423ed6b5c87fdf32eda3f31c32b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2777634
Diffstat (limited to 'zephyr/dts')
-rw-r--r-- | zephyr/dts/bindings/battery/named-batteries.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/battery/named-batteries.yaml b/zephyr/dts/bindings/battery/named-batteries.yaml new file mode 100644 index 0000000000..88dc0af960 --- /dev/null +++ b/zephyr/dts/bindings/battery/named-batteries.yaml @@ -0,0 +1,14 @@ +description: Named Batteries parent node + +compatible: "named-batteries" + +# TODO(b/183544739): Move this to use compatible strings + +child-binding: + description: Named batteries child node + properties: + enum-name: + type: string + required: true + enum: + - "lgc011" |