[PATCH v12 0/2] Add RP1 PWM controller support

From: Andrea della Porta

Date: Tue Sep 29 2026 - 08:58:40 EST


This patchset adds support for the PWM controller found on the
Raspberry Pi RP1 southbridge. This is necessary to operate the
cooling fan connected to one of the PWM channels.

The tachometer pin for the fan speed is managed by the firmware
running on the RP1's M-core. It uses the PHASE2 register
to report the RPM, which will be exported by this driver via
a function. A subsequent patch will add the function to read the
speed to this driver and a new device and driver to read the RPM
and export this value via hwmon.

Subsequent patches will also add the CPU thermal zone, which
acts as a consumer of the PWM device.

Best regards,
Andrea


CHANGES in V12:

- added a comment to better explain why we don't need to save and
restore config registers upon suspend/resume, hopefully Sashiko
will stop complaining about that.
- the RMW access to teh global control register is not synchronized
via spinlock.
- patch 3 from previous release:
"arm64: dts: broadcom: rpi-5: Add RP1 PWM node"
has been dropped from this patchset since it's already applied
to Florian's devicetre-arm64/next branch.

Link to V11:
https://lore.kernel.org/all/cover.1790606188.git.andrea.porta@xxxxxxxx/


Naushir Patuck (2):
dt-bindings: pwm: Add Raspberry Pi RP1 PWM controller
pwm: rp1: Add RP1 PWM controller driver

.../bindings/pwm/raspberrypi,rp1-pwm.yaml | 66 +++
drivers/pwm/Kconfig | 7 +
drivers/pwm/Makefile | 1 +
drivers/pwm/pwm-rp1.c | 428 ++++++++++++++++++
4 files changed, 502 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/raspberrypi,rp1-pwm.yaml
create mode 100644 drivers/pwm/pwm-rp1.c

--
2.35.3