Re: [PATCH 1/2] dt-bindings: pwm: marvell,pxa-pwm: Add SpacemiT K3 PWM support

Conor Dooley
2026-04-09T15:41:49Z

[-- Attachment #1: Type: text/plain, Size: 2845 bytes --]

On Thu, Apr 09, 2026 at 12:45:11AM +0000, Yixun Lan wrote:
> The PWM controller in SpacemiT K3 SoC reuse the same IP as previous K1
> generation, while the difference is that one additional bus clock is
> added.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
> ---
> .../devicetree/bindings/pwm/marvell,pxa-pwm.yaml | 53 ++++++++++++++++++++--
> 1 file changed, 50 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml b/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
> index 8df327e52810..3427c8ef3945 100644
> --- a/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
> @@ -15,7 +15,9 @@ allOf:
> properties:
> compatible:
> contains:
> - const: spacemit,k1-pwm
> + enum:
> + - spacemit,k1-pwm
> + - spacemit,k3-pwm
> then:
> properties:
> "#pwm-cells":
> @@ -26,6 +28,38 @@ allOf:
> const: 1
> description: |
> Used for specifying the period length in nanoseconds.
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - spacemit,k3-pwm
> + then:
> + properties:
> + clock-names:
> + items:
> + - const: func
> + - const: bus

This condition here doesn't appear to do anything? It just repeats
what's already done unconditonally below?

> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - spacemit,k3-pwm
> + then:
> + required:
> + - clock-names
> + properties:
> + clocks:
> + minItems: 2
> + clock-names:
> + minItems: 2
> + else:
> + properties:
> + clocks:
> + maxItems: 1
> + clock-names:
> + maxItems: 1
>
> properties:
> compatible:
> @@ -36,7 +70,9 @@ properties:
> - marvell,pxa168-pwm
> - marvell,pxa910-pwm
> - items:
> - - const: spacemit,k1-pwm
> + - enum:
> + - spacemit,k1-pwm
> + - spacemit,k3-pwm
> - const: marvell,pxa910-pwm
>
> reg:
> @@ -47,7 +83,18 @@ properties:
> description: Number of cells in a pwm specifier.
>
> clocks:
> - maxItems: 1
> + minItems: 1
> + items:
> + - description: The function clock
> + - description: An optional bus clock
> +
> + clock-names:
> + minItems: 1
> + maxItems: 2
> + oneOf:
> + - items:
> + - const: func
> + - const: bus
>
> resets:
> maxItems: 1
>
> --
> 2.53.0
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]