linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: timer: Convert fsl,gtm to DT schema
@ 2025-05-06  2:22 Rob Herring (Arm)
  2025-05-15  8:37 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2025-05-06  2:22 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-kernel, devicetree

Convert the Freescale General Purpose Timer binding to DT schema format.
Add the specific compatibles in use. Drop the "fsl,cpm2-gtm" compatible
which is not used. The examples are all similar, so just leave 1
example.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../devicetree/bindings/timer/fsl,gtm.txt     | 30 ----------
 .../devicetree/bindings/timer/fsl,gtm.yaml    | 55 +++++++++++++++++++
 2 files changed, 55 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/fsl,gtm.txt
 create mode 100644 Documentation/devicetree/bindings/timer/fsl,gtm.yaml

diff --git a/Documentation/devicetree/bindings/timer/fsl,gtm.txt b/Documentation/devicetree/bindings/timer/fsl,gtm.txt
deleted file mode 100644
index fc1c571f7412..000000000000
--- a/Documentation/devicetree/bindings/timer/fsl,gtm.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-* Freescale General-purpose Timers Module
-
-Required properties:
-  - compatible : should be
-    "fsl,<chip>-gtm", "fsl,gtm" for SOC GTMs
-    "fsl,<chip>-qe-gtm", "fsl,qe-gtm", "fsl,gtm" for QE GTMs
-    "fsl,<chip>-cpm2-gtm", "fsl,cpm2-gtm", "fsl,gtm" for CPM2 GTMs
-  - reg : should contain gtm registers location and length (0x40).
-  - interrupts : should contain four interrupts.
-  - clock-frequency : specifies the frequency driving the timer.
-
-Example:
-
-timer@500 {
-	compatible = "fsl,mpc8360-gtm", "fsl,gtm";
-	reg = <0x500 0x40>;
-	interrupts = <90 8 78 8 84 8 72 8>;
-	interrupt-parent = <&ipic>;
-	/* filled by u-boot */
-	clock-frequency = <0>;
-};
-
-timer@440 {
-	compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm";
-	reg = <0x440 0x40>;
-	interrupts = <12 13 14 15>;
-	interrupt-parent = <&qeic>;
-	/* filled by u-boot */
-	clock-frequency = <0>;
-};
diff --git a/Documentation/devicetree/bindings/timer/fsl,gtm.yaml b/Documentation/devicetree/bindings/timer/fsl,gtm.yaml
new file mode 100644
index 000000000000..31d8534ac868
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/fsl,gtm.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/fsl,gtm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale General-purpose Timers Module
+
+maintainers:
+  - Rob Herring <robh@kernel.org>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - fsl,mpc8308-gtm
+              - fsl,mpc8313-gtm
+              - fsl,mpc8315-gtm
+          - const: fsl,gtm
+      - items:
+          - enum:
+              - fsl,mpc8569-qe-gtm
+              - fsl,mpc8360-qe-gtm
+          - const: fsl,qe-gtm
+          - const: fsl,gtm
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 4
+    description:
+      One interrupt for each timer
+
+  clock-frequency:
+    description: Specifies the frequency driving the timer.
+    default: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clock-frequency
+
+additionalProperties: false
+
+examples:
+  - |
+    timer@440 {
+        compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm";
+        reg = <0x440 0x40>;
+        interrupts = <12>, <13>, <14>, <15>;
+        clock-frequency = <0>;
+    };
-- 
2.47.2


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

* Re: [PATCH] dt-bindings: timer: Convert fsl,gtm to DT schema
  2025-05-06  2:22 [PATCH] dt-bindings: timer: Convert fsl,gtm to DT schema Rob Herring (Arm)
@ 2025-05-15  8:37 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2025-05-15  8:37 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Thomas Gleixner, Krzysztof Kozlowski, Conor Dooley, linux-kernel,
	devicetree

On Mon, May 05, 2025 at 09:22:43PM -0500, Rob Herring wrote:
> Convert the Freescale General Purpose Timer binding to DT schema format.
> Add the specific compatibles in use. Drop the "fsl,cpm2-gtm" compatible
> which is not used. The examples are all similar, so just leave 1
> example.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---

I'm not applying this one, it was already converted by patch:

https://lore.kernel.org/r/20250412-gtm-yaml-v2-1-e4d2292ffefc@posteo.net

>  .../devicetree/bindings/timer/fsl,gtm.txt     | 30 ----------
>  .../devicetree/bindings/timer/fsl,gtm.yaml    | 55 +++++++++++++++++++
>  2 files changed, 55 insertions(+), 30 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/fsl,gtm.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/fsl,gtm.yaml
> 
> diff --git a/Documentation/devicetree/bindings/timer/fsl,gtm.txt b/Documentation/devicetree/bindings/timer/fsl,gtm.txt
> deleted file mode 100644
> index fc1c571f7412..000000000000
> --- a/Documentation/devicetree/bindings/timer/fsl,gtm.txt
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -* Freescale General-purpose Timers Module
> -
> -Required properties:
> -  - compatible : should be
> -    "fsl,<chip>-gtm", "fsl,gtm" for SOC GTMs
> -    "fsl,<chip>-qe-gtm", "fsl,qe-gtm", "fsl,gtm" for QE GTMs
> -    "fsl,<chip>-cpm2-gtm", "fsl,cpm2-gtm", "fsl,gtm" for CPM2 GTMs
> -  - reg : should contain gtm registers location and length (0x40).
> -  - interrupts : should contain four interrupts.
> -  - clock-frequency : specifies the frequency driving the timer.
> -
> -Example:
> -
> -timer@500 {
> -	compatible = "fsl,mpc8360-gtm", "fsl,gtm";
> -	reg = <0x500 0x40>;
> -	interrupts = <90 8 78 8 84 8 72 8>;
> -	interrupt-parent = <&ipic>;
> -	/* filled by u-boot */
> -	clock-frequency = <0>;
> -};
> -
> -timer@440 {
> -	compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm";
> -	reg = <0x440 0x40>;
> -	interrupts = <12 13 14 15>;
> -	interrupt-parent = <&qeic>;
> -	/* filled by u-boot */
> -	clock-frequency = <0>;
> -};
> diff --git a/Documentation/devicetree/bindings/timer/fsl,gtm.yaml b/Documentation/devicetree/bindings/timer/fsl,gtm.yaml
> new file mode 100644
> index 000000000000..31d8534ac868
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/fsl,gtm.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/timer/fsl,gtm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale General-purpose Timers Module
> +
> +maintainers:
> +  - Rob Herring <robh@kernel.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - fsl,mpc8308-gtm
> +              - fsl,mpc8313-gtm
> +              - fsl,mpc8315-gtm
> +          - const: fsl,gtm
> +      - items:
> +          - enum:
> +              - fsl,mpc8569-qe-gtm
> +              - fsl,mpc8360-qe-gtm
> +          - const: fsl,qe-gtm
> +          - const: fsl,gtm
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 4
> +    description:
> +      One interrupt for each timer
> +
> +  clock-frequency:
> +    description: Specifies the frequency driving the timer.
> +    default: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clock-frequency
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    timer@440 {
> +        compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm";
> +        reg = <0x440 0x40>;
> +        interrupts = <12>, <13>, <14>, <15>;
> +        clock-frequency = <0>;
> +    };
> -- 
> 2.47.2
> 

-- 

 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

end of thread, other threads:[~2025-05-15  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06  2:22 [PATCH] dt-bindings: timer: Convert fsl,gtm to DT schema Rob Herring (Arm)
2025-05-15  8:37 ` Daniel Lezcano

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