summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Huang <david.huang@quanta.corp-partner.google.com>2021-11-10 16:01:55 +0800
committerCommit Bot <commit-bot@chromium.org>2021-11-11 03:05:38 +0000
commite635a89e9c107d6500a9947a0c388e9bdb1ecc2d (patch)
tree1a9118221f44bdde93f9749da2c2ed3fd8825c93
parent0898dca66cb555515338739980d2c0158bb7539c (diff)
downloadchrome-ec-e635a89e9c107d6500a9947a0c388e9bdb1ecc2d.tar.gz
kano: Add battery: AP19B8M and remove unused battery.
Add battery: AP19B8M and remove unused battery. BUG=b:201775225 BRANCH=main TEST=Check battery can cutoff and resume from cutoff. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I02667409b59f9de5b41a864ec83b93630d9e645f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3270229 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: caveh jalali <caveh@chromium.org>
-rw-r--r--board/kano/battery.c75
-rw-r--r--board/kano/board.h3
2 files changed, 23 insertions, 55 deletions
diff --git a/board/kano/battery.c b/board/kano/battery.c
index a18ab029b6..395b45371d 100644
--- a/board/kano/battery.c
+++ b/board/kano/battery.c
@@ -10,7 +10,7 @@
#include "compile_time_macros.h"
/*
- * Battery info for all Brya battery types. Note that the fields
+ * Battery info for all Kano battery types. Note that the fields
* start_charging_min/max and charging_min/max are not used for the charger.
* The effective temperature limits are given by discharging_min/max_c.
*
@@ -32,67 +32,36 @@
* address, mask, and disconnect value need to be provided.
*/
const struct board_batt_params board_battery_info[] = {
- /* POW-TECH GQA05 Battery Information */
- [BATTERY_POWER_TECH] = {
- /* BQ40Z50 Fuel Gauge */
+ /* LGC AP19B8M Battery Information */
+ [BATTERY_AP19B8M] = {
.fuel_gauge = {
- .manuf_name = "POW-TECH",
- .device_name = "BATGQA05L22",
+ .manuf_name = "LGC KT0030G024",
.ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x0010, 0x0010 },
+ .reg_addr = 0x3A,
+ .reg_data = { 0xC574, 0xC574 },
},
.fet = {
- .mfgacc_support = 1,
- .reg_addr = 0x00,
- .reg_mask = 0x2000, /* XDSG */
- .disconnect_val = 0x2000,
+ .reg_addr = 0x43,
+ .reg_mask = 0x0001,
+ .disconnect_val = 0x0,
+ .cfet_mask = 0x0002,
+ .cfet_off_val = 0x0000,
}
},
.batt_info = {
- .voltage_max = TARGET_WITH_MARGIN(13050, 5),
- .voltage_normal = 11400, /* mV */
- .voltage_min = 9000, /* mV */
- .precharge_current = 280, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 45,
- .charging_min_c = 0,
- .charging_max_c = 45,
- .discharging_min_c = -10,
- .discharging_max_c = 60,
- },
- },
- /* LGC L17L3PB0 Battery Information */
- /*
- * Battery info provided by ODM on b/143477210, comment #11
- */
- [BATTERY_LGC011] = {
- .fuel_gauge = {
- .manuf_name = "LGC",
- .ship_mode = {
- .reg_addr = 0x00,
- .reg_data = { 0x0010, 0x0010 },
- },
- .fet = {
- .reg_addr = 0x0,
- .reg_mask = 0x6000,
- .disconnect_val = 0x6000,
- }
- },
- .batt_info = {
- .voltage_max = TARGET_WITH_MARGIN(13200, 5),
- .voltage_normal = 11550, /* mV */
- .voltage_min = 9000, /* mV */
- .precharge_current = 256, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 45,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 75,
+ .voltage_max = 13350,
+ .voltage_normal = 11610,
+ .voltage_min = 9000,
+ .precharge_current = 256,
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 50,
+ .charging_min_c = 0,
+ .charging_max_c = 60,
+ .discharging_min_c = -20,
+ .discharging_max_c = 75,
},
},
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_POWER_TECH;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AP19B8M;
diff --git a/board/kano/board.h b/board/kano/board.h
index 3146557f78..c42ea9b7ab 100644
--- a/board/kano/board.h
+++ b/board/kano/board.h
@@ -215,8 +215,7 @@ enum sensor_id {
};
enum battery_type {
- BATTERY_POWER_TECH,
- BATTERY_LGC011,
+ BATTERY_AP19B8M,
BATTERY_TYPE_COUNT
};