it87: Add support for the IT8716F
Subsystems (3)
PATCH 1/5 it87: Add support for the IT8716F
it87: Add support for the IT8716F
The IT8716F is a Super-I/O chip with integrated hardware monitoring functions. It is very similar to the IT8712F, so adding support to the it87 driver was pretty straightforward. The most significant change here is that the IT8716F has 16-bit fan speed counters, so the user no more needs to tweak the fan clock dividers to get the best readings.
Userspace support is already in lm_sensors SVN (to be soon released as 2.10.1.)
Thanks to Stian Oksavik for testing the early versions of this patch.
--- Documentation/hwmon/it87 | 40 ++++++++++---- drivers/hwmon/Kconfig | 4 drivers/hwmon/it87.c | 127 +++++++++++++++++++++++++++++++++++++--------- 3 files changed, 134 insertions(+), 37 deletions(-)
Documentation/hwmon/it87 +29 -11
@@ -13,6 +13,11 @@ from Super I/O config space (8 I/O ports) Datasheet: Publicly available at the ITE website http://www.ite.com.tw/ + * IT8716F + Prefix: 'it8716' + Addresses scanned: from Super I/O config space (8 I/O ports) + Datasheet: Publicly available at the ITE website + http://www.ite.com.tw/product_info/file/pc/IT8716F_V0.3.ZIP * SiS950 [clone of IT8705F] Prefix: 'it87' Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -43,26 +48,39 @@ Description ----------- -This driver implements support for the IT8705F, IT8712F and SiS950 chips. - -This driver also supports IT8712F, which adds SMBus access, and a VID -input, used to report the Vcore voltage of the Pentium processor. -The IT8712F additionally features VID inputs. +This driver implements support for the IT8705F, IT8712F, IT8716F and +SiS950 chips. These chips are 'Super I/O chips', supporting floppy disks, infrared ports, joysticks and other miscellaneous stuff. For hardware monitoring, they include an 'environment controller' with 3 temperature sensors, 3 fan rotation speed sensors, 8 voltage sensors, and associated alarms. +The IT8712F and IT8716F additionally feature VID inputs, used to report +the Vcore voltage of the processor. The early IT8712F have 5 VID pins, +the IT8716F and late IT8712F have 6. They are shared with other functions +though, so the functionality may not be available on a given system. +The driver dumbly assume it is there. + +The IT8716F and later IT8712F revisions have support for 2 additional +fans. They are not yet supported by the driver. + +The IT8716F and late IT8712F and IT8705F also have optional 16-bit +tachometer counters for fans 1 to 3. This is better (no more fan +clock divider mess) but not compatible with the older chips and +revisions. For now, the driver only uses the 16-bit mode on the +IT8716F, and only if the chip was so configured. + Temperatures are measured in degrees Celsius. An alarm is triggered once when the Overtemperature Shutdown limit is crossed. Fan rotation speeds are reported in RPM (rotations per minute). An alarm is -triggered if the rotation speed has dropped below a programmable limit. Fan -readings can be divided by a programmable divider (1, 2, 4 or 8) to give the -readings more range or accuracy. Not all RPM values can accurately be -represented, so some rounding is done. With a divider of 2, the lowest -representable value is around 2600 RPM. +triggered if the rotation speed has dropped below a programmable limit. When +16-bit tachometer counters aren't use, fan readings can be divided by +a programmable divider (1, 2, 4 or 8) to give the readings more range or +accuracy. With a divider of 2, the lowest representable value is around +2600 RPM. Not all RPM values can accurately be represented, so some rounding +is done. Voltage sensors (also known as IN sensors) report their values in volts. An alarm is triggered if the voltage has crossed a programmable minimum or
@@ -71,7 +89,7 @@ inputs can measure voltages between 0 and 4.08 volts, with a resolution of 0.016 volt. The battery voltage in8 does not have limit registers. -The VID lines (IT8712F only) encode the core voltage value: the voltage +The VID lines (IT8712F/IT8716F) encode the core voltage value: the voltage level your processor should work with. This is hardcoded by the mainboard and/or processor itself. It is a value in volts.
drivers/hwmon/it87.c +90 -16
211 lines not on this page · raw message
}
- i = it87_read_value(client, IT87_REG_FAN_DIV);
- data->fan_div[0] = i & 0x07;
- data->fan_div[1] = (i >> 3) & 0x07;
- data->fan_div[2] = (i & 0x40) ? 3 : 1;
+ /* If at least one fan isn't in 16-bit tachometer mode, we
+ need the clock divider values */
+ if (~data->fan16 & 0x07) {
+ i = it87_read_value(client, IT87_REG_FAN_DIV);
+ data->fan_div[0] = i & 0x07;
+ data->fan_div[1] = (i >> 3) & 0x07;
+ data->fan_div[2] = (i & 0x40) ? 3 : 1;
+ }
data->alarms it87_read_value(client, IT87_REG_ALARM1) |
@@ -1152,9 +1229,11 @@
data->sensor = it87_read_value(client, IT87_REG_TEMP_ENABLE); /* The 8705 does not have VID capability */
- if (data->type = it8712) {
+ if (data->type = it8712 || data->type = it8716) {
data->vid = it87_read_value(client, IT87_REG_VID);
- data->vid &= 0x1f;
+ /* The older IT8712F revisions had only 5 VID pins,
+ but we assume it is always safe to read 6 bits. */
+ data->vid &= 0x3f;
}
data->last_updated = jiffies;
data->valid = 1;
@@ -1193,7 +1272,7 @@
MODULE_AUTHOR("Chris Gauthron <chrisg at 0-in.com>");
-MODULE_DESCRIPTION("IT8705F, IT8712F, Sis950 driver"); +MODULE_DESCRIPTION("IT8705F/8712F/8716F, SiS950 driver");
module_param(update_vbat, bool, 0);
MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value"); module_param(fix_pwm_polarity, bool, 0);
drivers/hwmon/Kconfig +2 -2
@@ -186,8 +186,8 @@ select I2C_ISA select HWMON_VID help - If you say yes here you get support for ITE IT87xx sensor chips - and clones: SiS960. + If you say yes here you get support for ITE IT8705F, IT8712F and + IT8716F sensor chips, and the SiS960 clone. This driver can also be built as a module. If so, the module will be called it87.
Signature · 1 line
Jean Delvare