summaryrefslogtreecommitdiff
path: root/board/brya/sensors.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/brya/sensors.c')
-rw-r--r--board/brya/sensors.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/board/brya/sensors.c b/board/brya/sensors.c
index bb51eb245b..4dffe00d7c 100644
--- a/board/brya/sensors.c
+++ b/board/brya/sensors.c
@@ -7,6 +7,7 @@
#include "adc_chip.h"
#include "temp_sensor.h"
+#include "thermal.h"
#include "thermistor.h"
/* ADC configuration */
@@ -44,3 +45,54 @@ const struct temp_sensor_t temp_sensors[] = {
},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
+
+/*
+ * TODO(b/180681346): update for Alder Lake/brya
+ *
+ * Tiger Lake specifies 100 C as maximum TDP temperature. THRMTRIP# occurs at
+ * 130 C. However, sensor is located next to DDR, so we need to use the lower
+ * DDR temperature limit (85 C)
+ */
+static const struct ec_thermal_config thermal_cpu = {
+ .temp_host = {
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(70),
+ [EC_TEMP_THRESH_HALT] = C_TO_K(80),
+ },
+ .temp_host_release = {
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(65),
+ },
+ .temp_fan_off = C_TO_K(35),
+ .temp_fan_max = C_TO_K(50),
+};
+
+/*
+ * TODO(b/180681346): update for Alder Lake/brya
+ *
+ * Inductor limits - used for both charger and PP3300 regulator
+ *
+ * Need to use the lower of the charger IC, PP3300 regulator, and the inductors
+ *
+ * Charger max recommended temperature 100C, max absolute temperature 125C
+ * PP3300 regulator: operating range -40 C to 145 C
+ *
+ * Inductors: limit of 125c
+ * PCB: limit is 80c
+ */
+static const struct ec_thermal_config thermal_inductor = {
+ .temp_host = {
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(75),
+ [EC_TEMP_THRESH_HALT] = C_TO_K(80),
+ },
+ .temp_host_release = {
+ [EC_TEMP_THRESH_HIGH] = C_TO_K(65),
+ },
+ .temp_fan_off = C_TO_K(40),
+ .temp_fan_max = C_TO_K(55),
+};
+
+/* this should really be "const" */
+struct ec_thermal_config thermal_params[] = {
+ [TEMP_SENSOR_1_DDR_SOC] = thermal_cpu,
+ [TEMP_SENSOR_2_CHARGER] = thermal_inductor,
+};
+BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);