[PATCH RFC 2/4] dt-bindings: hwmon: Add Raspberry Pi RP1 fan binding

From: Andrea della Porta

Date: Fri Oct 23 2026 - 06:17:14 EST


The Raspberry Pi RP1 is a multi-function southbridge used on the
Raspberry Pi 5. Its internal PWM controller block includes a built-in
hardware tachometer logic, which calculates the fan RPM by measuring the
tachometer pulses. The computed RPM is updated by the internal Cortex-M
firmware into specific MMIO registers within the PWM block.

Currently, the Linux PWM subsystem lacks a standard API to report
hardware-calculated tachometer values back to consumer drivers.
To avoid abusing the standard 'pwms' property, this binding introduces
a custom property, 'raspberrypi,pwm-tachometer', to link the standalone
hwmon fan driver to the RP1 PWM controller node. This enables reading
the tachometer MMIO registers and exposing the RPM via sysfs.

Signed-off-by: Andrea della Porta <andrea.porta@xxxxxxxx>
---
For the rationale behind this design, please see the cover letter

.../bindings/hwmon/raspberrypi,rp1-fan.yaml | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-fan.yaml

diff --git a/Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-fan.yaml b/Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-fan.yaml
new file mode 100644
index 0000000000000..53e5b67fa856b
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/raspberrypi,rp1-fan.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/raspberrypi,rp1-fan.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Raspberry Pi RP1 fan tachometer
+
+maintainers:
+ - Andrea della Porta <andrea.porta@xxxxxxxx>
+
+description: |
+ Hardware monitoring driver for the fan connected to the Raspberry Pi RP1
+ southbridge. The RP1 PWM controller hardware contains a built-in tachometer
+ logic that calculates the fan RPM. This binding links the fan to the PWM
+ controller to read the tachometer values.
+
+properties:
+ compatible:
+ const: raspberrypi,rp1-fan
+
+ raspberrypi,pwm-tachometer:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the RP1 PWM controller node that contains the tachometer
+ registers for this fan.
+
+required:
+ - compatible
+ - raspberrypi,pwm-tachometer
+
+additionalProperties: false
+
+examples:
+ - |
+ fan {
+ compatible = "raspberrypi,rp1-fan";
+ raspberrypi,pwm-tachometer = <&rp1_pwm1>;
+ };
--
2.35.3