diff options
author | Kshitiz Godara <kgodara@qualcomm.corp-partner.google.com> | 2022-03-21 22:04:36 +0530 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-13 05:38:46 +0000 |
commit | 4b10063fd2f65a5060e795e748d2ddeb8c04b2af (patch) | |
tree | ae30ad98a603682b28d85f84324e9006e2e22bf3 | |
parent | fd753e96c9387fe3b46a318bc9eaf3df503d0679 (diff) | |
download | chrome-ec-4b10063fd2f65a5060e795e748d2ddeb8c04b2af.tar.gz |
zephyr: herobrine: hoglin battery specs
Added battery parameters for hoglin board.
BRANCH=None
BUG=None
TEST=1)Battery is detecting fine at EC bootup
2)Battery cutoff is working as expected
Signed-off-by: Kshitiz Godara <kgodara@qualcomm.corp-partner.google.com>
Change-Id: I86c6824a45f477ae83234d115ed8bb900c344eef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3539766
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/ganfeng,7c01.yaml | 54 | ||||
-rw-r--r-- | zephyr/dts/bindings/vendor-prefixes.txt | 1 | ||||
-rw-r--r-- | zephyr/projects/herobrine/BUILD.py | 2 | ||||
-rw-r--r-- | zephyr/projects/herobrine/battery_hoglin.dts | 12 |
5 files changed, 69 insertions, 1 deletions
diff --git a/zephyr/dts/bindings/battery/battery-smart.yaml b/zephyr/dts/bindings/battery/battery-smart.yaml index 8e97d010e0..c2c6d28175 100644 --- a/zephyr/dts/bindings/battery/battery-smart.yaml +++ b/zephyr/dts/bindings/battery/battery-smart.yaml @@ -13,6 +13,7 @@ properties: enum: - "aec,5477109" - "as3gwrc3ka,c235-41" + - "ganfeng,7c01" - "getac,bq40z50-R3-S3" - "getac,bq40z50-R3-S2" - "lgc,ac17a8m" diff --git a/zephyr/dts/bindings/battery/ganfeng,7c01.yaml b/zephyr/dts/bindings/battery/ganfeng,7c01.yaml new file mode 100644 index 0000000000..6601761bea --- /dev/null +++ b/zephyr/dts/bindings/battery/ganfeng,7c01.yaml @@ -0,0 +1,54 @@ +description: "Ganfeng 7C01" +compatible: "ganfeng,7c01" + +include: battery-smart.yaml + +properties: + enum-name: + type: string + default: "ganfeng,7c01" + + # Fuel gauge + manuf_name: + default: "Ganfeng" + device_name: + default: "7C01" + ship_mode_reg_addr: + default: 0x00 + ship_mode_reg_data: + default: [ 0x0010, 0x0010 ] + # Documentation: b/226820234 + fet_mfgacc_support: + default: 0 + fet_reg_addr: + default: 0x43 + fet_reg_mask: + default: 0x0001 + fet_disconnect_val: + default: 0x0000 + fet_cfet_mask: + default: 0x0002 + fet_cfet_off_val: + default: 0x0000 + + # Battery info + voltage_max: + default: 8700 + voltage_normal: + default: 7600 + voltage_min: + default: 6000 + precharge_current: + default: 256 + start_charging_min_c: + default: -20 + start_charging_max_c: + default: 60 + charging_min_c: + default: 0 + charging_max_c: + default: 60 + discharging_min_c: + default: -20 + discharging_max_c: + default: 60 diff --git a/zephyr/dts/bindings/vendor-prefixes.txt b/zephyr/dts/bindings/vendor-prefixes.txt index 4095b8f300..403b0ba1ea 100644 --- a/zephyr/dts/bindings/vendor-prefixes.txt +++ b/zephyr/dts/bindings/vendor-prefixes.txt @@ -14,3 +14,4 @@ smp Battery vendor aec Battery vendor powertech Battery vendor getac Battery vendor +ganfeng Battery vendor diff --git a/zephyr/projects/herobrine/BUILD.py b/zephyr/projects/herobrine/BUILD.py index 6245fc9e00..3bf790e0a7 100644 --- a/zephyr/projects/herobrine/BUILD.py +++ b/zephyr/projects/herobrine/BUILD.py @@ -46,7 +46,7 @@ register_variant( register_variant( project_name="hoglin", extra_dts_overlays=[ - here / "battery_herobrine.dts", + here / "battery_hoglin.dts", here / "gpio_hoglin.dts", here / "motionsense_hoglin.dts", here / "switchcap_hoglin.dts", diff --git a/zephyr/projects/herobrine/battery_hoglin.dts b/zephyr/projects/herobrine/battery_hoglin.dts new file mode 100644 index 0000000000..79fc6ca296 --- /dev/null +++ b/zephyr/projects/herobrine/battery_hoglin.dts @@ -0,0 +1,12 @@ +/* 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. + */ + +/ { + batteries { + default_battery: 7c01 { + compatible = "ganfeng,7c01", "battery-smart"; + }; + }; +}; |