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: pxa-pwm: Convert to YAML

Convert the PXA PWM binding file from TXT to YAML.

The original binding does not mention any clocks, but the PWM controller
will not probe without a clock.

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240107-pxa-pwm-yaml-v3-1-92ac90911c3f@skole.hr
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

authored by

Duje Mihanović and committed by
Uwe Kleine-König
bdc585f9 e92ce0e8

+51 -30
+51
Documentation/devicetree/bindings/pwm/marvell,pxa-pwm.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pwm/marvell,pxa-pwm.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell PXA PWM 8 + 9 + maintainers: 10 + - Duje Mihanović <duje.mihanovic@skole.hr> 11 + 12 + allOf: 13 + - $ref: pwm.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - marvell,pxa250-pwm 19 + - marvell,pxa270-pwm 20 + - marvell,pxa168-pwm 21 + - marvell,pxa910-pwm 22 + 23 + reg: 24 + # Length should be 0x10 25 + maxItems: 1 26 + 27 + "#pwm-cells": 28 + # Used for specifying the period length in nanoseconds 29 + const: 1 30 + 31 + clocks: 32 + maxItems: 1 33 + 34 + required: 35 + - compatible 36 + - reg 37 + - "#pwm-cells" 38 + - clocks 39 + 40 + additionalProperties: false 41 + 42 + examples: 43 + - | 44 + #include <dt-bindings/clock/pxa-clock.h> 45 + 46 + pwm0: pwm@40b00000 { 47 + compatible = "marvell,pxa250-pwm"; 48 + reg = <0x40b00000 0x10>; 49 + #pwm-cells = <1>; 50 + clocks = <&clks CLK_PWM0>; 51 + };
-30
Documentation/devicetree/bindings/pwm/pxa-pwm.txt
··· 1 - Marvell PWM controller 2 - 3 - Required properties: 4 - - compatible: should be one or more of: 5 - - "marvell,pxa250-pwm" 6 - - "marvell,pxa270-pwm" 7 - - "marvell,pxa168-pwm" 8 - - "marvell,pxa910-pwm" 9 - - reg: Physical base address and length of the registers used by the PWM channel 10 - Note that one device instance must be created for each PWM that is used, so the 11 - length covers only the register window for one PWM output, not that of the 12 - entire PWM controller. Currently length is 0x10 for all supported devices. 13 - - #pwm-cells: Should be 1. This cell is used to specify the period in 14 - nanoseconds. 15 - 16 - Example PWM device node: 17 - 18 - pwm0: pwm@40b00000 { 19 - compatible = "marvell,pxa250-pwm"; 20 - reg = <0x40b00000 0x10>; 21 - #pwm-cells = <1>; 22 - }; 23 - 24 - Example PWM client node: 25 - 26 - backlight { 27 - compatible = "pwm-backlight"; 28 - pwms = <&pwm0 5000000>; 29 - ... 30 - }