Page MenuHomeFreeBSD

superio, ncthwm: add support for the Nuvoton NCT6798D
Needs ReviewPublic

Authored by nick_spun.io on Fri, Jul 17, 3:22 AM.
Tags
None
Referenced Files
F163431339: D58291.id182100.diff
Thu, Jul 23, 3:52 AM
F163407015: D58291.id.diff
Wed, Jul 22, 10:44 PM
F163350135: D58291.diff
Wed, Jul 22, 9:54 AM
Unknown Object (File)
Mon, Jul 20, 5:40 PM
Unknown Object (File)
Mon, Jul 20, 4:44 AM
Unknown Object (File)
Sun, Jul 19, 8:55 PM
Unknown Object (File)
Sat, Jul 18, 11:08 PM
Subscribers

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

The ASUS PRIME X570-P carries a Nuvoton NCT6798D, which reports Super I/O
device ID 0xd42b. Neither driver knew that ID, so superio probed ports
0x2e/0x4e, matched nothing and attached no device; ncthwm in turn had no
HWM logical device to attach to, and no fan tachometer was exposed at all.

Add an exact-match entry for 0xd42b to both drivers. The neighbouring
Nuvoton entries use .mask = 0xff, which ignores the whole revision byte,
but that is not usable for the 0xd4xx family: 0xd420 (NCT6796) and 0xd428
(NCT6798) are distinct parts differing only in the low byte. Linux masks
this family with 0xfff8, whose direct equivalent here would be
.mask = 0x07. That is not appropriate either, because the existing 0xd42a
entries are deliberately exact-match with an extid: that ID is claimed by
two different chips, NCT6796D-E and NCT5585D, which carry different
logical device lists and are disambiguated only by the prefer tunable.
Widening them with a mask would make all of 0xd428-0xd42f match both
entries, silently resolving to the first and mislabelling the part. A
discrete entry leaves that arrangement alone.

The NCT6798D has seven fan tachometers, two more than NCTHWM_FAN_MAX
allowed. Reading the fan bank directly on an X570-P showed a fan turning
at 4411 RPM at bank 4 offset 0xca, which the five-entry table could not
report. Raise the bound to seven and describe both additional
tachometers. The existing entries keep fan_count = 5 and are unaffected.

The SYSFAN/CPUFAN/AUXFAN* names follow the established NCT6779 convention
and do not necessarily correspond to the physical headers of any
particular board; on the X570-P the populated tachometers appear as
AUXFAN2 and AUXFAN3.

Tested on: ASUS PRIME X570-P, Ryzen 9 3950X, FreeBSD 16.0-CURRENT

Signed-off-by: Nick Price <nick@spun.io>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74863
Build 71746: arc lint + arc unit