diff options
author | Divya Sasidharan <divya.s.sasidharan@intel.com> | 2018-05-02 16:56:11 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-04 00:13:42 -0700 |
commit | 0f54e5dd5a0a6dfd4f12681aa3552c66c1e3ad28 (patch) | |
tree | 921d1ecb1c31911d5cb749596e6e5be546f1ba2e /board | |
parent | d0d1ea3d46faa5c1141157fe9ef27967aafe85e0 (diff) | |
download | chrome-ec-0f54e5dd5a0a6dfd4f12681aa3552c66c1e3ad28.tar.gz |
yorp: Add support for SONY battery
BUG=b:78906183
BRANCH=None
TEST=make buildall -j; connect SONY battery
and test if recognized on battery UI icon in OS.
Change-Id: I15c7a9611c10de425f3ca34f7f8f737c65e47275
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1041159
Commit-Ready: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Tested-by: Wenkai Du <wenkai.du@intel.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/yorp/battery.c | 28 | ||||
-rw-r--r-- | board/yorp/board.h | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/board/yorp/battery.c b/board/yorp/battery.c index d960dd8a67..603beb38b9 100644 --- a/board/yorp/battery.c +++ b/board/yorp/battery.c @@ -117,6 +117,34 @@ const struct board_batt_params board_battery_info[] = { .discharging_max_c = 60, }, }, + + /* Sony Ap13J4K Battery Information */ + [BATTERY_SONY] = { + .fuel_gauge = { + .manuf_name = "SONYCorp", + .ship_mode = { + .reg_addr = 0x3A, + .reg_data = { 0xC574, 0xC574 }, + }, + .fet = { + .reg_addr = 0x0, + .reg_mask = 0x8000, + .disconnect_val = 0x8000, + } + }, + .batt_info = { + .voltage_max = TARGET_WITH_MARGIN(13200, 5), + .voltage_normal = 11400, /* 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); diff --git a/board/yorp/board.h b/board/yorp/board.h index 16e4b5dab0..fa1cc32d50 100644 --- a/board/yorp/board.h +++ b/board/yorp/board.h @@ -74,6 +74,7 @@ enum battery_type { BATTERY_LGC15, BATTERY_PANASONIC, BATTERY_SANYO, + BATTERY_SONY, BATTERY_TYPE_COUNT, }; |