* [PATCH v2 0/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 14:46 Sergiu Moga
2022-03-07 14:46 ` [PATCH v2 1/2] " Sergiu Moga
2022-03-07 14:46 ` [PATCH v2 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
0 siblings, 2 replies; 5+ messages in thread
From: Sergiu Moga @ 2022-03-07 14:46 UTC (permalink / raw)
To: claudiu.beznea, thierry.reding, u.kleine-koenig, lee.jones,
robh+dt, krzysztof.kozlowski, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-pwm, devicetree, linux-kernel,
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 v1:
- Name the file `atmel,at91sam-pwm.yaml` instead of `atmel-pwm.yaml`
- Removed unnecessary descriptions of the `reg` and `#pwm-cells`
properties
- Remove unnecessary `pwmleds` node
- Remove `#pwm-cells` property from the list of required properties
- Add `allOf` including `pwm.yaml`
- Rename title from `Atmel PWM Controller` to `Atmel/Microchip PWM
controller`
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 --------------
2 files changed, 47 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
2022-03-07 14:46 [PATCH v2 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
@ 2022-03-07 14:46 ` Sergiu Moga
2022-03-07 14:55 ` Krzysztof Kozlowski
2022-03-07 14:46 ` [PATCH v2 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
1 sibling, 1 reply; 5+ messages in thread
From: Sergiu Moga @ 2022-03-07 14:46 UTC (permalink / raw)
To: claudiu.beznea, thierry.reding, u.kleine-koenig, lee.jones,
robh+dt, krzysztof.kozlowski, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-pwm, devicetree, linux-kernel,
Sergiu Moga
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
format.
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
.../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++
.../devicetree/bindings/pwm/atmel-pwm.txt | 35 ----------------
2 files changed, 42 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
diff --git a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
new file mode 100644
index 000000000000..2d5dd51a6a55
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
@@ -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
+
+allOf:
+ - $ref: "pwm.yaml#"
+
+maintainers:
+ - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+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
+
+additionalProperties: true
+
+examples:
+ - |
+ pwm0: pwm@f8034000 {
+ compatible = "atmel,at91sam9rl-pwm";
+ reg = <0xf8034000 0x400>;
+ #pwm-cells = <3>;
+ };
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.txt b/Documentation/devicetree/bindings/pwm/atmel-pwm.txt
deleted file mode 100644
index fbb5325be1f0..000000000000
--- a/Documentation/devicetree/bindings/pwm/atmel-pwm.txt
+++ /dev/null
@@ -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>;
- };
- };
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
2022-03-07 14:46 [PATCH v2 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
2022-03-07 14:46 ` [PATCH v2 1/2] " Sergiu Moga
@ 2022-03-07 14:46 ` Sergiu Moga
1 sibling, 0 replies; 5+ messages in thread
From: Sergiu Moga @ 2022-03-07 14:46 UTC (permalink / raw)
To: claudiu.beznea, thierry.reding, u.kleine-koenig, lee.jones,
robh+dt, krzysztof.kozlowski, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-pwm, devicetree, linux-kernel,
Sergiu Moga
Add compatible strings list for SAMA7G5.
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
.../bindings/pwm/atmel,at91sam-pwm.yaml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
index 2d5dd51a6a55..9cc08e0eb1fc 100644
--- a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
@@ -15,11 +15,16 @@ maintainers:
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
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
2022-03-07 14:46 ` [PATCH v2 1/2] " Sergiu Moga
@ 2022-03-07 14:55 ` Krzysztof Kozlowski
2022-03-07 15:24 ` Sergiu.Moga
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 14:55 UTC (permalink / raw)
To: Sergiu Moga, claudiu.beznea, thierry.reding, u.kleine-koenig,
lee.jones, robh+dt, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-pwm, devicetree, linux-kernel
On 07/03/2022 15:46, Sergiu Moga wrote:
> Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
> format.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> .../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++
> .../devicetree/bindings/pwm/atmel-pwm.txt | 35 ----------------
> 2 files changed, 42 insertions(+), 35 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
> delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
>
> diff --git a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
> new file mode 100644
> index 000000000000..2d5dd51a6a55
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
> @@ -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
> +
> +allOf:
> + - $ref: "pwm.yaml#"
allOf by convention should go between maintaners and properties.
> +
> +maintainers:
> + - Claudiu Beznea <claudiu.beznea@microchip.com>
> +
> +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
> +
> +additionalProperties: true
This has to be either additionalProperties:false or
"unevaluatedProperties:false".
> +
> +examples:
> + - |
> + pwm0: pwm@f8034000 {
> + compatible = "atmel,at91sam9rl-pwm";
> + reg = <0xf8034000 0x400>;
> + #pwm-cells = <3>;
Also please change indentation to 2 or 4 spaces (like we use for all DTS
examples). Four is preferred (only personally).
You also need to update the path in MAINTAINERS.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
2022-03-07 14:55 ` Krzysztof Kozlowski
@ 2022-03-07 15:24 ` Sergiu.Moga
0 siblings, 0 replies; 5+ messages in thread
From: Sergiu.Moga @ 2022-03-07 15:24 UTC (permalink / raw)
To: krzysztof.kozlowski, Claudiu.Beznea, thierry.reding,
u.kleine-koenig, lee.jones, robh+dt, Nicolas.Ferre,
alexandre.belloni
Cc: linux-arm-kernel, linux-pwm, devicetree, linux-kernel
On 07.03.2022 16:55, Krzysztof Kozlowski wrote:
> On 07/03/2022 15:46, Sergiu Moga wrote:
>> Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
>> format.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>> .../bindings/pwm/atmel,at91sam-pwm.yaml | 42 +++++++++++++++++++
>> .../devicetree/bindings/pwm/atmel-pwm.txt | 35 ----------------
>> 2 files changed, 42 insertions(+), 35 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
>> delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
>> new file mode 100644
>> index 000000000000..2d5dd51a6a55
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
>> @@ -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
>> +
>> +allOf:
>> + - $ref: "pwm.yaml#"
> allOf by convention should go between maintaners and properties.
>
Understood.
>> +
>> +maintainers:
>> + - Claudiu Beznea <claudiu.beznea@microchip.com>
>> +
>> +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
>> +
>> +additionalProperties: true
> This has to be either additionalProperties:false or
> "unevaluatedProperties:false".
>
>
Indeed, I believe `unevaluatedProperties: false` would be better here.
Thank you.
>> +
>> +examples:
>> + - |
>> + pwm0: pwm@f8034000 {
>> + compatible = "atmel,at91sam9rl-pwm";
>> + reg = <0xf8034000 0x400>;
>> + #pwm-cells = <3>;
> Also please change indentation to 2 or 4 spaces (like we use for all DTS
> examples). Four is preferred (only personally).
>
Noted, I will change the indentation to 4 spaces.
> You also need to update the path in MAINTAINERS.
>
Noted.
> Best regards,
> Krzysztof
Thank you for the feedback.
Sergiu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-07 15:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 14:46 [PATCH v2 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
2022-03-07 14:46 ` [PATCH v2 1/2] " Sergiu Moga
2022-03-07 14:55 ` Krzysztof Kozlowski
2022-03-07 15:24 ` Sergiu.Moga
2022-03-07 14:46 ` [PATCH v2 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).