hwmon (nct6775): Please fix Invalid temperature source error for NCT6798D
Hi,
I'm facing the same problem. I did some research on my machine.
Quoted 4 lines · Guenter Roeck
There is nothing much if anything we can do about that. The NCT6798D datasheet reports temperature source 28 as reserved. You could ask Asus for support, but their usual response is that they don't support Linux.
Looks like there are different versions of the datasheet. The one of NCT6796D, Revision 0.6 states that 28 (0x1c or 11100) is "Select PECI Agent 0 Calibration as CPUFAN monitoring source." This seems to be correct since the fan in question is the CPU one and the value of "PECI Agent 0 Calibration" is actually very similar to the CPU temperature and rises with CPU load.
Also, looking at the driver code I found no signs of reading so-called "HM Read-Only Registers". They are described in section 9.481 of the above datasheet. They are I/O ports (readable with inb) with their base address located in configuration registers 0x64 and 0x65 of the SuperIO. Some temperatures seem to be directly readable only through these registers. Looks like the driver monitors all temperatures only indirectly via switchable channels, is it true?
Regards,
Alexey
Guenter Roeck
maintainerQuoted 6 lines · Alexey Galakhov
Hi,
I'm facing the same problem. I did some research on my machine.
On Fri, 2020-07-03 at 10:10 -0700, Guenter Roeck wrote:
Quoted 7 lines
Quoted 4 lines
There is nothing much if anything we can do about that. The NCT6798D datasheet reports temperature source 28 as reserved. You could ask Asus for support, but their usual response is that they don't support Linux.
Looks like there are different versions of the datasheet. The one of NCT6796D, Revision 0.6 states that 28 (
0x1cor 11100) is "Select PECI
We are talking about NCT6798D here.
Quoted 5 lines
Agent 0 Calibration as CPUFAN monitoring source." This seems to be correct since the fan in question is the CPU one and the value of "PECI Agent 0 Calibration" is actually very similar to the CPU temperature and rises with CPU load.
Quoted 8 lines
Also, looking at the driver code I found no signs of reading so-called "HM Read-Only Registers". They are described in section 9.481 of the above datasheet. They are I/O ports (readable with
inb) with their base address located in configuration registers0x64and0x65of the SuperIO. Some temperatures seem to be directly readable only through these registers. Looks like the driver monitors all temperatures only indirectly via switchable channels, is it true?
I have no idea how to access the "HM Read-Only" registers. The datasheets are not exactly verbal about it.
Guenter
Quoted 12 lines · On Tue, 14 Jul 2020 16:58:29 -0700 Guenter Roeck <[email protected]> wrote:
Quoted 11 lines · Alexey Galakhov
Hi,
I'm facing the same problem. I did some research on my machine.
Quoted 4 lines · Guenter Roeck
There is nothing much if anything we can do about that. The NCT6798D datasheet reports temperature source 28 as reserved. You could ask Asus for support, but their usual response is that they don't support Linux.
Quoted 4 lines
Quoted 2 lines
Looks like there are different versions of the datasheet. The one of NCT6796D, Revision 0.6 states that 28 (
0x1cor 11100) is "Select PECIWe are talking about NCT6798D here.
I have NCT6798D on my machine and I also double-checked the chip marking on the motherboard. I just looked at the 96's datasheet (not found a 98's one). Even with 98 this configuration seems to be correct. Looks like at least on some revisions of 98 it is not reserved and usable. The fan in controlled correctly with this setting.
Quoted 2 lines
I have no idea how to access the "HM Read-Only" registers. The datasheets are not exactly verbal about it.
I successfully accessed them. The access procedure is poorly described but quite simple.
Each of these "HM Read-Only" registers is just a plain I/O port. Just inb() reads them. Their addresses are sequential. The base address (address of register 00) is configured similar to the main I/O address (the one which is usually 0x295). Its MSB is in register 0x64 and its LSB is in 0x65 of the SuperIO. Like that:
superio_select(sioreg, NCT6775_LD_HWM); hm_ro_base = superio_inb(sioreg, 0x64) << 8; hm_ro_base |= superio_inb(sioreg, 0x65);
// on my machine hm_ro_base == 0x800
val = inb(hm_io_base + hm_reg);
Hope this helps.
Regards,
Alexey
Guenter Roeck
maintainerQuoted 18 lines · Alexey Galakhov
Quoted 15 lines · On Tue, 14 Jul 2020 16:58:29 -0700 Guenter Roeck <[email protected]> wrote:
Quoted 13 lines · Alexey Galakhov
Hi,
I'm facing the same problem. I did some research on my machine.
Quoted 4 lines · Guenter Roeck
There is nothing much if anything we can do about that. The NCT6798D datasheet reports temperature source 28 as reserved. You could ask Asus for support, but their usual response is that they don't support Linux.
Looks like there are different versions of the datasheet. The one of NCT6796D, Revision 0.6 states that 28 (
0x1cor 11100) is "Select PECI
Quoted 8 lines
Quoted 1 line
We are talking about NCT6798D here.
I have NCT6798D on my machine and I also double-checked the chip marking on the motherboard. I just looked at the 96's datasheet (not found a 98's one). Even with 98 this configuration seems to be correct. Looks like at least on some revisions of 98 it is not reserved and usable. The fan in controlled correctly with this setting.
FWIW: https://patchwork.kernel.org/patch/11663841/
Quoted 16 lines
Quoted 2 lines
I have no idea how to access the "HM Read-Only" registers. The datasheets are not exactly verbal about it.
I successfully accessed them. The access procedure is poorly described but quite simple.
Each of these "HM Read-Only" registers is just a plain I/O port. Just
inb()reads them. Their addresses are sequential. The base address (address of register 00) is configured similar to the main I/O address (the one which is usually0x295). Its MSB is in register0x64and its LSB is in0x65of the SuperIO. Like that:superio_select(sioreg, NCT6775_LD_HWM); hm_ro_base = superio_inb(sioreg, 0x64) << 8; hm_ro_base |= superio_inb(sioreg, 0x65);
Quoted 6 lines
// on my machine
hm_ro_base==0x800val = inb(hm_io_base + hm_reg);Hope this helps.
Interesting. I'll keep it in mind, but I don't think I'll be able to submit any patches anytime soon.
Thanks,
Guenter