diff options
author | Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com> | 2023-03-20 11:19:00 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-21 03:25:05 +0000 |
commit | d9999d9ea8d34efe45f3e63c96b5dfe30a069471 (patch) | |
tree | 2924c80e6c885a61cbe412d26f1f8b585b115a5a | |
parent | 45c25c16ae0d66204eb8bc4a6991bbaeae29b4e5 (diff) | |
download | chrome-ec-d9999d9ea8d34efe45f3e63c96b5dfe30a069471.tar.gz |
zombie: Add battery 30w configuration
Correct battery parameters for zombie board.
BRANCH=none
BUG=b:271946491
TEST=1). ~$ battery
Status: 0x0080 INIT
Param flags: 00000003
Temp: 0x0b9d = 297.3 K (24.2 C)
V: 0x203f = 8255 mV
V-desired: 0x21fc = 8700 mV
I: 0x0113 = 275 mA(CHG)
I-desired: 0x0802 = 2050 mA
Charging: Allowed
Charge: 92 %
Display: 94.3 %
Manuf: POW-TECH
Device: SG20QT1C
Chem: LION
Serial: 0x03a4
V-design: 0x1db0 = 7600 mV
Mode: 0x6001
Abs charge: 93 %
Remaining: 3798 mAh
Cap-full: 4141 mAh
Design: 4100 mAh
Charge Cycle: 17
Time-full: 1h:24
Empty: 0h:0
Full Factor: 0.97
Shutdown SoC: 4 %
C-FET: 1
2).Battery cutoff is working as expected
Change-Id: I3c9ddc12734487209e1b5d49d03a7a39df80c8f0
Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4352187
Commit-Queue: Bob Moragues <moragues@chromium.org>
Reviewed-by: Bob Moragues <moragues@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r-- | zephyr/dts/bindings/battery/battery-smart.yaml | 1 | ||||
-rw-r--r-- | zephyr/dts/bindings/battery/pow-tech,sg20qt1c.yaml | 57 | ||||
-rw-r--r-- | zephyr/dts/bindings/vendor-prefixes.txt | 3 | ||||
-rw-r--r-- | zephyr/program/herobrine/zombie/project.overlay | 3 |
4 files changed, 63 insertions, 1 deletions
diff --git a/zephyr/dts/bindings/battery/battery-smart.yaml b/zephyr/dts/bindings/battery/battery-smart.yaml index 74deb224b2..5fe175a309 100644 --- a/zephyr/dts/bindings/battery/battery-smart.yaml +++ b/zephyr/dts/bindings/battery/battery-smart.yaml @@ -31,6 +31,7 @@ properties: - "dynapack,c140254" - "ganfeng,7c01" - "ganfeng,sg20" + - "pow-tech,sg20qt1c" - "getac,bq40z50-R3-S3" - "getac,bq40z50-R3-S2" - "lgc,ac17a8m" diff --git a/zephyr/dts/bindings/battery/pow-tech,sg20qt1c.yaml b/zephyr/dts/bindings/battery/pow-tech,sg20qt1c.yaml new file mode 100644 index 0000000000..7df7bcc274 --- /dev/null +++ b/zephyr/dts/bindings/battery/pow-tech,sg20qt1c.yaml @@ -0,0 +1,57 @@ +# Copyright 2022 The ChromiumOS Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +description: "POW-TECH SG20QT1C" +compatible: "pow-tech,sg20qt1c" + +include: battery-smart.yaml + +properties: + enum-name: + type: string + default: "pow-tech,sg20qt1c" + + # TI BQ40Z50 Fuel Gauge + manuf_name: + default: "POW-TECH" + device_name: + default: "SG20QT1C" + ship_mode_reg_addr: + default: 0x00 + ship_mode_reg_data: + default: [0x0010, 0x0010] + fet_mfgacc_support: + default: 1 + fet_reg_addr: + default: 0x54 + fet_reg_mask: + default: 0x0006 + fet_disconnect_val: + default: 0x0000 + fet_cfet_mask: + default: 0x4000 + fet_cfet_off_val: + default: 0x4000 + + # Battery info + voltage_max: + default: 8700 + voltage_normal: + default: 7600 + voltage_min: + default: 6000 + 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: 53 + discharging_min_c: + default: -23 + discharging_max_c: + default: 63 diff --git a/zephyr/dts/bindings/vendor-prefixes.txt b/zephyr/dts/bindings/vendor-prefixes.txt index c04ca3b546..d504a6e573 100644 --- a/zephyr/dts/bindings/vendor-prefixes.txt +++ b/zephyr/dts/bindings/vendor-prefixes.txt @@ -20,4 +20,5 @@ sunwoda Battery vendor cosmx Battery vendor dynapack Battery vendor atl Battery vendor -bms-gf Battery vendor
\ No newline at end of file +bms-gf Battery vendor +pow-tech Battery vendor diff --git a/zephyr/program/herobrine/zombie/project.overlay b/zephyr/program/herobrine/zombie/project.overlay index 6f5ed174cf..f07bccd3e6 100644 --- a/zephyr/program/herobrine/zombie/project.overlay +++ b/zephyr/program/herobrine/zombie/project.overlay @@ -25,6 +25,9 @@ default_battery: sg20 { compatible = "ganfeng,sg20", "battery-smart"; }; + sg20qt1c { + compatible = "pow-tech,sg20qt1c", "battery-smart"; + }; }; }; |