Re: [PATCH 01/10] dt-bindings: watchdog: sp-805: Convert to Json-schema

From
Rob Herring <robh+dt@kernel.org>
Date
2020-09-08 17:26:35
Also in
linux-watchdog, lkml
Reply to
Rob Herring, 2020-09-08
On Tue, Sep 8, 2020 at 11:20 AM Rob Herring [off-list ref] wrote:
On Fri, Aug 28, 2020 at 7:06 AM Andre Przywara [off-list ref] wrote:
quoted
Convert the ARM SP-805 watchdog IP DT binding over to Json-schema.

A straight-forward conversion, but the requirement for providing two
clocks got strengthened from "should" to "must".

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../bindings/watchdog/arm,sp805.txt           | 32 --------
 .../bindings/watchdog/arm,sp805.yaml          | 75 +++++++++++++++++++
 2 files changed, 75 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/arm,sp805.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/arm,sp805.txt b/Documentation/devicetree/bindings/watchdog/arm,sp805.txt
deleted file mode 100644
index bee6f1f0e41b..000000000000
--- a/Documentation/devicetree/bindings/watchdog/arm,sp805.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-ARM AMBA Primecell SP805 Watchdog
-
-SP805 WDT is a ARM Primecell Peripheral and has a standard-id register that
-can be used to identify the peripheral type, vendor, and revision.
-This value can be used for driver matching.
-
-As SP805 WDT is a primecell IP, it follows the base bindings specified in
-'arm/primecell.txt'
-
-Required properties:
-- compatible:  Should be "arm,sp805" & "arm,primecell"
-- reg:         Should contain location and length for watchdog timer register
-- clocks:      Clocks driving the watchdog timer hardware. This list should be
-               2 clocks. With 2 clocks, the order is wdog_clk, apb_pclk
-               wdog_clk can be equal to or be a sub-multiple of the apb_pclk
-               frequency
-- clock-names: Shall be "wdog_clk" for first clock and "apb_pclk" for the
-               second one
-
-Optional properties:
-- interrupts:  Should specify WDT interrupt number
-- timeout-sec: Should specify default WDT timeout in seconds. If unset, the
-               default timeout is determined by the driver
-
-Example:
-       watchdog@66090000 {
-               compatible = "arm,sp805", "arm,primecell";
-               reg = <0x66090000 0x1000>;
-               interrupts = <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&wdt_clk>, <&apb_pclk>;
-               clock-names = "wdog_clk", "apb_pclk";
-       };
diff --git a/Documentation/devicetree/bindings/watchdog/arm,sp805.yaml b/Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
new file mode 100644
index 000000000000..980e155d3387
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/arm,sp805.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM AMBA Primecell SP805 Watchdog
+
+maintainers:
+  - Viresh Kumar <vireshk@kernel.org>
+
+description: |+
+  The Arm SP805 IP implements a watchdog device, which triggers an interrupt
+  after a configurable time period. If that interrupt has not been serviced
+  when the next interrupt would be triggered, the reset signal is asserted.
+
+allOf:
+  - $ref: /schemas/arm/primecell.yaml#
Should also ref watchdog.yaml here.
Actually, you should also drop primecell.yaml as that will get applied
already with the 'arm,primecell' compatible match.

Rob
Thread (35 messages) 35 messages, 8 authors, last reply 2020-09-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help