From 84a348f4bff39cd4cf96c1f3c7a7cc6650093529 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 23 Oct 2025 20:33:32 +0100 Subject: [PATCH] ec/starlabs/merlin: Remove the fast charge option This is a legacy option that changed the charging frequency. It is no longer needed as the "normal" frequency is faster and more stable so remove it. Change-Id: I73cf439d96d65f0be26595e42a4aedbc4388b850 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/89694 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/ec/starlabs/merlin/Kconfig | 7 ------ src/ec/starlabs/merlin/nuvoton.c | 23 ------------------- src/ec/starlabs/merlin/variants/glk/ecdefs.h | 1 - src/ec/starlabs/merlin/variants/glkr/ecdefs.h | 1 - src/ec/starlabs/merlin/variants/kbl/ecdefs.h | 1 - .../starlabs/merlin/variants/merlin/ecdefs.h | 1 - src/mainboard/starlabs/lite/Kconfig | 1 - src/mainboard/starlabs/lite/cfr.c | 12 ---------- 8 files changed, 47 deletions(-) diff --git a/src/ec/starlabs/merlin/Kconfig b/src/ec/starlabs/merlin/Kconfig index d2f59a64fb..4758d44de1 100644 --- a/src/ec/starlabs/merlin/Kconfig +++ b/src/ec/starlabs/merlin/Kconfig @@ -43,13 +43,6 @@ config EC_STARLABS_FAN help Select if the mainboard has a fan. -config EC_STARLABS_FAST_CHARGE - bool - default n - depends on EC_STARLABS_NUVOTON - help - Select if the mainboard supports fast charging. - config EC_STARLABS_MAX_CHARGE bool default n diff --git a/src/ec/starlabs/merlin/nuvoton.c b/src/ec/starlabs/merlin/nuvoton.c index f62bcdf3ae..6b39fe0ebf 100644 --- a/src/ec/starlabs/merlin/nuvoton.c +++ b/src/ec/starlabs/merlin/nuvoton.c @@ -165,29 +165,6 @@ static void merlin_init(struct device *dev) UINT_MAX, UINT_MAX)); - /* - * Fast Charge - * - * Setting: fast_charge - * - * Values: Normal, Fast - * Default: Normal - * - */ - const uint8_t fast_charge[] = { - CHARGE_RATE_NORMAL, - CHARGE_RATE_FAST - }; - - if (CONFIG(EC_STARLABS_FAST_CHARGE)) - ec_write(ECRAM_FAST_CHARGE, - get_ec_value_from_option("fast_charge", - 0, - fast_charge, - ARRAY_SIZE(fast_charge), - UINT_MAX, - UINT_MAX)); - /* * Fan Mode * diff --git a/src/ec/starlabs/merlin/variants/glk/ecdefs.h b/src/ec/starlabs/merlin/variants/glk/ecdefs.h index b9b4305f49..a9b3025148 100644 --- a/src/ec/starlabs/merlin/variants/glk/ecdefs.h +++ b/src/ec/starlabs/merlin/variants/glk/ecdefs.h @@ -19,7 +19,6 @@ #define ECRAM_FN_CTRL_REVERSE 0x2d #define ECRAM_MAX_CHARGE dead_code_t(uint8_t) #define ECRAM_FAN_MODE dead_code_t(uint8_t) -#define ECRAM_FAST_CHARGE dead_code_t(uint8_t) #define ECRAM_CHARGING_SPEED dead_code_t(uint8_t) #define ECRAM_LID_SWITCH dead_code_t(uint8_t) #define ECRAM_POWER_LED 0x1f diff --git a/src/ec/starlabs/merlin/variants/glkr/ecdefs.h b/src/ec/starlabs/merlin/variants/glkr/ecdefs.h index 3e63bcba2e..028dd5f047 100644 --- a/src/ec/starlabs/merlin/variants/glkr/ecdefs.h +++ b/src/ec/starlabs/merlin/variants/glkr/ecdefs.h @@ -22,7 +22,6 @@ #define ECRAM_FN_CTRL_REVERSE 0x13 #define ECRAM_MAX_CHARGE dead_code_t(uint8_t) #define ECRAM_FAN_MODE dead_code_t(uint8_t) -#define ECRAM_FAST_CHARGE 0x18 #define ECRAM_CHARGING_SPEED dead_code_t(uint8_t) #define ECRAM_LID_SWITCH dead_code_t(uint8_t) #define ECRAM_POWER_LED 0x1f diff --git a/src/ec/starlabs/merlin/variants/kbl/ecdefs.h b/src/ec/starlabs/merlin/variants/kbl/ecdefs.h index 82384dd778..75b83c9bf5 100644 --- a/src/ec/starlabs/merlin/variants/kbl/ecdefs.h +++ b/src/ec/starlabs/merlin/variants/kbl/ecdefs.h @@ -19,7 +19,6 @@ #define ECRAM_FAN_MODE 0x42 #define ECRAM_FN_CTRL_REVERSE 0x43 #define ECRAM_MAX_CHARGE dead_code_t(uint8_t) -#define ECRAM_FAST_CHARGE dead_code_t(uint8_t) #define ECRAM_CHARGING_SPEED dead_code_t(uint8_t) #define ECRAM_LID_SWITCH dead_code_t(uint8_t) #define ECRAM_POWER_LED 0x1f diff --git a/src/ec/starlabs/merlin/variants/merlin/ecdefs.h b/src/ec/starlabs/merlin/variants/merlin/ecdefs.h index 17de22c6ae..b712baaf6a 100644 --- a/src/ec/starlabs/merlin/variants/merlin/ecdefs.h +++ b/src/ec/starlabs/merlin/variants/merlin/ecdefs.h @@ -19,7 +19,6 @@ #define ECRAM_FN_CTRL_REVERSE 0x17 #define ECRAM_MAX_CHARGE 0x1a #define ECRAM_FAN_MODE 0x1b -#define ECRAM_FAST_CHARGE dead_code_t(uint8_t) #define ECRAM_CHARGING_SPEED 0x1d #define ECRAM_LID_SWITCH 0x1e #define ECRAM_POWER_LED 0x1f diff --git a/src/mainboard/starlabs/lite/Kconfig b/src/mainboard/starlabs/lite/Kconfig index 2218b4e051..8ea2101f69 100644 --- a/src/mainboard/starlabs/lite/Kconfig +++ b/src/mainboard/starlabs/lite/Kconfig @@ -32,7 +32,6 @@ config BOARD_STARLABS_LITE_GLK config BOARD_STARLABS_LITE_GLKR select BOARD_STARLABS_LITE_SERIES - select EC_STARLABS_FAST_CHARGE select EC_STARLABS_NUVOTON select EC_STARLABS_KBL_LEVELS select SOC_INTEL_GEMINILAKE diff --git a/src/mainboard/starlabs/lite/cfr.c b/src/mainboard/starlabs/lite/cfr.c index 8423a04afa..4049531081 100644 --- a/src/mainboard/starlabs/lite/cfr.c +++ b/src/mainboard/starlabs/lite/cfr.c @@ -14,15 +14,6 @@ static const struct sm_object card_reader = SM_DECLARE_BOOL({ .default_value = true, }); -#if CONFIG(EC_STARLABS_FAST_CHARGE) -static const struct sm_object fast_charge = SM_DECLARE_BOOL({ - .opt_name = "fast_charge", - .ui_name = "Fast Charge", - .ui_helptext = "Charge the battery faster at the cost of heat and battery wear.", - .default_value = false, -}); -#endif - static const struct sm_object power_profile = SM_DECLARE_ENUM({ .opt_name = "power_profile", .ui_name = "Power Profile", @@ -93,9 +84,6 @@ static struct sm_obj_form processor = { static struct sm_obj_form power = { .ui_name = "Power", .obj_list = (const struct sm_object *[]) { - #if CONFIG(EC_STARLABS_FAST_CHARGE) - &fast_charge, - #endif &power_on_after_fail_bool, NULL },