From 4a6bb8c6dd2f26cb44a7475f6e0d834d80c92b54 Mon Sep 17 00:00:00 2001 From: Ridden_Liu Date: Tue, 8 Mar 2022 16:36:38 +0800 Subject: Banshee: Implement fan table Modify the fan rpm min/max/start value. And modify the fan temperature setting. BUG=b:223492897 BRANCH=none TEST=make -j BOARD=banshee. Verify critical temperature of three sensors. Verify max/min of rpm. Signed-off-by: Ridden_Liu Change-Id: I0f9745efcea10677400be5aa9d4db6eda14f0041 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508984 Reviewed-by: Boris Mittelberg Reviewed-by: Elthan Huang Tested-by: Elthan Huang Reviewed-by: caveh jalali Commit-Queue: caveh jalali --- board/banshee/fans.c | 6 +++--- board/banshee/sensors.c | 36 +++++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/board/banshee/fans.c b/board/banshee/fans.c index 27f5bca929..73bd0dcd77 100644 --- a/board/banshee/fans.c +++ b/board/banshee/fans.c @@ -38,9 +38,9 @@ static const struct fan_conf fan_conf_0 = { * boards as well. */ static const struct fan_rpm fan_rpm_0 = { - .rpm_min = 2200, - .rpm_start = 2200, - .rpm_max = 4200, + .rpm_min = 1800, + .rpm_start = 1800, + .rpm_max = 6800, }; const struct fan_t fans[FAN_CH_COUNT] = { diff --git a/board/banshee/sensors.c b/board/banshee/sensors.c index b742da635d..457c243796 100644 --- a/board/banshee/sensors.c +++ b/board/banshee/sensors.c @@ -212,14 +212,16 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); #define THERMAL_CPU \ { \ .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(85), \ - [EC_TEMP_THRESH_HALT] = C_TO_K(90), \ + [EC_TEMP_THRESH_WARN] = C_TO_K(80), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(90), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(100), \ }, \ .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(80), \ + [EC_TEMP_THRESH_WARN] = C_TO_K(75), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(81), \ }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(60), \ + .temp_fan_off = C_TO_K(40), \ + .temp_fan_max = C_TO_K(58), \ } __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; @@ -242,14 +244,16 @@ __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; #define THERMAL_AMBIENT \ { \ .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(85), \ - [EC_TEMP_THRESH_HALT] = C_TO_K(90), \ + [EC_TEMP_THRESH_WARN] = C_TO_K(85), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(95), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(105), \ }, \ .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(80), \ + [EC_TEMP_THRESH_WARN] = C_TO_K(70), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(86), \ }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(60), \ + .temp_fan_off = C_TO_K(40), \ + .temp_fan_max = C_TO_K(58), \ } __maybe_unused static const struct ec_thermal_config thermal_ambient = THERMAL_AMBIENT; @@ -271,14 +275,16 @@ __maybe_unused static const struct ec_thermal_config thermal_ambient = #define THERMAL_CHARGER \ { \ .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(105), \ - [EC_TEMP_THRESH_HALT] = C_TO_K(120), \ + [EC_TEMP_THRESH_WARN] = C_TO_K(90), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(100), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(110), \ }, \ .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(90), \ + [EC_TEMP_THRESH_WARN] = C_TO_K(85), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(91), \ }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(65), \ + .temp_fan_off = C_TO_K(40), \ + .temp_fan_max = C_TO_K(58), \ } __maybe_unused static const struct ec_thermal_config thermal_charger = THERMAL_CHARGER; -- cgit v1.2.1