[PATCH v5 3/6] pwm: Add rockchip PWMv4 driver
Damon Ding
damon.ding at rock-chips.com
Sun Apr 26 02:44:46 PDT 2026
Hi Nicolas,
On 4/20/2026 9:52 PM, Nicolas Frattaroli wrote:
> The Rockchip RK3576 brings with it a new PWM IP, in downstream code
> referred to as "v4". This new IP is different enough from the previous
> Rockchip IP that I felt it necessary to add a new driver for it, instead
> of shoehorning it in the old one.
>
> Add this new driver, based on the PWM core's waveform APIs. Its platform
> device is registered by the parent mfpwm driver, from which it also
> receives a little platform data struct, so that mfpwm can guarantee that
> all the platform device drivers spread across different subsystems for
> this specific hardware IP do not interfere with each other.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
Tested-by: Damon Ding <damon.ding at rock-chips.com>
The continuous mode of all PWM channels has been preliminarily tested
and verified working on the RK3576 IoT board.
I have tested with several typical period and duty cycle configurations.
Following Uwe's suggestion [0], I also tested with libpwm using commands
similar to the following:
./pwmset -c 0 -p 0 -P 1000000 -D 500000 -s 5000
I was previously unaware of the existence of libpwm. I will continue to
follow its upstream development and updates going forward. :-)
Best regards,
Damon
[0]https://lore.kernel.org/all/fgu42esufq2x4fcccncqs3hlotih2gqmws5atotlaznuahoslw@34vblr6vboze/
More information about the Linux-rockchip
mailing list