Add preliminary support for Nuvoton NCT6799D (#846)

This commit is contained in:
Alexander Vostres
2022-11-10 13:41:21 +01:00
committed by GitHub
parent d2ab5fd98f
commit f9cfde5f91
5 changed files with 29 additions and 7 deletions
@@ -63,7 +63,8 @@ internal enum Chip : ushort
NCT6797D = 0xD451,
NCT6798D = 0xD42B,
NCT6687D = 0xD592,
NCT6683D = 0xc732,
NCT6683D = 0xC732,
NCT6799D = 0xD802,
W83627DHG = 0xA020,
W83627DHGP = 0xB070,
@@ -128,6 +129,7 @@ internal class ChipName
case Chip.NCT6796DR: return "Nuvoton NCT6796D-R";
case Chip.NCT6797D: return "Nuvoton NCT6797D";
case Chip.NCT6798D: return "Nuvoton NCT6798D";
case Chip.NCT6799D: return "Nuvoton NCT6799D";
case Chip.NCT6687D: return "Nuvoton NCT6687D";
case Chip.NCT6683D: return "Nuvoton NCT6683D";
@@ -118,6 +118,9 @@ internal class LMSensors
case "nct6798":
_superIOs.Add(new LMChip(Chip.NCT6798D, path));
break;
case "nct6799":
_superIOs.Add(new LMChip(Chip.NCT6799D, path));
break;
case "w83627ehf":
_superIOs.Add(new LMChip(Chip.W83627EHF, path));
@@ -304,6 +304,16 @@ internal class LpcIO
}
break;
case 0xC7:
switch (revision)
{
case 0x32:
chip = Chip.NCT6683D;
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
break;
}
break;
case 0xC8:
switch (revision)
{
@@ -380,11 +390,11 @@ internal class LpcIO
}
break;
case 199:
case 0xD8:
switch (revision)
{
case 50:
chip = Chip.NCT6683D;
case 0x02:
chip = Chip.NCT6799D;
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
break;
}
@@ -410,7 +420,7 @@ internal class LpcIO
// disable the hardware monitor i/o space lock on NCT679XD chips
if (address == verify &&
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)
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)
{
port.NuvotonDisableIOSpaceLock();
}
@@ -472,6 +482,7 @@ internal class LpcIO
case Chip.NCT6796DR:
case Chip.NCT6797D:
case Chip.NCT6798D:
case Chip.NCT6799D:
case Chip.NCT6687D:
case Chip.NCT6683D:
_superIOs.Add(new Nct677X(chip, revision, address, port));
@@ -81,7 +81,7 @@ internal class Nct677X : ISuperIO
VENDOR_ID_HIGH_REGISTER = 0x804F;
VENDOR_ID_LOW_REGISTER = 0x004F;
FAN_PWM_OUT_REG = chip is Chip.NCT6797D or Chip.NCT6798D
FAN_PWM_OUT_REG = chip is Chip.NCT6797D or Chip.NCT6798D or Chip.NCT6799D
? new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0xA09, 0xB09 }
: new ushort[] { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017, 0x029 };
@@ -150,6 +150,7 @@ internal class Nct677X : ISuperIO
case Chip.NCT6796DR:
case Chip.NCT6797D:
case Chip.NCT6798D:
case Chip.NCT6799D:
switch (chip)
{
case Chip.NCT6779D:
@@ -160,6 +161,7 @@ internal class Nct677X : ISuperIO
case Chip.NCT6796DR:
case Chip.NCT6797D:
case Chip.NCT6798D:
case Chip.NCT6799D:
Fans = new float?[7];
Controls = new float?[7];
break;
@@ -189,6 +191,7 @@ internal class Nct677X : ISuperIO
case Chip.NCT6796DR:
case Chip.NCT6797D:
case Chip.NCT6798D:
case Chip.NCT6799D:
temperaturesSources.AddRange(new TemperatureSourceData[]
{
new(SourceNct67Xxd.PECI_0, 0x073, 0x074, 7, 0x100),
@@ -467,6 +470,7 @@ internal class Nct677X : ISuperIO
case Chip.NCT6796DR:
case Chip.NCT6797D:
case Chip.NCT6798D:
case Chip.NCT6799D:
if (_temperaturesSource[i].Register == 0)
{
System.Diagnostics.Debug.WriteLine("Temperature register {0} skipped, address 0.", i);
@@ -901,7 +905,8 @@ internal class Nct677X : ISuperIO
not Chip.NCT6796D and
not Chip.NCT6796DR and
not Chip.NCT6797D and
not Chip.NCT6798D)
not Chip.NCT6798D and
not Chip.NCT6799D)
{
return;
}
@@ -348,6 +348,7 @@ internal sealed class SuperIOHardware : Hardware
case Chip.NCT6796DR:
case Chip.NCT6797D:
case Chip.NCT6798D:
case Chip.NCT6799D:
case Chip.NCT6683D:
GetNuvotonConfigurationD(superIO, manufacturer, model, v, t, f, c);
break;