Skip to contentSkip to conversation

hwmon: Add Minisforum UM780 XTX EC monitoring and fan control

PATCH Applied Sebastián Peyrott 3 participants 3 messages Sep 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 hwmon: Add Minisforum UM780 XTX EC monitoring and fan control

Add a DMI-gated hwmon driver for the embedded controller used by the Minisforum UM780 XTX with board revision 1.1 and BIOS 1.06.

Expose the CPU and system fan control temperatures and tachometers. The tachometer protocol returns one byte per OEM command, so serialize transactions and use high-low-high sampling to reject torn values.

Allow selecting either complete OEM CPU fan profile through pwm1_enable and changing the two validated system fan transition temperatures through standard automatic-curve attributes. Cache coherent settings and restore them after the firmware reloads defaults following resume.

---
Changes in v4:
- depend directly on ACPI_EC to prevent undefined ACPI EC references when that support is disabled;
- send the single patch without a separate cover letter.

Tested on the target system with concurrent RPM reads, OEM profile changes, system-fan threshold changes, unload/reload stress, and s2idle resume. The settings were correct from the first userspace sample after resume and remained stable for 15 seconds. The 0-day i386 randconfig that exposed the missing dependency also builds successfully with this revision.

OpenAI Codex assisted with reverse-engineering review, code editing, test orchestration, and patch and email preparation across a long interactive session. I reviewed every change, ran the live tests on the target hardware, and take responsibility for the submission.

 Documentation/hwmon/index.rst               |   1 +
 Documentation/hwmon/minisforum-um780xtx.rst |  68 +++
 MAINTAINERS                                 |   7 +
 drivers/hwmon/Kconfig                       |  16 +
 drivers/hwmon/Makefile                      |   1 +
 drivers/hwmon/minisforum-um780xtx.c         | 501 ++++++++++++++++++++
 6 files changed, 594 insertions(+)
 create mode 100644 Documentation/hwmon/minisforum-um780xtx.rst
 create mode 100644 drivers/hwmon/minisforum-um780xtx.c
Documentation/hwmon/index.rst +1 -0
index d979e6d6e9f2..c98cad395455 100644
@@ -186,6 +186,7 @@ Hardware Monitoring Kernel Drivers
    mcp3021
    mcp9982
    menf21bmc
+   minisforum-um780xtx
    mlxreg-fan
    mp2856
    mp2869
Documentation/hwmon/minisforum-um780xtx.rst new file +68 -0

68 lines not on this page · raw message

MAINTAINERS +7 -0
index 6156e48e1816..f60ea9c6cfe7 100644
@@ -18012,6 +18012,13 @@ F:	include/linux/min_heap.h
 F:	lib/min_heap.c
 F:	lib/tests/min_heap_kunit.c
 
+MINISFORUM UM780 XTX EC HARDWARE MONITOR DRIVER
+M:	Sebastián Peyrott <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/hwmon/minisforum-um780xtx.rst
+F:	drivers/hwmon/minisforum-um780xtx.c
+
 MIPI CCS, SMIA AND SMIA++ IMAGE SENSOR DRIVER
 M:	Sakari Ailus <[email protected]>
 L:	[email protected]
drivers/hwmon/Kconfig +16 -0
index 81a9a1d40eec..06e730ee9f6e 100644
@@ -1490,6 +1490,22 @@ config SENSORS_MENF21BMC_HWMON
 	  This driver can also be built as a module. If so the module
 	  will be called menf21bmc_hwmon.
 
+config SENSORS_MINISFORUM_UM780XTX
+	tristate "Minisforum UM780 XTX EC hardware monitoring"
+	depends on ACPI_EC && DMI && X86
+	help
+	  If you say yes here you get support for the hardware monitoring
+	  features of the embedded controller in the Minisforum UM780 XTX.
+	  This includes CPU and system fan speeds, their control temperatures,
+	  two CPU fan profiles, system fan temperature thresholds, and
+	  preservation of the selected settings across suspend and resume.
+
+	  This driver only binds to explicitly supported board and firmware
+	  versions.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called minisforum-um780xtx.
+
 config SENSORS_MR75203
 	tristate "Moortec Semiconductor MR75203 PVT Controller"
 	select REGMAP_MMIO
drivers/hwmon/Makefile +1 -0
index 0cad7e21634c..a690f5f97ffc 100644
@@ -180,6 +180,7 @@ obj-$(CONFIG_SENSORS_TC654)	+= tc654.o
 obj-$(CONFIG_SENSORS_TPS23861)	+= tps23861.o
 obj-$(CONFIG_SENSORS_MLXREG_FAN) += mlxreg-fan.o
 obj-$(CONFIG_SENSORS_MENF21BMC_HWMON) += menf21bmc_hwmon.o
+obj-$(CONFIG_SENSORS_MINISFORUM_UM780XTX) += minisforum-um780xtx.o
 obj-$(CONFIG_SENSORS_MR75203)	+= mr75203.o
 obj-$(CONFIG_SENSORS_NCT6683)	+= nct6683.o
 obj-$(CONFIG_SENSORS_NCT6694)	+= nct6694-hwmon.o
drivers/hwmon/minisforum-um780xtx.c new file +501 -0

501 lines not on this page · raw message

base-commit: 75f2c0b3690702c90863c2e138cb5520670845ea

Signature · 1 line
2.54.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

Add a DMI-gated hwmon driver for the embedded controller used by the Minisforum UM780 XTX with board revision 1.1 and BIOS 1.06.

Expose the CPU and system fan control temperatures and tachometers. The tachometer protocol returns one byte per OEM command, so serialize transactions and use high-low-high sampling to reject torn values.

Quoted 6 lines

Allow selecting either complete OEM CPU fan profile through pwm1_enable and changing the two validated system fan transition temperatures through standard automatic-curve attributes. Cache coherent settings and restore them after the firmware reloads defaults following resume.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Sebastián Peyrott
Quoted 7 lines · Sebastián Peyrott

Add a DMI-gated hwmon driver for the embedded controller used by the Minisforum UM780 XTX with board revision 1.1 and BIOS 1.06.

Expose the CPU and system fan control temperatures and tachometers. The tachometer protocol returns one byte per OEM command, so serialize transactions and use high-low-high sampling to reject torn values.

Quoted 6 lines

Allow selecting either complete OEM CPU fan profile through pwm1_enable and changing the two validated system fan transition temperatures through standard automatic-curve attributes. Cache coherent settings and restore them after the firmware reloads defaults following resume.

Applied.

Thanks,
Guenter