summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/program/skyrim/winterhold/project.conf1
-rw-r--r--zephyr/program/skyrim/winterhold/src/usb_mux_config.c22
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;
+}