[PATCH v6 0/3] Add RP1 PWM controller support
Andrea della Porta <[email protected]>
| Newsgroups | org.kernel.vger.linux-pwm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 is then exported by this driver via syscon registers. A subsequent patch will add 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 V6: - dt-bindings: added Andrea and Stanimir as maintiners, Naushir if you want to be dropped from the maintainer list, please just give me a shout - dt-bindings: added dmas properties in case the driver will support that in the future - _tohw(): fetch the actual polarity in the disable case to avoid potential glitch due to garbage data in the passed-in param - _tohw(): fixed a compilation error on 32 bit target due to missing 64 bit divider helper function - _fromhw(): division by clk_rate explicitly cast to 32 bit for the divisor - _fromhw(): fixed an unsigned underflow in ticks calculation - set the atomic flag to allow calling from atomic context Naushir Patuck (2): dt-bindings: pwm: Add Raspberry Pi RP1 PWM controller pwm: rp1: Add RP1 PWM controller driver Stanimir Varbanov (1): arm64: dts: broadcom: rpi-5: Add RP1 PWM node .../bindings/pwm/raspberrypi,rp1-pwm.yaml | 66 +++ .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 12 + arch/arm64/boot/dts/broadcom/rp1-common.dtsi | 9 + drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-rp1.c | 435 ++++++++++++++++++ 6 files changed, 532 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/raspberrypi,rp1-pwm.yaml create mode 100644 drivers/pwm/pwm-rp1.c -- 2.35.3