diff options
-rw-r--r-- | baseboard/volteer/baseboard.c | 53 | ||||
-rw-r--r-- | board/boldar/board.c | 52 | ||||
-rw-r--r-- | board/delbin/board.c | 52 | ||||
-rw-r--r-- | board/eldrid/thermal.c | 54 | ||||
-rw-r--r-- | board/elemi/board.c | 52 | ||||
-rw-r--r-- | board/halvor/board.c | 52 | ||||
-rw-r--r-- | board/lindar/board.c | 52 | ||||
-rw-r--r-- | board/lingcod/board.c | 52 | ||||
-rw-r--r-- | board/malefor/board.c | 52 | ||||
-rw-r--r-- | board/terrador/board.c | 54 | ||||
-rw-r--r-- | board/todor/board.c | 54 | ||||
-rw-r--r-- | board/trondo/board.c | 52 | ||||
-rw-r--r-- | board/volteer/board.c | 52 | ||||
-rw-r--r-- | board/voxel/board.c | 52 |
14 files changed, 682 insertions, 53 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index c06306ec2c..f42bcba930 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -150,59 +150,6 @@ const struct temp_sensor_t temp_sensors[] = { BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); /******************************************************************************/ -/* EC thermal management configuration */ - -/* - * 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) - */ -const static 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), -}; - -/* - * 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 - */ -const static 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), -}; - - -struct ec_thermal_config thermal_params[] = { - [TEMP_SENSOR_1_CHARGER] = thermal_inductor, - [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, - [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, - [TEMP_SENSOR_4_FAN] = thermal_cpu, -}; -BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); - -/******************************************************************************/ - void tcpc_alert_event(enum gpio_signal signal) { /* TODO: b/140572591 - check correct operation for Volteer */ diff --git a/board/boldar/board.c b/board/boldar/board.c index fd81a8a0c5..1993b241fb 100644 --- a/board/boldar/board.c +++ b/board/boldar/board.c @@ -154,6 +154,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/delbin/board.c b/board/delbin/board.c index a1676e8298..b7a26b683b 100644 --- a/board/delbin/board.c +++ b/board/delbin/board.c @@ -147,6 +147,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/eldrid/thermal.c b/board/eldrid/thermal.c index ce36ce3860..2f4210c36c 100644 --- a/board/eldrid/thermal.c +++ b/board/eldrid/thermal.c @@ -17,6 +17,60 @@ #define CPUTS(outstr) cputs(CC_THERMAL, outstr) #define CPRINTS(format, args...) cprints(CC_THERMAL, format, ## args) + +/******************************************************************************/ +/* EC thermal management configuration */ +/* + * 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). + * TODO(b/170143672): Have different sensor placement. The temperature need to + * be changed. + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ struct fan_step { /* * Sensor 1~4 trigger point, set -1 if we're not using this diff --git a/board/elemi/board.c b/board/elemi/board.c index fd81a8a0c5..1993b241fb 100644 --- a/board/elemi/board.c +++ b/board/elemi/board.c @@ -154,6 +154,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/halvor/board.c b/board/halvor/board.c index 2167e1f959..fc12ccfb85 100644 --- a/board/halvor/board.c +++ b/board/halvor/board.c @@ -223,6 +223,58 @@ const struct pwm_t pwm_channels[] = { BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ void halvor_tcpc_alert_event(enum gpio_signal signal) { int port = -1; diff --git a/board/lindar/board.c b/board/lindar/board.c index 122baebe6f..a4e685a837 100644 --- a/board/lindar/board.c +++ b/board/lindar/board.c @@ -110,6 +110,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/lingcod/board.c b/board/lingcod/board.c index 57b0f7d3e4..28edcce5ae 100644 --- a/board/lingcod/board.c +++ b/board/lingcod/board.c @@ -244,6 +244,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/malefor/board.c b/board/malefor/board.c index 32c575a9c2..2532369dc8 100644 --- a/board/malefor/board.c +++ b/board/malefor/board.c @@ -245,6 +245,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/terrador/board.c b/board/terrador/board.c index 303f18f184..22a9b36eaa 100644 --- a/board/terrador/board.c +++ b/board/terrador/board.c @@ -163,6 +163,60 @@ const struct pwm_t pwm_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); +/******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ + static void kb_backlight_enable(void) { gpio_set_level(GPIO_EC_KB_BL_EN, 1); diff --git a/board/todor/board.c b/board/todor/board.c index 41c13c4509..6f189a7c33 100644 --- a/board/todor/board.c +++ b/board/todor/board.c @@ -189,6 +189,60 @@ const struct pwm_t pwm_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); +/******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ + static void kb_backlight_enable(void) { gpio_set_level(GPIO_EC_KB_BL_EN, 1); diff --git a/board/trondo/board.c b/board/trondo/board.c index de229342cf..58c74283e4 100644 --- a/board/trondo/board.c +++ b/board/trondo/board.c @@ -136,6 +136,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/volteer/board.c b/board/volteer/board.c index 8cc307a356..b8314d8a01 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -154,6 +154,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { diff --git a/board/voxel/board.c b/board/voxel/board.c index e028734c55..6f6b1824fb 100644 --- a/board/voxel/board.c +++ b/board/voxel/board.c @@ -102,6 +102,58 @@ const struct fan_t fans[FAN_CH_COUNT] = { }; /******************************************************************************/ +/* EC thermal management configuration */ + +/* + * 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) + */ +const static 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), +}; + +/* + * 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 + */ +const static 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), +}; + + +struct ec_thermal_config thermal_params[] = { + [TEMP_SENSOR_1_CHARGER] = thermal_inductor, + [TEMP_SENSOR_2_PP3300_REGULATOR] = thermal_inductor, + [TEMP_SENSOR_3_DDR_SOC] = thermal_cpu, + [TEMP_SENSOR_4_FAN] = thermal_cpu, +}; +BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +/******************************************************************************/ /* MFT channels. These are logically separate from pwm_channels. */ const struct mft_t mft_channels[] = { [MFT_CH_0] = { |