Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Nuvoton NCT6793D chip #884

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions Hardware/LPC/Chip.cs
Expand Up @@ -43,6 +43,8 @@ internal enum Chip : ushort {
NCT610X = 0xC452,
NCT6779D = 0xC560,
NCT6791D = 0xC803,
NCT6793D = 0xD121,
NCT6795D = 0xD352,

W83627DHG = 0xA020,
W83627DHGP = 0xB070,
Expand Down Expand Up @@ -91,6 +93,8 @@ internal class ChipName {
case Chip.NCT6776F: return "Nuvoton NCT6776F";
case Chip.NCT6779D: return "Nuvoton NCT6779D";
case Chip.NCT6791D: return "Nuvoton NCT6791D";
case Chip.NCT6793D: return "Nuvoton NCT6793D";
case Chip.NCT6795D: return "Nuvoton NCT6795D";

case Chip.W83627DHG: return "Winbond W83627DHG";
case Chip.W83627DHGP: return "Winbond W83627DHG-P";
Expand Down
4 changes: 4 additions & 0 deletions Hardware/LPC/LMSensors.cs
Expand Up @@ -73,6 +73,10 @@ internal class LMSensors {
lmChips.Add(new LMChip(Chip.NCT6779D, path)); break;
case "nct6791":
lmChips.Add(new LMChip(Chip.NCT6791D, path)); break;
case "nct6793":
lmChips.Add(new LMChip(Chip.NCT6793D, path)); break;
case "nct6795":
lmChips.Add(new LMChip(Chip.NCT6795D, path)); break;

case "w83627ehf":
lmChips.Add(new LMChip(Chip.W83627EHF, path)); break;
Expand Down
20 changes: 18 additions & 2 deletions Hardware/LPC/LPCIO.cs
Expand Up @@ -209,6 +209,20 @@ internal class LPCIO {
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
break;
} break;
case 0xD1:
switch (revision) {
case 0x21:
chip = Chip.NCT6793D;
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
break;
} break;
case 0xD3:
switch (revision) {
case 0x52:
chip = Chip.NCT6795D;
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
break;
} break;
}
if (chip == Chip.Unknown) {
if (id != 0 && id != 0xff) {
Expand All @@ -226,8 +240,8 @@ internal class LPCIO {

ushort vendorID = port.ReadWord(FINTEK_VENDOR_ID_REGISTER);

// disable the hardware monitor i/o space lock on NCT6791D chips
if (address == verify && chip == Chip.NCT6791D) {
// disable the hardware monitor i/o space lock on NCT679*D chips
if (address == verify && (chip == Chip.NCT6791D || chip == Chip.NCT6793D || chip == Chip.NCT6795D)) {
port.NuvotonDisableIOSpaceLock();
}

Expand Down Expand Up @@ -277,6 +291,8 @@ internal class LPCIO {
case Chip.NCT6776F:
case Chip.NCT6779D:
case Chip.NCT6791D:
case Chip.NCT6793D:
case Chip.NCT6795D:
superIOs.Add(new NCT677X(chip, revision, address, port));
break;
case Chip.F71858:
Expand Down
4 changes: 3 additions & 1 deletion Hardware/LPC/NCT677X.cs
Expand Up @@ -271,6 +271,8 @@ public NCT677X(Chip chip, byte revision, ushort port, LPCPort lpcPort)
break;

case Chip.NCT6779D:
case Chip.NCT6795D:
case Chip.NCT6793D:
case Chip.NCT6791D:
if (chip == Chip.NCT6779D) {
fans = new float?[5];
Expand Down Expand Up @@ -414,7 +416,7 @@ public NCT677X(Chip chip, byte revision, ushort port, LPCPort lpcPort)
public float?[] Controls { get { return controls; } }

private void DisableIOSpaceLock() {
if (chip != Chip.NCT6791D)
if (chip != Chip.NCT6791D && chip != Chip.NCT6793D && chip != Chip.NCT6795D)
return;

// the lock is disabled already if the vendor ID can be read
Expand Down
2 changes: 2 additions & 0 deletions Hardware/Mainboard/SuperIOHardware.cs
Expand Up @@ -266,6 +266,8 @@ internal sealed class SuperIOHardware : Hardware {
break;
case Chip.NCT6779D:
case Chip.NCT6791D:
case Chip.NCT6793D:
case Chip.NCT6795D:
GetNuvotonConfigurationD(superIO, manufacturer, model, v, t, f, c);
break;
default:
Expand Down