[Core] Add support for PRIME X370-PRO -> All credits goes to azuisleet (https://github.com/azuisleet/openhardwaremonitor/tree/IT8665E)
This commit is contained in:
@@ -27,6 +27,7 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
|
||||
IT8620E = 0x8620,
|
||||
IT8628E = 0x8628,
|
||||
IT8665E = 0x8665,
|
||||
IT8686E = 0x8686,
|
||||
IT8705F = 0x8705,
|
||||
IT8712F = 0x8712,
|
||||
@@ -78,6 +79,7 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
|
||||
case Chip.IT8620E: return "ITE IT8620E";
|
||||
case Chip.IT8628E: return "ITE IT8628E";
|
||||
case Chip.IT8665E: return "ITE IT8665E";
|
||||
case Chip.IT8686E: return "ITE IT8686E";
|
||||
case Chip.IT8705F: return "ITE IT8705F";
|
||||
case Chip.IT8712F: return "ITE IT8712F";
|
||||
|
||||
+40
-6
@@ -28,6 +28,7 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
private readonly float?[] voltages = new float?[0];
|
||||
private readonly float?[] temperatures = new float?[0];
|
||||
private readonly float?[] fans = new float?[0];
|
||||
private readonly bool[] fansDisabled = new bool[0];
|
||||
private readonly float?[] controls = new float?[0];
|
||||
|
||||
private readonly float voltageGain;
|
||||
@@ -46,10 +47,11 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
private const byte TEMPERATURE_BASE_REG = 0x29;
|
||||
private const byte VENDOR_ID_REGISTER = 0x58;
|
||||
private const byte FAN_TACHOMETER_DIVISOR_REGISTER = 0x0B;
|
||||
private const byte FAN_TACHOMETER_16BIT_REGISTER = 0x0C;
|
||||
private readonly byte[] FAN_TACHOMETER_REG =
|
||||
{ 0x0d, 0x0e, 0x0f, 0x80, 0x82 };
|
||||
{ 0x0d, 0x0e, 0x0f, 0x80, 0x82, 0x4c };
|
||||
private readonly byte[] FAN_TACHOMETER_EXT_REG =
|
||||
{ 0x18, 0x19, 0x1a, 0x81, 0x83 };
|
||||
{ 0x18, 0x19, 0x1a, 0x81, 0x83, 0x4c };
|
||||
private const byte VOLTAGE_BASE_REG = 0x20;
|
||||
private readonly byte[] FAN_PWM_CTRL_REG = { 0x15, 0x16, 0x17 };
|
||||
private readonly byte[] FAN_PWM_DUTY_REG = { 0x63, 0x6b, 0x73 };
|
||||
@@ -176,7 +178,8 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
return;
|
||||
|
||||
// Bit 0x10 of the configuration register should always be 1
|
||||
if ((ReadByte(CONFIGURATION_REGISTER, out valid) & 0x10) == 0)
|
||||
byte config = ReadByte(CONFIGURATION_REGISTER, out valid);
|
||||
if ((config & 0x10) == 0 && chip != Chip.IT8665E)
|
||||
return;
|
||||
if (!valid)
|
||||
return;
|
||||
@@ -187,13 +190,19 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
voltages = new float?[10];
|
||||
temperatures = new float?[5];
|
||||
fans = new float?[5];
|
||||
fansDisabled = new bool[5];
|
||||
controls = new float?[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else if (chip == Chip.IT8665E) {
|
||||
voltages = new float?[10];
|
||||
temperatures = new float?[6];
|
||||
fans = new float?[6];
|
||||
fansDisabled = new bool[6];
|
||||
controls = new float?[3];
|
||||
} else {
|
||||
voltages = new float?[9];
|
||||
temperatures = new float?[3];
|
||||
fans = new float?[chip == Chip.IT8705F ? 3 : 5];
|
||||
fansDisabled = new bool[chip == Chip.IT8705F ? 3 : 5];
|
||||
controls = new float?[3];
|
||||
}
|
||||
|
||||
@@ -203,6 +212,10 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
|| chip == Chip.IT8728F || chip == Chip.IT8771E || chip == Chip.IT8772E || chip == Chip.IT8686E)
|
||||
{
|
||||
voltageGain = 0.012f;
|
||||
}
|
||||
else if (chip == Chip.IT8665E)
|
||||
{
|
||||
voltageGain = 0.0109f;
|
||||
} else {
|
||||
voltageGain = 0.016f;
|
||||
}
|
||||
@@ -220,6 +233,25 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
hasNewerAutopwm = true;
|
||||
}
|
||||
|
||||
// Disable any fans that aren't set with 16-bit fan counters
|
||||
if (has16bitFanCounter)
|
||||
{
|
||||
int modes = ReadByte(FAN_TACHOMETER_16BIT_REGISTER, out valid);
|
||||
|
||||
if (!valid)
|
||||
return;
|
||||
|
||||
if (fans.Length >= 5)
|
||||
{
|
||||
fansDisabled[3] = (modes & (1 << 4)) == 0;
|
||||
fansDisabled[4] = (modes & (1 << 5)) == 0;
|
||||
}
|
||||
if (fans.Length >= 6)
|
||||
{
|
||||
fansDisabled[5] = (modes & (1 << 2)) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the number of GPIO sets
|
||||
switch (chip) {
|
||||
case Chip.IT8712F:
|
||||
@@ -333,6 +365,8 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
|
||||
if (has16bitFanCounter) {
|
||||
for (int i = 0; i < fans.Length; i++) {
|
||||
if (fansDisabled[i])
|
||||
continue;
|
||||
bool valid;
|
||||
int value = ReadByte(FAN_TACHOMETER_REG[i], out valid);
|
||||
if (!valid)
|
||||
|
||||
@@ -357,6 +357,7 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
||||
switch (chipID) {
|
||||
case 0x8620: chip = Chip.IT8620E; break;
|
||||
case 0x8628: chip = Chip.IT8628E; break;
|
||||
case 0x8665: chip = Chip.IT8665E; break;
|
||||
case 0x8686: chip = Chip.IT8686E; break;
|
||||
case 0x8705: chip = Chip.IT8705F; break;
|
||||
case 0x8712: chip = Chip.IT8712F; break;
|
||||
|
||||
@@ -195,6 +195,8 @@ namespace OpenHardwareMonitor.Hardware.Mainboard {
|
||||
return Model.FH67;
|
||||
case "AX370-Gaming K7":
|
||||
return Model.AX370_K7;
|
||||
case "PRIME X370-PRO":
|
||||
return Model.PRIME_X370_PRO;
|
||||
case "Base Board Product Name":
|
||||
case "To be filled by O.E.M.":
|
||||
return Model.Unknown;
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace OpenHardwareMonitor.Hardware.Mainboard {
|
||||
P9X79,
|
||||
Rampage_Extreme,
|
||||
Rampage_II_GENE,
|
||||
PRIME_X370_PRO,
|
||||
|
||||
// DFI
|
||||
LP_BI_P45_T2RS_Elite,
|
||||
|
||||
@@ -182,6 +182,7 @@ namespace OpenHardwareMonitor.Hardware.Mainboard {
|
||||
case Chip.IT8718F:
|
||||
case Chip.IT8720F:
|
||||
case Chip.IT8726F:
|
||||
case Chip.IT8665E:
|
||||
case Chip.IT8686E:
|
||||
GetITEConfigurationsA(superIO, manufacturer, model, v, t, f, c,
|
||||
ref readFan, ref postUpdate, ref mutex);
|
||||
@@ -328,6 +329,26 @@ namespace OpenHardwareMonitor.Hardware.Mainboard {
|
||||
f.Add(new Fan("Chassis Fan #1", 1));
|
||||
f.Add(new Fan("Chassis Fan #2", 2));
|
||||
break;
|
||||
case Model.PRIME_X370_PRO: // IT8665E
|
||||
v.Add(new Voltage("CPU VCore", 0));
|
||||
v.Add(new Voltage("SB 2.5V", 1));
|
||||
v.Add(new Voltage("+12V", 2, 5, 1));
|
||||
v.Add(new Voltage("+5V", 3, 1.5f, 1));
|
||||
v.Add(new Voltage("Voltage #4", 4, true));
|
||||
v.Add(new Voltage("Voltage #6", 5, true));
|
||||
v.Add(new Voltage("Voltage #7", 6, true));
|
||||
v.Add(new Voltage("+3.3V", 7, 10, 10));
|
||||
v.Add(new Voltage("VBAT", 8, 10, 10));
|
||||
v.Add(new Voltage("Voltage #10", 9, true));
|
||||
t.Add(new Temperature("CPU", 0));
|
||||
t.Add(new Temperature("Motherboard", 1));
|
||||
t.Add(new Temperature("PCH", 2));
|
||||
for (int i = 3; i < superIO.Temperatures.Length; i++)
|
||||
t.Add(new Temperature("Temperature #" + (i + 1), i));
|
||||
f.Add(new Fan("CPU Fan", 0));
|
||||
for (int i = 1; i < superIO.Fans.Length; i++)
|
||||
f.Add(new Fan("Fan #" + (i + 1), i));
|
||||
break;
|
||||
default:
|
||||
v.Add(new Voltage("CPU VCore", 0));
|
||||
v.Add(new Voltage("Voltage #2", 1, true));
|
||||
|
||||
Reference in New Issue
Block a user