summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/reef/battery.c44
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,
},
},