dt-bindings: pwm: convert atmel pwm to json-schema
v3 cover dt-bindings: pwm: convert atmel pwm to json-schema
This patch series addresses the conversion of the Atmel PWM DT binding to the DT Schema format and adds the SAMA7G5 compatible to the respective converted binding.
Changes since v2:
- Moved allOf between maintainers and properties`
- Replaced additionalProperties: true with unevaluatedProperties: false
- Used 4 spaces indentation for examples
- Modified file path in MAINTAINERS
Sergiu Moga (2):
dt-bindings: pwm: convert atmel pwm to json-schema
dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
.../bindings/pwm/atmel,at91sam-pwm.yaml | 47 +++++++++++++++++++ .../devicetree/bindings/pwm/atmel-pwm.txt | 35 -------------- MAINTAINERS | 2 +- 3 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
Signature · 1 line
2.25.1
PATCH v3 1/2 dt-bindings: pwm: convert atmel pwm to json-schema
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema format.
--- .../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++ .../devicetree/bindings/pwm/atmel-pwm.txt | 35 ---------------- MAINTAINERS | 2 +- 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml new file +42 -0
@@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/atmel,at91sam-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel/Microchip PWM controller + +maintainers: + - Claudiu Beznea <[email protected]> + +allOf: + - $ref: "pwm.yaml#" + +properties: + compatible: + enum: + - atmel,at91sam9rl-pwm + - atmel,sama5d3-pwm + - atmel,sama5d2-pwm + - microchip,sam9x60-pwm + + reg: + maxItems: 1 + + "#pwm-cells": + const: 3 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + pwm0: pwm@f8034000 { + compatible = "atmel,at91sam9rl-pwm"; + reg = <0xf8034000 0x400>; + #pwm-cells = <3>; + };
Documentation/devicetree/bindings/pwm/atmel-pwm.txt deleted +0 -35
@@ -1,35 +0,0 @@ -Atmel PWM controller - -Required properties: - - compatible: should be one of: - - "atmel,at91sam9rl-pwm" - - "atmel,sama5d3-pwm" - - "atmel,sama5d2-pwm" - - "microchip,sam9x60-pwm" - - reg: physical base address and length of the controller's registers - - #pwm-cells: Should be 3. See pwm.yaml in this directory for a - description of the cells format. - -Example: - - pwm0: pwm@f8034000 { - compatible = "atmel,at91sam9rl-pwm"; - reg = <0xf8034000 0x400>; - #pwm-cells = <3>; - }; - - pwmleds { - compatible = "pwm-leds"; - - d1 { - label = "d1"; - pwms = <&pwm0 3 5000 0> - max-brightness = <255>; - }; - - d2 { - label = "d2"; - pwms = <&pwm0 1 5000 1> - max-brightness = <255>; - }; - };
MAINTAINERS +1 -1
@@ -12903,7 +12903,7 @@ M: Claudiu Beznea <[email protected]> L: [email protected] (moderated for non-subscribers) L: [email protected] S: Supported -F: Documentation/devicetree/bindings/pwm/atmel-pwm.txt +F: Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml F: drivers/pwm/pwm-atmel.c MICROCHIP SAMA5D2-COMPATIBLE ADC DRIVER
Signature · 1 line
2.25.1
Quoted 12 lines · Sergiu Moga
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema format.
Signed-off-by Sergiu Moga <[email protected]>--- .../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++ .../devicetree/bindings/pwm/atmel-pwm.txt | 35 ---------------- MAINTAINERS | 2 +- 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
Best regards,
Krzysztof
Rob Herring
maintainerQuoted 12 lines · Sergiu Moga
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema format.
Signed-off-by Sergiu Moga <[email protected]>--- .../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++ .../devicetree/bindings/pwm/atmel-pwm.txt | 35 ---------------- MAINTAINERS | 2 +- 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings.
Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.
Full log is available here: https://patchwork.ozlabs.org/patch/1602300
pwm@e1604000: compatible:0: 'microchip,sama7g5-pwm' is not one of ['atmel,at91sam9rl-pwm', 'atmel,sama5d3-pwm', 'atmel,sama5d2-pwm', 'microchip,sam9x60-pwm']
arch/arm/boot/dts/at91-sama7g5ek.dt.yaml
pwm@e1604000: compatible: ['microchip,sama7g5-pwm', 'atmel,sama5d2-pwm'] is too long
arch/arm/boot/dts/at91-sama7g5ek.dt.yaml
Rob Herring
maintainerQuoted 21 lines · Rob Herring
Quoted 12 lines · Sergiu Moga
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema format.
Signed-off-by Sergiu Moga <[email protected]>--- .../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++ .../devicetree/bindings/pwm/atmel-pwm.txt | 35 ---------------- MAINTAINERS | 2 +- 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txtRunning 'make
dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings.Note that it is not yet a requirement to have 0 warnings for
dtbs_check. This will change in the future.
Quoted 8 lines
Full log is available here: https://patchwork.ozlabs.org/patch/1602300
pwm@e1604000: compatible:0: 'microchip,sama7g5-pwm' is not one of ['atmel,at91sam9rl-pwm', 'atmel,sama5d3-pwm', 'atmel,sama5d2-pwm', 'microchip,sam9x60-pwm']
arch/arm/boot/dts/at91-sama7g5ek.dt.yamlpwm@e1604000: compatible: ['microchip,sama7g5-pwm', 'atmel,sama5d2-pwm'] is too long
arch/arm/boot/dts/at91-sama7g5ek.dt.yaml
Disregard, I see patch 2 addresses this.
Rob
PATCH v3 2/2 dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
In reply to Sergiu MogaAdd compatible strings list for SAMA7G5.
--- .../bindings/pwm/atmel,at91sam-pwm.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml +10 -5
@@ -15,11 +15,16 @@ allOf: properties: compatible: - enum: - - atmel,at91sam9rl-pwm - - atmel,sama5d3-pwm - - atmel,sama5d2-pwm - - microchip,sam9x60-pwm + oneOf: + - items: + - enum: + - atmel,at91sam9rl-pwm + - atmel,sama5d3-pwm + - atmel,sama5d2-pwm + - microchip,sam9x60-pwm + - items: + - const: microchip,sama7g5-pwm + - const: atmel,sama5d2-pwm reg: maxItems: 1
Signature · 1 line
2.25.1
Thierry Reding
AppliedQuoted 15 lines · Sergiu Moga
This patch series addresses the conversion of the Atmel PWM DT binding to the DT Schema format and adds the SAMA7G5 compatible to the respective converted binding.
Changes since v2:
- MovedallOfbetweenmaintainers andproperties`
- ReplacedadditionalProperties: truewithunevaluatedProperties: false
- Used 4 spaces indentation forexamples
- Modified file path inMAINTAINERSSergiu Moga (2):
dt-bindings: pwm: convert atmel pwm to json-schema
dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
Quoted 6 lines
.../bindings/pwm/atmel,at91sam-pwm.yaml | 47 +++++++++++++++++++ .../devicetree/bindings/pwm/atmel-pwm.txt | 35 -------------- MAINTAINERS | 2 +- 3 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
Applied, thanks.
Thierry