summaryrefslogtreecommitdiff
path: root/zephyr/dts
diff options
context:
space:
mode:
authorwen zhang <zhangwen6@huaqin.corp-partner.google.com>2022-06-09 15:44:35 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-28 08:49:46 +0000
commitd3affe7123a9f7b8ff504c5e56faf41d8bcea104 (patch)
tree508c7085c8288651a5357da09c51f49debf9221f /zephyr/dts
parent96e07fc781c2d9d1214b5befd9b1dfcb8a64efe7 (diff)
downloadchrome-ec-d3affe7123a9f7b8ff504c5e56faf41d8bcea104.tar.gz
zephyr: battery: add Sunwoda L22D3PG0
Add Sunwoda L22D3PG0 battery BUG=b:235456598 TEST=zmake testall BRANCH=none Change-Id: Ic12db06f0875fade3a06a6915b7a00a575e38a9d Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3697274 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org>
Diffstat (limited to 'zephyr/dts')
-rw-r--r--zephyr/dts/bindings/battery/battery-smart.yaml1
-rw-r--r--zephyr/dts/bindings/battery/sunwoda,l22d3pg0.yaml54
-rw-r--r--zephyr/dts/bindings/vendor-prefixes.txt1
3 files changed, 56 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/battery/battery-smart.yaml b/zephyr/dts/bindings/battery/battery-smart.yaml
index fc44b8465b..b509a44ba3 100644
--- a/zephyr/dts/bindings/battery/battery-smart.yaml
+++ b/zephyr/dts/bindings/battery/battery-smart.yaml
@@ -31,3 +31,4 @@ properties:
- "smp,l20m3pg0"
- "smp,l20m3pg1"
- "smp,l20m3pg2"
+ - "sunwoda,l22d3pg0"
diff --git a/zephyr/dts/bindings/battery/sunwoda,l22d3pg0.yaml b/zephyr/dts/bindings/battery/sunwoda,l22d3pg0.yaml
new file mode 100644
index 0000000000..9d4da91747
--- /dev/null
+++ b/zephyr/dts/bindings/battery/sunwoda,l22d3pg0.yaml
@@ -0,0 +1,54 @@
+# Copyright 2022 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.
+
+description: "SUNWODA L22D3PG0"
+compatible: "sunwoda,l22d3pg0"
+
+include: battery-smart.yaml
+
+properties:
+ enum-name:
+ type: string
+ default: "sunwoda,l22d3pg0"
+
+ # Fuel gauge
+ manuf_name:
+ default: "Sunwoda"
+ device_name:
+ default: "L22D3PG0"
+ ship_mode_reg_addr:
+ default: 0x34
+ ship_mode_reg_data:
+ default: [ 0x0000, 0x1000 ]
+ fet_mfgacc_support:
+ default: 0
+ fet_reg_addr:
+ default: 0x34
+ fet_reg_mask:
+ default: 0x0100
+ fet_disconnect_val:
+ default: 0x0100
+
+ # Battery info
+ voltage_max:
+ default: 13200
+ voltage_normal:
+ default: 11310
+ voltage_min:
+ default: 9000
+ precharge_current:
+ default: 209
+ start_charging_min_c:
+ default: 0
+ start_charging_max_c:
+ default: 50
+ charging_min_c:
+ default: 0
+ charging_max_c:
+ default: 63
+ discharging_min_c:
+ default: -20
+ discharging_max_c:
+ default: 63
+
diff --git a/zephyr/dts/bindings/vendor-prefixes.txt b/zephyr/dts/bindings/vendor-prefixes.txt
index 0aa061c6d8..fb01231208 100644
--- a/zephyr/dts/bindings/vendor-prefixes.txt
+++ b/zephyr/dts/bindings/vendor-prefixes.txt
@@ -17,3 +17,4 @@ getac Battery vendor
ganfeng Battery vendor
byd Battery vendor
celxpert Battery vendor
+sunwoda Battery vendor