summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2022-04-06 11:35:15 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-11 08:57:23 +0000
commit76f3e5ad39745d82b2e2cb1febe5ac6b5d4fa367 (patch)
tree273272ffb9b2679caf2a99c0e9349e2b1f5d9708
parentce5ca00b634dc152a05b2de469187d6bc3729c51 (diff)
downloadchrome-ec-76f3e5ad39745d82b2e2cb1febe5ac6b5d4fa367.tar.gz
vell: Update fan table version 3
BUG=b:216026302 BRANCH=none TEST=Thermal team verified thermal policy is expected. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I4dccd252fe8bfe0c545508da09ac8a9570ddd6bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577326 Reviewed-by: Boris Mittelberg <bmbm@google.com>
-rw-r--r--board/vell/thermal.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/board/vell/thermal.c b/board/vell/thermal.c
index 00b3e2ae9a..e72b86e3b1 100644
--- a/board/vell/thermal.c
+++ b/board/vell/thermal.c
@@ -19,13 +19,13 @@
struct fan_step {
/*
- * Sensor 1~4 trigger point, set -1 if we're not using this
+ * Sensor 1~5 trigger point, set -1 if we're not using this
* sensor to determine fan speed.
*/
int8_t on[TEMP_SENSOR_COUNT];
/*
- * Sensor 1~4 trigger point, set -1 if we're not using this
+ * Sensor 1~5 trigger point, set -1 if we're not using this
* sensor to determine fan speed.
*/
int8_t off[TEMP_SENSOR_COUNT];
@@ -37,32 +37,26 @@ struct fan_step {
static const struct fan_step fan_table[] = {
{
/* level 0 */
- .on = {49, 60, -1, 50, -1},
- .off = {99, 99, -1, 99, -1},
+ .on = {48, 60, 48, 47, -1},
+ .off = {99, 99, 99, 99, -1},
.rpm = {0},
},
{
/* level 1 */
- .on = {50, 60, -1, 51, -1},
- .off = {48, 99, -1, 49, -1},
- .rpm = {3400},
+ .on = {50, 60, 50, 49, -1},
+ .off = {47, 99, 47, 46, -1},
+ .rpm = {3600},
},
{
/* level 2 */
- .on = {52, 60, -1, 53, -1},
- .off = {49, 99, -1, 50, -1},
- .rpm = {4000},
+ .on = {53, 60, 53, 52, -1},
+ .off = {49, 99, 49, 48, -1},
+ .rpm = {4100},
},
{
/* level 3 */
- .on = {54, 64, -1, 55, -1},
- .off = {51, 59, -1, 52, -1},
- .rpm = {4450},
- },
- {
- /* level 4 */
- .on = {100, 100, -1, 100, -1},
- .off = {53, 63, -1, 54, -1},
+ .on = {100, 100, 100, 100, -1},
+ .off = {51, 59, 51, 50, -1},
.rpm = {5500},
},
};
@@ -84,14 +78,17 @@ static int fan_table_to_rpm(int fan, int *temp)
*/
if (temp[TEMP_SENSOR_1_SOC] < prev_tmp[TEMP_SENSOR_1_SOC] ||
temp[TEMP_SENSOR_2_CHARGER] < prev_tmp[TEMP_SENSOR_2_CHARGER] ||
+ temp[TEMP_SENSOR_3_WWAN] < prev_tmp[TEMP_SENSOR_3_WWAN] ||
temp[TEMP_SENSOR_4_DDR] < prev_tmp[TEMP_SENSOR_4_DDR]) {
for (i = current_level; i > 0; i--) {
if (temp[TEMP_SENSOR_1_SOC] <
fan_table[i].off[TEMP_SENSOR_1_SOC] &&
- temp[TEMP_SENSOR_4_DDR] <
- fan_table[i].off[TEMP_SENSOR_4_DDR] &&
temp[TEMP_SENSOR_2_CHARGER] <
- fan_table[i].off[TEMP_SENSOR_2_CHARGER])
+ fan_table[i].off[TEMP_SENSOR_2_CHARGER] &&
+ temp[TEMP_SENSOR_3_WWAN] <
+ fan_table[i].off[TEMP_SENSOR_3_WWAN] &&
+ temp[TEMP_SENSOR_4_DDR] <
+ fan_table[i].off[TEMP_SENSOR_4_DDR])
current_level = i - 1;
else
break;
@@ -99,15 +96,19 @@ static int fan_table_to_rpm(int fan, int *temp)
} else if (temp[TEMP_SENSOR_1_SOC] > prev_tmp[TEMP_SENSOR_1_SOC] ||
temp[TEMP_SENSOR_2_CHARGER] >
prev_tmp[TEMP_SENSOR_2_CHARGER] ||
+ temp[TEMP_SENSOR_3_WWAN] >
+ prev_tmp[TEMP_SENSOR_3_WWAN] ||
temp[TEMP_SENSOR_4_DDR] >
prev_tmp[TEMP_SENSOR_4_DDR]) {
for (i = current_level; i < NUM_FAN_LEVELS; i++) {
if (temp[TEMP_SENSOR_1_SOC] >
fan_table[i].on[TEMP_SENSOR_1_SOC] ||
+ (temp[TEMP_SENSOR_2_CHARGER] >
+ fan_table[i].on[TEMP_SENSOR_2_CHARGER] &&
+ temp[TEMP_SENSOR_3_WWAN] >
+ fan_table[i].on[TEMP_SENSOR_3_WWAN]) ||
temp[TEMP_SENSOR_4_DDR] >
- fan_table[i].on[TEMP_SENSOR_4_DDR] ||
- temp[TEMP_SENSOR_2_CHARGER] >
- fan_table[i].on[TEMP_SENSOR_2_CHARGER])
+ fan_table[i].on[TEMP_SENSOR_4_DDR])
current_level = i + 1;
else
break;