The branch main has been updated by nprice:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9c650fb537d53ec396fc8537b2de403553ae3d02

commit 9c650fb537d53ec396fc8537b2de403553ae3d02
Author:     Nick Price <[email protected]>
AuthorDate: 2026-09-12 21:56:08 +0000
Commit:     Nick Price <[email protected]>
CommitDate: 2026-09-12 21:57:24 +0000

    superio, ncthwm: add support for the Nuvoton NCT6798D
    
    The ASUS PRIME X570-P carries a Nuvoton NCT6798D, Super I/O device ID 
0xd42b. Add an exact-match entry to both. Exact rather than masked: the 
neighboring 0xd42a entries are deliberately exact with an extid because that ID 
is claimed by both NCT6796D-E and NCT5585D, and widening the family would make 
them collide.
    
    The NCT6798D has seven tachometers, so raise NCTHWM_FAN_MAX to seven and 
describe the two extra ones; existing entries keep fan_count = 5 and are 
unaffected. Fan names follow the NCT6779 convention and do not map to any 
board's physical headers.
    
    Tested on: ASUS PRIME X570-P, Ryzen 9 5950X, FreeBSD 16.0-CURRENT.
    
    Approved by:    adrian
    Reviewed by:    stephane.rochoy_stormshield.eu, adrian
    Differential Revision:  https://reviews.freebsd.org/D58291
    
    Signed-off-by: Nick Price <[email protected]>
---
 sys/dev/ncthwm/ncthwm.c   | 17 ++++++++++++++++-
 sys/dev/superio/superio.c |  5 +++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/sys/dev/ncthwm/ncthwm.c b/sys/dev/ncthwm/ncthwm.c
index 99d32be8a82d..c23635df66fe 100644
--- a/sys/dev/ncthwm/ncthwm.c
+++ b/sys/dev/ncthwm/ncthwm.c
@@ -39,7 +39,7 @@
 #include <machine/bus.h>
 #include <machine/resource.h>
 
-#define NCTHWM_FAN_MAX                 5
+#define NCTHWM_FAN_MAX                 7
 
 #define NCTHWM_BANK_SELECT 0x4e
 #define NCTHWM_VENDOR_ID   0x4f
@@ -98,6 +98,21 @@ struct ncthwm_device {
                        { .name = "AUXFAN1", .low_byte_offset = 0xc7, 
.high_byte_offset = 0xc6 },
                        { .name = "AUXFAN2", .low_byte_offset = 0xc9, 
.high_byte_offset = 0xc8 },
                },
+       }, {
+               .devid       = 0xd42b,
+               .descr       = "HWM on Nuvoton NCT6798D",
+               .base_offset = 5,
+               .fan_bank    = 4,
+               .fan_count   = 7,
+               .fan_info = {
+                       { .name = "SYSFAN",  .low_byte_offset = 0xc1, 
.high_byte_offset = 0xc0 },
+                       { .name = "CPUFAN",  .low_byte_offset = 0xc3, 
.high_byte_offset = 0xc2 },
+                       { .name = "AUXFAN0", .low_byte_offset = 0xc5, 
.high_byte_offset = 0xc4 },
+                       { .name = "AUXFAN1", .low_byte_offset = 0xc7, 
.high_byte_offset = 0xc6 },
+                       { .name = "AUXFAN2", .low_byte_offset = 0xc9, 
.high_byte_offset = 0xc8 },
+                       { .name = "AUXFAN3", .low_byte_offset = 0xcb, 
.high_byte_offset = 0xca },
+                       { .name = "AUXFAN4", .low_byte_offset = 0xcf, 
.high_byte_offset = 0xce },
+               },
        }
 };
 
diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c
index 24d40eb7a208..007e91552f11 100644
--- a/sys/dev/superio/superio.c
+++ b/sys/dev/superio/superio.c
@@ -452,6 +452,11 @@ static const struct {
                .descr   = "Nuvoton NCT5585D",
                .devices = nct5585_devices,
        },
+       {
+               .vendor  = SUPERIO_VENDOR_NUVOTON, .devid = 0xd42b,
+               .descr   = "Nuvoton NCT6798D",
+               .devices = nct67xx_devices,
+       },
        {
                .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc800, .mask = 0xff,
                .descr = "Nuvoton NCT6791",

Reply via email to