Re: [PATCH v5 1/6] dt-bindings: pwm: Add a new binding for rockchip,rk3576-pwm
From: Uwe Kleine-König
Date: Fri Jul 10 2026 - 06:33:32 EST
Hello,
On Mon, Apr 20, 2026 at 03:52:38PM +0200, Nicolas Frattaroli wrote:
> The Rockchip RK3576 SoC has a newer PWM controller IP revision than
> previous Rockchip SoCs. This IP, called "PWMv4" by Rockchip, introduces
> several new features, and consequently differs in its bindings.
>
> Instead of expanding the ever-growing rockchip-pwm binding that already
> has an if-condition, add an entirely new binding to handle this.
>
> There are two additional clocks, "osc" and "rc". These are available for
> every PWM instance, and the PWM hardware can switch between the "pwm",
> "osc" and "rc" clock at runtime.
>
> The PWM controller also comes with an interrupt now. This interrupt is
> used to signal various conditions.
>
> Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
> Reviewed-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
> ---
> .../bindings/pwm/rockchip,rk3576-pwm.yaml | 77 ++++++++++++++++++++++
> MAINTAINERS | 7 ++
> 2 files changed, 84 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pwm/rockchip,rk3576-pwm.yaml b/Documentation/devicetree/bindings/pwm/rockchip,rk3576-pwm.yaml
> new file mode 100644
> index 000000000000..48d5055c8b06
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/rockchip,rk3576-pwm.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/rockchip,rk3576-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Rockchip PWMv4 controller
> +
> +maintainers:
> + - Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
> +
> +description: |
> + The Rockchip PWMv4 controller is a PWM controller found on several Rockchip
> + SoCs, such as the RK3576.
> +
> + It supports both generating and capturing PWM signals.
> +
> +allOf:
> + - $ref: pwm.yaml#
> +
> +properties:
> + compatible:
> + items:
> + - const: rockchip,rk3576-pwm
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: Used to derive the PWM signal.
> + - description: Used as the APB bus clock.
> + - description: Used as an alternative to derive the PWM signal.
> + - description: Used as another alternative to derive the PWM signal.
> +
> + clock-names:
> + items:
> + - const: pwm
> + - const: pclk
> + - const: osc
> + - const: rc
> +
> + interrupts:
> + maxItems: 1
> +
> + "#pwm-cells":
> + const: 3
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
pwm.yaml has:
required:
- "#pwm-cells"
Still Sashiko[1] claims:
The binding defines #pwm-cells under properties, but omitting it from the
required list allows device tree nodes missing the property to pass schema
validation.
I played a bit around with dt-validate and I think Sashiko is wrong here
and pwm.yaml's requirement isn't overridden by the local required list.
So this patch should be fine.
Best regards
Uwe
[1] https://sashiko.dev/#/patchset/20260420-rk3576-pwm-v5-0-ae7cfbbe5427%40collabora.com
Attachment:
signature.asc
Description: PGP signature