summaryrefslogtreecommitdiff
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-14 01:34:44 +0000
commit4198698a634e0c369fa43a53a7130c540911308e (patch)
tree08a96239907d09cfed2149640766be5e63264f0c
parente998edf56d03d3223141c5f62e3a861331d36833 (diff)
downloadchrome-ec-4198698a634e0c369fa43a53a7130c540911308e.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> (cherry picked from commit f0a70403e25db4affec4e81405907876f38f39ee) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4230495 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r--board/casta/battery.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/casta/battery.c b/board/casta/battery.c
index 0e14d10be8..3e5299e3f8 100644
--- a/board/casta/battery.c
+++ b/board/casta/battery.c
@@ -14,6 +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
@@ -103,7 +105,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();