From c27c9db51b3f6dc345df338187efb326b4a25649 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Thu, 30 Oct 2025 16:04:52 -0500 Subject: [PATCH] mb/samsung/stumpy: Fix thermal configuration issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix multiple critical thermal management problems while preserving the quiet-at-idle design: - Overlapping temperature thresholds causing fan oscillations - CRITICAL_TEMPERATURE equal to Tj_max (no safety margin) - Multiple fan levels trying to activate simultaneously Issues fixed: 1. CRITICAL_TEMPERATURE: 100°C → 98°C - Was equal to Tj_max, leaving zero safety margin - System could reach absolute thermal limits before shutdown - 2°C margin allows clean shutdown before CPU thermal protection 2. Fix overlapping temperature thresholds (PRIMARY BUG) - Previous config had all fan levels overlapping: * FAN3: 48-55°C * FAN2: 52-64°C (started at 52°C, before FAN3 stopped at 55°C) * FAN1: 60-68°C (started at 60°C, before FAN2 stopped at 64°C) * FAN0: 66-78°C (started at 66°C, before FAN1 stopped at 68°C) - Multiple fan levels would try to activate simultaneously - Caused rapid fan speed oscillations and unpredictable behavior New configuration with proper discrete levels: * FAN3: 45-55°C * FAN2: 55-65°C (starts when FAN3 stops) * FAN1: 65-72°C (starts when FAN2 stops) * FAN0: 72-80°C (starts when FAN1 stops) 3. Increase PWM values for better cooling at each level: - FAN3: 0x40 → 0xA0 - FAN2: 0x80 → 0xB0 - FAN1: 0xb0 → 0xC0 - Provides more effective cooling progression Design philosophy: - Keep FAN4_PWM = 0x00 (fan OFF at idle) * Chromebox designed as quiet desktop device * Passive cooling adequate below 55°C * Silent operation at idle/light loads Configuration now follows best practices: - Silent at idle (fan OFF until >45-55°C) - No overlapping thresholds (discrete fan levels) - 8-10°C hysteresis (prevents oscillation) - Proper safety margin below Tj_max - Progressive PWM values for smooth transitions These changes fix the actual bugs (overlaps and safety margins) while maintaining the intended quiet operation at idle. TEST=build/boot stumpy, verify fan remains silent at idle, activates smoothly when needed, no oscillations, proper cooling maintained under load. Change-Id: I284cbe34348345589564ae77828b9beee0b0d9c0 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/89847 Tested-by: build bot (Jenkins) Reviewed-by: Sean Rhodes --- src/mainboard/samsung/stumpy/thermal.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mainboard/samsung/stumpy/thermal.h b/src/mainboard/samsung/stumpy/thermal.h index fa8a08ed75..bfefc36d36 100644 --- a/src/mainboard/samsung/stumpy/thermal.h +++ b/src/mainboard/samsung/stumpy/thermal.h @@ -3,33 +3,33 @@ #ifndef STUMPY_THERMAL_H #define STUMPY_THERMAL_H -/* Fan is OFF */ +/* Fan is OFF at idle (passive cooling) */ #define FAN4_THRESHOLD_OFF 0 #define FAN4_THRESHOLD_ON 0 #define FAN4_PWM 0x00 /* Fan is at LOW speed */ -#define FAN3_THRESHOLD_OFF 48 +#define FAN3_THRESHOLD_OFF 45 #define FAN3_THRESHOLD_ON 55 -#define FAN3_PWM 0x40 +#define FAN3_PWM 0xA0 /* Fan is at MEDIUM speed */ -#define FAN2_THRESHOLD_OFF 52 -#define FAN2_THRESHOLD_ON 64 -#define FAN2_PWM 0x80 +#define FAN2_THRESHOLD_OFF 55 +#define FAN2_THRESHOLD_ON 65 +#define FAN2_PWM 0xB0 /* Fan is at HIGH speed */ -#define FAN1_THRESHOLD_OFF 60 -#define FAN1_THRESHOLD_ON 68 -#define FAN1_PWM 0xb0 +#define FAN1_THRESHOLD_OFF 65 +#define FAN1_THRESHOLD_ON 72 +#define FAN1_PWM 0xC0 /* Fan is at FULL speed */ -#define FAN0_THRESHOLD_OFF 66 -#define FAN0_THRESHOLD_ON 78 +#define FAN0_THRESHOLD_OFF 72 +#define FAN0_THRESHOLD_ON 80 #define FAN0_PWM 0xff /* Temperature which OS will shutdown at */ -#define CRITICAL_TEMPERATURE 100 +#define CRITICAL_TEMPERATURE 98 /* Temperature which OS will throttle CPU */ #define PASSIVE_TEMPERATURE 90