* [PATCH v2] dt-bindings: watchdog: sp-805: Convert to Json-schema
@ 2020-09-09 10:50 Andre Przywara
2020-09-09 11:08 ` Viresh Kumar
2020-09-15 17:31 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Andre Przywara @ 2020-09-09 10:50 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Guenter Roeck, Wim Van Sebroeck, Viresh Kumar, linux-watchdog,
linux-kernel
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>
---
Hi,
this is just the bindings conversion patch, updated to address Rob's
comments:
- Remove redundant primecell.yaml inclusion
- Reference watchdog.yaml
- Drop now redundant timeout-sec property
- Add unevaluatedProperties
The DT fixes are independent and now partly already queued, so I am
posting this separately.
Cheers,
Andre
.../bindings/watchdog/arm,sp805.txt | 32 ---------
.../bindings/watchdog/arm,sp805.yaml | 71 +++++++++++++++++++
2 files changed, 71 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..a69cac8ec208
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
@@ -0,0 +1,71 @@
+# 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/watchdog/watchdog.yaml#
+
+# Need a custom select here or 'arm,primecell' will match on lots of nodes
+select:
+ properties:
+ compatible:
+ contains:
+ const: arm,sp805
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - const: arm,sp805
+ - const: arm,primecell
+
+ interrupts:
+ maxItems: 1
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ Clocks driving the watchdog timer hardware. The first clock is used
+ for the actual watchdog counter. The second clock drives the register
+ interface.
+ minItems: 2
+ maxItems: 2
+
+ clock-names:
+ items:
+ - const: wdog_clk
+ - const: apb_pclk
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ 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";
+ };
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dt-bindings: watchdog: sp-805: Convert to Json-schema
2020-09-09 10:50 [PATCH v2] dt-bindings: watchdog: sp-805: Convert to Json-schema Andre Przywara
@ 2020-09-09 11:08 ` Viresh Kumar
2020-09-15 17:31 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2020-09-09 11:08 UTC (permalink / raw)
To: Andre Przywara
Cc: Rob Herring, devicetree, Guenter Roeck, Wim Van Sebroeck,
Viresh Kumar, linux-watchdog, linux-kernel
On 09-09-20, 11:50, Andre Przywara wrote:
> 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>
> ---
> Hi,
>
> this is just the bindings conversion patch, updated to address Rob's
> comments:
> - Remove redundant primecell.yaml inclusion
> - Reference watchdog.yaml
> - Drop now redundant timeout-sec property
> - Add unevaluatedProperties
>
> The DT fixes are independent and now partly already queued, so I am
> posting this separately.
>
> Cheers,
> Andre
>
> .../bindings/watchdog/arm,sp805.txt | 32 ---------
> .../bindings/watchdog/arm,sp805.yaml | 71 +++++++++++++++++++
> 2 files changed, 71 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..a69cac8ec208
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
> @@ -0,0 +1,71 @@
> +# 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/watchdog/watchdog.yaml#
> +
> +# Need a custom select here or 'arm,primecell' will match on lots of nodes
> +select:
> + properties:
> + compatible:
> + contains:
> + const: arm,sp805
> + required:
> + - compatible
> +
> +properties:
> + compatible:
> + items:
> + - const: arm,sp805
> + - const: arm,primecell
> +
> + interrupts:
> + maxItems: 1
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + Clocks driving the watchdog timer hardware. The first clock is used
> + for the actual watchdog counter. The second clock drives the register
> + interface.
> + minItems: 2
> + maxItems: 2
> +
> + clock-names:
> + items:
> + - const: wdog_clk
> + - const: apb_pclk
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + 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";
> + };
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dt-bindings: watchdog: sp-805: Convert to Json-schema
2020-09-09 10:50 [PATCH v2] dt-bindings: watchdog: sp-805: Convert to Json-schema Andre Przywara
2020-09-09 11:08 ` Viresh Kumar
@ 2020-09-15 17:31 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-09-15 17:31 UTC (permalink / raw)
To: Andre Przywara
Cc: Guenter Roeck, devicetree, linux-kernel, linux-watchdog,
Viresh Kumar, Wim Van Sebroeck, Rob Herring
On Wed, 09 Sep 2020 11:50:46 +0100, Andre Przywara wrote:
> 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>
> ---
> Hi,
>
> this is just the bindings conversion patch, updated to address Rob's
> comments:
> - Remove redundant primecell.yaml inclusion
> - Reference watchdog.yaml
> - Drop now redundant timeout-sec property
> - Add unevaluatedProperties
>
> The DT fixes are independent and now partly already queued, so I am
> posting this separately.
>
> Cheers,
> Andre
>
> .../bindings/watchdog/arm,sp805.txt | 32 ---------
> .../bindings/watchdog/arm,sp805.yaml | 71 +++++++++++++++++++
> 2 files changed, 71 insertions(+), 32 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/watchdog/arm,sp805.txt
> create mode 100644 Documentation/devicetree/bindings/watchdog/arm,sp805.yaml
>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-15 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 10:50 [PATCH v2] dt-bindings: watchdog: sp-805: Convert to Json-schema Andre Przywara
2020-09-09 11:08 ` Viresh Kumar
2020-09-15 17:31 ` 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).