Skip to contentSkip to conversation

dt-bindings: timer: Convert ezchip,nps400-timer to DT schema

PATCH Applied Rob Herring (Arm) 3 participants 3 messages May 6, 2025 – May 21, 2025

Subsystems (2)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: timer: Convert ezchip,nps400-timer to DT schema

Convert the EZChip NPS400 Timer bindings to DT schema format. It's a straight-forward conversion. The 2 bindings only differ in compatible and one required property, so the schemas can be combined.

---
 .../bindings/timer/ezchip,nps400-timer.yaml   | 45 +++++++++++++++++++
 .../bindings/timer/ezchip,nps400-timer0.txt   | 17 -------
 .../bindings/timer/ezchip,nps400-timer1.txt   | 15 -------
 3 files changed, 45 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer0.txt
 delete mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer1.txt
Documentation/devicetree/bindings/timer/ezchip,nps400-timer.yaml new file +45 -0
new file mode 100644
index 000000000000..317c5010c4c1
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ezchip,nps400-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: EZChip NPS400 Timers
+
+maintainers:
+  - Noam Camus <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - ezchip,nps400-timer0
+      - ezchip,nps400-timer1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - clocks
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ezchip,nps400-timer0
+    then:
+      required: [ interrupts ]
+
+examples:
+  - |
+    timer {
+        compatible = "ezchip,nps400-timer0";
+        interrupts = <3>;
+        clocks = <&sysclk>;
+    };
Documentation/devicetree/bindings/timer/ezchip,nps400-timer0.txt deleted +0 -17
deleted file mode 100644
index e3cfce8fecc5..000000000000
@@ -1,17 +0,0 @@
-NPS Network Processor
-
-Required properties:
-
-- compatible :	should be "ezchip,nps400-timer0"
-
-Clocks required for compatible = "ezchip,nps400-timer0":
-- interrupts : The interrupt of the first timer
-- clocks : Must contain a single entry describing the clock input
-
-Example:
-
-timer {
-	compatible = "ezchip,nps400-timer0";
-	interrupts = <3>;
-	clocks = <&sysclk>;
-};
Documentation/devicetree/bindings/timer/ezchip,nps400-timer1.txt deleted +0 -15
deleted file mode 100644
index c0ab4190b8fb..000000000000
@@ -1,15 +0,0 @@
-NPS Network Processor
-
-Required properties:
-
-- compatible :	should be "ezchip,nps400-timer1"
-
-Clocks required for compatible = "ezchip,nps400-timer1":
-- clocks : Must contain a single entry describing the clock input
-
-Example:
-
-timer {
-	compatible = "ezchip,nps400-timer1";
-	clocks = <&sysclk>;
-};
Signature · 1 line
2.47.2
#1 lore raw
Quoted 6 lines · Rob Herring

Convert the EZChip NPS400 Timer bindings to DT schema format. It's a straight-forward conversion. The 2 bindings only differ in compatible and one required property, so the schemas can be combined.

---

Applied, thanks

Signature · 5 lines
 <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
#2 lore raw
In reply to Rob Herring (Arm)
The following commit has been merged into the timers/clocksource branch of tip:

The following commit has been merged into the timers/clocksource branch of tip:

Commit-ID:     2b3b58f233afb4b1edf779c95e8106fe7c707c7c
Gitweb:        https://git.kernel.org/tip/2b3b58f233afb4b1edf779c95e8106fe7c707c7c
Author:        Rob Herring (Arm) <[email protected]>
AuthorDate:    Mon, 05 May 2025 21:22:35 -05:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Fri, 16 May 2025 11:10:33 +02:00

dt-bindings: timer: Convert ezchip,nps400-timer to DT schema

Convert the EZChip NPS400 Timer bindings to DT schema format. It's a straight-forward conversion. The 2 bindings only differ in compatible and one required property, so the schemas can be combined.

---
 Documentation/devicetree/bindings/timer/ezchip,nps400-timer.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++
 Documentation/devicetree/bindings/timer/ezchip,nps400-timer0.txt | 17 -----------------
 Documentation/devicetree/bindings/timer/ezchip,nps400-timer1.txt | 15 ---------------
 3 files changed, 45 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer0.txt
 delete mode 100644 Documentation/devicetree/bindings/timer/ezchip,nps400-timer1.txt
Documentation/devicetree/bindings/timer/ezchip,nps400-timer.yaml new file +45 -0
new file mode 100644
index 0000000..317c501
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ezchip,nps400-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: EZChip NPS400 Timers
+
+maintainers:
+  - Noam Camus <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - ezchip,nps400-timer0
+      - ezchip,nps400-timer1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - clocks
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ezchip,nps400-timer0
+    then:
+      required: [ interrupts ]
+
+examples:
+  - |
+    timer {
+        compatible = "ezchip,nps400-timer0";
+        interrupts = <3>;
+        clocks = <&sysclk>;
+    };
Documentation/devicetree/bindings/timer/ezchip,nps400-timer0.txt deleted +0 -17
deleted file mode 100644
index e3cfce8..0000000
@@ -1,17 +0,0 @@
-NPS Network Processor
-
-Required properties:
-
-- compatible :	should be "ezchip,nps400-timer0"
-
-Clocks required for compatible = "ezchip,nps400-timer0":
-- interrupts : The interrupt of the first timer
-- clocks : Must contain a single entry describing the clock input
-
-Example:
-
-timer {
-	compatible = "ezchip,nps400-timer0";
-	interrupts = <3>;
-	clocks = <&sysclk>;
-};
Documentation/devicetree/bindings/timer/ezchip,nps400-timer1.txt deleted +0 -15
deleted file mode 100644
index c0ab419..0000000
@@ -1,15 +0,0 @@
-NPS Network Processor
-
-Required properties:
-
-- compatible :	should be "ezchip,nps400-timer1"
-
-Clocks required for compatible = "ezchip,nps400-timer1":
-- clocks : Must contain a single entry describing the clock input
-
-Example:
-
-timer {
-	compatible = "ezchip,nps400-timer1";
-	clocks = <&sysclk>;
-};