diff options
author | johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> | 2022-12-09 13:37:20 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-20 03:18:27 +0000 |
commit | 84ab332d934b703e4a4b302a11025525e6801602 (patch) | |
tree | 9e2f075d06987b3a24770224623217552ac4fa49 | |
parent | aeb757fd759b4fd649e5758a6ebc18117a3aefc9 (diff) | |
download | chrome-ec-84ab332d934b703e4a4b302a11025525e6801602.tar.gz |
Winterhold: Change charging current
1. In S3 and S5, charge current follow battery request.
2. In S0:
a) charge current set to 1000mA.
b) If battery request lower 1000mA, charge current
follow battery request.
LOW_COVERAGE_REASON=Skyrim board tests not created yet: b/247151116
BUG=b:257851736
BRANCH=None
TEST=Test on winterhold, charge current be change to 1A
Change-Id: Iec572b062281d5deab45c6deac1126686692083d
Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4091388
Code-Coverage: Diana Z <dzigterman@chromium.org>
Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r-- | zephyr/program/skyrim/winterhold/project.conf | 1 | ||||
-rw-r--r-- | zephyr/program/skyrim/winterhold/src/usb_mux_config.c | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/zephyr/program/skyrim/winterhold/project.conf b/zephyr/program/skyrim/winterhold/project.conf index 4daff2805b..b0c99c75ed 100644 --- a/zephyr/program/skyrim/winterhold/project.conf +++ b/zephyr/program/skyrim/winterhold/project.conf @@ -18,6 +18,7 @@ CONFIG_PLATFORM_EC_DC_PROCHOT_CURRENT_MA=6570 # Enable alternative charger chip CONFIG_PLATFORM_EC_CHARGER_RUNTIME_CONFIG=y CONFIG_PLATFORM_EC_CHARGER_ISL9238C=y +CONFIG_PLATFORM_EC_CHARGER_PROFILE_OVERRIDE=y # Get the vbus voltage from TCPC CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_CHARGER=n diff --git a/zephyr/program/skyrim/winterhold/src/usb_mux_config.c b/zephyr/program/skyrim/winterhold/src/usb_mux_config.c index 19153eb676..2d834bcfdf 100644 --- a/zephyr/program/skyrim/winterhold/src/usb_mux_config.c +++ b/zephyr/program/skyrim/winterhold/src/usb_mux_config.c @@ -5,6 +5,7 @@ /* Winterhold board-specific USB-C mux configuration */ +#include "charge_state.h" #include "console.h" #include "cros_board_info.h" #include "cros_cbi.h" @@ -144,3 +145,24 @@ int board_anx7483_c1_mux_set(const struct usb_mux *me, mux_state_t mux_state) return EC_SUCCESS; } + +int charger_profile_override(struct charge_state_data *curr) +{ + if (chipset_in_state(CHIPSET_STATE_ON)) { + curr->requested_current = MIN(curr->requested_current, 1000); + } + + return 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; +} |