diff options
author | Philip Chen <philipchen@google.com> | 2019-07-16 13:45:43 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-17 02:19:41 +0000 |
commit | 283338b878bf47fe8f371729b399320225472b1b (patch) | |
tree | e261f92a0cff61a2ec95129b1fc3295ea2ed696d | |
parent | ea49cf673af69904efc8873c77f362bae0ab5830 (diff) | |
download | chrome-ec-283338b878bf47fe8f371729b399320225472b1b.tar.gz |
kohaku: Support SDI battery pack
BUG=b:130578043
BRANCH=none
TEST=battery command on EC console
Change-Id: I2518892dac3daeae8734bd3b45f225f4723dc7c6
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704788
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
-rw-r--r-- | board/kohaku/battery.c | 30 | ||||
-rw-r--r-- | board/kohaku/board.h | 1 |
2 files changed, 30 insertions, 1 deletions
diff --git a/board/kohaku/battery.c b/board/kohaku/battery.c index 6026d40d2b..d63843a7e3 100644 --- a/board/kohaku/battery.c +++ b/board/kohaku/battery.c @@ -60,10 +60,38 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 60, }, }, + [BATTERY_SDI] = { + .fuel_gauge = { + .manuf_name = "SDI", + .device_name = "4404D62", + .ship_mode = { + .reg_addr = 0x00, + .reg_data = { 0x0010, 0x0010 }, + }, + .fet = { + .mfgacc_support = 0, + .reg_addr = 0x00, + .reg_mask = 0xc000, + .disconnect_val = 0x8000, + } + }, + .batt_info = { + .voltage_max = 8800, + .voltage_normal = 7700, /* mV */ + .voltage_min = 6000, /* mV */ + .precharge_current = 200, /* mA */ + .start_charging_min_c = 0, + .start_charging_max_c = 45, + .charging_min_c = 0, + .charging_max_c = 55, + .discharging_min_c = -20, + .discharging_max_c = 60, + }, + }, }; BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); -const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_DYNA; +const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SDI; enum battery_present variant_battery_present(void) { diff --git a/board/kohaku/board.h b/board/kohaku/board.h index bd29caa150..f10da2ef58 100644 --- a/board/kohaku/board.h +++ b/board/kohaku/board.h @@ -167,6 +167,7 @@ enum temp_sensor_id { /* List of possible batteries */ enum battery_type { BATTERY_DYNA, + BATTERY_SDI, BATTERY_TYPE_COUNT, }; |