Add Pump Fan 2 for MSI MEG Z790 GODLIKE MAX + handle 0 RPM / unplugged fan (#2187)

* Add Pump Fan 2.
Handle Fan at 0 RPM or unplugged.

* Space
This commit is contained in:
Blacktempel
2026-01-30 10:58:22 +01:00
committed by GitHub
parent eb799fa815
commit 883f24d149
2 changed files with 14 additions and 5 deletions
@@ -401,7 +401,7 @@ internal class Nct677X : ISuperIO
case Chip.NCT6683D:
case Chip.NCT6686D:
case Chip.NCT6687D:
Fans = new float?[17];
Fans = new float?[18];
Controls = new float?[8];
Voltages = new float?[14];
Temperatures = new float?[11];
@@ -462,11 +462,12 @@ internal class Nct677X : ISuperIO
// SYS Fan 3 on newer NCT6687Ds
// SYS Fan 2 on newer NCT6687Ds
// SYS Fan 1 on newer NCT6687Ds
// PUMP Fan 2 on some NCT6687Ds - 0x850 (e.g. Z790 GODLIKE MAX)
// SYS Fan 7 on some NCT6687Ds - 0x852 (e.g. Z790 GODLIKE MAX)
_fanRpmRegister = [0x140, 0x142, 0x144, 0x146, 0x148, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x852];
_fanRpmRegister = [0x140, 0x142, 0x144, 0x146, 0x148, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x850, 0x852];
// On some boards, there will be SYS Fan 7 (e.g. MSI MEG Z790 GODLIKE MAX)
_fanCountRegister = [0x852];
// On some boards, there will be PUMP Fan 2 and SYS Fan 7 (e.g. MSI MEG Z790 GODLIKE MAX)
_fanCountRegister = [0x850, 0x852];
// max value for 13-bit fan counter
_maxFanCount = 0x1FFF;
@@ -840,6 +841,13 @@ internal class Nct677X : ISuperIO
void Update13BitFan(int i, byte low, byte high)
{
// No fan plugged in OR fan is at 0 RPM
if (Chip is Chip.NCT6687D && high == 0xFF && low == 0xF8)
{
Fans[i] = 0;
return;
}
int count = (high << 5) | (low & 0x1F);
if (count < _maxFanCount)
{
@@ -559,13 +559,14 @@ internal sealed class SuperIOHardware : Hardware
f.Add(new Fan("CPU Fan", 0));
f.Add(new Fan("Pump Fan #1", 1));
f.Add(new Fan("Pump Fan #2", 16));
f.Add(new Fan("System Fan #1", 2));
f.Add(new Fan("System Fan #2", 3));
f.Add(new Fan("System Fan #3", 4));
f.Add(new Fan("System Fan #4", 5));
f.Add(new Fan("System Fan #5", 6));
f.Add(new Fan("System Fan #6", 7));
f.Add(new Fan("System Fan #7", 16));
f.Add(new Fan("System Fan #7", 17));
c.Add(new Control("CPU Fan", 0));
c.Add(new Control("Pump Fan #1", 1));