Added experimental support for the Nuvoton NCT6791D super I/O chip.
authormoel.mich
Sun, 21 Jul 2013 14:17:11 +0000
changeset 413362c5e77197d
parent 412 ff39f6b90696
child 414 93dbee74f1e7
Added experimental support for the Nuvoton NCT6791D super I/O chip.
Hardware/LPC/Chip.cs
Hardware/LPC/LMSensors.cs
Hardware/LPC/LPCIO.cs
Hardware/LPC/NCT677X.cs
Hardware/Mainboard/SuperIOHardware.cs
Program.cs
Properties/AssemblyVersion.cs
     1.1 --- a/Hardware/LPC/Chip.cs	Sun Jul 14 16:32:27 2013 +0000
     1.2 +++ b/Hardware/LPC/Chip.cs	Sun Jul 21 14:17:11 2013 +0000
     1.3 @@ -39,6 +39,7 @@
     1.4      NCT6771F = 0xB470,
     1.5      NCT6776F = 0xC330,
     1.6      NCT6779D = 0xC560,
     1.7 +    NCT6791D = 0xC803,
     1.8  
     1.9      W83627DHG = 0xA020,
    1.10      W83627DHGP = 0xB070,
    1.11 @@ -82,6 +83,7 @@
    1.12          case Chip.NCT6771F: return "Nuvoton NCT6771F";
    1.13          case Chip.NCT6776F: return "Nuvoton NCT6776F";
    1.14          case Chip.NCT6779D: return "Nuvoton NCT6779D";
    1.15 +        case Chip.NCT6791D: return "Nuvoton NCT6791D";
    1.16  
    1.17          case Chip.W83627DHG: return "Winbond W83627DHG";
    1.18          case Chip.W83627DHGP: return "Winbond W83627DHG-P";
     2.1 --- a/Hardware/LPC/LMSensors.cs	Sun Jul 14 16:32:27 2013 +0000
     2.2 +++ b/Hardware/LPC/LMSensors.cs	Sun Jul 21 14:17:11 2013 +0000
     2.3 @@ -69,6 +69,10 @@
     2.4                lmChips.Add(new LMChip(Chip.NCT6771F, path)); break;
     2.5              case "nct6776":
     2.6                lmChips.Add(new LMChip(Chip.NCT6776F, path)); break;
     2.7 +            case "nct6779":
     2.8 +              lmChips.Add(new LMChip(Chip.NCT6779D, path)); break;
     2.9 +            case "nct6791":
    2.10 +              lmChips.Add(new LMChip(Chip.NCT6791D, path)); break;
    2.11  
    2.12              case "w83627ehf":
    2.13                lmChips.Add(new LMChip(Chip.W83627EHF, path)); break;
     3.1 --- a/Hardware/LPC/LPCIO.cs	Sun Jul 14 16:32:27 2013 +0000
     3.2 +++ b/Hardware/LPC/LPCIO.cs	Sun Jul 21 14:17:11 2013 +0000
     3.3 @@ -222,6 +222,13 @@
     3.4                logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
     3.5                break;
     3.6            } break;
     3.7 +        case 0xC8:
     3.8 +          switch (revision) {
     3.9 +            case 0x03:
    3.10 +              chip = Chip.NCT6791D;
    3.11 +              logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
    3.12 +              break;
    3.13 +          } break;
    3.14        }
    3.15        if (chip == Chip.Unknown) {
    3.16          if (id != 0 && id != 0xff) {
    3.17 @@ -283,6 +290,7 @@
    3.18            case Chip.NCT6771F:
    3.19            case Chip.NCT6776F:
    3.20            case Chip.NCT6779D:
    3.21 +          case Chip.NCT6791D:
    3.22              superIOs.Add(new NCT677X(chip, revision, address));
    3.23              break;
    3.24            case Chip.F71858:
     4.1 --- a/Hardware/LPC/NCT677X.cs	Sun Jul 14 16:32:27 2013 +0000
     4.2 +++ b/Hardware/LPC/NCT677X.cs	Sun Jul 21 14:17:11 2013 +0000
     4.3 @@ -4,7 +4,7 @@
     4.4    License, v. 2.0. If a copy of the MPL was not distributed with this
     4.5    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     4.6   
     4.7 -  Copyright (C) 2010-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
     4.8 +  Copyright (C) 2010-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
     4.9  	
    4.10  */
    4.11  
    4.12 @@ -56,11 +56,11 @@
    4.13      private const ushort VENDOR_ID_LOW_REGISTER = 0x004F;  
    4.14      
    4.15      private readonly ushort[] FAN_PWM_OUT_REG = 
    4.16 -      { 0x001, 0x003, 0x011, 0x013, 0x015 };
    4.17 +      { 0x001, 0x003, 0x011, 0x013, 0x015, 0x017 };
    4.18      private readonly ushort[] FAN_PWM_COMMAND_REG = 
    4.19 -      { 0x109, 0x209, 0x309, 0x809, 0x909 };
    4.20 +      { 0x109, 0x209, 0x309, 0x809, 0x909, 0xA09 };
    4.21      private readonly ushort[] FAN_CONTROL_MODE_REG = 
    4.22 -      { 0x102, 0x202, 0x302, 0x802, 0x902 };
    4.23 +      { 0x102, 0x202, 0x302, 0x802, 0x902, 0xA02 };
    4.24  
    4.25      private readonly ushort fanRpmBaseRegister;
    4.26      private readonly int minFanRPM;
    4.27 @@ -129,7 +129,7 @@
    4.28        BYTE_TEMP = 22
    4.29      }
    4.30  
    4.31 -    private enum SourceNCT6779D : byte {
    4.32 +    private enum SourceNCT67XXD : byte {
    4.33        SYSTIN = 1,
    4.34        CPUTIN = 2,
    4.35        AUXTIN0 = 3,
    4.36 @@ -217,14 +217,20 @@
    4.37            break;
    4.38  
    4.39          case Chip.NCT6779D:
    4.40 -          fans = new float?[5];
    4.41 +        case Chip.NCT6791D:
    4.42 +          if (chip == Chip.NCT6779D) {
    4.43 +            fans = new float?[5];
    4.44 +            controls = new float?[5];
    4.45 +          } else {
    4.46 +            fans = new float?[6];
    4.47 +            controls = new float?[6];
    4.48 +          }
    4.49 +
    4.50            fanRpmBaseRegister = 0x4C0;
    4.51  
    4.52            // min value RPM value with 13-bit fan counter
    4.53            minFanRPM = (int)(1.35e6 / 0x1FFF);
    4.54  
    4.55 -          controls = new float?[5];
    4.56 -
    4.57            voltages = new float?[15];
    4.58            voltageRegisters = new ushort[] 
    4.59              { 0x480, 0x481, 0x482, 0x483, 0x484, 0x485, 0x486, 0x487, 0x488, 
    4.60 @@ -233,13 +239,13 @@
    4.61  
    4.62            temperatures = new float?[7];
    4.63            temperaturesSource = new byte[] {
    4.64 -            (byte)SourceNCT6779D.PECI_0,
    4.65 -            (byte)SourceNCT6779D.CPUTIN,
    4.66 -            (byte)SourceNCT6779D.SYSTIN,
    4.67 -            (byte)SourceNCT6779D.AUXTIN0,
    4.68 -            (byte)SourceNCT6779D.AUXTIN1,
    4.69 -            (byte)SourceNCT6779D.AUXTIN2,
    4.70 -            (byte)SourceNCT6779D.AUXTIN3
    4.71 +            (byte)SourceNCT67XXD.PECI_0,
    4.72 +            (byte)SourceNCT67XXD.CPUTIN,
    4.73 +            (byte)SourceNCT67XXD.SYSTIN,
    4.74 +            (byte)SourceNCT67XXD.AUXTIN0,
    4.75 +            (byte)SourceNCT67XXD.AUXTIN1,
    4.76 +            (byte)SourceNCT67XXD.AUXTIN2,
    4.77 +            (byte)SourceNCT67XXD.AUXTIN3
    4.78            };
    4.79  
    4.80            temperatureRegister = new ushort[]
    4.81 @@ -254,7 +260,7 @@
    4.82            alternateTemperatureRegister = new ushort?[] 
    4.83              {null, 0x491, 0x490, 0x492, 0x493, 0x494, 0x495 };
    4.84  
    4.85 -          break;        
    4.86 +          break;
    4.87        }
    4.88      }
    4.89  
    4.90 @@ -398,14 +404,16 @@
    4.91        ushort[] addresses = new ushort[] { 
    4.92          0x000, 0x010, 0x020, 0x030, 0x040, 0x050, 0x060, 0x070,
    4.93          0x100, 0x110, 0x120, 0x130, 0x140, 0x150, 
    4.94 -        0x200,        0x220, 0x230, 0x240, 0x250,
    4.95 -        0x300,        0x320, 0x330, 0x340, 
    4.96 -        0x400, 0x410, 0x420,        0x440, 0x450, 0x460, 0x480, 0x490, 0x4C0,
    4.97 -        0x500,                             0x550, 
    4.98 +        0x200,        0x220, 0x230, 0x240, 0x250, 0x260,
    4.99 +        0x300,        0x320, 0x330, 0x340,        0x360,
   4.100 +        0x400, 0x410, 0x420,        0x440, 0x450, 0x460, 0x480, 0x490, 0x4B0, 
   4.101 +                                                                0x4C0, 0x4F0,
   4.102 +        0x500,                             0x550, 0x560,
   4.103          0x600, 0x610 ,0x620, 0x630, 0x640, 0x650, 0x660, 0x670, 
   4.104 -        0x800,
   4.105 -        0x900,
   4.106 -        0xA00, 0xA10, 0xA20, 0xA30,        0xA50, 0xA60, 0xA70, 
   4.107 +        0x700, 0x710, 0x720, 0x730,
   4.108 +        0x800,        0x820, 0x830, 0x840,
   4.109 +        0x900,        0x920, 0x930, 0x940,        0x960,
   4.110 +        0xA00, 0xA10, 0xA20, 0xA30, 0xA40, 0xA50, 0xA60, 0xA70, 
   4.111          0xB00, 0xB10, 0xB20, 0xB30,        0xB50, 0xB60, 0xB70, 
   4.112          0xC00, 0xC10, 0xC20, 0xC30,        0xC50, 0xC60, 0xC70,
   4.113          0xD00, 0xD10, 0xD20, 0xD30,        0xD50, 0xD60, 
     5.1 --- a/Hardware/Mainboard/SuperIOHardware.cs	Sun Jul 14 16:32:27 2013 +0000
     5.2 +++ b/Hardware/Mainboard/SuperIOHardware.cs	Sun Jul 21 14:17:11 2013 +0000
     5.3 @@ -1059,6 +1059,7 @@
     5.4            }
     5.5            break;
     5.6          case Chip.NCT6779D:
     5.7 +        case Chip.NCT6791D:
     5.8            switch (manufacturer) {
     5.9              case Manufacturer.ASUS:
    5.10                switch (model) {
     6.1 --- a/Program.cs	Sun Jul 14 16:32:27 2013 +0000
     6.2 +++ b/Program.cs	Sun Jul 21 14:17:11 2013 +0000
     6.3 @@ -4,13 +4,12 @@
     6.4    License, v. 2.0. If a copy of the MPL was not distributed with this
     6.5    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6.6   
     6.7 -  Copyright (C) 2009-2010 Michael Möller <mmoeller@openhardwaremonitor.org>
     6.8 +  Copyright (C) 2009-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
     6.9  	
    6.10  */
    6.11  
    6.12  using System;
    6.13  using System.IO;
    6.14 -using System.Text;
    6.15  using System.Threading;
    6.16  using System.Windows.Forms;
    6.17  using OpenHardwareMonitor.GUI;
    6.18 @@ -61,7 +60,11 @@
    6.19          return false;
    6.20        if (!IsFileAvailable("OpenHardwareMonitorLib.dll"))
    6.21          return false;
    6.22 -
    6.23 +      if (!IsFileAvailable("OxyPlot.dll"))
    6.24 +        return false;
    6.25 +      if (!IsFileAvailable("OxyPlot.WindowsForms.dll"))
    6.26 +        return false;
    6.27 +      
    6.28        return true;
    6.29      }
    6.30  
     7.1 --- a/Properties/AssemblyVersion.cs	Sun Jul 14 16:32:27 2013 +0000
     7.2 +++ b/Properties/AssemblyVersion.cs	Sun Jul 21 14:17:11 2013 +0000
     7.3 @@ -10,5 +10,5 @@
     7.4  
     7.5  using System.Reflection;
     7.6  
     7.7 -[assembly: AssemblyVersion("0.6.0.0")]
     7.8 -[assembly: AssemblyInformationalVersion("0.6.0 Beta")]
     7.9 \ No newline at end of file
    7.10 +[assembly: AssemblyVersion("0.6.0.1")]
    7.11 +[assembly: AssemblyInformationalVersion("0.6.0.1 Alpha")]
    7.12 \ No newline at end of file