bip: Add support for Sanyo AC15A3J battery

For Bip P0, we are using some of the Sanyo batteries. Need to add
support in battery.c/board.h so this battery is recognized and
battery disconnect and cutoff functions are supported.

BRANCH=none
BUG=b:79734977
TEST=Verfied Sanyo battery is found at EC init time and that 'cuttof'
EC console command works.

Change-Id: I4b69296869e1eed6248800eb4b7b3c35a79bae4c
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1059935
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
This commit is contained in:
Scott Collyer
2018-05-15 08:44:08 -07:00
committed by chrome-bot
parent 83f8996bd0
commit 9ebaece91b
2 changed files with 29 additions and 0 deletions

View File

@@ -59,6 +59,34 @@ const struct board_batt_params board_battery_info[] = {
.discharging_max_c = 60,
},
},
/* SANYO AC15A3J Battery Information */
[BATTERY_SANYO] = {
.fuel_gauge = {
.manuf_name = "SANYO",
.ship_mode = {
.reg_addr = 0x3A,
.reg_data = { 0xC574, 0xC574 },
},
.fet = {
.reg_addr = 0x0,
.reg_mask = 0x4000,
.disconnect_val = 0x0,
}
},
.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 = 50,
.charging_min_c = 0,
.charging_max_c = 60,
.discharging_min_c = 0,
.discharging_max_c = 60,
},
},
};
BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT);

View File

@@ -30,6 +30,7 @@ enum adc_channel {
/* List of possible batteries */
enum battery_type {
BATTERY_PANASONIC,
BATTERY_SANYO,
BATTERY_TYPE_COUNT,
};