Contribute
Register

NCT6795D changes for HWSensors (FakeSMC)

Joined
Nov 8, 2012
Messages
24
I wrote in another thread here that I added support for the NCT6795D Super I/O Device that can be found on newer MSI mainboards (in my case: MSI Z270-A Pro with an Intel 200 series chipset for SkyLake and Kaby Lake CPUs). There may be other vendors who use this device that I'm not aware of.

It's only a small number of changes necessary, but unfortunately after waiting for a week I didn't receive any reply to my mails to the original author of FakeSMC nor RehabMan who maintains another version of FakeSMC. This is not what I expected to happen and very disappointing.

So, I decided to release the changes now to the public so others who know how to use XCode can compile their own versions. I cannot teach you how to use XCode so if you don't know XCode yet, stay away from this and wait until somebody will be so nice to include the patches in the official source code and creates a binary version.

All files that need to be modified can be found in the SuperIOSensors folder.

Code:
Index: SuperIOSensors/LPCSensors-Info.plist
===================================================================
--- SuperIOSensors/LPCSensors-Info.plist	(revision 1844)
+++ SuperIOSensors/LPCSensors-Info.plist	(working copy)
@@ -2983,6 +2983,7 @@
 				<string>Nuvoton,NCT6791D</string>
 				<string>Nuvoton,NCT6792D</string>
 				<string>Nuvoton,NCT6793D</string>
+				<string>Nuvoton,NCT6795D</string>
 			</array>
 			<key>IOProviderClass</key>
 			<string>SuperIODevice</string>
Code:
Index: SuperIOSensors/NCT677xSensors.cpp
===================================================================
--- SuperIOSensors/NCT677xSensors.cpp	(revision 1844)
+++ SuperIOSensors/NCT677xSensors.cpp	(working copy)
@@ -106,6 +106,7 @@
             case NCT6791D:
             case NCT6792D:
             case NCT6793D:
+            case NCT6795D:
                 value = readByte(NUVOTON_TEMPERATURE_REG_NEW[index]) << 1;
                 break;
         }
@@ -135,6 +136,7 @@
             case NCT6791D:
             case NCT6792D:
             case NCT6793D:
+            case NCT6795D:
                 value = readByte(NUVOTON_VOLTAGE_REG_NEW[index]) * NUVOTON_VOLTAGE_SCALE[index] * 0.001f;
                 break;
         }
@@ -266,6 +268,7 @@
         case NCT6791D:
         case NCT6792D:
         case NCT6793D:
+        case NCT6795D:
             fanLimit = 6;
             tempLimit = 7;
             voltLimit = 15;
@@ -288,7 +291,8 @@
     switch (model) {
         case NCT6791D:
         case NCT6792D:
-        case NCT6793D: {
+        case NCT6793D:
+        case NCT6795D: {
             // disable the hardware monitor i/o space lock on NCT679xD chips
             winbond_family_enter(port);
Code:
Index: SuperIOSensors/SuperIODevice.h
===================================================================
--- SuperIOSensors/SuperIODevice.h   (revision 1844)
+++ SuperIOSensors/SuperIODevice.h   (working copy)
@@ -84,7 +84,8 @@
     NCT6779D    = 0xC560,
     NCT6791D    = 0xC803,
     NCT6792D    = 0xC911,
-    NCT6793D    = 0xD121
+    NCT6793D    = 0xD121,
+    NCT6795D    = 0xD352
 };
 inline UInt8 superio_listen_port_byte(i386_ioport_t port, UInt8 reg)
@@ -186,6 +187,7 @@
         case NCT6791D:      return "NCT6791D";
         case NCT6792D:      return "NCT6792D";
         case NCT6793D:      return "NCT6793D";
+        case NCT6795D:      return "NCT6795D";
     }
     
     return "unknown";
Code:
Index: SuperIOSensors/SuperIODevice.cpp
===================================================================
--- SuperIOSensors/SuperIODevice.cpp	(revision 1844)
+++ SuperIOSensors/SuperIODevice.cpp	(working copy)
@@ -194,7 +194,16 @@
                                 vendor = "Nuvoton";
                                 break;
                         } break;
-
+                        
+                    case 0xD3:
+                        switch (id & 0xff) {
+                            case 0x52:
+                                model = NCT6795D;
+                                ldn = kWinbondHardwareMonitorLDN;
+                                vendor = "Nuvoton";
+                                break;
+                        } break;
+                        
                 } break;
         }
 
Last edited by a moderator:

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,989
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I wrote in another thread here that I added support for the NCT6795D Super I/O Device that can be found on newer MSI mainboards (in my case: MSI Z270-A Pro with an Intel 200 series chipset for SkyLake and Kaby Lake CPUs). There may be other vendors who use this device that I'm not aware of.

It's only a small number of changes necessary, but unfortunately after waiting for a week I didn't receive any reply to my mails to the original author of FakeSMC nor RehabMan who maintains another version of FakeSMC. This is not what I expected to happen and very disappointing.

So, I decided to release the changes now to the public so others who know how to use XCode can compile their own versions. I cannot teach you how to use XCode so if you don't know XCode yet, stay away from this and wait until somebody will be so nice to include the patches in the official source code and creates a binary version.

All files that need to be modified can be found in the SuperIOSensors folder.

Code:
Index: SuperIOSensors/LPCSensors-Info.plist
===================================================================
--- SuperIOSensors/LPCSensors-Info.plist    (revision 1844)
+++ SuperIOSensors/LPCSensors-Info.plist    (working copy)
@@ -2983,6 +2983,7 @@
                 <string>Nuvoton,NCT6791D</string>
                 <string>Nuvoton,NCT6792D</string>
                 <string>Nuvoton,NCT6793D</string>
+                <string>Nuvoton,NCT6795D</string>
             </array>
             <key>IOProviderClass</key>
             <string>SuperIODevice</string>
Code:
Index: SuperIOSensors/NCT677xSensors.cpp
===================================================================
--- SuperIOSensors/NCT677xSensors.cpp    (revision 1844)
+++ SuperIOSensors/NCT677xSensors.cpp    (working copy)
@@ -106,6 +106,7 @@
             case NCT6791D:
             case NCT6792D:
             case NCT6793D:
+            case NCT6795D:
                 value = readByte(NUVOTON_TEMPERATURE_REG_NEW[index]) << 1;
                 break;
         }
@@ -135,6 +136,7 @@
             case NCT6791D:
             case NCT6792D:
             case NCT6793D:
+            case NCT6795D:
                 value = readByte(NUVOTON_VOLTAGE_REG_NEW[index]) * NUVOTON_VOLTAGE_SCALE[index] * 0.001f;
                 break;
         }
@@ -266,6 +268,7 @@
         case NCT6791D:
         case NCT6792D:
         case NCT6793D:
+        case NCT6795D:
             fanLimit = 6;
             tempLimit = 7;
             voltLimit = 15;
@@ -288,7 +291,8 @@
     switch (model) {
         case NCT6791D:
         case NCT6792D:
-        case NCT6793D: {
+        case NCT6793D:
+        case NCT6795D: {
             // disable the hardware monitor i/o space lock on NCT679xD chips
             winbond_family_enter(port);
Code:
Index: SuperIOSensors/SuperIODevice.h
===================================================================
--- SuperIOSensors/SuperIODevice.h   (revision 1844)
+++ SuperIOSensors/SuperIODevice.h   (working copy)
@@ -84,7 +84,8 @@
     NCT6779D    = 0xC560,
     NCT6791D    = 0xC803,
     NCT6792D    = 0xC911,
-    NCT6793D    = 0xD121
+    NCT6793D    = 0xD121,
+    NCT6795D    = 0xD352
 };
 inline UInt8 superio_listen_port_byte(i386_ioport_t port, UInt8 reg)
@@ -186,6 +187,7 @@
         case NCT6791D:      return "NCT6791D";
         case NCT6792D:      return "NCT6792D";
         case NCT6793D:      return "NCT6793D";
+        case NCT6795D:      return "NCT6795D";
     }
    
     return "unknown";
Code:
Index: SuperIOSensors/SuperIODevice.cpp
===================================================================
--- SuperIOSensors/SuperIODevice.cpp    (revision 1844)
+++ SuperIOSensors/SuperIODevice.cpp    (working copy)
@@ -194,7 +194,16 @@
                                 vendor = "Nuvoton";
                                 break;
                         } break;
-
+                       
+                    case 0xD3:
+                        switch (id & 0xff) {
+                            case 0x52:
+                                model = NCT6795D;
+                                ldn = kWinbondHardwareMonitorLDN;
+                                vendor = "Nuvoton";
+                                break;
+                        } break;
+                       
                 } break;
         }
You should submit a PR (pull request) on github.
Never saw any email.
 
Top