Re: [PATCH v2 1/1] hwmon: Add driver for Raspberry Pi RP1 fan tachometer
From: Gary Guo
Date: Tue Dec 01 2026 - 16:26:32 EST
On Tue Nov 24, 2026 at 5:39 PM GMT, Andrea della Porta wrote:
> Add a hardware monitoring driver to support the fan tachometer on the
> Raspberry Pi RP1 southbridge, found on the Raspberry Pi 5.
>
> The RP1 PWM controller block contains an MMIO register that holds the
> current fan speed in RPM. This register is periodically updated by the
> RP1 internal firmware based on the tachometer pulses.
>
> The RP1 PWM driver registers a "fan" auxiliary device for the
> tachometer. This driver binds to it as an auxiliary driver and reads
> the RPM value through rp1_pwm_read_tachometer(), exported by the PWM
> driver in the 'RP1_PWM' symbol namespace. Since the auxiliary device is
> a child of the PWM controller, no Device Tree node is needed and the
> lifetime of this driver is bound to the one of the PWM controller.
>
> Provides the standard hwmon sysfs attribute 'fan1_input'.
>
> Signed-off-by: Andrea della Porta <andrea.porta@xxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
Tested-by: Gary Guo <gary@xxxxxxxxxxx>
> ---
> Documentation/hwmon/index.rst | 1 +
> Documentation/hwmon/rp1-fan.rst | 43 ++++++++++++++++++
> MAINTAINERS | 7 +++
> drivers/hwmon/Kconfig | 11 +++++
> drivers/hwmon/Makefile | 1 +
> drivers/hwmon/rp1-hwmon.c | 78 +++++++++++++++++++++++++++++++++
> 6 files changed, 141 insertions(+)
> create mode 100644 Documentation/hwmon/rp1-fan.rst
> create mode 100644 drivers/hwmon/rp1-hwmon.c
>
> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
> index 199ca79621e9..2d81cf3b46ff 100644
> --- a/Documentation/hwmon/index.rst
> +++ b/Documentation/hwmon/index.rst