Skip to content

Commit 84b3101

Browse files
committed
Add support for ASUS TUF GAMING B450 PLUS II and fixes for some ITE
* Add informations for ASUS TUF GAMING B450 PLUS II + some fix * Improved and more correct IT8665 fixes
1 parent 8526cf9 commit 84b3101

File tree

4 files changed

+57
-3
lines changed

4 files changed

+57
-3
lines changed

OpenHardwareMonitorLib/Hardware/Motherboard/Identification.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ public static Model GetModel(string name)
703703
return Model.X670_AORUS_ELITE_AX;
704704
case var _ when name.Equals("PROART B760-CREATOR D4", StringComparison.OrdinalIgnoreCase):
705705
return Model.PROART_B760_CREATOR_D4;
706+
case var _ when name.Equals("TUF GAMING B450-PLUS II", StringComparison.OrdinalIgnoreCase):
707+
return Model.TUF_GAMING_B450_PLUS_II;
706708
case var _ when name.Equals("Base Board Product Name", StringComparison.OrdinalIgnoreCase):
707709
case var _ when name.Equals("To be filled by O.E.M.", StringComparison.OrdinalIgnoreCase):
708710
return Model.Unknown;

OpenHardwareMonitorLib/Hardware/Motherboard/Lpc/IT87XX.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ internal class IT87XX : ISuperIO
1919
private readonly int _gpioCount;
2020
private readonly bool _has16BitFanCounter;
2121
private readonly bool _hasExtReg;
22+
private readonly bool _hasAlt6thFanReg;
2223
private readonly bool[] _initialFanOutputModeEnabled = new bool[3]; // Initial Fan Controller Main Control Register value.
2324
private readonly byte[] _initialFanPwmControl = new byte[MaxFanHeaders]; // This will also store the 2nd control register value.
2425
private readonly byte[] _initialFanPwmControlExt = new byte[MaxFanHeaders];
@@ -96,6 +97,8 @@ Chip.IT8631E or
9697
Chip.IT8638E or
9798
Chip.IT8696E;
9899

100+
_hasAlt6thFanReg = chip is Chip.IT8665E or Chip.IT8625E;
101+
99102
switch (chip)
100103
{
101104
case Chip.IT8613E:
@@ -242,7 +245,16 @@ Chip.IT8638E or
242245
}
243246

244247
if (Fans.Length >= 6)
245-
_fansDisabled[5] = (modes & (1 << 2)) == 0;
248+
{
249+
if (chip == Chip.IT8665E)
250+
{
251+
modes = ReadByte(FAN_TACHOMETER_16BIT_REGISTER_ALT, out valid);
252+
if (valid)
253+
_fansDisabled[5] = (modes & (1 << 3)) == 0;
254+
}
255+
else
256+
_fansDisabled[5] = (modes & (1 << 2)) == 0;
257+
}
246258
}
247259

248260
// Set the number of GPIO sets
@@ -460,11 +472,11 @@ public void Update()
460472
if (_fansDisabled[i])
461473
continue;
462474

463-
int value = ReadByte(FAN_TACHOMETER_REG[i], out bool valid);
475+
int value = ReadByte(_hasAlt6thFanReg ? FAN_TACHOMETER_REG_ALT[i] : FAN_TACHOMETER_REG[i], out bool valid);
464476
if (!valid)
465477
continue;
466478

467-
value |= ReadByte(FAN_TACHOMETER_EXT_REG[i], out valid) << 8;
479+
value |= ReadByte(_hasAlt6thFanReg ? FAN_TACHOMETER_EXT_REG_ALT[i] : FAN_TACHOMETER_EXT_REG[i], out valid) << 8;
468480
if (!valid)
469481
continue;
470482

@@ -598,6 +610,7 @@ private void RestoreDefaultFanPwmControl(int index)
598610
private const byte DATA_REGISTER_OFFSET = 0x06;
599611
private const byte BANK_REGISTER = 0x06; // bit 5-6 define selected bank
600612
private const byte FAN_TACHOMETER_16BIT_REGISTER = 0x0C;
613+
private const byte FAN_TACHOMETER_16BIT_REGISTER_ALT = 0x0B;
601614
private const byte FAN_TACHOMETER_DIVISOR_REGISTER = 0x0B;
602615

603616
private readonly byte[] ITE_VENDOR_IDS = { 0x90, 0x7F };
@@ -612,6 +625,8 @@ private void RestoreDefaultFanPwmControl(int index)
612625
private readonly byte[] FAN_PWM_CTRL_EXT_REG = { 0x63, 0x6b, 0x73, 0x7b, 0xa3, 0xab };
613626
private readonly byte[] FAN_TACHOMETER_EXT_REG = { 0x18, 0x19, 0x1a, 0x81, 0x83, 0x4d };
614627
private readonly byte[] FAN_TACHOMETER_REG = { 0x0d, 0x0e, 0x0f, 0x80, 0x82, 0x4c };
628+
private readonly byte[] FAN_TACHOMETER_EXT_REG_ALT = { 0x18, 0x19, 0x1a, 0x81, 0x83, 0x94 };
629+
private readonly byte[] FAN_TACHOMETER_REG_ALT = { 0x0d, 0x0e, 0x0f, 0x80, 0x82, 0x93 };
615630

616631
// Address of the Fan Controller Main Control Register.
617632
// No need for the 2nd control register (bit 7 of 0x15 0x16 0x17),

OpenHardwareMonitorLib/Hardware/Motherboard/Model.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public enum Model
115115
ROG_STRIX_X870E_E_GAMING_WIFI,
116116
PROART_X870E_CREATOR_WIFI,
117117
PROART_B760_CREATOR_D4,
118+
TUF_GAMING_B450_PLUS_II,
118119

119120
//BIOSTAR
120121
B660GTN,

OpenHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,42 @@ private static void GetIteConfigurationsB(ISuperIO superIO, Manufacturer manufac
13461346

13471347
break;
13481348

1349+
case Model.TUF_GAMING_B450_PLUS_II: // IT8665E
1350+
v.Add(new Voltage("Vcore", 0));
1351+
v.Add(new Voltage("Vccp2", 1));
1352+
v.Add(new Voltage("+12V", 2, 5, 1));
1353+
v.Add(new Voltage("+5V", 3, 1.5f, 1));
1354+
v.Add(new Voltage("Voltage #5", 4, true));
1355+
v.Add(new Voltage("Voltage #6", 5, true));
1356+
v.Add(new Voltage("Voltage #7", 6, true));
1357+
v.Add(new Voltage("3VSB", 7, 10, 10));
1358+
v.Add(new Voltage("VBat", 8, 10, 10));
1359+
//v.Add(new Voltage("AVCC3", 15, 10, 10));
1360+
1361+
t.Add(new Temperature("CPU", 0));
1362+
t.Add(new Temperature("Motherboard", 1));
1363+
t.Add(new Temperature("Temperature #3", 2));
1364+
t.Add(new Temperature("Temperature #4", 3));
1365+
t.Add(new Temperature("Temperature #5", 4));
1366+
t.Add(new Temperature("Temperature #6", 5));
1367+
1368+
f.Add(new Fan("CPU Fan", 0));
1369+
f.Add(new Fan("Chassis Fan #1", 1));
1370+
f.Add(new Fan("Chassis Fan #2", 2));
1371+
f.Add(new Fan("Chassis Fan #3", 3));
1372+
//f.Add(new Fan("Chassis Fan #4", 4)); //Useless. Not connected to anything.
1373+
f.Add(new Fan("AIO Pump", 5));
1374+
1375+
c.Add(new Control("CPU Fan Control", 0));
1376+
c.Add(new Control("Chassis Fan #1 Control", 1));
1377+
c.Add(new Control("Chassis Fan #2 Control", 2));
1378+
c.Add(new Control("Chassis Fan #3 Control", 3));
1379+
//c.Add(new Control("Chassis Fan #4 Control", 4)); //Useless. Not connected to anything.
1380+
c.Add(new Control("AIO Pump Control", 5));
1381+
1382+
break;
1383+
1384+
13491385
default:
13501386
v.Add(new Voltage("Vcore", 0));
13511387
v.Add(new Voltage("Voltage #2", 1, true));

0 commit comments

Comments
 (0)