Add support for ASUS TUF GAMING B450 PLUS II and fixes for some ITE (#1677)
* Add informations for ASUS TUF GAMING B450 PLUS II + some fix * Improved and more correct IT8665 fixes
This commit is contained in:
@@ -709,6 +709,8 @@ internal class Identification
|
||||
return Model.X670_AORUS_ELITE_AX;
|
||||
case var _ when name.Equals("PROART B760-CREATOR D4", StringComparison.OrdinalIgnoreCase):
|
||||
return Model.PROART_B760_CREATOR_D4;
|
||||
case var _ when name.Equals("TUF GAMING B450-PLUS II", StringComparison.OrdinalIgnoreCase):
|
||||
return Model.TUF_GAMING_B450_PLUS_II;
|
||||
case var _ when name.Equals("Base Board Product Name", StringComparison.OrdinalIgnoreCase):
|
||||
case var _ when name.Equals("To be filled by O.E.M.", StringComparison.OrdinalIgnoreCase):
|
||||
return Model.Unknown;
|
||||
|
||||
@@ -25,7 +25,8 @@ internal class IT87XX : ISuperIO
|
||||
private readonly int _gpioCount;
|
||||
private readonly bool _has16BitFanCounter;
|
||||
private readonly bool _hasExtReg;
|
||||
private readonly bool[] _initialFanOutputModeEnabled = new bool[3]; // Initial Fan Controller Main Control Register value.
|
||||
private readonly bool _hasAlt6thFanReg;
|
||||
private readonly bool[] _initialFanOutputModeEnabled = new bool[3]; // Initial Fan Controller Main Control Register value.
|
||||
private readonly byte[] _initialFanPwmControl = new byte[MaxFanHeaders]; // This will also store the 2nd control register value.
|
||||
private readonly byte[] _initialFanPwmControlExt = new byte[MaxFanHeaders];
|
||||
private readonly bool[] _restoreDefaultFanPwmControlRequired = new bool[MaxFanHeaders];
|
||||
@@ -104,6 +105,8 @@ internal class IT87XX : ISuperIO
|
||||
Chip.IT8638E or
|
||||
Chip.IT8696E;
|
||||
|
||||
_hasAlt6thFanReg = chip is Chip.IT8665E or Chip.IT8625E;
|
||||
|
||||
switch (chip)
|
||||
{
|
||||
case Chip.IT8613E:
|
||||
@@ -250,7 +253,16 @@ internal class IT87XX : ISuperIO
|
||||
}
|
||||
|
||||
if (Fans.Length >= 6)
|
||||
_fansDisabled[5] = (modes & (1 << 2)) == 0;
|
||||
{
|
||||
if (chip == Chip.IT8665E)
|
||||
{
|
||||
modes = ReadByte(FAN_TACHOMETER_16BIT_REGISTER_ALT, out valid);
|
||||
if (valid)
|
||||
_fansDisabled[5] = (modes & (1 << 3)) == 0;
|
||||
}
|
||||
else
|
||||
_fansDisabled[5] = (modes & (1 << 2)) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the number of GPIO sets
|
||||
@@ -468,11 +480,11 @@ internal class IT87XX : ISuperIO
|
||||
if (_fansDisabled[i])
|
||||
continue;
|
||||
|
||||
int value = ReadByte(FAN_TACHOMETER_REG[i], out bool valid);
|
||||
int value = ReadByte(_hasAlt6thFanReg ? FAN_TACHOMETER_REG_ALT[i] : FAN_TACHOMETER_REG[i], out bool valid);
|
||||
if (!valid)
|
||||
continue;
|
||||
|
||||
value |= ReadByte(FAN_TACHOMETER_EXT_REG[i], out valid) << 8;
|
||||
value |= ReadByte(_hasAlt6thFanReg ? FAN_TACHOMETER_EXT_REG_ALT[i] : FAN_TACHOMETER_EXT_REG[i], out valid) << 8;
|
||||
if (!valid)
|
||||
continue;
|
||||
|
||||
@@ -608,6 +620,7 @@ internal class IT87XX : ISuperIO
|
||||
private const byte DATA_REGISTER_OFFSET = 0x06;
|
||||
private const byte BANK_REGISTER = 0x06; // bit 5-6 define selected bank
|
||||
private const byte FAN_TACHOMETER_16BIT_REGISTER = 0x0C;
|
||||
private const byte FAN_TACHOMETER_16BIT_REGISTER_ALT = 0x0B;
|
||||
private const byte FAN_TACHOMETER_DIVISOR_REGISTER = 0x0B;
|
||||
|
||||
private readonly byte[] ITE_VENDOR_IDS = { 0x90, 0x7F };
|
||||
@@ -622,6 +635,8 @@ internal class IT87XX : ISuperIO
|
||||
private readonly byte[] FAN_PWM_CTRL_EXT_REG = { 0x63, 0x6b, 0x73, 0x7b, 0xa3, 0xab };
|
||||
private readonly byte[] FAN_TACHOMETER_EXT_REG = { 0x18, 0x19, 0x1a, 0x81, 0x83, 0x4d };
|
||||
private readonly byte[] FAN_TACHOMETER_REG = { 0x0d, 0x0e, 0x0f, 0x80, 0x82, 0x4c };
|
||||
private readonly byte[] FAN_TACHOMETER_EXT_REG_ALT = { 0x18, 0x19, 0x1a, 0x81, 0x83, 0x94 };
|
||||
private readonly byte[] FAN_TACHOMETER_REG_ALT = { 0x0d, 0x0e, 0x0f, 0x80, 0x82, 0x93 };
|
||||
|
||||
// Address of the Fan Controller Main Control Register.
|
||||
// No need for the 2nd control register (bit 7 of 0x15 0x16 0x17),
|
||||
|
||||
Executable → Regular
+1
@@ -123,6 +123,7 @@ public enum Model
|
||||
ROG_STRIX_X870E_E_GAMING_WIFI,
|
||||
PROART_X870E_CREATOR_WIFI,
|
||||
PROART_B760_CREATOR_D4,
|
||||
TUF_GAMING_B450_PLUS_II,
|
||||
|
||||
//BIOSTAR
|
||||
B660GTN,
|
||||
|
||||
@@ -1352,6 +1352,42 @@ internal sealed class SuperIOHardware : Hardware
|
||||
|
||||
break;
|
||||
|
||||
case Model.TUF_GAMING_B450_PLUS_II: // IT8665E
|
||||
v.Add(new Voltage("Vcore", 0));
|
||||
v.Add(new Voltage("Vccp2", 1));
|
||||
v.Add(new Voltage("+12V", 2, 5, 1));
|
||||
v.Add(new Voltage("+5V", 3, 1.5f, 1));
|
||||
v.Add(new Voltage("Voltage #5", 4, true));
|
||||
v.Add(new Voltage("Voltage #6", 5, true));
|
||||
v.Add(new Voltage("Voltage #7", 6, true));
|
||||
v.Add(new Voltage("3VSB", 7, 10, 10));
|
||||
v.Add(new Voltage("VBat", 8, 10, 10));
|
||||
//v.Add(new Voltage("AVCC3", 15, 10, 10));
|
||||
|
||||
t.Add(new Temperature("CPU", 0));
|
||||
t.Add(new Temperature("Motherboard", 1));
|
||||
t.Add(new Temperature("Temperature #3", 2));
|
||||
t.Add(new Temperature("Temperature #4", 3));
|
||||
t.Add(new Temperature("Temperature #5", 4));
|
||||
t.Add(new Temperature("Temperature #6", 5));
|
||||
|
||||
f.Add(new Fan("CPU Fan", 0));
|
||||
f.Add(new Fan("Chassis Fan #1", 1));
|
||||
f.Add(new Fan("Chassis Fan #2", 2));
|
||||
f.Add(new Fan("Chassis Fan #3", 3));
|
||||
//f.Add(new Fan("Chassis Fan #4", 4)); //Useless. Not connected to anything.
|
||||
f.Add(new Fan("AIO Pump", 5));
|
||||
|
||||
c.Add(new Control("CPU Fan Control", 0));
|
||||
c.Add(new Control("Chassis Fan #1 Control", 1));
|
||||
c.Add(new Control("Chassis Fan #2 Control", 2));
|
||||
c.Add(new Control("Chassis Fan #3 Control", 3));
|
||||
//c.Add(new Control("Chassis Fan #4 Control", 4)); //Useless. Not connected to anything.
|
||||
c.Add(new Control("AIO Pump Control", 5));
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
v.Add(new Voltage("Vcore", 0));
|
||||
v.Add(new Voltage("Voltage #2", 1, true));
|
||||
|
||||
Reference in New Issue
Block a user