diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2016-12-19 12:56:21 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-02 16:16:58 -0800 |
commit | 18bb7c7971f4cb7c8d705f34ecd2797ce4e51023 (patch) | |
tree | 144706704ec6b77b881bc9061e5305e17f0604d1 | |
parent | 63ca2d693f39bdf8cad3f92234f4c757df20e87d (diff) | |
download | chrome-ec-18bb7c7971f4cb7c8d705f34ecd2797ce4e51023.tar.gz |
electro: Add BQ40z555 Sony battery parameters as in the spec
BUG=chrome-os-partner:59904
BRANCH=none
TEST=Tested on Reef by manipulating the elctro configs as reef
and observed correct charging profile is selected.
Change-Id: Ib155ea5aa3ab48b4853ba401a783d42d25fbea99
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/422430
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | board/reef/battery.c | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/board/reef/battery.c b/board/reef/battery.c index 307b44c115..689d8cc147 100644 --- a/board/reef/battery.c +++ b/board/reef/battery.c @@ -108,6 +108,33 @@ static const struct fast_charge_params fast_chg_params_smp_cos4870 = { .chg_profile_info = &fast_charge_smp_cos4870_info[0], }; +static const struct fast_charge_profile fast_charge_sonycorp_info[] = { + /* < 10C */ + [TEMP_RANGE_0] = { + .temp_c = TEMPC_TENTHS_OF_DEG(9), + .current_mA = { + [VOLTAGE_RANGE_LOW] = 1200, + [VOLTAGE_RANGE_HIGH] = 1200, + }, + }, + + /* >= 10C */ + [TEMP_RANGE_1] = { + .temp_c = TEMPC_TENTHS_OF_DEG(CHARGER_PROF_TEMP_C_LAST_RANGE), + .current_mA = { + [VOLTAGE_RANGE_LOW] = 3300, + [VOLTAGE_RANGE_HIGH] = 3300, + }, + }, +}; + +static const struct fast_charge_params fast_chg_params_sonycorp = { + .total_temp_ranges = ARRAY_SIZE(fast_charge_sonycorp_info), + .default_temp_range_profile = TEMP_RANGE_1, + .vtg_low_limit_mV = 8000, + .chg_profile_info = &fast_charge_sonycorp_info[0], +}; + static int batt_smp_cos4870_init(void) { int batt_status; @@ -138,13 +165,10 @@ static const struct board_batt_params info[] = { .ship_mode_data = 0xC574, .batt_init = batt_sony_corp_init, - /* - * Add fast charging params info for BQ40z555 - * (TODO: crosbug.com/p/59904) - */ - .fast_chg_params = &fast_chg_params_smp_cos4870, + /* Fast charging params info for BQ40Z555 */ + .fast_chg_params = &fast_chg_params_sonycorp, - /* Battery info for BQ40z555 (TODO: crosbug.com/p/59904) */ + /* Battery info for BQ40Z555 */ .batt_info = { .voltage_max = 8700, /* mV */ .voltage_normal = 7600, @@ -157,11 +181,11 @@ static const struct board_batt_params info[] = { .voltage_min = 6100, .precharge_current = 256, /* mA */ .start_charging_min_c = 0, - .start_charging_max_c = 46, + .start_charging_max_c = 50, .charging_min_c = 0, - .charging_max_c = 45, - .discharging_min_c = 0, - .discharging_max_c = 60, + .charging_max_c = 60, + .discharging_min_c = -20, + .discharging_max_c = 75, }, }, |