* [PATCH 0/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 13:03 ` Sergiu Moga
0 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-07 13:03 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.
Sergiu Moga (2):
dt-bindings: pwm: convert atmel pwm to json-schema
dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
.../devicetree/bindings/pwm/atmel-pwm.txt | 35 ----------
.../devicetree/bindings/pwm/atmel-pwm.yaml | 67 +++++++++++++++++++
2 files changed, 67 insertions(+), 35 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 13:03 ` Sergiu Moga
0 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-07 13:03 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.
Sergiu Moga (2):
dt-bindings: pwm: convert atmel pwm to json-schema
dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
.../devicetree/bindings/pwm/atmel-pwm.txt | 35 ----------
.../devicetree/bindings/pwm/atmel-pwm.yaml | 67 +++++++++++++++++++
2 files changed, 67 insertions(+), 35 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
2022-03-07 13:03 ` Sergiu Moga
@ 2022-03-07 13:03 ` Sergiu Moga
-1 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-07 13:03 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>
---
.../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
.../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
2 files changed, 62 insertions(+), 35 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
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>;
- };
- };
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
new file mode 100644
index 000000000000..f5378a2226bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
@@ -0,0 +1,62 @@
+# 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-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel PWM controller
+
+maintainers:
+ - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+properties:
+ compatible:
+ enum:
+ - atmel,at91sam9rl-pwm
+ - atmel,sama5d3-pwm
+ - atmel,sama5d2-pwm
+ - microchip,sam9x60-pwm
+
+ reg:
+ description: |
+ Physical base address and length of the controller's
+ registers
+ maxItems: 1
+
+ "#pwm-cells":
+ description: |
+ Should be 3. See pwm.yaml in this directory for a
+ description of the cells format.
+ const: 3
+
+required:
+ - compatible
+ - reg
+ - "#pwm-cells"
+
+additionalProperties: true
+
+examples:
+ - |
+ pwm0: pwm@f8034000 {
+ compatible = "atmel,at91sam9rl-pwm";
+ reg = <0xf8034000 0x400>;
+ #pwm-cells = <3>;
+ };
+
+ pwmleds {
+ compatible = "pwm-leds";
+
+ led-1 {
+ label = "led-1";
+ pwms = <&pwm0 3 5000 0>;
+ max-brightness = <255>;
+ };
+
+ led-2 {
+ label = "led-2";
+ pwms = <&pwm0 1 5000 1>;
+ max-brightness = <255>;
+ };
+ };
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 13:03 ` Sergiu Moga
0 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-07 13:03 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>
---
.../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
.../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
2 files changed, 62 insertions(+), 35 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
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>;
- };
- };
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
new file mode 100644
index 000000000000..f5378a2226bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
@@ -0,0 +1,62 @@
+# 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-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel PWM controller
+
+maintainers:
+ - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+properties:
+ compatible:
+ enum:
+ - atmel,at91sam9rl-pwm
+ - atmel,sama5d3-pwm
+ - atmel,sama5d2-pwm
+ - microchip,sam9x60-pwm
+
+ reg:
+ description: |
+ Physical base address and length of the controller's
+ registers
+ maxItems: 1
+
+ "#pwm-cells":
+ description: |
+ Should be 3. See pwm.yaml in this directory for a
+ description of the cells format.
+ const: 3
+
+required:
+ - compatible
+ - reg
+ - "#pwm-cells"
+
+additionalProperties: true
+
+examples:
+ - |
+ pwm0: pwm@f8034000 {
+ compatible = "atmel,at91sam9rl-pwm";
+ reg = <0xf8034000 0x400>;
+ #pwm-cells = <3>;
+ };
+
+ pwmleds {
+ compatible = "pwm-leds";
+
+ led-1 {
+ label = "led-1";
+ pwms = <&pwm0 3 5000 0>;
+ max-brightness = <255>;
+ };
+
+ led-2 {
+ label = "led-2";
+ pwms = <&pwm0 1 5000 1>;
+ max-brightness = <255>;
+ };
+ };
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
2022-03-07 13:03 ` Sergiu Moga
@ 2022-03-07 13:03 ` Sergiu Moga
-1 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-07 13:03 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>
---
.../devicetree/bindings/pwm/atmel-pwm.yaml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
index f5378a2226bd..55d40973e6a9 100644
--- a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
@@ -12,11 +12,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:
description: |
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
@ 2022-03-07 13:03 ` Sergiu Moga
0 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-07 13:03 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>
---
.../devicetree/bindings/pwm/atmel-pwm.yaml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
index f5378a2226bd..55d40973e6a9 100644
--- a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
@@ -12,11 +12,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:
description: |
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
2022-03-07 13:03 ` Sergiu Moga
@ 2022-03-07 13:22 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 13:22 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 14:03, Sergiu Moga wrote:
> Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
> format.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> .../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
> .../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
> 2 files changed, 62 insertions(+), 35 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
> create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>
> 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
I would prefer for new files to switch to common DT conversion:
vendor,name.yaml
You have there another PWM bindings for Atmel, so the name should not be
just "pwm" but something more specific, maybe "at91sam-pwm"?
> +++ /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>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
> new file mode 100644
> index 000000000000..f5378a2226bd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
> @@ -0,0 +1,62 @@
> +# 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-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel PWM controller
title: Atmel/Microchip PWM controller
> +
> +maintainers:
> + - Claudiu Beznea <claudiu.beznea@microchip.com>
> +
allOf including pwm.yaml
> +properties:
> + compatible:
> + enum:
> + - atmel,at91sam9rl-pwm
> + - atmel,sama5d3-pwm
> + - atmel,sama5d2-pwm
> + - microchip,sam9x60-pwm
> +
> + reg:
> + description: |
> + Physical base address and length of the controller's
> + registers
Skip description, it's obvious.
> + maxItems: 1
> +
> + "#pwm-cells":
> + description: |
> + Should be 3. See pwm.yaml in this directory for a
> + description of the cells format.
Skip description, it's obvious.
> + const: 3
> +
> +required:
> + - compatible
> + - reg
> + - "#pwm-cells"
Skip pwm-cells, required by pwm.yaml.
> +
> +additionalProperties: true
> +
> +examples:
> + - |
> + pwm0: pwm@f8034000 {
> + compatible = "atmel,at91sam9rl-pwm";
> + reg = <0xf8034000 0x400>;
> + #pwm-cells = <3>;
> + };
> +
> + pwmleds {
Skip this node. No actual benefit. All clients are the same.
> + compatible = "pwm-leds";
> +
> + led-1 {
> + label = "led-1";
> + pwms = <&pwm0 3 5000 0>;
> + max-brightness = <255>;
> + };
> +
> + led-2 {
> + label = "led-2";
> + pwms = <&pwm0 1 5000 1>;
> + max-brightness = <255>;
> + };
> + };
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 13:22 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 13:22 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 14:03, Sergiu Moga wrote:
> Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
> format.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> .../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
> .../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
> 2 files changed, 62 insertions(+), 35 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
> create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>
> 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
I would prefer for new files to switch to common DT conversion:
vendor,name.yaml
You have there another PWM bindings for Atmel, so the name should not be
just "pwm" but something more specific, maybe "at91sam-pwm"?
> +++ /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>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
> new file mode 100644
> index 000000000000..f5378a2226bd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
> @@ -0,0 +1,62 @@
> +# 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-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel PWM controller
title: Atmel/Microchip PWM controller
> +
> +maintainers:
> + - Claudiu Beznea <claudiu.beznea@microchip.com>
> +
allOf including pwm.yaml
> +properties:
> + compatible:
> + enum:
> + - atmel,at91sam9rl-pwm
> + - atmel,sama5d3-pwm
> + - atmel,sama5d2-pwm
> + - microchip,sam9x60-pwm
> +
> + reg:
> + description: |
> + Physical base address and length of the controller's
> + registers
Skip description, it's obvious.
> + maxItems: 1
> +
> + "#pwm-cells":
> + description: |
> + Should be 3. See pwm.yaml in this directory for a
> + description of the cells format.
Skip description, it's obvious.
> + const: 3
> +
> +required:
> + - compatible
> + - reg
> + - "#pwm-cells"
Skip pwm-cells, required by pwm.yaml.
> +
> +additionalProperties: true
> +
> +examples:
> + - |
> + pwm0: pwm@f8034000 {
> + compatible = "atmel,at91sam9rl-pwm";
> + reg = <0xf8034000 0x400>;
> + #pwm-cells = <3>;
> + };
> +
> + pwmleds {
Skip this node. No actual benefit. All clients are the same.
> + compatible = "pwm-leds";
> +
> + led-1 {
> + label = "led-1";
> + pwms = <&pwm0 3 5000 0>;
> + max-brightness = <255>;
> + };
> +
> + led-2 {
> + label = "led-2";
> + pwms = <&pwm0 1 5000 1>;
> + max-brightness = <255>;
> + };
> + };
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
2022-03-07 13:03 ` Sergiu Moga
@ 2022-03-07 13:24 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 13:24 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 14:03, Sergiu Moga wrote:
> Add compatible strings list for SAMA7G5.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> .../devicetree/bindings/pwm/atmel-pwm.yaml | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
@ 2022-03-07 13:24 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 13:24 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 14:03, Sergiu Moga wrote:
> Add compatible strings list for SAMA7G5.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> .../devicetree/bindings/pwm/atmel-pwm.yaml | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
2022-03-07 13:22 ` Krzysztof Kozlowski
@ 2022-03-07 14:05 ` Sergiu.Moga
-1 siblings, 0 replies; 12+ messages in thread
From: Sergiu.Moga @ 2022-03-07 14:05 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 15:22, Krzysztof Kozlowski wrote:
> On 07/03/2022 14:03, Sergiu Moga wrote:
>> Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
>> format.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>> .../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
>> .../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
>> 2 files changed, 62 insertions(+), 35 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
>> create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>>
>> 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
> I would prefer for new files to switch to common DT conversion:
> vendor,name.yaml
>
> You have there another PWM bindings for Atmel, so the name should not be
> just "pwm" but something more specific, maybe "at91sam-pwm"?
>
>
Understood, yes, it does make more sense like this. Thank you for the
suggestion, I will rename the file to `atmel,at91sam-pwm.yaml`.
>> +++ /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>;
>> - };
>> - };
>> diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>> new file mode 100644
>> index 000000000000..f5378a2226bd
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>> @@ -0,0 +1,62 @@
>> +# 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-pwm.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel PWM controller
> title: Atmel/Microchip PWM controller
>
>> +
>> +maintainers:
>> + - Claudiu Beznea <claudiu.beznea@microchip.com>
>> +
> allOf including pwm.yaml
>
Noted.
>> +properties:
>> + compatible:
>> + enum:
>> + - atmel,at91sam9rl-pwm
>> + - atmel,sama5d3-pwm
>> + - atmel,sama5d2-pwm
>> + - microchip,sam9x60-pwm
>> +
>> + reg:
>> + description: |
>> + Physical base address and length of the controller's
>> + registers
> Skip description, it's obvious.
>
>> + maxItems: 1
>> +
>> + "#pwm-cells":
>> + description: |
>> + Should be 3. See pwm.yaml in this directory for a
>> + description of the cells format.
> Skip description, it's obvious.
>
>> + const: 3
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - "#pwm-cells"
> Skip pwm-cells, required by pwm.yaml.
>
Understood, will remove it in the next version along with the unnecessary descriptions.
>> +
>> +additionalProperties: true
>> +
>> +examples:
>> + - |
>> + pwm0: pwm@f8034000 {
>> + compatible = "atmel,at91sam9rl-pwm";
>> + reg = <0xf8034000 0x400>;
>> + #pwm-cells = <3>;
>> + };
>> +
>> + pwmleds {
> Skip this node. No actual benefit. All clients are the same.
>
Understood. I will include `pwm0` only.
>> + compatible = "pwm-leds";
>> +
>> + led-1 {
>> + label = "led-1";
>> + pwms = <&pwm0 3 5000 0>;
>> + max-brightness = <255>;
>> + };
>> +
>> + led-2 {
>> + label = "led-2";
>> + pwms = <&pwm0 1 5000 1>;
>> + max-brightness = <255>;
>> + };
>> + };
>
> Best regards,
> Krzysztof
Thank you for the detailed feedback.
Sergiu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 14:05 ` Sergiu.Moga
0 siblings, 0 replies; 12+ messages in thread
From: Sergiu.Moga @ 2022-03-07 14:05 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 15:22, Krzysztof Kozlowski wrote:
> On 07/03/2022 14:03, Sergiu Moga wrote:
>> Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
>> format.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>> .../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
>> .../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
>> 2 files changed, 62 insertions(+), 35 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
>> create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>>
>> 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
> I would prefer for new files to switch to common DT conversion:
> vendor,name.yaml
>
> You have there another PWM bindings for Atmel, so the name should not be
> just "pwm" but something more specific, maybe "at91sam-pwm"?
>
>
Understood, yes, it does make more sense like this. Thank you for the
suggestion, I will rename the file to `atmel,at91sam-pwm.yaml`.
>> +++ /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>;
>> - };
>> - };
>> diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>> new file mode 100644
>> index 000000000000..f5378a2226bd
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
>> @@ -0,0 +1,62 @@
>> +# 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-pwm.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel PWM controller
> title: Atmel/Microchip PWM controller
>
>> +
>> +maintainers:
>> + - Claudiu Beznea <claudiu.beznea@microchip.com>
>> +
> allOf including pwm.yaml
>
Noted.
>> +properties:
>> + compatible:
>> + enum:
>> + - atmel,at91sam9rl-pwm
>> + - atmel,sama5d3-pwm
>> + - atmel,sama5d2-pwm
>> + - microchip,sam9x60-pwm
>> +
>> + reg:
>> + description: |
>> + Physical base address and length of the controller's
>> + registers
> Skip description, it's obvious.
>
>> + maxItems: 1
>> +
>> + "#pwm-cells":
>> + description: |
>> + Should be 3. See pwm.yaml in this directory for a
>> + description of the cells format.
> Skip description, it's obvious.
>
>> + const: 3
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - "#pwm-cells"
> Skip pwm-cells, required by pwm.yaml.
>
Understood, will remove it in the next version along with the unnecessary descriptions.
>> +
>> +additionalProperties: true
>> +
>> +examples:
>> + - |
>> + pwm0: pwm@f8034000 {
>> + compatible = "atmel,at91sam9rl-pwm";
>> + reg = <0xf8034000 0x400>;
>> + #pwm-cells = <3>;
>> + };
>> +
>> + pwmleds {
> Skip this node. No actual benefit. All clients are the same.
>
Understood. I will include `pwm0` only.
>> + compatible = "pwm-leds";
>> +
>> + led-1 {
>> + label = "led-1";
>> + pwms = <&pwm0 3 5000 0>;
>> + max-brightness = <255>;
>> + };
>> +
>> + led-2 {
>> + label = "led-2";
>> + pwms = <&pwm0 1 5000 1>;
>> + max-brightness = <255>;
>> + };
>> + };
>
> Best regards,
> Krzysztof
Thank you for the detailed feedback.
Sergiu
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-03-07 14:07 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 13:03 [PATCH 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
2022-03-07 13:03 ` Sergiu Moga
2022-03-07 13:03 ` [PATCH 1/2] " Sergiu Moga
2022-03-07 13:03 ` Sergiu Moga
2022-03-07 13:22 ` Krzysztof Kozlowski
2022-03-07 13:22 ` Krzysztof Kozlowski
2022-03-07 14:05 ` Sergiu.Moga
2022-03-07 14:05 ` Sergiu.Moga
2022-03-07 13:03 ` [PATCH 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
2022-03-07 13:03 ` Sergiu Moga
2022-03-07 13:24 ` Krzysztof Kozlowski
2022-03-07 13:24 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.