openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: timer: nuvoton, npcm7xx-timer: Convert to YAML
@ 2022-01-30 10:27 Jonathan Neuschäfer
  2022-02-09 21:13 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Neuschäfer @ 2022-01-30 10:27 UTC (permalink / raw)
  To: openbmc
  Cc: devicetree, Tomer Maimon, Avi Fishman, Patrick Venture,
	Daniel Lezcano, Jonathan Neuschäfer, Tali Perry,
	Rob Herring, Thomas Gleixner, linux-kernel, Benjamin Fair

Let's convert this devicetree binding to YAML, to make it easier to
extend later.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2:
- Fix nuvoton,npcm750-timer compatible string
---
 .../bindings/timer/nuvoton,npcm7xx-timer.txt  | 21 ---------
 .../bindings/timer/nuvoton,npcm7xx-timer.yaml | 46 +++++++++++++++++++
 2 files changed, 46 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml

diff --git a/Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt b/Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt
deleted file mode 100644
index ac3a5e887455d..0000000000000
--- a/Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Nuvoton NPCM7xx timer
-
-Nuvoton NPCM7xx have three timer modules, each timer module provides five 24-bit
-timer counters.
-
-Required properties:
-- compatible      : "nuvoton,npcm750-timer" for Poleg NPCM750, or
-                    "nuvoton,wpcm450-timer" for Hermon WPCM450.
-- reg             : Offset and length of the register set for the device.
-- interrupts      : Contain the timer interrupt of timer 0.
-- clocks          : phandle of timer reference clock (usually a 25 MHz clock).
-
-Example:
-
-timer@f0008000 {
-    compatible = "nuvoton,npcm750-timer";
-    interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-    reg = <0xf0008000 0x50>;
-    clocks = <&clk NPCM7XX_CLK_TIMER>;
-};
-
diff --git a/Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml b/Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml
new file mode 100644
index 0000000000000..0cbc26a721514
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/nuvoton,npcm7xx-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NPCM7xx timer
+
+maintainers:
+  - Jonathan Neuschäfer <j.neuschaefer@gmx.net>
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,wpcm450-timer  # for Hermon WPCM450
+      - nuvoton,npcm750-timer  # for Poleg NPCM750
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: The timer interrupt of timer 0
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
+    timer@f0008000 {
+        compatible = "nuvoton,npcm750-timer";
+        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+        reg = <0xf0008000 0x50>;
+        clocks = <&clk NPCM7XX_CLK_TIMER>;
+    };
--
2.34.1


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

* Re: [PATCH v2] dt-bindings: timer: nuvoton, npcm7xx-timer: Convert to YAML
  2022-01-30 10:27 [PATCH v2] dt-bindings: timer: nuvoton, npcm7xx-timer: Convert to YAML Jonathan Neuschäfer
@ 2022-02-09 21:13 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2022-02-09 21:13 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: devicetree, Benjamin Fair, Avi Fishman, Patrick Venture, openbmc,
	Daniel Lezcano, linux-kernel, Tali Perry, Rob Herring,
	Thomas Gleixner, Tomer Maimon

On Sun, 30 Jan 2022 11:27:02 +0100, Jonathan Neuschäfer wrote:
> Let's convert this devicetree binding to YAML, to make it easier to
> extend later.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
> 
> v2:
> - Fix nuvoton,npcm750-timer compatible string
> ---
>  .../bindings/timer/nuvoton,npcm7xx-timer.txt  | 21 ---------
>  .../bindings/timer/nuvoton,npcm7xx-timer.yaml | 46 +++++++++++++++++++
>  2 files changed, 46 insertions(+), 21 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.yaml
> 

Applied, thanks!

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

end of thread, other threads:[~2022-02-09 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 10:27 [PATCH v2] dt-bindings: timer: nuvoton, npcm7xx-timer: Convert to YAML Jonathan Neuschäfer
2022-02-09 21:13 ` Rob Herring

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