summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajesh Kumar <rajesh3.kumar@intel.com>2022-01-12 13:38:55 -0800
committerCommit Bot <commit-bot@chromium.org>2022-01-14 03:40:05 +0000
commitfd9d4e3bd061fd1a470dfe5a30af187bec6a30f8 (patch)
treebeff89a124d01812b965a0c580d8d567c91bc492
parentc7e09bf5303f43059429ff6cf3d441394e033010 (diff)
downloadchrome-ec-fd9d4e3bd061fd1a470dfe5a30af187bec6a30f8.tar.gz
zephyr: battery: Support LGC and POWERTECH batteries
Added support for LGC ac17a8m and POWERTECH batgqa05l22 batteries. BUG=none BRANCH=none TEST=zmake testall; TEST=battery can be probed and check battery info using EC command "battery" Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I59548d580d32978837e1a222c823eb341c574c1d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384483 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/dts/bindings/battery/battery-smart.yaml2
-rw-r--r--zephyr/dts/bindings/battery/lgc,ac17a8m.yaml59
-rw-r--r--zephyr/dts/bindings/battery/powertech,batgqa05l22.yaml59
3 files changed, 120 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/battery/battery-smart.yaml b/zephyr/dts/bindings/battery/battery-smart.yaml
index 96f7b6bdd2..24dbe756aa 100644
--- a/zephyr/dts/bindings/battery/battery-smart.yaml
+++ b/zephyr/dts/bindings/battery/battery-smart.yaml
@@ -13,10 +13,12 @@ properties:
enum:
- "aec,5477109"
- "as3gwrc3ka,c235-41"
+ - "lgc,ac17a8m"
- "lgc,ap16l8j"
- "lgc,ap18c8k"
- "lgc,l20l3pg2"
- "murata,ap18c4k"
- "panasonic,ap16l5j"
- "panasonic,ap16l5j-009"
+ - "powertech,batgqa05l22"
- "smp,l20m3pg2"
diff --git a/zephyr/dts/bindings/battery/lgc,ac17a8m.yaml b/zephyr/dts/bindings/battery/lgc,ac17a8m.yaml
new file mode 100644
index 0000000000..53eeedc8a4
--- /dev/null
+++ b/zephyr/dts/bindings/battery/lgc,ac17a8m.yaml
@@ -0,0 +1,59 @@
+# 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: "LGC AC17A8M"
+compatible: "lgc,ac17a8m"
+
+include: battery-smart.yaml
+
+properties:
+ enum-name:
+ type: string
+ default: "lgc,ac17a8m"
+
+ # TI BQ40Z55 Fuel Gauge
+ manuf_name:
+ default: "LGC"
+ device_name:
+ default: "AC17A8M"
+ ship_mode_reg_addr:
+ default: 0x00
+ ship_mode_reg_data:
+ default: [ 0x0010, 0x0010 ]
+ fet_mfgacc_support:
+ default: 0
+ fet_reg_addr:
+ default: 0x00
+ fet_reg_mask:
+ default: 0x2000
+ fet_disconnect_val:
+ default: 0x2000
+ fet_cfet_mask:
+ default: 0x4000
+ fet_cfet_off_val:
+ default: 0x4000
+
+ # Battery info
+ # voltage_max =13200, Calculated value with 5 tenth % error margin
+ # considered is: ((13200 * 1000) / (1000 + 5)) = 13134
+ voltage_max:
+ default: 13134
+ voltage_normal:
+ default: 11550
+ voltage_min:
+ default: 9000
+ precharge_current:
+ default: 256
+ start_charging_min_c:
+ default: 0
+ start_charging_max_c:
+ default: 45
+ charging_min_c:
+ default: 0
+ charging_max_c:
+ default: 60
+ discharging_min_c:
+ default: 0
+ discharging_max_c:
+ default: 75
diff --git a/zephyr/dts/bindings/battery/powertech,batgqa05l22.yaml b/zephyr/dts/bindings/battery/powertech,batgqa05l22.yaml
new file mode 100644
index 0000000000..a12ef741e6
--- /dev/null
+++ b/zephyr/dts/bindings/battery/powertech,batgqa05l22.yaml
@@ -0,0 +1,59 @@
+# 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: "POWERTECH BATGQA05L22"
+compatible: "powertech,batgqa05l22"
+
+include: battery-smart.yaml
+
+properties:
+ enum-name:
+ type: string
+ default: "powertech,batgqa05l22"
+
+ # TI BQ40Z50 Fuel Gauge
+ manuf_name:
+ default: "POW-TECH"
+ device_name:
+ default: "BATGQA05L22"
+ ship_mode_reg_addr:
+ default: 0x00
+ ship_mode_reg_data:
+ default: [ 0x0010, 0x0010 ]
+ fet_mfgacc_support:
+ default: 1
+ fet_reg_addr:
+ default: 0x00
+ fet_reg_mask:
+ default: 0x2000
+ fet_disconnect_val:
+ default: 0x2000
+ fet_cfet_mask:
+ default: 0x4000
+ fet_cfet_off_val:
+ default: 0x4000
+
+ # Battery info
+ # voltage_max = 13050, Calculated value with 5 tenth % error margin
+ # considered is: ((13050 * 1000) / (1000 + 5)) = 12985
+ voltage_max:
+ default: 12985
+ voltage_normal:
+ default: 11400
+ voltage_min:
+ default: 9000
+ precharge_current:
+ default: 280
+ start_charging_min_c:
+ default: 0
+ start_charging_max_c:
+ default: 45
+ charging_min_c:
+ default: 0
+ charging_max_c:
+ default: 45
+ discharging_min_c:
+ default: -10
+ discharging_max_c:
+ default: 60