devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema
@ 2022-03-07 15:36 Sergiu Moga
  2022-03-07 15:36 ` [PATCH v3 1/2] " Sergiu Moga
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sergiu Moga @ 2022-03-07 15:36 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 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

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
  2022-03-07 15:36 [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
@ 2022-03-07 15:36 ` Sergiu Moga
  2022-03-07 16:29   ` Krzysztof Kozlowski
  2022-03-08  1:07   ` Rob Herring
  2022-03-07 15:36 ` [PATCH v3 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
  2022-04-22 16:32 ` [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Thierry Reding
  2 siblings, 2 replies; 7+ messages in thread
From: Sergiu Moga @ 2022-03-07 15:36 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 ----------------
 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

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..5e8bb5a8095d
--- /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
+
+maintainers:
+  - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+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>;
+    };
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/MAINTAINERS b/MAINTAINERS
index a35eef379db0..f8b27ac0572d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12903,7 +12903,7 @@ M:	Claudiu Beznea <claudiu.beznea@microchip.com>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-pwm@vger.kernel.org
 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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list
  2022-03-07 15:36 [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
  2022-03-07 15:36 ` [PATCH v3 1/2] " Sergiu Moga
@ 2022-03-07 15:36 ` Sergiu Moga
  2022-04-22 16:32 ` [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Thierry Reding
  2 siblings, 0 replies; 7+ messages in thread
From: Sergiu Moga @ 2022-03-07 15:36 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 5e8bb5a8095d..ab45df80345d 100644
--- a/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
  2022-03-07 15:36 ` [PATCH v3 1/2] " Sergiu Moga
@ 2022-03-07 16:29   ` Krzysztof Kozlowski
  2022-03-08  1:07   ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-07 16:29 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 16:36, 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 ----------------
>  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
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
  2022-03-07 15:36 ` [PATCH v3 1/2] " Sergiu Moga
  2022-03-07 16:29   ` Krzysztof Kozlowski
@ 2022-03-08  1:07   ` Rob Herring
  2022-03-09  1:43     ` Rob Herring
  1 sibling, 1 reply; 7+ messages in thread
From: Rob Herring @ 2022-03-08  1:07 UTC (permalink / raw)
  To: Sergiu Moga
  Cc: claudiu.beznea, thierry.reding, robh+dt, alexandre.belloni,
	u.kleine-koenig, nicolas.ferre, lee.jones, krzysztof.kozlowski,
	linux-kernel, linux-arm-kernel, devicetree, linux-pwm

On Mon, 07 Mar 2022 17:36:55 +0200, 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 ----------------
>  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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
  2022-03-08  1:07   ` Rob Herring
@ 2022-03-09  1:43     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-03-09  1:43 UTC (permalink / raw)
  To: Sergiu Moga
  Cc: claudiu.beznea, thierry.reding, alexandre.belloni,
	u.kleine-koenig, nicolas.ferre, lee.jones, krzysztof.kozlowski,
	linux-kernel, linux-arm-kernel, devicetree, linux-pwm

On Mon, Mar 07, 2022 at 07:07:40PM -0600, Rob Herring wrote:
> On Mon, 07 Mar 2022 17:36:55 +0200, 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 ----------------
> >  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

Disregard, I see patch 2 addresses this.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema
  2022-03-07 15:36 [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
  2022-03-07 15:36 ` [PATCH v3 1/2] " Sergiu Moga
  2022-03-07 15:36 ` [PATCH v3 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
@ 2022-04-22 16:32 ` Thierry Reding
  2 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2022-04-22 16:32 UTC (permalink / raw)
  To: Sergiu Moga
  Cc: claudiu.beznea, u.kleine-koenig, lee.jones, robh+dt,
	krzysztof.kozlowski, nicolas.ferre, alexandre.belloni,
	linux-arm-kernel, linux-pwm, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

On Mon, Mar 07, 2022 at 05:36:54PM +0200, Sergiu Moga wrote:
> 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

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-22 16:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 15:36 [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Sergiu Moga
2022-03-07 15:36 ` [PATCH v3 1/2] " Sergiu Moga
2022-03-07 16:29   ` Krzysztof Kozlowski
2022-03-08  1:07   ` Rob Herring
2022-03-09  1:43     ` Rob Herring
2022-03-07 15:36 ` [PATCH v3 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
2022-04-22 16:32 ` [PATCH v3 0/2] dt-bindings: pwm: convert atmel pwm to json-schema Thierry Reding

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).