summaryrefslogtreecommitdiff
path: root/board/ampton/battery.c
diff options
context:
space:
mode:
authorJames_Chao <james_chao@asus.corp-partner.google.com>2018-10-08 13:57:42 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-23 22:50:45 -0700
commit94aa19dc8e27b06ab93eecee7abba8b24af7cc6f (patch)
treee3b9146e4ffc2ce187ecd755e089dd10e3b793d4 /board/ampton/battery.c
parentf5d38b0ac1b64a03a23f5bf9bf938d679c33d0d4 (diff)
downloadchrome-ec-94aa19dc8e27b06ab93eecee7abba8b24af7cc6f.tar.gz
Ampton: add battery configuration
BUG=b:115502621 BRANCH=master TEST=Build success now. Check the battery is working after we got proto board. Change-Id: I5a3f14e118b474767ec885137448c776c215e0fa Signed-off-by: James_Chao <james_chao@asus.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1267760 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: James Chao <james_chao@asus.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/ampton/battery.c')
-rw-r--r--board/ampton/battery.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/board/ampton/battery.c b/board/ampton/battery.c
index 552649b6b7..e19582973a 100644
--- a/board/ampton/battery.c
+++ b/board/ampton/battery.c
@@ -32,8 +32,34 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* TODO(b/115502621): Ampton/Apel: need battery datasheets and specs */
+ [BATTERY_C214] = {
+ .fuel_gauge = {
+ .manuf_name = "AS1GUXd3KB",
+ .device_name = "C214-43",
+ .ship_mode = {
+ .reg_addr = 0x0,
+ .reg_data = { 0x10, 0x10 },
+ },
+ .fet = {
+ .mfgacc_support = 1,
+ .reg_addr = 0x00,
+ .reg_mask = 0x2000,
+ .disconnect_val = 0x2000,
+ },
+ },
+ .batt_info = {
+ .voltage_max = 13200,
+ .voltage_normal = 11550,
+ .voltage_min = 9000,
+ .precharge_current = 256,
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 45,
+ .charging_min_c = 0,
+ .discharging_min_c = 0,
+ .discharging_max_c = 60,
+ },
+ },
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_TYPE_COUNT;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_C214;