summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/magolor/board.c25
-rw-r--r--board/magolor/board.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/board/magolor/board.c b/board/magolor/board.c
index 4335141881..c2e510af1b 100644
--- a/board/magolor/board.c
+++ b/board/magolor/board.c
@@ -129,6 +129,28 @@ const struct temp_sensor_t temp_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
+
+const static struct ec_thermal_config thermal_a = {
+ .temp_host = {
+ [EC_TEMP_THRESH_WARN] = 0,
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(73),
+ [EC_TEMP_THRESH_HALT] = C_TO_K(80),
+ },
+ .temp_host_release = {
+ [EC_TEMP_THRESH_WARN] = 0,
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(65),
+ [EC_TEMP_THRESH_HALT] = 0,
+ },
+};
+
+struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT];
+
+static void setup_thermal(void)
+{
+ thermal_params[TEMP_SENSOR_1] = thermal_a;
+ thermal_params[TEMP_SENSOR_2] = thermal_a;
+}
+
void board_init(void)
{
int on;
@@ -141,6 +163,9 @@ void board_init(void)
/* Turn on 5V if the system is on, otherwise turn it off. */
on = chipset_in_state(CHIPSET_STATE_ON | CHIPSET_STATE_ANY_SUSPEND);
board_power_5v_enable(on);
+
+ /* Initialize THERMAL */
+ setup_thermal();
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
diff --git a/board/magolor/board.h b/board/magolor/board.h
index 102b9b37a5..f875e172ac 100644
--- a/board/magolor/board.h
+++ b/board/magolor/board.h
@@ -11,6 +11,7 @@
#define VARIANT_DEDEDE_EC_NPCX796FC
#include "baseboard.h"
+#define CONFIG_USB_PD_DEBUG_LEVEL 2
/* this change saves 1656 bytes of RW flash space */
#define CONFIG_CHIP_INIT_ROM_REGION
@@ -50,6 +51,7 @@
/* Temp sensor */
#define CONFIG_TEMP_SENSOR
+#define CONFIG_THROTTLE_AP
#define CONFIG_THERMISTOR_NCP15WB
#define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B