Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: pwm: marvell,pxa-pwm: Add SpacemiT K1 PWM support

The SpacemiT K1 SoC reuses the Marvell PXA910-compatible PWM controller
with one notable difference: the addition of a resets property. To make
the device tree pass schema validation (make dtbs_check W=3), this patch
updates the binding to accept spacemit,k1-pwm as a compatible string, when
used in conjunction with the fallback marvell,pxa910-pwm.

Support for the optional resets property is also added, as it is required
by the K1 integration but was not present in the original Marvell bindings.

Since the PWM reset line may be deasserted during the early bootloader
stage, making the resets property optional avoids potential
double-deassertion, which could otherwise cause flickering on displays
that use PWM for backlight control.

Additionally, this patch adjusts the required value of the #pwm-cells
property for the new compatible string:
- For "spacemit,k1-pwm", #pwm-cells must be set to 3.
- For existing Marvell compatibles, #pwm-cells remains 1.

Background of #pwm-cells change is by an ongoing community discussion
about increasing the #pwm-cells value from 1 to 3 for all Marvell PXA PWM
devices. These devices are currently the only ones whose bindings do not
pass the line index as the first argument. See [1] for further details.

[1] https://lore.kernel.org/all/cover.1738842938.git.u.kleine-koenig@baylibre.com/

Reviewed-by: Rob Herring (Arm) <robh@kernel.org> # v2
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Link: https://lore.kernel.org/r/20250429085048.1310409-2-guodong@riscstar.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Guodong Xu and committed by
Uwe Kleine-König
08e0b981 9c06f26b

+28 -7
+28 -7
Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
··· 11 11 12 12 allOf: 13 13 - $ref: pwm.yaml# 14 + - if: 15 + properties: 16 + compatible: 17 + contains: 18 + const: spacemit,k1-pwm 19 + then: 20 + properties: 21 + "#pwm-cells": 22 + const: 3 23 + else: 24 + properties: 25 + "#pwm-cells": 26 + const: 1 27 + description: | 28 + Used for specifying the period length in nanoseconds. 14 29 15 30 properties: 16 31 compatible: 17 - enum: 18 - - marvell,pxa250-pwm 19 - - marvell,pxa270-pwm 20 - - marvell,pxa168-pwm 21 - - marvell,pxa910-pwm 32 + oneOf: 33 + - enum: 34 + - marvell,pxa250-pwm 35 + - marvell,pxa270-pwm 36 + - marvell,pxa168-pwm 37 + - marvell,pxa910-pwm 38 + - items: 39 + - const: spacemit,k1-pwm 40 + - const: marvell,pxa910-pwm 22 41 23 42 reg: 24 43 # Length should be 0x10 25 44 maxItems: 1 26 45 27 46 "#pwm-cells": 28 - # Used for specifying the period length in nanoseconds 29 - const: 1 47 + description: Number of cells in a pwm specifier. 30 48 31 49 clocks: 50 + maxItems: 1 51 + 52 + resets: 32 53 maxItems: 1 33 54 34 55 required: