Skip to content
This repository was archived by the owner on Oct 12, 2018. It is now read-only.

Commit 906cf08

Browse files
authored
Merge branch 'master' into master
2 parents cc7b72a + b2e6341 commit 906cf08

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

CPUSensors/CPUSensors.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ bool CPUSensors::start(IOService *provider)
604604

605605
case CPUID_MODEL_HASWELL_DT:
606606
case CPUID_MODEL_BROADWELL_DT:
607+
case CPUID_MODEL_SKYLAKE_X:
607608
case CPUID_MODEL_SKYLAKE_DT:
608609
case CPUID_MODEL_KABYLAKE_S:
609610
if (!platform) platform = OSData::withBytes("j45\0\0\0\0\0", 8); // TODO: got from macbookpro11,2 need to check for other platforms

Shared/cpuid.h

+2
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
#define CPUID_MODEL_BROADWELL_ULV 0x3D
167167
#define CPUID_MODEL_BROADWELL_MB 0x4f
168168
#define CPUID_MODEL_SKYLAKE_LT 0x4E
169+
#define CPUID_MODEL_SKYLAKE_X 0x55 /* Intel® Core™ X-series Processors */
169170
#define CPUID_MODEL_SKYLAKE_DT 0x5E
170171
#define CPUID_MODEL_KABYLAKE_U 0x8E
171172
#define CPUID_MODEL_KABYLAKE_S 0x9E
@@ -697,6 +698,7 @@ cpuid_set_cpufamily(i386_cpu_info_t *info_p)
697698
cpufamily = CPUFAMILY_INTEL_BROADWELL;
698699
break;
699700
case CPUID_MODEL_SKYLAKE_LT:
701+
case CPUID_MODEL_SKYLAKE_X:
700702
case CPUID_MODEL_SKYLAKE_DT:
701703
cpufamily = CPUFAMILY_INTEL_SKYLAKE;
702704
break;

SuperIOSensors/LPCSensors-Info.plist

+1
Original file line numberDiff line numberDiff line change
@@ -2979,6 +2979,7 @@
29792979
<string>Nuvoton,NCT6792D</string>
29802980
<string>Nuvoton,NCT6793D</string>
29812981
<string>Nuvoton,NCT6795D</string>
2982+
<string>Nuvoton,NCT6796D</string>
29822983
</array>
29832984
<key>IOProviderClass</key>
29842985
<string>SuperIODevice</string>

SuperIOSensors/NCT677xSensors.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ float NCT677xSensors::readTemperature(UInt32 index)
107107
case NCT6792D:
108108
case NCT6793D:
109109
case NCT6795D:
110+
case NCT6796D:
110111
value = readByte(NUVOTON_TEMPERATURE_REG_NEW[index]) << 1;
111112
break;
112113
}
@@ -137,6 +138,7 @@ float NCT677xSensors::readVoltage(UInt32 index)
137138
case NCT6792D:
138139
case NCT6793D:
139140
case NCT6795D:
141+
case NCT6796D:
140142
value = readByte(NUVOTON_VOLTAGE_REG_NEW[index]) * NUVOTON_VOLTAGE_SCALE[index] * 0.001f;
141143
break;
142144
}
@@ -269,6 +271,7 @@ bool NCT677xSensors::initialize()
269271
case NCT6792D:
270272
case NCT6793D:
271273
case NCT6795D:
274+
case NCT6796D:
272275
fanLimit = 6;
273276
tempLimit = 7;
274277
voltLimit = 15;
@@ -292,7 +295,8 @@ void NCT677xSensors::hasPoweredOn()
292295
case NCT6791D:
293296
case NCT6792D:
294297
case NCT6793D:
295-
case NCT6795D: {
298+
case NCT6795D:
299+
case NCT6796D: {
296300
// disable the hardware monitor i/o space lock on NCT679xD chips
297301
winbond_family_enter(port);
298302

SuperIOSensors/SuperIODevice.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ bool SuperIODevice::detectWinbondFamilyChip()
194194
vendor = "Nuvoton";
195195
break;
196196
} break;
197+
198+
case 0xD4:
199+
switch (id & 0xff) {
200+
case 0x23:
201+
model = NCT6796D;
202+
203+
ldn = kWinbondHardwareMonitorLDN;
204+
vendor = "Nuvoton";
205+
break;
206+
} break;
197207

198208
} break;
199209
}

SuperIOSensors/SuperIODevice.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ enum SuperIOModel
8181
NCT6791D = 0xC803,
8282
NCT6792D = 0xC911,
8383
NCT6793D = 0xD121,
84-
NCT6795D = 0xD352
84+
NCT6795D = 0xD352,
85+
NCT6796D = 0xD423,
8586
};
8687

8788
inline UInt8 superio_listen_port_byte(i386_ioport_t port, UInt8 reg)
@@ -184,6 +185,7 @@ inline const char* superio_get_model_name(UInt16 model)
184185
case NCT6792D: return "NCT6792D";
185186
case NCT6793D: return "NCT6793D";
186187
case NCT6795D: return "NCT6795D";
188+
case NCT6796D: return "NCT6796D";
187189
}
188190

189191
return "unknown";

0 commit comments

Comments
 (0)