[PATCH] dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Fri Nov 18 06:22:24 PST 2022
On 18/11/2022 13:54, Tony Lindgren wrote:
> Update for yaml and remove the old txt binding.
>
> Cc: Nishanth Menon <nm at ti.com>
> Cc: Vignesh Raghavendra <vigneshr at ti.com>
> Signed-off-by: Tony Lindgren <tony at atomide.com>
Thank you for your patch. There is something to discuss/improve.
> -Example:
> - pwm9: dmtimer-pwm at 9 {
> - compatible = "ti,omap-dmtimer-pwm";
> - ti,timers = <&timer9>;
> - #pwm-cells = <3>;
> - };
> diff --git a/Documentation/devicetree/bindings/pwm/ti,pwm-omap-dmtimer.yaml b/Documentation/devicetree/bindings/pwm/ti,pwm-omap-dmtimer.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/ti,pwm-omap-dmtimer.yaml
Use filename matching the compatible, so ti,omap-dmtimer-pwm.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/ti,pwm-omap-dmtimer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI dual mode timer PWM controller
> +
> +maintainers:
> + - Tony Lindgren <tony at atomide.com>
> +
> +description:
> + TI dual mode timer instances have an IO pin for PWM capability
> +
> +allOf:
> + - $ref: pwm.yaml#
> +
> +properties:
> + $nodename:
> + pattern: "^pwm-([1-9]|1[0-2])$"
Drop the nodename, device schemas do not need to enforce it.
> +
> + compatible:
> + const: ti,omap-dmtimer-pwm
> +
> + "#pwm-cells":
> + const: 3
> +
> + ti,timers:
> + description: phandle to the timer instance used for PWM
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> + ti,prescaler:
> + description: legacy clock prescaled for timer
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
> + deprecated: true
This was not deprecated before and your commit msg does not mention it.
> +
> + ti,clock-source:
> + description: legacy clock for timer, use assigned-clocks instead
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [ 0, 1, 2 ]
You miss here explanation of constants.
> + deprecated: true
This was not deprecated before and your commit msg does not mention it.
> +
> +required:
> + - compatible
> + - ti,timers
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + pwm9: pwm-9 {
Node name: pwm
> + compatible = "ti,omap-dmtimer-pwm";
> + ti,timers = <&timer9>;
> + #pwm-cells = <3>;
> + };
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list