From b56fcfe9b5b49915c1ae00ac06421fca7a7e2308 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 6 Aug 2019 18:05:50 +0200 Subject: drivers/i2c/lm96000: Add more settings for fan control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow to set a lower temperature limit, as the currently hard-coded 25C may be to low for a given temperature sensor. Also enable smoo- thing, currently hard-coded to the maximum interval of 35s, and set the hysteresis value. Change-Id: I5fde1cf909e8fbbaf8a345790b00c58a73c19ef8 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/35475 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/drivers/i2c/lm96000/chip.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/drivers/i2c/lm96000/chip.h') diff --git a/src/drivers/i2c/lm96000/chip.h b/src/drivers/i2c/lm96000/chip.h index ab782dbbb5..cbf8601146 100644 --- a/src/drivers/i2c/lm96000/chip.h +++ b/src/drivers/i2c/lm96000/chip.h @@ -93,6 +93,7 @@ struct lm96000_fan_config { }; struct lm96000_temp_zone { + u8 low_temp; /* temperature for min. duty cycle (in °C) */ u8 target_temp; /* temperature for 100% duty cycle (in °C) */ u8 panic_temp; /* temperature for 100% duty cycle on all fans */ @@ -100,9 +101,12 @@ struct lm96000_temp_zone { with. (Datasheet clearly states the opposite, that this is tied to each PWM output so YMMV.) */ enum { - LM96000_LOW_TEMP_OFF = 0, /* turn fan off below low temp. */ - LM96000_LOW_TEMP_MIN = 1, /* keep PWM at mininum duty cycle */ + /* turn fan off below `low_temp - hysteresis` */ + LM96000_LOW_TEMP_OFF = 0, + /* keep PWM at mininum duty cycle */ + LM96000_LOW_TEMP_MIN = 1, } min_off; + u8 hysteresis; }; /* Implements only those parts currently used by coreboot mainboards. */ -- cgit v1.2.3