# HG changeset patch # User moel.mich # Date 1374416231 0 # Node ID 362c5e77197da2a075e0da1aeb82810fd43153d7 # Parent ff39f6b906969b1a4a0d798bc54caf3956b58d36 Added experimental support for the Nuvoton NCT6791D super I/O chip. diff -r ff39f6b90696 -r 362c5e77197d Hardware/LPC/Chip.cs --- a/Hardware/LPC/Chip.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Hardware/LPC/Chip.cs Sun Jul 21 14:17:11 2013 +0000 @@ -39,6 +39,7 @@ NCT6771F = 0xB470, NCT6776F = 0xC330, NCT6779D = 0xC560, + NCT6791D = 0xC803, W83627DHG = 0xA020, W83627DHGP = 0xB070, @@ -82,6 +83,7 @@ case Chip.NCT6771F: return "Nuvoton NCT6771F"; case Chip.NCT6776F: return "Nuvoton NCT6776F"; case Chip.NCT6779D: return "Nuvoton NCT6779D"; + case Chip.NCT6791D: return "Nuvoton NCT6791D"; case Chip.W83627DHG: return "Winbond W83627DHG"; case Chip.W83627DHGP: return "Winbond W83627DHG-P"; diff -r ff39f6b90696 -r 362c5e77197d Hardware/LPC/LMSensors.cs --- a/Hardware/LPC/LMSensors.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Hardware/LPC/LMSensors.cs Sun Jul 21 14:17:11 2013 +0000 @@ -69,6 +69,10 @@ lmChips.Add(new LMChip(Chip.NCT6771F, path)); break; case "nct6776": lmChips.Add(new LMChip(Chip.NCT6776F, path)); break; + case "nct6779": + lmChips.Add(new LMChip(Chip.NCT6779D, path)); break; + case "nct6791": + lmChips.Add(new LMChip(Chip.NCT6791D, path)); break; case "w83627ehf": lmChips.Add(new LMChip(Chip.W83627EHF, path)); break; diff -r ff39f6b90696 -r 362c5e77197d Hardware/LPC/LPCIO.cs --- a/Hardware/LPC/LPCIO.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Hardware/LPC/LPCIO.cs Sun Jul 21 14:17:11 2013 +0000 @@ -222,6 +222,13 @@ logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN; break; } break; + case 0xC8: + switch (revision) { + case 0x03: + chip = Chip.NCT6791D; + logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN; + break; + } break; } if (chip == Chip.Unknown) { if (id != 0 && id != 0xff) { @@ -283,6 +290,7 @@ case Chip.NCT6771F: case Chip.NCT6776F: case Chip.NCT6779D: + case Chip.NCT6791D: superIOs.Add(new NCT677X(chip, revision, address)); break; case Chip.F71858: diff -r ff39f6b90696 -r 362c5e77197d Hardware/LPC/NCT677X.cs --- a/Hardware/LPC/NCT677X.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Hardware/LPC/NCT677X.cs Sun Jul 21 14:17:11 2013 +0000 @@ -4,7 +4,7 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - Copyright (C) 2010-2012 Michael Möller + Copyright (C) 2010-2013 Michael Möller */ @@ -56,11 +56,11 @@ private const ushort VENDOR_ID_LOW_REGISTER = 0x004F; private readonly ushort[] FAN_PWM_OUT_REG = - { 0x001, 0x003, 0x011, 0x013, 0x015 }; + { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017 }; private readonly ushort[] FAN_PWM_COMMAND_REG = - { 0x109, 0x209, 0x309, 0x809, 0x909 }; + { 0x109, 0x209, 0x309, 0x809, 0x909, 0xA09 }; private readonly ushort[] FAN_CONTROL_MODE_REG = - { 0x102, 0x202, 0x302, 0x802, 0x902 }; + { 0x102, 0x202, 0x302, 0x802, 0x902, 0xA02 }; private readonly ushort fanRpmBaseRegister; private readonly int minFanRPM; @@ -129,7 +129,7 @@ BYTE_TEMP = 22 } - private enum SourceNCT6779D : byte { + private enum SourceNCT67XXD : byte { SYSTIN = 1, CPUTIN = 2, AUXTIN0 = 3, @@ -217,14 +217,20 @@ break; case Chip.NCT6779D: - fans = new float?[5]; + case Chip.NCT6791D: + if (chip == Chip.NCT6779D) { + fans = new float?[5]; + controls = new float?[5]; + } else { + fans = new float?[6]; + controls = new float?[6]; + } + fanRpmBaseRegister = 0x4C0; // min value RPM value with 13-bit fan counter minFanRPM = (int)(1.35e6 / 0x1FFF); - controls = new float?[5]; - voltages = new float?[15]; voltageRegisters = new ushort[] { 0x480, 0x481, 0x482, 0x483, 0x484, 0x485, 0x486, 0x487, 0x488, @@ -233,13 +239,13 @@ temperatures = new float?[7]; temperaturesSource = new byte[] { - (byte)SourceNCT6779D.PECI_0, - (byte)SourceNCT6779D.CPUTIN, - (byte)SourceNCT6779D.SYSTIN, - (byte)SourceNCT6779D.AUXTIN0, - (byte)SourceNCT6779D.AUXTIN1, - (byte)SourceNCT6779D.AUXTIN2, - (byte)SourceNCT6779D.AUXTIN3 + (byte)SourceNCT67XXD.PECI_0, + (byte)SourceNCT67XXD.CPUTIN, + (byte)SourceNCT67XXD.SYSTIN, + (byte)SourceNCT67XXD.AUXTIN0, + (byte)SourceNCT67XXD.AUXTIN1, + (byte)SourceNCT67XXD.AUXTIN2, + (byte)SourceNCT67XXD.AUXTIN3 }; temperatureRegister = new ushort[] @@ -254,7 +260,7 @@ alternateTemperatureRegister = new ushort?[] {null, 0x491, 0x490, 0x492, 0x493, 0x494, 0x495 }; - break; + break; } } @@ -398,14 +404,16 @@ ushort[] addresses = new ushort[] { 0x000, 0x010, 0x020, 0x030, 0x040, 0x050, 0x060, 0x070, 0x100, 0x110, 0x120, 0x130, 0x140, 0x150, - 0x200, 0x220, 0x230, 0x240, 0x250, - 0x300, 0x320, 0x330, 0x340, - 0x400, 0x410, 0x420, 0x440, 0x450, 0x460, 0x480, 0x490, 0x4C0, - 0x500, 0x550, + 0x200, 0x220, 0x230, 0x240, 0x250, 0x260, + 0x300, 0x320, 0x330, 0x340, 0x360, + 0x400, 0x410, 0x420, 0x440, 0x450, 0x460, 0x480, 0x490, 0x4B0, + 0x4C0, 0x4F0, + 0x500, 0x550, 0x560, 0x600, 0x610 ,0x620, 0x630, 0x640, 0x650, 0x660, 0x670, - 0x800, - 0x900, - 0xA00, 0xA10, 0xA20, 0xA30, 0xA50, 0xA60, 0xA70, + 0x700, 0x710, 0x720, 0x730, + 0x800, 0x820, 0x830, 0x840, + 0x900, 0x920, 0x930, 0x940, 0x960, + 0xA00, 0xA10, 0xA20, 0xA30, 0xA40, 0xA50, 0xA60, 0xA70, 0xB00, 0xB10, 0xB20, 0xB30, 0xB50, 0xB60, 0xB70, 0xC00, 0xC10, 0xC20, 0xC30, 0xC50, 0xC60, 0xC70, 0xD00, 0xD10, 0xD20, 0xD30, 0xD50, 0xD60, diff -r ff39f6b90696 -r 362c5e77197d Hardware/Mainboard/SuperIOHardware.cs --- a/Hardware/Mainboard/SuperIOHardware.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Hardware/Mainboard/SuperIOHardware.cs Sun Jul 21 14:17:11 2013 +0000 @@ -1059,6 +1059,7 @@ } break; case Chip.NCT6779D: + case Chip.NCT6791D: switch (manufacturer) { case Manufacturer.ASUS: switch (model) { diff -r ff39f6b90696 -r 362c5e77197d Program.cs --- a/Program.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Program.cs Sun Jul 21 14:17:11 2013 +0000 @@ -4,13 +4,12 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - Copyright (C) 2009-2010 Michael Möller + Copyright (C) 2009-2013 Michael Möller */ using System; using System.IO; -using System.Text; using System.Threading; using System.Windows.Forms; using OpenHardwareMonitor.GUI; @@ -61,7 +60,11 @@ return false; if (!IsFileAvailable("OpenHardwareMonitorLib.dll")) return false; - + if (!IsFileAvailable("OxyPlot.dll")) + return false; + if (!IsFileAvailable("OxyPlot.WindowsForms.dll")) + return false; + return true; } diff -r ff39f6b90696 -r 362c5e77197d Properties/AssemblyVersion.cs --- a/Properties/AssemblyVersion.cs Sun Jul 14 16:32:27 2013 +0000 +++ b/Properties/AssemblyVersion.cs Sun Jul 21 14:17:11 2013 +0000 @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyInformationalVersion("0.6.0 Beta")] \ No newline at end of file +[assembly: AssemblyVersion("0.6.0.1")] +[assembly: AssemblyInformationalVersion("0.6.0.1 Alpha")] \ No newline at end of file