Bug 27262

Summary: Missing support for ITE IT8728F chip
Product: Drivers Reporter: Ivan Bulatovic (combuster)
Component: Hardware MonitoringAssignee: Jean Delvare (jdelvare)
Status: RESOLVED CODE_FIX    
Severity: enhancement CC: chmooreck, florian, jy0610, kyle
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.37 Subsystem:
Regression: No Bisected commit-id:
Attachments: Patch for it8728 on 2.6.39-rc6
output from sensors after loading

Description Ivan Bulatovic 2011-01-21 14:02:30 UTC
I've checked the documentation for it87 module and for now it isn't supported. I'm running 2.6.37 kernel on Gigabyte H67MA-UD2H and i5-2400

modprobe it87
FATAL: Error inserting it87 (/lib/modules/2.6.37-INTEL/kernel/drivers/hwmon/it87.ko): No such device

Coretemp is working fine, latest snapshot of lm-sensors detects IT8728F but kernel support is missing.

Driver `it87':
  * ISA bus, address 0x290
    Chip `ITE IT8728F Super IO Sensors' (confidence: 9)

If you have any patches (work in progress) I'll be glad to test them.

Thanks.
Comment 1 Jean Delvare 2011-01-21 14:59:34 UTC
We currently don't have a datasheet for this chip. The chip itself isn't even listed on ITE's product page.
Comment 2 Jean Delvare 2011-01-21 15:04:38 UTC
I've added your request to lm-sensors's Device support status page:

http://www.lm-sensors.org/wiki/Devices
Comment 3 Peter 2011-04-08 10:34:32 UTC
speedfan guys got it working (http://jccsoft.com/software/6129-speedfan-443-final.html)
Maybe they could help ?
Comment 4 Peter 2011-04-08 10:35:45 UTC
http://www.almico.com/sfhistory.php
Comment 5 jy0610 2011-05-07 13:03:41 UTC
I've just bought a Gigabyte P67A-UD4-B3 with this chip

Support for this chip has been added to http://code.google.com/p/open-hardware-monitor/ too, and it's GPLv2

Reading the svn diff between r311 and r313, it seems the IT8721 was used as reference. I made similar changes to the it87.c and it recognized the chip. fan and temp sensors values looks right (Bios reporting same values), voltage values needs some more config. 

I'll attach the diff and the sensors output
Comment 6 jy0610 2011-05-07 13:05:59 UTC
Created attachment 56902 [details]
Patch for it8728 on 2.6.39-rc6
Comment 7 jy0610 2011-05-07 13:07:56 UTC
Created attachment 56912 [details]
output from sensors after loading

output from dmesg with debug enabled :
it87: Found IT8728F chip at 0x290, revision 0
it87: Beeping is supported
Comment 8 Kyle 2011-05-30 00:40:02 UTC
I can confirm that the patch in comment #6 appears to work just fine on my system.

The motherboard is a GA-Z68MX-UD2H-B3 and the patch cleanly applies to Ubuntu's 2.6.38-9 kernel tree.

Too bad we don't have a data sheet to know with absolute certainty that things are setup correctly, but a good start.
Comment 9 Jean Delvare 2011-06-10 08:29:05 UTC
(In reply to comment #3)
> speedfan guys got it working
> (http://jccsoft.com/software/6129-speedfan-443-final.html)
> Maybe they could help ?

Very unlikely. Every time I asked the author for help, he ignored me. I will try again, but I expect it to fail.
Comment 10 Jean Delvare 2011-06-10 08:38:38 UTC
(In reply to comment #6)
> Created an attachment (id=56902) [details]
> Patch for it8728 on 2.6.39-rc6

Note that this is equivalent to loading the it87 driver with parameter force_id=0x8721. So everyone can test, even without patching and rebuilding.
Comment 11 Jean Delvare 2011-06-10 09:14:48 UTC
I would appreciate if users with this chip could do more testing, before we add support to the it87 driver. Check list:

* Compare the values reported by the BIOS and the values reported by "sensors". Fan speeds and temperatures should match. If the BIOS reports fan speeds which "sensors" don't (or the other way around), that would indicate an incompatibility between IT8721F and IT8728F. For voltages, it's more complex because values above 2.5 V need a scaling factor, but at least all voltage values between 0 and 2.5 V in the BIOS should appear in the output of "sensors".

* Change the low and high limits of every voltage channel individually and check if the ALARM flag is set and cleared as expected. Any unexpected result here would also indicate an incompatibility. Do the same with the low limit of fan channels.

* Then test manual fan speed control. This is the more delicate part obviously. If nobody tests this successfully, we'll have to disable the feature completely until we get a datasheet.
Comment 12 Ivan Bulatovic 2011-06-10 21:21:51 UTC
Loaded it87 with force_id=0x8721 parameter and running sensors reported this:

 sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +41.0°C  (high = +80.0°C, crit = +99.0°C)
Core 0:         +34.0°C  (high = +80.0°C, crit = +99.0°C)
Core 1:         +40.0°C  (high = +80.0°C, crit = +99.0°C)
Core 2:         +35.0°C  (high = +80.0°C, crit = +99.0°C)
Core 3:         +41.0°C  (high = +80.0°C, crit = +99.0°C)

it8721-isa-0290
Adapter: ISA adapter
in0:          +1.06 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +1.49 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.98 V  (min =  +0.00 V, max =  +3.06 V)
+3.3V:        +3.38 V  (min =  +0.00 V, max =  +6.12 V)
in4:          +0.26 V  (min =  +0.00 V, max =  +1.00 V)
in5:          +1.02 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.38 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.17 V  
fan1:        1151 RPM  (min =   10 RPM)
fan2:           0 RPM  (min =    0 RPM)
temp1:        +39.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +36.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +30.0°C  (low  = +127.0°C, high = +80.0°C)  sensor = thermistor

I've recompiled kernel in one terminal and on the other monitored sensors output, fan speed is working ok (it was rising to 1600rpm for 90sec duration of recompiling), I've set cpu alarm on 80C in bios and that is reported correctly, but voltages seems to be way off (except Vbat) and 3.3V aren't showed in BIOS at all but it's reported in sensors.

I can contact Martin Malik (author of hwinfo), I've contacted him a while ago regarding hwinfo tweaking for my mainboard (H67MA-UD2H-B3).

Regarding voltage channel limits, where it is set, in BIOS or this should be done in lm_sensors somehow ? And how to test manual fan speed control ?
Comment 13 Ivan Bulatovic 2011-06-10 22:26:58 UTC
Regarding datasheet for IT8728F it looks like that signing NDA is required for obtaining one. So I seriously doubt that we could get our hands on one except through official ITE channels. Your thoughts on that one Jean ?
Comment 14 Ivan Bulatovic 2011-06-10 22:29:35 UTC
Oh and Martin said that obtaining one wouldn't help us much because voltage readings are mobo specific, I quote:

I'm not sure what kind of information you seek about this chip, but if you
need motherboard-specific adjustments for voltages for example, the
datasheet won't help you at all (because it depends on mobo manufacturer
what values for R1/R2 it decides to use for +5V/+12V rails, etc for a
particular mobo model).

And that is true since hwinfo changelogs are full of optimisations and support enhancements for specific mainboard models.
Comment 15 Jean Delvare 2011-06-11 08:19:09 UTC
(In reply to comment #12)
> but voltages seems to be way off (except Vbat) and 3.3V aren't showed in BIOS
> at all but it's reported in sensors.

This is expected, as almost every voltage input not labeled and scaled by the driver itself will require labeling and scaling in user-space (using a board-specific libsensors configuration file in /etc/sensors.d).

At least +3.3V, 3VSB and Vbat look good. in0, in1, in5 and in6 look reasonable but may require scaling for your board. in2 and in4 look respectively too high and too low to be actual readings, but I don't know if it means they don't exist in the chip or they are simply unused on your specific board.

What voltage values does the BIOS print? If some values oscillate, report them all.

> Regarding voltage channel limits, where it is set, in BIOS or this should be
> done in lm_sensors somehow ?

You can either add "set" statements in any file under /etc/sensors.d, for example:

chip "it8721-*"
   set in0_min 1.5

and run "sensors -s" as root to apply the change. Or you can go to /sys/devices/platform/it87.656 and write to attribute files directly (note that voltage values are in mV there, so "echo 15000 > in0_min" is the equivalent of the example configuration file above.)

> And how to test manual fan speed control ?

The easiest way is using the pwmconfig and fancontrol scripts.

(In reply to comment #13)
> Regarding datasheet for IT8728F it looks like that signing NDA is required
> for
> obtaining one. So I seriously doubt that we could get our hands on one except
> through official ITE channels. Your thoughts on that one Jean ?

I don't sign NDA, period. I'm working for free on the it87 driver. If ITE people don't want to give technical information to me, I can't support their chips and they'll start losing customers. Their problem, not mine.
Comment 16 Ivan Bulatovic 2011-06-11 16:51:42 UTC
in0, in1, in2 looks locked since they dont change at all when I compare them with and without heavy cpu/memory load. Here is comparison:

with heavy sys load:

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +61.0°C  (high = +80.0°C, crit = +99.0°C)
Core 0:         +56.0°C  (high = +80.0°C, crit = +99.0°C)
Core 1:         +61.0°C  (high = +80.0°C, crit = +99.0°C)
Core 2:         +56.0°C  (high = +80.0°C, crit = +99.0°C)
Core 3:         +58.0°C  (high = +80.0°C, crit = +99.0°C)

it8721-isa-0290
Adapter: ISA adapter
in0:          +1.06 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +1.49 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.98 V  (min =  +0.00 V, max =  +3.06 V)
+3.3V:        +3.36 V  (min =  +0.00 V, max =  +6.12 V)
in4:          +1.25 V  (min =  +0.00 V, max =  +1.00 V)  ALARM
in5:          +1.22 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.38 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.17 V  
fan1:        1480 RPM  (min =   10 RPM)
fan2:           0 RPM  (min =    0 RPM)
temp1:        +36.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +34.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +51.0°C  (low  = +127.0°C, high = +80.0°C)  sensor = thermistor

When idling:

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +40.0°C  (high = +80.0°C, crit = +99.0°C)
Core 0:         +35.0°C  (high = +80.0°C, crit = +99.0°C)
Core 1:         +40.0°C  (high = +80.0°C, crit = +99.0°C)
Core 2:         +33.0°C  (high = +80.0°C, crit = +99.0°C)
Core 3:         +38.0°C  (high = +80.0°C, crit = +99.0°C)

it8721-isa-0290
Adapter: ISA adapter
in0:          +1.06 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +1.49 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.98 V  (min =  +0.00 V, max =  +3.06 V)
+3.3V:        +3.38 V  (min =  +0.00 V, max =  +6.12 V)
in4:          +0.13 V  (min =  +0.00 V, max =  +1.00 V)
in5:          +1.01 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.38 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.17 V  
fan1:        1128 RPM  (min =   10 RPM)
fan2:           0 RPM  (min =    0 RPM)
temp1:        +37.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +35.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +30.0°C  (low  = +127.0°C, high = +80.0°C)  sensor = thermistor


I have only these readings in BIOS:

Vcore (1.248 - 1.260)
DRAM Voltage 1.524
+12V 12.221
Vtt 1.076
Fan speed: 1095rpm

Alarms are set and cleared on the values that change (fan speed, in4/5/3VSB) so that works as expected. Manual fan speed control also works great.

Regarding NDA signing, I wouldn't sign it either, so I agree with you on this 100%.
Comment 17 Florian Mickler 2012-01-21 16:37:31 UTC
A patch referencing this bug report has been merged in Linux v3.3-rc1:

commit 16b5dda22e3798e61bb008d2329d4f4d90ef764e
Author: Jean Delvare <khali@linux-fr.org>
Date:   Mon Jan 16 22:51:48 2012 +0100

    hwmon: (it87) Add IT8728F support
Comment 18 Ivan Bulatovic 2012-01-21 17:46:38 UTC
I can confirm this as fixed:

it8728-isa-0290
Adapter: ISA adapter
in0:          +1.06 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +1.48 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.98 V  (min =  +0.00 V, max =  +3.06 V)
+3.3V:        +3.38 V  (min =  +0.00 V, max =  +6.12 V)
in4:          +0.14 V  (min =  +0.00 V, max =  +1.00 V)
in5:          +1.12 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.38 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.07 V  
fan1:        1184 RPM  (min =   10 RPM)
fan2:           0 RPM  (min =    0 RPM)
temp1:        +40.0 C  (low  = +127.0 C, high = +127.0 C)  sensor = thermistor
temp2:        +40.0 C  (low  = +127.0 C, high = +127.0 C)  sensor = thermistor
temp3:        +34.0 C  (low  = +127.0 C, high = +80.0 C)  sensor = thermistor
intrusion0:  ALARM

But I have to manually load it87 module, cause sensors-detect doesn't pick it up:

Driver `to-be-written':
  * ISA bus, address 0x290
    Chip `ITE IT8728F Super IO Sensors' (confidence: 9)

When I multiply Vin2 with my mb multiplier I get 12.1V wich is ok. Thanx!
Comment 19 Jean Delvare 2012-01-21 18:17:48 UTC
An updated sensors-detect can be downloaded from:

http://dl.lm-sensors.org/lm-sensors/files/sensors-detect

Upcoming lm-sensors version 3.3.2 will include this fix.

The kernel part is done too, so closing this bug.
Comment 20 Ivan Bulatovic 2012-01-21 22:19:25 UTC
Ok, I don't know a better place for posting this but this should work for all GA H,P,Z 61/67 users with IT8728F chip (paste this to /etc/sensors3.conf)

chip "it8728-*"

    label in0 "Vtt"
    label in1 "+3.3V"
    label in2 "+12V"
    label in5 "Vcore"
    label in6 "Vdram"
    label in8 "Vbat"
    compute in1 1.649*@,@/1.649
    compute in2 4.090*@,@/4.090

Please note that in1 (+3.3V) is not present on all boards. Jean, please include this by default or link it to the wiki page for lm_sensors or advise me what is the best way for people to see this.
Comment 21 Jean Delvare 2012-01-22 08:09:21 UTC
There's a discussion list for the lm-sensors project where such information can be contributed, see:
http://www.lm-sensors.org/wiki/FeedbackAndSupport

We can't include these settings in the default configuration file as they are at least vendor-specific and possibly even board-specific. We also don't currently have a place for storing multi-board configuration hints as the above, although I presume we could put it at the bottom of:
http://www.lm-sensors.org/wiki/Configurations/Gigabyte

OTOH I wonder how you came to this conclusion. In my experience board vendors are sometimes very quick at changing the way they wire hardware monitoring chips. So our current approach is to simply add known-good configuration files for specific boards to the wiki, and tell users to try them as a base if they have a board which is similar enough (same vendor, same board series, same chipset).
Comment 22 Ivan Bulatovic 2012-01-22 11:21:08 UTC
A year ago, I've contacted Martin Malik, author of hwinfo, he gave me an info on multipliers for GA-67MA-UD2H and he said that quite often multipliers aren't the same for all GA boards even if they belong to the same series, but that as far as he knows those are common between certain models of P65/H61/H67 boards.

I don't even know why I've asked you to include this in sensors3.conf cause I was very well aware of this, but a link to the wiki page for GA-H67MA-UD2H (and possibly others, but we need users to test those) would be great.

I should however tweak those settings (regarding min/max values etc.) When I do I'll post them on the mailing list and I hope that other users can test/eventually enhance them and that they could be posted on the wiki page. I think I can get them done by this evening.

Thanks for all the hard work Jean, really appreciate it.