From 93d5c4fe61e33ae7c2499212c6ffe15649233027 Mon Sep 17 00:00:00 2001 From: Terrails Date: Fri, 4 Oct 2024 19:51:13 +0200 Subject: [PATCH 1/2] lower threshold for Apple 96W and TS4 98W chargers --- zephyr/program/framework/lotus/src/cpu_power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zephyr/program/framework/lotus/src/cpu_power.c b/zephyr/program/framework/lotus/src/cpu_power.c index c1cbc37f30..6ea17d5666 100644 --- a/zephyr/program/framework/lotus/src/cpu_power.c +++ b/zephyr/program/framework/lotus/src/cpu_power.c @@ -216,7 +216,7 @@ static void update_thermal_power_limit(int battery_percent, int active_mpower, thermal_stt_table = 28; } } - } else if (active_mpower >= 100000) { + } else if (active_mpower >= 96000) { if (with_dc) { if (mode == EC_AC_BEST_PERFORMANCE) { power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPL] = 85000; @@ -250,7 +250,7 @@ static void update_thermal_power_limit(int battery_percent, int active_mpower, thermal_stt_table = 30; } } - } else if ((active_mpower < 100000) && (active_mpower > 0)) { + } else if ((active_mpower < 96000) && (active_mpower > 0)) { if (with_dc) { power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPL] = 60000; power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPPT] = 60000; @@ -289,7 +289,7 @@ static void update_thermal_power_limit(int battery_percent, int active_mpower, power_limit[FUNCTION_SLIDER].mwatt[TYPE_FPPT]; power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_APU_ONLY_SPPT] = 0; thermal_stt_table = slider_stt_table; - } else if (active_mpower >= 100000) { + } else if (active_mpower >= 96000) { if (mode == EC_AC_BEST_PERFORMANCE) { power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPL] = 45000; power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPPT] = 54000; From b6ea31fbbd8db60ae0fa63a9a9171184e134a89f Mon Sep 17 00:00:00 2001 From: Filip Date: Tue, 20 May 2025 15:50:44 +0200 Subject: [PATCH 2/2] Apple's charger identifies itself as 94W --- zephyr/program/framework/lotus/src/cpu_power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zephyr/program/framework/lotus/src/cpu_power.c b/zephyr/program/framework/lotus/src/cpu_power.c index 6ea17d5666..4ed3333edf 100644 --- a/zephyr/program/framework/lotus/src/cpu_power.c +++ b/zephyr/program/framework/lotus/src/cpu_power.c @@ -216,7 +216,7 @@ static void update_thermal_power_limit(int battery_percent, int active_mpower, thermal_stt_table = 28; } } - } else if (active_mpower >= 96000) { + } else if (active_mpower >= 94000) { if (with_dc) { if (mode == EC_AC_BEST_PERFORMANCE) { power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPL] = 85000; @@ -250,7 +250,7 @@ static void update_thermal_power_limit(int battery_percent, int active_mpower, thermal_stt_table = 30; } } - } else if ((active_mpower < 96000) && (active_mpower > 0)) { + } else if ((active_mpower < 94000) && (active_mpower > 0)) { if (with_dc) { power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPL] = 60000; power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPPT] = 60000; @@ -289,7 +289,7 @@ static void update_thermal_power_limit(int battery_percent, int active_mpower, power_limit[FUNCTION_SLIDER].mwatt[TYPE_FPPT]; power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_APU_ONLY_SPPT] = 0; thermal_stt_table = slider_stt_table; - } else if (active_mpower >= 96000) { + } else if (active_mpower >= 94000) { if (mode == EC_AC_BEST_PERFORMANCE) { power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPL] = 45000; power_limit[FUNCTION_THERMAL_PMF].mwatt[TYPE_SPPT] = 54000;