Skip to contentSkip to conversation

hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME

PATCH Applied Eugene Shalygin 3 participants 4 messages Jun 8

Subsystems (3)
lore
Share & tools
lore

Eugene Shalygin

author maintainer
#0 lore raw

PATCH v2 1/1 hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME

From: Brian Downey <[email protected]>

Add support for ROG MAXIMUS Z790 EXTREME

---
 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
Documentation/hwmon/asus_ec_sensors.rst +1 -0
index 9ad3f0a57f55..60f1a6036538 100644
@@ -29,6 +29,7 @@ Supported boards:
  * ROG MAXIMUS XI HERO
  * ROG MAXIMUS XI HERO (WI-FI)
  * ROG MAXIMUS Z690 FORMULA
+ * ROG MAXIMUS Z790 EXTREME
  * ROG STRIX B550-E GAMING
  * ROG STRIX B550-I GAMING
  * ROG STRIX B650E-I GAMING WIFI
drivers/hwmon/asus-ec-sensors.c +15 -0
index 070bb368f2b7..0e78750de34a 100644
@@ -399,6 +399,12 @@ static const struct ec_sensor_info sensors_family_intel_700[] = {
 	[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
 	[ec_sensor_fan_cpu_opt] =
 		EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0),
+	[ec_sensor_fan_water_flow] =
+		EC_SENSOR("Water_Flow", hwmon_fan, 2, 0x00, 0xbc),
+	[ec_sensor_temp_water_in] =
+		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
+	[ec_sensor_temp_water_out] =
+		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
 };
 
 /* Shortcuts for common combinations */
@@ -509,6 +515,13 @@ static const struct ec_board_info board_info_maximus_z690_formula = {
 	.family = family_intel_600_series,
 };
 
+static const struct ec_board_info board_info_maximus_z790_extreme = {
+	.sensors = SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
+		SENSOR_SET_TEMP_WATER | SENSOR_FAN_WATER_FLOW,
+	.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
+	.family = family_intel_700_series,
+};
+
 static const struct ec_board_info board_info_prime_x470_pro = {
 	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB |
 		SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
@@ -857,6 +870,8 @@ static const struct dmi_system_id dmi_table[] = {
 					&board_info_maximus_x_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS Z690 FORMULA",
 					&board_info_maximus_z690_formula),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS Z790 EXTREME",
+					&board_info_maximus_z790_extreme),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-E GAMING",
 					&board_info_strix_b550_e_gaming),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-I GAMING",
Signature · 1 line
2.54.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Flawed loop condition in asus_ec_block_read() causes invalid EC hardware bank reads --

commit 8836d81dc6f932fbdf066b7ca8c52190b6258c01
Author: Brian Downey <[email protected]>

hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME

This commit adds hardware monitoring support for the ROG MAXIMUS Z790 EXTREME motherboard to the asus-ec-sensors driver. It registers new sensor configurations including water cooling telemetry and updates the DMI matching table.

Quoted 5 lines
drivers/hwmon/asus-ec-sensors.c +0 -0
index b5d97a27f80d3..08418a01208cb 100644

drivers/hwmon/asus-ec-sensors.c static const struct ec_sensor_info sensors_family_intel_700[] = { · line 413

Quoted 10 lines
drivers/hwmon/asus-ec-sensors.c +6 -0
@@ -404,6 +404,12 @@ static const struct ec_sensor_info sensors_family_intel_700[] = {
 	[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
 	[ec_sensor_fan_cpu_opt] =
 		EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0),
+	[ec_sensor_fan_water_flow] =
+		EC_SENSOR("Water_Flow", hwmon_fan, 2, 0x00, 0xbc),
+	[ec_sensor_temp_water_in] =
+		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
+	[ec_sensor_temp_water_out] =
+		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
 };

[Severity: High]
This is a pre-existing issue, but will adding sensors across multiple banks like 0x00 and 0x01 trigger a bug in asus_ec_block_read()?

Looking at asus_ec_block_read(), the inner loop iterates over all requested registers but only skips past banks, omitting a check for future banks:

drivers/hwmon/asus-ec-sensors.c:asus_ec_block_read() {
...

        for (ireg = 0; ireg < ec->nr_registers; ireg++) {
            reg_bank = register_bank(ec->registers[ireg]);
            if (reg_bank < bank) {
                continue;
            }
            ec_read(register_index(ec->registers[ireg]),

...

Since the ec->registers array is not strictly sorted by bank index, could this cause the embedded controller to issue an ec_read() for registers of future banks while physically switched to the current, lower bank?

This might result in unintended side effects like clearing clear-on-read status registers or disrupting hardware behavior.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
author maintainer
#2 lore raw
Quoted 5 lines · On Mon, 8 Jun 2026 at 08:23, <[email protected]> wrote:

Looking at asus_ec_block_read(), the inner loop iterates over all requested registers but only skips past banks, omitting a check for future banks:

drivers/hwmon/asus-ec-sensors.c:asus_ec_block_read() {
...

Quoted 8 lines
        for (ireg = 0; ireg < ec->nr_registers; ireg++) {
            reg_bank = register_bank(ec->registers[ireg]);
            if (reg_bank < bank) {
                continue;
            }
            ec_read(register_index(ec->registers[ireg]),

...

There are only two known banks at the moment, bank 0 and bank 1. The condition can be replaced with '!=', of course.

Cheers,
Eugene

maintainer Applied
#3 lore raw
In reply to Eugene Shalygin
Quoted 6 lines · Eugene Shalygin

From: Brian Downey <[email protected]>

Add support for ROG MAXIMUS Z790 EXTREME

Applied. Please provide change logs in the future.

Guenter

Quoted 57 lines
---
 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
Documentation/hwmon/asus_ec_sensors.rst +1 -0
index 9ad3f0a57f55..60f1a6036538 100644
@@ -29,6 +29,7 @@ Supported boards:
  * ROG MAXIMUS XI HERO
  * ROG MAXIMUS XI HERO (WI-FI)
  * ROG MAXIMUS Z690 FORMULA
+ * ROG MAXIMUS Z790 EXTREME
  * ROG STRIX B550-E GAMING
  * ROG STRIX B550-I GAMING
  * ROG STRIX B650E-I GAMING WIFI
drivers/hwmon/asus-ec-sensors.c +15 -0
index 070bb368f2b7..0e78750de34a 100644
@@ -399,6 +399,12 @@ static const struct ec_sensor_info sensors_family_intel_700[] = {
 	[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
 	[ec_sensor_fan_cpu_opt] =
 		EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0),
+	[ec_sensor_fan_water_flow] =
+		EC_SENSOR("Water_Flow", hwmon_fan, 2, 0x00, 0xbc),
+	[ec_sensor_temp_water_in] =
+		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
+	[ec_sensor_temp_water_out] =
+		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
 };
 
 /* Shortcuts for common combinations */
@@ -509,6 +515,13 @@ static const struct ec_board_info board_info_maximus_z690_formula = {
 	.family = family_intel_600_series,
 };
 
+static const struct ec_board_info board_info_maximus_z790_extreme = {
+	.sensors = SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
+		SENSOR_SET_TEMP_WATER | SENSOR_FAN_WATER_FLOW,
+	.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
+	.family = family_intel_700_series,
+};
+
 static const struct ec_board_info board_info_prime_x470_pro = {
 	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB |
 		SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
@@ -857,6 +870,8 @@ static const struct dmi_system_id dmi_table[] = {
 					&board_info_maximus_x_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS Z690 FORMULA",
 					&board_info_maximus_z690_formula),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS Z790 EXTREME",
+					&board_info_maximus_z790_extreme),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-E GAMING",
 					&board_info_strix_b550_e_gaming),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-I GAMING",