Re: [PATCH 2/2] hwmon: (nct6683) Add fan control support for MSI boards with NCT6687D-R

From: Guenter Roeck

Date: Mon Oct 26 2026 - 15:16:06 EST


On Sun, Oct 04, 2026 at 11:32:50AM -0400, Hamza Mahfooz wrote:
> The fan control registers of the NCT6687D-R used on recent MSI boards
> (customer ID 0x20d) differ from the ones used on Mitac boards, and
> changes must be made in a configuration phase of its fan engine.
>
> Add fan control support for these boards, based on a reverse engineered
> register map:
>
> - Manual mode is selected with bit (channel % 8) of register 0xa00
> (channels 0-7) or 0x80f (channels 8-15). In manual mode, the duty
> cycle is set with register (0xa28 + channel) (channels 0-7) or
> (0x260 + channel - 10) (channels 10-15). Otherwise, the fan curve
> configured by the BIOS is used.
> - A configuration phase is requested by setting bit 7 of register
> 0xa01, and is entered once register 0xcf8 reports that the fan
> registers are unlocked. It is completed by setting bit 6 of register
> 0xa01, after which the EC checks the new configuration, locks the
> registers again and reports whether the configuration was accepted.
>
> Fan control is supported for the CPU (channel 0), pump (channel 1) and
> system fan (channels 10-15) headers. Add pwmN_enable attributes for
> them, with 1 selecting manual and 2 automatic mode, and make pwmN
> writable in manual mode. The behaviour of the driver does not change
> unless pwmN or pwmN_enable is written.
>
> Signed-off-by: Hamza Mahfooz <someguy@xxxxxxxxxxxxxxxxxxx>

Applied.

Thanks,
Guenter