diff options
-rw-r--r-- | board/osiris/fans.c | 46 | ||||
-rw-r--r-- | board/osiris/sensors.c | 99 |
2 files changed, 20 insertions, 125 deletions
diff --git a/board/osiris/fans.c b/board/osiris/fans.c index 27f5bca929..fa5a8dc09a 100644 --- a/board/osiris/fans.c +++ b/board/osiris/fans.c @@ -31,16 +31,16 @@ static const struct fan_conf fan_conf_0 = { }; /* - * TOOD(b/181271666): thermistor placement and calibration + * TODO(b/234545460): thermistor placement and calibration * * Prototype fan spins at about 4200 RPM at 100% PWM, this * is specific to board ID 2 and might also apears in later * boards as well. */ static const struct fan_rpm fan_rpm_0 = { - .rpm_min = 2200, - .rpm_start = 2200, - .rpm_max = 4200, + .rpm_min = 3000, + .rpm_start = 3000, + .rpm_max = 6000, }; const struct fan_t fans[FAN_CH_COUNT] = { @@ -49,41 +49,3 @@ const struct fan_t fans[FAN_CH_COUNT] = { .rpm = &fan_rpm_0, }, }; - -#ifndef CONFIG_FANS - -/* - * TODO(b/181271666): use static fan speeds until fan and sensors are - * tuned. for now, use: - * - * AP off: 33% - * AP on: 100% - */ - -static void fan_slow(void) -{ - const int duty_pct = 33; - - ccprints("%s: speed %d%%", __func__, duty_pct); - - pwm_enable(PWM_CH_FAN, 1); - pwm_set_duty(PWM_CH_FAN, duty_pct); -} - -static void fan_max(void) -{ - const int duty_pct = 100; - - ccprints("%s: speed %d%%", __func__, duty_pct); - - pwm_enable(PWM_CH_FAN, 1); - pwm_set_duty(PWM_CH_FAN, duty_pct); -} - -DECLARE_HOOK(HOOK_INIT, fan_slow, HOOK_PRIO_DEFAULT); -DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, fan_slow, HOOK_PRIO_DEFAULT); -DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, fan_slow, HOOK_PRIO_DEFAULT); -DECLARE_HOOK(HOOK_CHIPSET_RESET, fan_max, HOOK_PRIO_FIRST); -DECLARE_HOOK(HOOK_CHIPSET_RESUME, fan_max, HOOK_PRIO_DEFAULT); - -#endif /* CONFIG_FANS */ diff --git a/board/osiris/sensors.c b/board/osiris/sensors.c index 08ed297f5a..e02bee6a20 100644 --- a/board/osiris/sensors.c +++ b/board/osiris/sensors.c @@ -63,11 +63,9 @@ const struct temp_sensor_t temp_sensors[] = { BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); /* - * TODO(b/180681346): update for Alder Lake/brya + * TODO(b/234545460): update for Alder Lake/brya * - * Alder 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) + * temperature limit, See thermal table in b/234545460#comment2 */ /* * TODO(b/202062363): Remove when clang is fixed. @@ -75,101 +73,36 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); #define THERMAL_CPU \ { \ .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(85), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(78), \ [EC_TEMP_THRESH_HALT] = C_TO_K(90), \ }, \ .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(80), \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(75), \ }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(60), \ + .temp_fan_off = C_TO_K(25), \ + .temp_fan_max = C_TO_K(89), \ } __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; -/* - * 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 - */ -/* - * TODO(b/202062363): Remove when clang is fixed. - */ -#define THERMAL_AMBIENT \ - { \ - .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(85), \ - [EC_TEMP_THRESH_HALT] = C_TO_K(90), \ - }, \ - .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(80), \ - }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(60), \ - } -__maybe_unused static const struct ec_thermal_config thermal_ambient = - THERMAL_AMBIENT; - -/* - * 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 125C, max absolute temperature 150C - * PP3300 regulator: operating range -40 C to 125 C - * - * Inductors: limit of 125c - * PCB: limit is 80c - */ -/* - * TODO(b/202062363): Remove when clang is fixed. - */ -#define THERMAL_CHARGER \ - { \ - .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(105), \ - [EC_TEMP_THRESH_HALT] = C_TO_K(120), \ - }, \ - .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(90), \ - }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(65), \ - } -__maybe_unused static const struct ec_thermal_config thermal_charger = - THERMAL_CHARGER; -/* - * TODO(b/180681346): update for brya WWAN module - */ -/* - * TODO(b/202062363): Remove when clang is fixed. - */ -#define THERMAL_WWAN \ +#define THERMAL_UNUSED \ { \ .temp_host = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(130), \ - [EC_TEMP_THRESH_HALT] = C_TO_K(130), \ + [EC_TEMP_THRESH_HIGH] = 0, \ + [EC_TEMP_THRESH_HALT] = 0, \ }, \ .temp_host_release = { \ - [EC_TEMP_THRESH_HIGH] = C_TO_K(100), \ + [EC_TEMP_THRESH_HIGH] = 0, \ }, \ - .temp_fan_off = C_TO_K(35), \ - .temp_fan_max = C_TO_K(60), \ + .temp_fan_off = 0, \ + .temp_fan_max = 0, \ } -__maybe_unused static const struct ec_thermal_config thermal_wwan = - THERMAL_WWAN; +__maybe_unused static const struct ec_thermal_config thermal_unused = + THERMAL_UNUSED; struct ec_thermal_config thermal_params[] = { [TEMP_SENSOR_1_DDR_SOC] = THERMAL_CPU, - [TEMP_SENSOR_2_AMBIENT] = THERMAL_AMBIENT, - [TEMP_SENSOR_3_CHARGER] = THERMAL_CHARGER, + [TEMP_SENSOR_2_AMBIENT] = THERMAL_UNUSED, + [TEMP_SENSOR_3_CHARGER] = THERMAL_UNUSED, }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); |