linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] dt-bindings: watchdog: Convert Xilinx watchdog bindings to json-schema
@ 2022-08-18 15:06 Srinivas Neeli
  2022-08-19 12:23 ` Krzysztof Kozlowski
  2022-09-25 14:36 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Srinivas Neeli @ 2022-08-18 15:06 UTC (permalink / raw)
  To: linux, krzysztof.kozlowski+dt, wim, michal.simek,
	shubhrajyoti.datta, srinivas.neeli
  Cc: linux-kernel, linux-arm-kernel, devicetree, linux-watchdog, git,
	git, Radhey Shyam Pandey

Convert Xilinx watchdog bindings to DT schema format using json-schema

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
---
Changes in V2:
- Updated file name with compatible.
- Added subsystem name in subject prefix.
- Address minior comments.
---
 .../bindings/watchdog/of-xilinx-wdt.txt       | 26 -------
 .../watchdog/xlnx,xps-timebase-wdt.yaml       | 68 +++++++++++++++++++
 2 files changed, 68 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml

diff --git a/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt b/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt
deleted file mode 100644
index c6ae9c9d5e3e..000000000000
--- a/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Xilinx AXI/PLB soft-core watchdog Device Tree Bindings
----------------------------------------------------------
-
-Required properties:
-- compatible		: Should be "xlnx,xps-timebase-wdt-1.00.a" or
-			  "xlnx,xps-timebase-wdt-1.01.a".
-- reg			: Physical base address and size
-
-Optional properties:
-- clocks		: Input clock specifier. Refer to common clock
-			  bindings.
-- clock-frequency	: Frequency of clock in Hz
-- xlnx,wdt-enable-once	: 0 - Watchdog can be restarted
-			  1 - Watchdog can be enabled just once
-- xlnx,wdt-interval	: Watchdog timeout interval in 2^<val> clock cycles,
-			  <val> is integer from 8 to 31.
-
-Example:
-axi-timebase-wdt@40100000 {
-	clock-frequency = <50000000>;
-	compatible = "xlnx,xps-timebase-wdt-1.00.a";
-	clocks = <&clkc 15>;
-	reg = <0x40100000 0x10000>;
-	xlnx,wdt-enable-once = <0x0>;
-	xlnx,wdt-interval = <0x1b>;
-} ;
diff --git a/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml
new file mode 100644
index 000000000000..493a1c954707
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/xlnx,xps-timebase-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx AXI/PLB softcore and window Watchdog Timer
+
+maintainers:
+  - Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
+  - Srinivas Neeli <srinivas.neeli@xilinx.com>
+
+description:
+  The Timebase watchdog timer(WDT) is a free-running 32 bit counter.
+  WDT uses a dual-expiration architecture. After one expiration of
+  the timeout interval, an interrupt is generated and the WDT state
+  bit is set to one in the status register. If the state bit is not
+  cleared (by writing a one to the state bit) before the next
+  expiration of the timeout interval, a WDT reset is generated.
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    enum:
+      - xlnx,xps-timebase-wdt-1.01.a
+      - xlnx,xps-timebase-wdt-1.00.a
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-frequency:
+    description: Frequency of clock in Hz
+
+  xlnx,wdt-interval:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Watchdog timeout interval
+    minimum: 8
+    maximum: 32
+
+  xlnx,wdt-enable-once:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1]
+    description: If watchdog is configured as enable once,
+                 then the watchdog cannot be disabled after
+                 it has been enabled.
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@40100000 {
+      compatible = "xlnx,xps-timebase-wdt-1.00.a";
+      reg = <0x40100000 0x1000>;
+      clock-frequency = <50000000>;
+      clocks = <&clkc 15>;
+      xlnx,wdt-enable-once = <0x0>;
+      xlnx,wdt-interval = <0x1b>;
+    };
+...
-- 
2.17.1


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

* Re: [PATCH V2] dt-bindings: watchdog: Convert Xilinx watchdog bindings to json-schema
  2022-08-18 15:06 [PATCH V2] dt-bindings: watchdog: Convert Xilinx watchdog bindings to json-schema Srinivas Neeli
@ 2022-08-19 12:23 ` Krzysztof Kozlowski
  2022-09-25 14:36 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-19 12:23 UTC (permalink / raw)
  To: Srinivas Neeli, linux, krzysztof.kozlowski+dt, wim, michal.simek,
	shubhrajyoti.datta
  Cc: linux-kernel, linux-arm-kernel, devicetree, linux-watchdog, git,
	git, Radhey Shyam Pandey

On 18/08/2022 18:06, Srinivas Neeli wrote:
> Convert Xilinx watchdog bindings to DT schema format using json-schema
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH V2] dt-bindings: watchdog: Convert Xilinx watchdog bindings to json-schema
  2022-08-18 15:06 [PATCH V2] dt-bindings: watchdog: Convert Xilinx watchdog bindings to json-schema Srinivas Neeli
  2022-08-19 12:23 ` Krzysztof Kozlowski
@ 2022-09-25 14:36 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2022-09-25 14:36 UTC (permalink / raw)
  To: Srinivas Neeli
  Cc: krzysztof.kozlowski+dt, wim, michal.simek, shubhrajyoti.datta,
	linux-kernel, linux-arm-kernel, devicetree, linux-watchdog, git,
	git, Radhey Shyam Pandey

On Thu, Aug 18, 2022 at 08:36:37PM +0530, Srinivas Neeli wrote:
> Convert Xilinx watchdog bindings to DT schema format using json-schema
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Changes in V2:
> - Updated file name with compatible.
> - Added subsystem name in subject prefix.
> - Address minior comments.
> ---
>  .../bindings/watchdog/of-xilinx-wdt.txt       | 26 -------
>  .../watchdog/xlnx,xps-timebase-wdt.yaml       | 68 +++++++++++++++++++
>  2 files changed, 68 insertions(+), 26 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt b/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt
> deleted file mode 100644
> index c6ae9c9d5e3e..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -Xilinx AXI/PLB soft-core watchdog Device Tree Bindings
> ----------------------------------------------------------
> -
> -Required properties:
> -- compatible		: Should be "xlnx,xps-timebase-wdt-1.00.a" or
> -			  "xlnx,xps-timebase-wdt-1.01.a".
> -- reg			: Physical base address and size
> -
> -Optional properties:
> -- clocks		: Input clock specifier. Refer to common clock
> -			  bindings.
> -- clock-frequency	: Frequency of clock in Hz
> -- xlnx,wdt-enable-once	: 0 - Watchdog can be restarted
> -			  1 - Watchdog can be enabled just once
> -- xlnx,wdt-interval	: Watchdog timeout interval in 2^<val> clock cycles,
> -			  <val> is integer from 8 to 31.
> -
> -Example:
> -axi-timebase-wdt@40100000 {
> -	clock-frequency = <50000000>;
> -	compatible = "xlnx,xps-timebase-wdt-1.00.a";
> -	clocks = <&clkc 15>;
> -	reg = <0x40100000 0x10000>;
> -	xlnx,wdt-enable-once = <0x0>;
> -	xlnx,wdt-interval = <0x1b>;
> -} ;
> diff --git a/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml
> new file mode 100644
> index 000000000000..493a1c954707
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/xlnx,xps-timebase-wdt.yaml
> @@ -0,0 +1,68 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/xlnx,xps-timebase-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx AXI/PLB softcore and window Watchdog Timer
> +
> +maintainers:
> +  - Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> +  - Srinivas Neeli <srinivas.neeli@xilinx.com>
> +
> +description:
> +  The Timebase watchdog timer(WDT) is a free-running 32 bit counter.
> +  WDT uses a dual-expiration architecture. After one expiration of
> +  the timeout interval, an interrupt is generated and the WDT state
> +  bit is set to one in the status register. If the state bit is not
> +  cleared (by writing a one to the state bit) before the next
> +  expiration of the timeout interval, a WDT reset is generated.
> +
> +allOf:
> +  - $ref: watchdog.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - xlnx,xps-timebase-wdt-1.01.a
> +      - xlnx,xps-timebase-wdt-1.00.a
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-frequency:
> +    description: Frequency of clock in Hz
> +
> +  xlnx,wdt-interval:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Watchdog timeout interval
> +    minimum: 8
> +    maximum: 32
> +
> +  xlnx,wdt-enable-once:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [0, 1]
> +    description: If watchdog is configured as enable once,
> +                 then the watchdog cannot be disabled after
> +                 it has been enabled.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    watchdog@40100000 {
> +      compatible = "xlnx,xps-timebase-wdt-1.00.a";
> +      reg = <0x40100000 0x1000>;
> +      clock-frequency = <50000000>;
> +      clocks = <&clkc 15>;
> +      xlnx,wdt-enable-once = <0x0>;
> +      xlnx,wdt-interval = <0x1b>;
> +    };
> +...

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 15:06 [PATCH V2] dt-bindings: watchdog: Convert Xilinx watchdog bindings to json-schema Srinivas Neeli
2022-08-19 12:23 ` Krzysztof Kozlowski
2022-09-25 14:36 ` Guenter Roeck

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