summaryrefslogtreecommitdiff
path: root/board/casta
diff options
context:
space:
mode:
authorYongBeum.Ha <ybha@samsung.corp-partner.google.com>2023-01-30 09:38:38 +0900
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-08 05:42:13 +0000
commitf0a70403e25db4affec4e81405907876f38f39ee (patch)
treeb789960ff9d4a460d9de0f2c0b790b12e39e1897 /board/casta
parent78aa791499201024699ac63bed89d1aae7dbb398 (diff)
downloadchrome-ec-f0a70403e25db4affec4e81405907876f38f39ee.tar.gz
Casta : Change charging voltage and current
Change charging voltage(8600mV) and current(3200mA). BUG=b:266123223 BRANCH=firmware-octopus-11297.B TEST=build, update and check charging voltage and current Change-Id: Ib7b520fbb355ac7ad73634e21271569ed5073d10 Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4199245 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/casta')
-rw-r--r--board/casta/battery.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/board/casta/battery.c b/board/casta/battery.c
index 81e2d98e40..846165ff13 100644
--- a/board/casta/battery.c
+++ b/board/casta/battery.c
@@ -14,7 +14,8 @@
#define CHARGING_VOLTAGE_MV_SAFE 8400
#define CHARGING_CURRENT_MA_SAFE 1500
-
+#define CHARGING_VOLTAGE_MV_ADJUST 8600
+#define CHARGING_CURRENT_MA_ADJUST 3200
/*
* Battery info for all casta battery types. Note that the fields
* start_charging_min/max and charging_min/max are not used for the charger.
@@ -103,7 +104,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;
batt_info = battery_get_info();