summaryrefslogtreecommitdiff
path: root/board/berknip
diff options
context:
space:
mode:
authorZick Wei <zick.wei@quanta.corp-partner.google.com>2020-08-25 18:15:55 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-02 22:07:14 +0000
commit9ca75e89ce2d4af265d8f34f20d5892680bfa38d (patch)
tree4ec36d0f42976e0b0f422f02880ac0d2626d1ea2 /board/berknip
parent1d90e9b97bc5abd63c5731d6cae1862b532431a8 (diff)
downloadchrome-ec-9ca75e89ce2d4af265d8f34f20d5892680bfa38d.tar.gz
berknip: update thermal table
This patch update fan curve and thermal protect point. BUG=b:161470415 BRANCH=zork TEST=verify fan curve and thermal protect behavior as expected Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I842494acc62446be81b6df0f857c0e65e65380ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2389720 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/berknip')
-rw-r--r--board/berknip/board.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/board/berknip/board.c b/board/berknip/board.c
index 5e1e0ece7c..c3ac5de4fc 100644
--- a/board/berknip/board.c
+++ b/board/berknip/board.c
@@ -464,7 +464,19 @@ const struct temp_sensor_t temp_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
-const static struct ec_thermal_config thermal_thermistor_0 = {
+const static struct ec_thermal_config thermal_thermistor_soc = {
+ .temp_host = {
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(70),
+ [EC_TEMP_THRESH_HALT] = C_TO_K(73),
+ },
+ .temp_host_release = {
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(65),
+ },
+ .temp_fan_off = C_TO_K(39),
+ .temp_fan_max = C_TO_K(60),
+};
+
+const static struct ec_thermal_config thermal_thermistor_charger = {
.temp_host = {
[EC_TEMP_THRESH_HIGH] = C_TO_K(99),
[EC_TEMP_THRESH_HALT] = C_TO_K(99),
@@ -472,17 +484,17 @@ const static struct ec_thermal_config thermal_thermistor_0 = {
.temp_host_release = {
[EC_TEMP_THRESH_HIGH] = C_TO_K(98),
},
- .temp_fan_off = C_TO_K(37),
- .temp_fan_max = C_TO_K(70),
+ .temp_fan_off = C_TO_K(98),
+ .temp_fan_max = C_TO_K(99),
};
-const static struct ec_thermal_config thermal_thermistor_1 = {
+const static struct ec_thermal_config thermal_thermistor_5v = {
.temp_host = {
- [EC_TEMP_THRESH_HIGH] = C_TO_K(99),
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(60),
[EC_TEMP_THRESH_HALT] = C_TO_K(99),
},
.temp_host_release = {
- [EC_TEMP_THRESH_HIGH] = C_TO_K(98),
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(50),
},
.temp_fan_off = C_TO_K(98),
.temp_fan_max = C_TO_K(99),
@@ -490,11 +502,11 @@ const static struct ec_thermal_config thermal_thermistor_1 = {
const static struct ec_thermal_config thermal_cpu = {
.temp_host = {
- [EC_TEMP_THRESH_HIGH] = C_TO_K(90),
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(100),
[EC_TEMP_THRESH_HALT] = C_TO_K(105),
},
.temp_host_release = {
- [EC_TEMP_THRESH_HIGH] = C_TO_K(80),
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(99),
},
.temp_fan_off = C_TO_K(105),
.temp_fan_max = C_TO_K(105),
@@ -509,13 +521,13 @@ struct fan_step {
};
static const struct fan_step fan_table0[] = {
- {.on = 0, .off = 3, .rpm = 0},
- {.on = 18, .off = 3, .rpm = 3700},
- {.on = 33, .off = 12, .rpm = 4000},
- {.on = 48, .off = 24, .rpm = 4500},
- {.on = 64, .off = 36, .rpm = 4800},
- {.on = 85, .off = 48, .rpm = 5200},
- {.on = 100, .off = 70, .rpm = 6200},
+ {.on = 0, .off = 5, .rpm = 0},
+ {.on = 29, .off = 5, .rpm = 3700},
+ {.on = 38, .off = 19, .rpm = 4000},
+ {.on = 48, .off = 33, .rpm = 4500},
+ {.on = 62, .off = 43, .rpm = 4800},
+ {.on = 76, .off = 52, .rpm = 5200},
+ {.on = 100, .off = 67, .rpm = 6200},
};
/* All fan tables must have the same number of levels */
#define NUM_FAN_LEVELS ARRAY_SIZE(fan_table0)
@@ -565,9 +577,10 @@ int fan_percent_to_rpm(int fan, int pct)
static void setup_fans(void)
{
- thermal_params[TEMP_SENSOR_CHARGER] = thermal_thermistor_1;
- thermal_params[TEMP_SENSOR_SOC] = thermal_thermistor_0;
+ thermal_params[TEMP_SENSOR_CHARGER] = thermal_thermistor_charger;
+ thermal_params[TEMP_SENSOR_SOC] = thermal_thermistor_soc;
thermal_params[TEMP_SENSOR_CPU] = thermal_cpu;
+ thermal_params[TEMP_SENSOR_5V_REGULATOR] = thermal_thermistor_5v;
}
DECLARE_HOOK(HOOK_INIT, setup_fans, HOOK_PRIO_DEFAULT);