summaryrefslogtreecommitdiff
path: root/board/coachz
diff options
context:
space:
mode:
authorSimon Zhou <zhouguohui@huaqin.corp-partner.google.com>2020-09-17 17:47:02 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-19 20:54:16 +0000
commit7b6cb69db9d9ca392ef3d8d55f2535cc121f4b93 (patch)
treeec550bb765ceeaf2b480c3f7da242da97567b58e /board/coachz
parent2f181043100a03655b2c14a1536950e27c76fbfe (diff)
downloadchrome-ec-7b6cb69db9d9ca392ef3d8d55f2535cc121f4b93.tar.gz
Coachz: Add battery for Coachzstabilize-13482.B-master
Add DS02032XL battery information for Coachz BUG=b:168734684 BRANCH=master TEST=make -j BOARD=coachz Change-Id: I6f5ef136afe157b653ca53b374668195212bfe68 Signed-off-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2416469 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'board/coachz')
-rw-r--r--board/coachz/battery.c86
-rw-r--r--board/coachz/board.h4
2 files changed, 15 insertions, 75 deletions
diff --git a/board/coachz/battery.c b/board/coachz/battery.c
index 642c854406..a97395ca73 100644
--- a/board/coachz/battery.c
+++ b/board/coachz/battery.c
@@ -33,94 +33,36 @@
*/
const struct board_batt_params board_battery_info[] = {
- /* AP16L5J */
- [BATTERY_AP16L5J] = {
+ /* COSMX DS02032XL */
+ [BATTERY_DS02032XL] = {
.fuel_gauge = {
- .manuf_name = "PANASONIC",
- .device_name = "AP16L5J",
+ .manuf_name = "333-AC-13-A",
+ .device_name = "DS02032XL",
.ship_mode = {
- .reg_addr = 0x3A,
- .reg_data = { 0xC574, 0xC574 },
+ .reg_addr = 0x00,
+ .reg_data = { 0x0010, 0x0010 },
},
.fet = {
- .mfgacc_support = 0,
- .reg_addr = 0x0,
- .reg_mask = 0x4000,
- .disconnect_val = 0x0,
- }
- },
- .batt_info = {
- .voltage_max = 8800,
- .voltage_normal = 7700, /* mV */
- .voltage_min = 6000, /* mV */
- .precharge_current = 256, /* mA */
- .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,
- },
- },
- /* AP16L5J with PN version */
- [BATTERY_AP16L5J_009] = {
- .fuel_gauge = {
- .manuf_name = "PANASONIC KT00205009",
- .device_name = "AP16L5J",
- .ship_mode = {
- .reg_addr = 0x3A,
- .reg_data = { 0xC574, 0xC574 },
- },
- .fet = {
- .mfgacc_support = 0,
+ .mfgacc_support = 1,
.reg_addr = 0x0,
- .reg_mask = 0x4000,
+ .reg_mask = 0x0002,
.disconnect_val = 0x0,
}
},
.batt_info = {
- .voltage_max = 8800,
+ .voltage_max = 8800, /* mV */
.voltage_normal = 7700, /* mV */
.voltage_min = 6000, /* mV */
.precharge_current = 256, /* mA */
.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,
- },
- },
- /* AP16L8J */
- [BATTERY_AP16L8J] = {
- .fuel_gauge = {
- .manuf_name = "LGC KT0020G010",
- .device_name = "AP16L8J",
- .ship_mode = {
- .reg_addr = 0x3A,
- .reg_data = { 0xC574, 0xC574 },
- },
- .fet = {
- .mfgacc_support = 1,
- .reg_addr = 0x23,
- .reg_mask = 0x1,
- .disconnect_val = 0x0,
- }
- },
- .batt_info = {
- .voltage_max = 8700,
- .voltage_normal = 7500, /* mV */
- .voltage_min = 6000, /* mV */
- .precharge_current = 256, /* mA */
- .start_charging_min_c = 0,
- .start_charging_max_c = 50,
+ .start_charging_max_c = 45,
.charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = -20,
- .discharging_max_c = 75,
+ .charging_max_c = 45,
+ .discharging_min_c = -10,
+ .discharging_max_c = 60,
},
},
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);
-const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_AP16L5J;
+const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DS02032XL;
diff --git a/board/coachz/board.h b/board/coachz/board.h
index 3930f44f8c..9279e43296 100644
--- a/board/coachz/board.h
+++ b/board/coachz/board.h
@@ -73,9 +73,7 @@ enum pwm_channel {
/* List of possible batteries */
enum battery_type {
- BATTERY_AP16L5J,
- BATTERY_AP16L5J_009,
- BATTERY_AP16L8J,
+ BATTERY_DS02032XL,
BATTERY_TYPE_COUNT,
};