summaryrefslogtreecommitdiff
path: root/board/strago/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/strago/board.c')
-rw-r--r--board/strago/board.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/board/strago/board.c b/board/strago/board.c
index bfd574d5cf..586eac8552 100644
--- a/board/strago/board.c
+++ b/board/strago/board.c
@@ -4,6 +4,7 @@
*/
/* Strago board-specific configuration */
+#include "driver/temp_sensor/tmp432.h"
#include "extpower.h"
#include "gpio.h"
#include "i2c.h"
@@ -11,6 +12,9 @@
#include "power.h"
#include "power_button.h"
#include "registers.h"
+#include "temp_sensor.h"
+#include "temp_sensor_chip.h"
+#include "thermal.h"
#include "util.h"
#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP)
@@ -35,3 +39,28 @@ const struct i2c_port_t i2c_ports[] = {
{"thermal", 3, 100}
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+
+/*
+ * Temperature sensors data; must be in same order as enum temp_sensor_id.
+ * Sensor index and name must match those present in coreboot:
+ * src/mainboard/google/${board}/acpi/dptf.asl
+ */
+const struct temp_sensor_t temp_sensors[] = {
+ {"TMP432_Internal", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
+ TMP432_IDX_LOCAL, 4},
+ {"TMP432_Sensor_1", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
+ TMP432_IDX_REMOTE1, 4},
+ {"TMP432_Sensor_2", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
+ TMP432_IDX_REMOTE2, 4},
+};
+BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
+
+/* Thermal limits for each temp sensor. All temps are in degrees K. Must be in
+ * same order as enum temp_sensor_id. To always ignore any temp, use 0.
+ */
+struct ec_thermal_config thermal_params[] = {
+ {{0, 0, 0}, 0, 0}, /* TMP432_Internal */
+ {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_1 */
+ {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_2 */
+};
+BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);