Skip to content

Commit 8aff90c

Browse files
authored
NCT610XD bugfix register and temperature read (#1631)
* NCT610XD bugfix register and temperature read * Supermicro X11SWN-E support
1 parent 2d4f2cf commit 8aff90c

4 files changed

Lines changed: 72 additions & 26 deletions

File tree

LibreHardwareMonitorLib/Hardware/Motherboard/Identification.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ public static Model GetModel(string name)
615615
return Model.PRIME_X870_P;
616616
case var _ when name.Equals("ROG CROSSHAIR X870E HERO", StringComparison.OrdinalIgnoreCase):
617617
return Model.ROG_CROSSHAIR_X870E_HERO;
618+
case var _ when name.Equals("X11SWN-E", StringComparison.OrdinalIgnoreCase):
619+
return Model.X11SWN_E;
618620
case var _ when name.Equals("Base Board Product Name", StringComparison.OrdinalIgnoreCase):
619621
case var _ when name.Equals("To be filled by O.E.M.", StringComparison.OrdinalIgnoreCase):
620622
return Model.Unknown;

LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/Nct677X.cs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,15 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
257257
Voltages = new float?[9];
258258
_voltageRegisters = new ushort[] { 0x300, 0x301, 0x302, 0x303, 0x304, 0x305, 0x307, 0x308, 0x309 };
259259
_voltageVBatRegister = 0x308;
260-
Temperatures = new float?[4];
260+
Temperatures = new float?[7];
261261
_temperaturesSource = new TemperatureSourceData[] {
262-
new(SourceNct610X.PECI_0, 0x027, 0, -1, 0x621),
263-
new(SourceNct610X.SYSTIN, 0x018, 0x01B, 7, 0x100, 0x018),
264-
new(SourceNct610X.CPUTIN, 0x019, 0x11B, 7, 0x200, 0x019),
265-
new(SourceNct610X.AUXTIN, 0x01A, 0x21B, 7, 0x300, 0x01A)
262+
new(SourceNct610X.PECI_0, 0x06b, 0, -1, 0x621),
263+
new(SourceNct610X.AUXTIN, 0x010, 0x016, 0),
264+
new(SourceNct610X.CPUTIN, 0x011, 0x01B, 1),
265+
new(SourceNct610X.SYSTIN0, 0x012, 0x01B, 2),
266+
new(SourceNct610X.SYSTIN1, 0x013, 0x016, 3),
267+
new(SourceNct610X.SYSTIN2, 0x014, 0x01B, 4),
268+
new(SourceNct610X.SYSTIN3, 0x015, 0x01B, 5)
266269
};
267270
break;
268271

@@ -464,11 +467,18 @@ public void Update()
464467

465468
switch (Chip)
466469
{
470+
case Chip.NCT610XD:
471+
value = (sbyte)ReadByte(ts.Register);
472+
int half = (ReadByte((ushort)(ts.HalfRegister)) >> ts.HalfBit) & 0x1;
473+
temperature = value + (0.5f * half);
474+
Temperatures[i] = temperature;
475+
break;
476+
467477
case Chip.NCT6687D:
468478
case Chip.NCT6686D:
469479
case Chip.NCT6683D:
470480
value = (sbyte)ReadByte(ts.Register);
471-
int half = (ReadByte((ushort)(ts.Register + 1)) >> 7) & 0x1;
481+
half = (ReadByte((ushort)(ts.Register + 1)) >> 7) & 0x1;
472482
Temperatures[i] = value + (0.5f * half);
473483
break;
474484

@@ -1025,9 +1035,12 @@ private enum SourceNct67Xxd : byte
10251035
[SuppressMessage("ReSharper", "InconsistentNaming")]
10261036
private enum SourceNct610X : byte
10271037
{
1028-
SYSTIN = 1,
1029-
CPUTIN = 2,
1030-
AUXTIN = 3,
1038+
CPUTIN = 1,
1039+
AUXTIN = 2,
1040+
SYSTIN0 = 3,
1041+
SYSTIN1 = 4,
1042+
SYSTIN2 = 5,
1043+
SYSTIN3 = 6,
10311044
PECI_0 = 12
10321045
}
10331046

LibreHardwareMonitorLib/Hardware/Motherboard/Model.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ public enum Model
260260
// Shuttle
261261
FH67,
262262

263+
//Supermicro
264+
X11SWN_E,
265+
263266
// Unknown
264267
Unknown
265268
}

LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -321,25 +321,53 @@ private static void GetBoardSpecificConfiguration
321321
break;
322322

323323
case Chip.NCT610XD:
324-
v.Add(new Voltage("Vcore", 0));
325-
v.Add(new Voltage("Voltage #0", 1, true));
326-
v.Add(new Voltage("AVCC", 2, 34, 34));
327-
v.Add(new Voltage("+3.3V", 3, 34, 34));
328-
v.Add(new Voltage("Voltage #1", 4, true));
329-
v.Add(new Voltage("Voltage #2", 5, true));
330-
v.Add(new Voltage("Reserved", 6, true));
331-
v.Add(new Voltage("+3V Standby", 7, 34, 34));
332-
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
333-
v.Add(new Voltage("Voltage #10", 9, true));
334-
t.Add(new Temperature("System", 1));
335-
t.Add(new Temperature("CPU Core", 2));
336-
t.Add(new Temperature("Auxiliary", 3));
324+
switch (manufacturer)
325+
{
326+
case Manufacturer.Supermicro when model == Model.X11SWN_E:
327+
v.Add(new Voltage("Vcore", 0));
328+
v.Add(new Voltage("+12V", 1, 94, 10.25f));
329+
v.Add(new Voltage("AVSB", 2, 34, 34));
330+
v.Add(new Voltage("3VCC", 3, 34, 34));
331+
v.Add(new Voltage("+5V", 4, 14, 8.2f));
332+
v.Add(new Voltage("VDIMM", 5));
333+
v.Add(new Voltage("3VSB", 6, 34, 34));
334+
v.Add(new Voltage("VBAT", 7, 34, 34));
335+
t.Add(new Temperature("System", 1));
336+
t.Add(new Temperature("Peripheral", 2));
337+
t.Add(new Temperature("CPU Core", 4));
337338

338-
for (int i = 0; i < superIO.Fans.Length; i++)
339-
f.Add(new Fan("Fan #" + (i + 1), i));
339+
f.Add(new Fan("Fan #1", 1));
340340

341-
for (int i = 0; i < superIO.Controls.Length; i++)
342-
c.Add(new Control("Fan #" + (i + 1), i));
341+
c.Add(new Control("Fan #1", 1));
342+
343+
break;
344+
345+
default:
346+
v.Add(new Voltage("Vcore", 0));
347+
v.Add(new Voltage("Voltage #0", 1, true));
348+
v.Add(new Voltage("AVCC", 2, 34, 34));
349+
v.Add(new Voltage("+3.3V", 3, 34, 34));
350+
v.Add(new Voltage("Voltage #1", 4, true));
351+
v.Add(new Voltage("Voltage #2", 5, true));
352+
v.Add(new Voltage("Reserved", 6, true));
353+
v.Add(new Voltage("+3V Standby", 7, 34, 34));
354+
v.Add(new Voltage("CMOS Battery", 8, 34, 34));
355+
v.Add(new Voltage("Voltage #10", 9, true));
356+
t.Add(new Temperature("CPU Core", 0));
357+
t.Add(new Temperature("Auxiliary", 1));
358+
t.Add(new Temperature("System0", 2));
359+
t.Add(new Temperature("System1", 3));
360+
t.Add(new Temperature("System2", 4));
361+
t.Add(new Temperature("System3", 5));
362+
363+
for (int i = 0; i < superIO.Fans.Length; i++)
364+
f.Add(new Fan("Fan #" + (i + 1), i));
365+
366+
for (int i = 0; i < superIO.Controls.Length; i++)
367+
c.Add(new Control("Fan #" + (i + 1), i));
368+
369+
break;
370+
}
343371

344372
break;
345373

0 commit comments

Comments
 (0)