Re: [PATCH v5 1/6] dt-bindings: pwm: Add a new binding for rockchip,rk3576-pwm
Uwe Kleine-König <[email protected]> Fri, 10 Jul 2026 12:31:35 +0200
| Newsgroups | org.kernel.vger.linux-pwm,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <alCvmLX1ke0qjh99@monoceros> |
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 <[email protected]> > Reviewed-by: Rob Herring (Arm) <[email protected]> > Signed-off-by: Nicolas Frattaroli <[email protected]> > --- > .../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 <[email protected]> > + > +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
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmpQygUACgkQj4D7WH0S /k530Qf/Yrgd15Oua0wX8H9DeijzIE3bpRLuqNvVEsc2me0Ww9zPov4iHylUuu1a RubtMDQyyXRuiGSqbcmeNV8lWGFbd/moOm1pw/KXnkvtIuBd2S3tIlTC2qCKRwpF MVE2yBKSN1h4IAZ88/ei1M2RCCTX6WQ13Tp3cvt1MEx9+y06qLmjgkrBixr/mPMq JZYYzZh//1spbCmc6clKnfshjrRB1iDOQiS1VeTZgCv/bcNgYxIRDov/BJZzLnRZ GYYcl6tFqfbJ8UA7sn7s9I6q6/1ZlHwjK7e7/DWPeyPgD7ncpJHr7a91ajTCtZmC lnC4jZZBJcY1/1UCHZTUCTXDhQRwhQ== =FvaV -----END PGP SIGNATURE-----