summaryrefslogtreecommitdiff
path: root/board/careena/board.c
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2021-04-13 10:15:25 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-16 04:17:10 +0000
commit0d11b2f71e40e0147cc1dfc0a53b76758d318c77 (patch)
tree7d777ff99e2ae18758fb14e73b628da1084e3668 /board/careena/board.c
parent62b834032abdda092dd1fc4be437033807e3a4e3 (diff)
downloadchrome-ec-0d11b2f71e40e0147cc1dfc0a53b76758d318c77.tar.gz
careena: Add thermal protection
This patch adds thermal protection to prevent AP runaway. BUG=b:185082703 BRANCH=firmware-grunt-11031.B TEST=Verify thermal halt/alert as expected. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I4fccc93b0cb89a2e5d2784dfc0a41aa866f691f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2822269 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/careena/board.c')
-rw-r--r--board/careena/board.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/careena/board.c b/board/careena/board.c
index 082a47ab50..b674d9c90c 100644
--- a/board/careena/board.c
+++ b/board/careena/board.c
@@ -15,6 +15,7 @@
#include "pwm.h"
#include "pwm_chip.h"
#include "switch.h"
+#include "thermal.h"
#include "gpio_list.h"
@@ -46,6 +47,22 @@ const struct pwm_t pwm_channels[] = {
};
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
+struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT] = {
+ [TEMP_SENSOR_SOC] = {
+ .temp_host = {
+ [EC_TEMP_THRESH_WARN] = 0,
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(74),
+ [EC_TEMP_THRESH_HALT] = C_TO_K(79),
+ },
+ .temp_host_release = {
+ [EC_TEMP_THRESH_WARN] = 0,
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(71),
+ [EC_TEMP_THRESH_HALT] = 0,
+ },
+ },
+};
+BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);
+
#ifdef CONFIG_KEYBOARD_FACTORY_TEST
/*
* We have total 24 pins for keyboard connecter, {-1, -1} mean