diff options
author | YongBeum.Ha <ybha@samsung.corp-partner.google.com> | 2021-10-14 11:15:44 +0900 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-18 09:21:52 +0000 |
commit | 9a8fdc56534c16473afe7f98964e02978b9e51a7 (patch) | |
tree | 6903bfb1b9d2abcf60b32e31de8cd73f34024acb /board | |
parent | 50d67b5dbb66675d4dab6064fa53cd93c9453cb2 (diff) | |
download | chrome-ec-9a8fdc56534c16473afe7f98964e02978b9e51a7.tar.gz |
bugzzy : Change charging current
change charging current to reduce skin temperature.
BUG=b:197776876
BRANCH=None
TEST=make -j BOARD=bugzzy
Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Change-Id: I8a20455d92446ce1606f9e262f6715bf8721adc3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3220905
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/bugzzy/battery.c | 27 | ||||
-rw-r--r-- | board/bugzzy/board.h | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/board/bugzzy/battery.c b/board/bugzzy/battery.c index 55932feccf..23318890f3 100644 --- a/board/bugzzy/battery.c +++ b/board/bugzzy/battery.c @@ -42,6 +42,9 @@ * The value b'10 is disconnect_val, so we can use b'01 for cfet_off_val */ +/* charging current is limited to 0.45C */ +#define CHARGING_CURRENT_45C 2601 + const struct board_batt_params board_battery_info[] = { /* SDI Battery Information */ [BATTERY_SDI] = { @@ -79,6 +82,30 @@ BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_SDI; +int charger_profile_override(struct charge_state_data *curr) +{ + if ((chipset_in_state(CHIPSET_STATE_ON)) && + (curr->requested_current > CHARGING_CURRENT_45C)) + curr->requested_current = CHARGING_CURRENT_45C; + + return 0; +} + +/* Customs options controllable by host command. */ +#define PARAM_FASTCHARGE (CS_PARAM_CUSTOM_PROFILE_MIN + 0) + +enum ec_status charger_profile_override_get_param(uint32_t param, + uint32_t *value) +{ + return EC_RES_INVALID_PARAM; +} + +enum ec_status charger_profile_override_set_param(uint32_t param, + uint32_t value) +{ + return EC_RES_INVALID_PARAM; +} + /* Lower our input voltage to 5V in S0iX when battery is full. */ #define PD_VOLTAGE_WHEN_FULL 5000 static void reduce_input_voltage_when_full(void) diff --git a/board/bugzzy/board.h b/board/bugzzy/board.h index 51dd38d8d8..dba33aac0b 100644 --- a/board/bugzzy/board.h +++ b/board/bugzzy/board.h @@ -46,6 +46,7 @@ #undef CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE #define CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE (100 * MSEC) #define CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS +#define CONFIG_CHARGER_PROFILE_OVERRIDE /* * GPIO for C1 interrupts, for baseboard use |