Skip to content

Commit 4274691

Browse files
committed
Add ASRock X870E Nova WiFi Support
- Added support for Nuvoton NCT5585D chip - Added support for Nuvoton NCT6796D-S chip - Added motherboard-specific switch to select the correct chip due to duplicate chip ID/Revision - Added chips to disable monitor i/o space lock block - Added business logic to include chips in _superIOs.Add for the Nct677X() logic. - Added chips to business logic to properly assign indices for fans, controls, temperatures and voltages. - Added TSENSOR to the enum for SourceNct67Xxd to display the 3rd thermistor sensor. - Added Naming and Identification for the X870E Nova WiFi - Replaced TSENSOR with AUXTIN5 as it is named in the datasheet - Corrected Register values - Reworked indexes and temperature naming - Removed duplicate TSENSOR in enum
1 parent 67e7bf4 commit 4274691

File tree

6 files changed

+287
-29
lines changed

6 files changed

+287
-29
lines changed

OpenHardwareMonitorLib/Hardware/Motherboard/Identification.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
namespace OpenHardwareMonitor.Hardware.Motherboard;
44

@@ -710,6 +710,8 @@ public static Model GetModel(string name)
710710
case var _ when name.Equals("X870E Taichi", StringComparison.OrdinalIgnoreCase):
711711
case var _ when name.Equals("X870E Taichi Lite", StringComparison.OrdinalIgnoreCase):
712712
return Model.X870E_TAICHI;
713+
case var _ when name.Equals("X870E Nova WiFi", StringComparison.OrdinalIgnoreCase):
714+
return Model.X870E_NOVA_WIFI;
713715
case var _ when name.Equals("X670 AORUS ELITE AX", StringComparison.OrdinalIgnoreCase):
714716
return Model.X670_AORUS_ELITE_AX;
715717
case var _ when name.Equals("PROART B760-CREATOR D4", StringComparison.OrdinalIgnoreCase):

OpenHardwareMonitorLib/Hardware/Motherboard/Lpc/Chip.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
using System.Diagnostics.CodeAnalysis;
22

33
namespace OpenHardwareMonitor.Hardware.Motherboard.Lpc;
44

@@ -47,6 +47,7 @@ internal enum Chip : ushort
4747
IT8792E = 0x8733, // Could also be IT8791E, IT8795E
4848
IT87952E = 0x8695,
4949

50+
NCT5585D = 0xFFF0, // Chip reports 0xD42A but that's in use
5051
NCT610XD = 0xC452,
5152
NCT6771F = 0xB470,
5253
NCT6776F = 0xC330,
@@ -58,6 +59,7 @@ internal enum Chip : ushort
5859
NCT6795D = 0xD352,
5960
NCT6796D = 0xD423,
6061
NCT6796DR = 0xD42A,
62+
NCT6796DS = 0xFFF1, // Chip reports 0xD802 but that's in use
6163
NCT6797D = 0xD451,
6264
NCT6798D = 0xD42B,
6365
NCT6686D = 0xD440,
@@ -123,6 +125,7 @@ public static string GetName(Chip chip)
123125
case Chip.IT8792E: return "ITE IT8791E/IT8792E/IT8795E";
124126
case Chip.IT87952E: return "ITE IT87952E";
125127

128+
case Chip.NCT5585D: return "Nuvoton NCT5585D";
126129
case Chip.NCT610XD: return "Nuvoton NCT6102D/NCT6104D/NCT6106D";
127130
case Chip.NCT6771F: return "Nuvoton NCT6771F";
128131
case Chip.NCT6776F: return "Nuvoton NCT6776F";
@@ -134,6 +137,7 @@ public static string GetName(Chip chip)
134137
case Chip.NCT6795D: return "Nuvoton NCT6795D";
135138
case Chip.NCT6796D: return "Nuvoton NCT6796D";
136139
case Chip.NCT6796DR: return "Nuvoton NCT6796D-R";
140+
case Chip.NCT6796DS: return "Nuvoton NCT6796D-S";
137141
case Chip.NCT6797D: return "Nuvoton NCT6797D";
138142
case Chip.NCT6798D: return "Nuvoton NCT6798D";
139143
case Chip.NCT6799D: return "Nuvoton NCT6799D";

OpenHardwareMonitorLib/Hardware/Motherboard/Lpc/LpcIO.cs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,15 @@ private bool DetectWinbondFintek(LpcPort port, Motherboard motherboard)
361361
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
362362
break;
363363
case 0x2A:
364-
chip = Chip.NCT6796DR;
364+
switch (motherboard.Model)
365+
{
366+
case Model.X870E_NOVA_WIFI:
367+
chip = Chip.NCT5585D;
368+
break;
369+
default:
370+
chip = Chip.NCT6796DR;
371+
break;
372+
}
365373
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
366374
break;
367375
case 0x51:
@@ -424,7 +432,16 @@ private bool DetectWinbondFintek(LpcPort port, Motherboard motherboard)
424432
switch (revision)
425433
{
426434
case 0x02:
427-
chip = Chip.NCT6799D;
435+
switch (motherboard.Model)
436+
{
437+
case Model.X870E_NOVA_WIFI:
438+
chip = Chip.NCT6796DS;
439+
break;
440+
default:
441+
chip = Chip.NCT6799D;
442+
break;
443+
}
444+
428445
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
429446
break;
430447
case 0x06:
@@ -455,7 +472,7 @@ private bool DetectWinbondFintek(LpcPort port, Motherboard motherboard)
455472

456473
// disable the hardware monitor i/o space lock on NCT679XD chips
457474
if (address == verify &&
458-
chip is Chip.NCT6791D or Chip.NCT6792D or Chip.NCT6792DA or Chip.NCT6793D or Chip.NCT6795D or Chip.NCT6796D or Chip.NCT6796DR or Chip.NCT6798D or Chip.NCT6797D or Chip.NCT6799D or Chip.NCT6701D)
475+
chip is Chip.NCT6791D or Chip.NCT6792D or Chip.NCT6792DA or Chip.NCT6793D or Chip.NCT6795D or Chip.NCT6796D or Chip.NCT6796DR or Chip.NCT6796DS or Chip.NCT6798D or Chip.NCT6797D or Chip.NCT6799D or Chip.NCT6701D)
459476
{
460477
port.NuvotonDisableIOSpaceLock();
461478
}
@@ -515,6 +532,7 @@ private bool DetectWinbondFintek(LpcPort port, Motherboard motherboard)
515532
case Chip.NCT6795D:
516533
case Chip.NCT6796D:
517534
case Chip.NCT6796DR:
535+
case Chip.NCT6796DS:
518536
case Chip.NCT6797D:
519537
case Chip.NCT6798D:
520538
case Chip.NCT6799D:
@@ -523,7 +541,8 @@ private bool DetectWinbondFintek(LpcPort port, Motherboard motherboard)
523541
case Chip.NCT6687DR:
524542
case Chip.NCT6683D:
525543
case Chip.NCT6701D:
526-
_superIOs.Add(new Nct677X(chip, revision, address, port));
544+
case Chip.NCT5585D:
545+
_superIOs.Add(new Nct677X(port, chip, revision, address));
527546
break;
528547

529548
case Chip.F71858:

OpenHardwareMonitorLib/Hardware/Motherboard/Lpc/Nct677X.cs

Lines changed: 100 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public TemperatureSourceData(Enum source, ushort register, ushort halfRegister =
4545
private readonly ushort[] _voltageRegisters;
4646
private readonly ushort _voltageVBatRegister;
4747

48-
public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
48+
public Nct677X(LpcPort lpcPort, Chip chip, byte revision, ushort port)
4949
{
5050
Chip = chip;
5151
_revision = revision;
@@ -65,7 +65,7 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
6565
}
6666
else if (chip is Chip.NCT6683D or Chip.NCT6686D or Chip.NCT6687D) //These work on older NCT6687D boards, but only fans 0, 1 and 3 on newer (X870 and Z890) motherboards. Unsure of controls for "next pack of 8".
6767
{
68-
FAN_PWM_OUT_REG = new ushort[] { 0x160, 0x161, 0x162, 0x163, 0x164, 0x165, 0x166, 0x167 }; // Next 8 fans will be 0xE00, 0xE01, 0xE02, 0xE03, 0xE04, 0xE05, 0xE06, 0xE07
68+
FAN_PWM_OUT_REG = new ushort[] { 0x160, 0x161, 0x162, 0x163, 0x164, 0x165, 0x166, 0x167 }; // Next 8 fans will be 0xE00, 0xE01, 0xE02, 0xE03, 0xE04, 0xE05, 0xE06, 0xE07
6969
FAN_PWM_COMMAND_REG = new ushort[] { 0xA28, 0xA29, 0xA2A, 0xA2B, 0xA2C, 0xA2D, 0xA2E, 0xA2F }; // Possibly 0X260, 0X261, 0X262, 0X263, 0X264, 0X265, 0X266, 0X267 but can't confirm
7070
FAN_CONTROL_MODE_REG = new ushort[] { 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00, 0xA00 }; // Not sure of next 8, MSI won't provide info
7171
FAN_PWM_REQUEST_REG = new ushort[] { 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01, 0xA01 }; // Not sure of next 8, MSI won't provide info
@@ -82,7 +82,7 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
8282
VENDOR_ID_HIGH_REGISTER = 0x804F;
8383
VENDOR_ID_LOW_REGISTER = 0x004F;
8484

85-
FAN_PWM_OUT_REG = chip is Chip.NCT6797D or Chip.NCT6798D or Chip.NCT6799D
85+
FAN_PWM_OUT_REG = chip is Chip.NCT6797D or Chip.NCT6798D or Chip.NCT6799D or Chip.NCT6796DS or Chip.NCT5585D
8686
? new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0xA09, 0xB09 }
8787
: new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017, 0x029 };
8888

@@ -149,10 +149,12 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
149149
case Chip.NCT6795D:
150150
case Chip.NCT6796D: // 16 voltages
151151
case Chip.NCT6796DR: // 16 voltages
152+
case Chip.NCT6796DS:
152153
case Chip.NCT6797D:
153154
case Chip.NCT6798D:
154155
case Chip.NCT6799D:
155156
case Chip.NCT6701D:
157+
case Chip.NCT5585D:
156158
switch (chip)
157159
{
158160
case Chip.NCT6779D:
@@ -161,10 +163,12 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
161163
break;
162164

163165
case Chip.NCT6796DR:
166+
case Chip.NCT6796DS:
164167
case Chip.NCT6797D:
165168
case Chip.NCT6798D:
166169
case Chip.NCT6799D:
167170
case Chip.NCT6701D:
171+
case Chip.NCT5585D:
168172
Fans = new float?[7];
169173
Controls = new float?[7];
170174
break;
@@ -190,12 +194,47 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
190194

191195
switch (chip)
192196
{
197+
case Chip.NCT6791D:
198+
case Chip.NCT6792D:
199+
case Chip.NCT6793D:
200+
case Chip.NCT6795D:
193201
case Chip.NCT6796D:
194202
case Chip.NCT6796DR:
195203
case Chip.NCT6797D:
204+
case Chip.NCT6701D:
205+
temperaturesSources.AddRange(new TemperatureSourceData[]
206+
{
207+
new(SourceNct67Xxd.PECI_0, 0x073, 0x074, 7, 0x100),
208+
new(SourceNct67Xxd.CPUTIN, 0x075, 0x076, 7, 0x200, 0x491),
209+
new(SourceNct67Xxd.SYSTIN, 0x077, 0x078, 7, 0x300, 0x490),
210+
new(SourceNct67Xxd.AUXTIN0, 0x079, 0x07A, 7, 0x800, 0x492),
211+
new(SourceNct67Xxd.AUXTIN1, 0x07B, 0x07C, 7, 0x900, 0x493),
212+
new(SourceNct67Xxd.AUXTIN2, 0x07D, 0x07E, 7, 0xA00, 0x494),
213+
new(SourceNct67Xxd.AUXTIN3, 0x4A0, 0x49E, 6, 0xB00, 0x495),
214+
new(SourceNct67Xxd.AUXTIN4, 0x027, 0, -1, 0x621),
215+
new(SourceNct67Xxd.PCH_CHIP_CPU_MAX_TEMP, 0x674, 0, -1, 0xC28, 0x400),
216+
new(SourceNct67Xxd.PCH_CHIP_TEMP, 0x676, 0, -1, 0xC29, 0x401),
217+
new(SourceNct67Xxd.PCH_CPU_TEMP, 0x678, 0, -1, 0xC2A, 0x402),
218+
new(SourceNct67Xxd.PCH_MCH_TEMP, 0x67A, 0, -1, 0xC2B, 0x404),
219+
new(SourceNct67Xxd.AGENT0_DIMM0, 0x405, 0, -1),
220+
new(SourceNct67Xxd.AGENT0_DIMM1,0x406, 0, -1),
221+
new(SourceNct67Xxd.AGENT1_DIMM0, 0x407, 0, -1),
222+
new(SourceNct67Xxd.AGENT1_DIMM1, 0x408, 0, -1),
223+
new(SourceNct67Xxd.SMBUSMASTER0, 0x150, 0x151, 7, 0x622),
224+
new(SourceNct67Xxd.SMBUSMASTER1, 0x670, 0, -1, 0xC26),
225+
new(SourceNct67Xxd.PECI_1, 0x672, 0, -1, 0xC27),
226+
new(SourceNct67Xxd.BYTE_TEMP0, 0x419, 0, -1),
227+
new(SourceNct67Xxd.BYTE_TEMP1, 0x41A, 0, -1),
228+
new(SourceNct67Xxd.PECI_0_CAL, 0x4F4, 0, -1),
229+
new(SourceNct67Xxd.PECI_1_CAL, 0x4F5, 0, -1),
230+
new(SourceNct67Xxd.VIRTUAL_TEMP, 0),
231+
new(SourceNct67Xxd.SPARE_TEMP, 0),
232+
new(SourceNct67Xxd.SPARE_TEMP2, 0)
233+
});
234+
break;
235+
196236
case Chip.NCT6798D:
197237
case Chip.NCT6799D:
198-
case Chip.NCT6701D:
199238
temperaturesSources.AddRange(new TemperatureSourceData[]
200239
{
201240
new(SourceNct67Xxd.PECI_0, 0x073, 0x074, 7, 0x100),
@@ -214,18 +253,47 @@ public Nct677X(Chip chip, byte revision, ushort port, LpcPort lpcPort)
214253
new(SourceNct67Xxd.PCH_CHIP_TEMP, 0x676, 0, -1, 0xC29, 0x401),
215254
new(SourceNct67Xxd.PCH_CPU_TEMP, 0x678, 0, -1, 0xC2A, 0x402),
216255
new(SourceNct67Xxd.PCH_MCH_TEMP, 0x67A, 0, -1, 0xC2B, 0x404),
217-
new(SourceNct67Xxd.AGENT0_DIMM0, 0),
218-
new(SourceNct67Xxd.AGENT0_DIMM1, 0),
219-
new(SourceNct67Xxd.AGENT1_DIMM0, 0),
220-
new(SourceNct67Xxd.AGENT1_DIMM1, 0),
221-
new(SourceNct67Xxd.BYTE_TEMP0, 0),
222-
new(SourceNct67Xxd.BYTE_TEMP1, 0),
223-
new(SourceNct67Xxd.PECI_0_CAL, 0),
224-
new(SourceNct67Xxd.PECI_1_CAL, 0),
256+
new(SourceNct67Xxd.AGENT0_DIMM0, 0x405, 0, -1),
257+
new(SourceNct67Xxd.AGENT0_DIMM1,0x406, 0, -1),
258+
new(SourceNct67Xxd.AGENT1_DIMM0, 0x407, 0, -1),
259+
new(SourceNct67Xxd.AGENT1_DIMM1, 0x408, 0, -1),
260+
new(SourceNct67Xxd.BYTE_TEMP0, 0x419, 0, -1),
261+
new(SourceNct67Xxd.BYTE_TEMP1, 0x41A, 0, -1),
262+
new(SourceNct67Xxd.PECI_0_CAL, 0x4F4, 0, -1),
263+
new(SourceNct67Xxd.PECI_1_CAL, 0x4F5, 0, -1),
264+
new(SourceNct67Xxd.VIRTUAL_TEMP, 0),
265+
new(SourceNct67Xxd.SPARE_TEMP, 0),
266+
new(SourceNct67Xxd.SPARE_TEMP2, 0)
267+
});
268+
break;
269+
270+
case Chip.NCT6796DS:
271+
temperaturesSources.AddRange(new TemperatureSourceData[]
272+
{
273+
new(SourceNct67Xxd.CPUTIN, 0x073, 0x074, 7, 0x100, 0x491),
274+
new(SourceNct67Xxd.SYSTIN, 0x075, 0x076, 7, 0x200, 0x490),
275+
new(SourceNct67Xxd.AUXTIN0, 0x077, 0x078, 7, 0x300, 0x492),
276+
new(SourceNct67Xxd.AUXTIN1, 0x079, 0x07A, 7, 0x800, 0x493),
277+
new(SourceNct67Xxd.AUXTIN2, 0x07B, 0x07C, 7, 0x900, 0x494),
278+
new(SourceNct67Xxd.AUXTIN3, 0x07D, 0x07E, 7, 0xA00, 0x495),
279+
new(SourceNct67Xxd.AUXTIN4, 0x027, 0, 4,0xC16 ,0x496),
280+
new(SourceNct67Xxd.AUXTIN5, 0x449, 0, 4, 0x100, 0x4A2),
281+
new(SourceNct67Xxd.SMBUSMASTER0, 0x150, 0x151, 7, 0x622),
282+
new(SourceNct67Xxd.PECI_0, 0x0720, 0, -1, 0),
225283
new(SourceNct67Xxd.VIRTUAL_TEMP, 0)
226284
});
227285
break;
228286

287+
case Chip.NCT5585D:
288+
temperaturesSources.AddRange(new TemperatureSourceData[]
289+
{
290+
new(SourceNct67Xxd.PECI_0, 0x0720, 0, -1, 0x100),
291+
new(SourceNct67Xxd.CPUTIN, 0x075, 0x076, 7, 0x000, 0x073),
292+
new(SourceNct67Xxd.AUXTIN1, 0x07B, 0x07C, 7, 0x900, 0x493),
293+
new(SourceNct67Xxd.AUXTIN3, 0x4A0, 0x49E, 6, 0xB00, 0x495),
294+
});
295+
break;
296+
229297
default:
230298
temperaturesSources.AddRange(new TemperatureSourceData[]
231299
{
@@ -562,9 +630,11 @@ public void Update()
562630

563631
case Chip.NCT6796D:
564632
case Chip.NCT6796DR:
633+
case Chip.NCT6796DS:
565634
case Chip.NCT6797D:
566635
case Chip.NCT6798D:
567636
case Chip.NCT6799D:
637+
case Chip.NCT5585D:
568638
if (_temperaturesSource[i].Register == 0)
569639
{
570640
System.Diagnostics.Debug.WriteLine("Temperature register {0} skipped, address 0.", i);
@@ -921,7 +991,7 @@ private byte ReadByte(ushort address)
921991
if (access == EC_SPACE_PAGE_SELECT || DateTime.UtcNow > timeout)
922992
break;
923993

924-
System.Threading.Thread.Sleep(1);
994+
Thread.Sleep(1);
925995
}
926996

927997
if (access != EC_SPACE_PAGE_SELECT)
@@ -998,8 +1068,8 @@ private void Set6687DRControl(int index, byte? value)
9981068
int targetFanCurveAddr = initFanCurveReg; // Address of the Current Fan Curve Register we're writing to
9991069
ushort targetFanCurveReg; // Integer value of the current fan curve register address, not the value within
10001070
byte currentSpeed = ReadByte(FAN_PWM_OUT_REG[index]); // Current Speed of the target fan
1001-
1002-
// If current fan duty cycle matches requested duty cycle, skip re-writing the fan curve
1071+
1072+
// If current fan duty cycle matches requested duty cycle, skip re-writing the fan curve
10031073
if (currentSpeed == value.Value)
10041074
{
10051075
return;
@@ -1083,9 +1153,11 @@ not Chip.NCT6793D and
10831153
not Chip.NCT6795D and
10841154
not Chip.NCT6796D and
10851155
not Chip.NCT6796DR and
1156+
not Chip.NCT6796DS and
10861157
not Chip.NCT6797D and
10871158
not Chip.NCT6798D and
1088-
not Chip.NCT6799D)
1159+
not Chip.NCT6799D and
1160+
not Chip.NCT5585D)
10891161
{
10901162
return;
10911163
}
@@ -1127,9 +1199,15 @@ private enum SourceNct67Xxd : byte
11271199
AUXTIN2 = 5,
11281200
AUXTIN3 = 6,
11291201
AUXTIN4 = 7,
1202+
TSENSOR = 10,
11301203
SMBUSMASTER0 = 8,
11311204
SMBUSMASTER1 = 9,
1132-
TSENSOR = 10,
1205+
RESERVED_1 = 10,
1206+
RESERVED_2 = 11,
1207+
RESERVED_3 = 12,
1208+
RESERVED_4 = 13,
1209+
RESERVED_5 = 14,
1210+
RESERVED_6 = 15,
11331211
PECI_0 = 16,
11341212
PECI_1 = 17,
11351213
PCH_CHIP_CPU_MAX_TEMP = 18,
@@ -1144,7 +1222,11 @@ private enum SourceNct67Xxd : byte
11441222
BYTE_TEMP1 = 27,
11451223
PECI_0_CAL = 28,
11461224
PECI_1_CAL = 29,
1147-
VIRTUAL_TEMP = 31
1225+
RESERVED_7 = 30,
1226+
VIRTUAL_TEMP = 31,
1227+
SPARE_TEMP = 32,
1228+
SPARE_TEMP2 = 33,
1229+
AUXTIN5 = 34,
11481230
}
11491231

11501232
[SuppressMessage("ReSharper", "InconsistentNaming")]

OpenHardwareMonitorLib/Hardware/Motherboard/Model.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
using System.Diagnostics.CodeAnalysis;
22

33
namespace OpenHardwareMonitor.Hardware.Motherboard;
44

@@ -37,6 +37,7 @@ public enum Model
3737
H61M_DGS,
3838
B850M_STEEL_LEGEND_WIFI,
3939
X870E_TAICHI,
40+
X870E_NOVA_WIFI,
4041

4142
// ASUS
4243
CROSSHAIR_III_FORMULA,

0 commit comments

Comments
 (0)