summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/nautilus/battery.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/board/nautilus/battery.c b/board/nautilus/battery.c
index 54e48404da..6ccedf1378 100644
--- a/board/nautilus/battery.c
+++ b/board/nautilus/battery.c
@@ -28,8 +28,10 @@ static enum battery_present batt_pres_prev = BP_NOT_SURE;
#define BATFETS_MASK (0x3)
#define BATFETS_DISABLED (0x2)
-#define CHARGING_VOLTAGE_MV_SAFE 8400
-#define CHARGING_CURRENT_MA_SAFE 1500
+#define CHARGING_VOLTAGE_MV_SAFE 8400
+#define CHARGING_CURRENT_MA_SAFE 1500
+#define CHARGING_VOLTAGE_MV_ADJUST 8600
+#define CHARGING_CURRENT_MA_ADJUST 3200
static const struct battery_info info = {
.voltage_max = 8600,
@@ -95,7 +97,11 @@ int charger_profile_override(struct charge_state_data *curr)
return 0;
current = curr->requested_current;
+ if (current > CHARGING_CURRENT_MA_ADJUST)
+ current = CHARGING_CURRENT_MA_ADJUST;
voltage = curr->requested_voltage;
+ if (voltage > CHARGING_VOLTAGE_MV_ADJUST)
+ voltage = CHARGING_VOLTAGE_MV_ADJUST;
bat_temp_c = curr->batt.temperature - 2731;
/*