Commit cffff6df authored by Corey Hickey's avatar Corey Hickey Committed by Guenter Roeck
Browse files

hwmon: (asus-ec-sensors) Fix T_Sensor for PRIME X670E-PRO WIFI



On the Asus PRIME X670E-PRO WIFI, the driver reports a constant value of
zero for T_Sensor. On this board, the register for T_Sensor is at a
different address, as found by experimentation and confirmed by
comparison to an independent temperature reading.

* sensor disconnected: -62.0°C
* ambient temperature: +22.0°C
* held between fingers: +30.0°C

Introduce SENSOR_TEMP_T_SENSOR_ALT1 to support the PRIME X670E-PRO WIFI
without causing a regression for other 600-series boards

Fixes: e0444758 ("hwmon: (asus-ec-sensors) add PRIME X670E-PRO WIFI")
Signed-off-by: default avatarCorey Hickey <bugfood-c@fatooh.org>
Link: https://lore.kernel.org/r/20260331215414.368785-1-bugfood-ml@fatooh.org


[groeck: Fixed typo, updated Fixes: reference]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 09773978
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -111,6 +111,8 @@ enum ec_sensors {
	ec_sensor_temp_mb,
	/* "T_Sensor" temperature sensor reading [℃] */
	ec_sensor_temp_t_sensor,
	/* like ec_sensor_temp_t_sensor, but at an alternate address [℃] */
	ec_sensor_temp_t_sensor_alt1,
	/* VRM temperature [℃] */
	ec_sensor_temp_vrm,
	/* VRM east (right) temperature [℃] */
@@ -160,6 +162,7 @@ enum ec_sensors {
#define SENSOR_TEMP_CPU_PACKAGE BIT(ec_sensor_temp_cpu_package)
#define SENSOR_TEMP_MB BIT(ec_sensor_temp_mb)
#define SENSOR_TEMP_T_SENSOR BIT(ec_sensor_temp_t_sensor)
#define SENSOR_TEMP_T_SENSOR_ALT1 BIT(ec_sensor_temp_t_sensor_alt1)
#define SENSOR_TEMP_VRM BIT(ec_sensor_temp_vrm)
#define SENSOR_TEMP_VRME BIT(ec_sensor_temp_vrme)
#define SENSOR_TEMP_VRMW BIT(ec_sensor_temp_vrmw)
@@ -279,6 +282,8 @@ static const struct ec_sensor_info sensors_family_amd_600[] = {
		EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
	[ec_sensor_temp_t_sensor] =
		EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x00, 0x36),
	[ec_sensor_temp_t_sensor_alt1] =
		EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x00, 0x37),
	[ec_sensor_fan_cpu_opt] =
		EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0),
	[ec_sensor_temp_water_in] =
@@ -519,7 +524,7 @@ static const struct ec_board_info board_info_prime_x570_pro = {
static const struct ec_board_info board_info_prime_x670e_pro_wifi = {
	.sensors = SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
		SENSOR_TEMP_MB | SENSOR_TEMP_VRM |
		SENSOR_TEMP_T_SENSOR | SENSOR_FAN_CPU_OPT,
		SENSOR_TEMP_T_SENSOR_ALT1 | SENSOR_FAN_CPU_OPT,
	.mutex_path = ACPI_GLOBAL_LOCK_PSEUDO_PATH,
	.family = family_amd_600_series,
};