.../watchdog/alphascale,asm9260-wdt.yaml | 70 +++++++++++++++++++ .../bindings/watchdog/alphascale-asm9260.txt | 35 ---------- 2 files changed, 70 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml delete mode 100644 Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
Makes alphascale-asm9260 dt bindings adhere to the dt json-schema
by replacing txt file with yaml file.
Signed-off-by: Om Parikh <hack3r-0m@proton.me>
---
v1 -> v2:
- drop quotes in "$ref" value
- update compatible string from board name to node name
- drop "Olof Johansson" from maintainers
- update "compatible" property from enum to const
- drop generic reset description
v2 -> v3:
- drop timeout-sec property
- update description for mode property
- set default as "hw" for mode enum
.../watchdog/alphascale,asm9260-wdt.yaml | 70 +++++++++++++++++++
.../bindings/watchdog/alphascale-asm9260.txt | 35 ----------
2 files changed, 70 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
delete mode 100644 Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
diff --git a/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml b/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
new file mode 100644
index 000000000000..fea84f5b7e6d
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/alphascale,asm9260-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Alphascale asm9260 Watchdog timer
+
+allOf:
+ - $ref: watchdog.yaml#
+
+maintainers:
+ - Oleksij Rempel <linux@rempel-privat.de>
+
+properties:
+ compatible:
+ const: alphascale,asm9260-wdt
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: source clock, used for tick counter
+ - description: ahb gate
+
+ clock-names:
+ items:
+ - const: mod
+ - const: ahb
+
+ interrupts:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ items:
+ - const: wdt_rst
+
+ alphascale,mode:
+ description: |
+ Specifies the reset mode of operation. If set to sw, then reset is handled
+ via interrupt request, if set to debug, then it does nothing and logs.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [hw, sw, debug]
+ default: hw
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/alphascale,asm9260.h>
+ watchdog0: watchdog@80048000 {
+ compatible = "alphascale,asm9260-wdt";
+ reg = <0x80048000 0x10>;
+ clocks = <&acc CLKID_SYS_WDT>, <&acc CLKID_AHB_WDT>;
+ clock-names = "mod", "ahb";
+ interrupts = <55>;
+ timeout-sec = <30>;
+ alphascale,mode = "hw";
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt b/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
deleted file mode 100644
index 75b265a04047..000000000000
--- a/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Alphascale asm9260 Watchdog timer
-
-Required properties:
-
-- compatible : should be "alphascale,asm9260-wdt".
-- reg : Specifies base physical address and size of the registers.
-- clocks : the clocks feeding the watchdog timer. See clock-bindings.txt
-- clock-names : should be set to
- "mod" - source for tick counter.
- "ahb" - ahb gate.
-- resets : phandle pointing to the system reset controller with
- line index for the watchdog.
-- reset-names : should be set to "wdt_rst".
-
-Optional properties:
-- timeout-sec : shall contain the default watchdog timeout in seconds,
- if unset, the default timeout is 30 seconds.
-- alphascale,mode : three modes are supported
- "hw" - hw reset (default).
- "sw" - sw reset.
- "debug" - no action is taken.
-
-Example:
-
-watchdog0: watchdog@80048000 {
- compatible = "alphascale,asm9260-wdt";
- reg = <0x80048000 0x10>;
- clocks = <&acc CLKID_SYS_WDT>, <&acc CLKID_AHB_WDT>;
- clock-names = "mod", "ahb";
- interrupts = <55>;
- resets = <&rst WDT_RESET>;
- reset-names = "wdt_rst";
- timeout-sec = <30>;
- alphascale,mode = "hw";
-};
--
2.40.0
On Tue, Apr 18, 2023 at 05:16:10AM +0000, Om Parikh wrote:
> Makes alphascale-asm9260 dt bindings adhere to the dt json-schema
> by replacing txt file with yaml file.
>
> Signed-off-by: Om Parikh <hack3r-0m@proton.me>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v1 -> v2:
> - drop quotes in "$ref" value
> - update compatible string from board name to node name
> - drop "Olof Johansson" from maintainers
> - update "compatible" property from enum to const
> - drop generic reset description
>
> v2 -> v3:
> - drop timeout-sec property
> - update description for mode property
> - set default as "hw" for mode enum
>
> .../watchdog/alphascale,asm9260-wdt.yaml | 70 +++++++++++++++++++
> .../bindings/watchdog/alphascale-asm9260.txt | 35 ----------
> 2 files changed, 70 insertions(+), 35 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
> delete mode 100644 Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
>
> diff --git a/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml b/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
> new file mode 100644
> index 000000000000..fea84f5b7e6d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/alphascale,asm9260-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Alphascale asm9260 Watchdog timer
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +maintainers:
> + - Oleksij Rempel <linux@rempel-privat.de>
> +
> +properties:
> + compatible:
> + const: alphascale,asm9260-wdt
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: source clock, used for tick counter
> + - description: ahb gate
> +
> + clock-names:
> + items:
> + - const: mod
> + - const: ahb
> +
> + interrupts:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + reset-names:
> + items:
> + - const: wdt_rst
> +
> + alphascale,mode:
> + description: |
> + Specifies the reset mode of operation. If set to sw, then reset is handled
> + via interrupt request, if set to debug, then it does nothing and logs.
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [hw, sw, debug]
> + default: hw
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/alphascale,asm9260.h>
> + watchdog0: watchdog@80048000 {
> + compatible = "alphascale,asm9260-wdt";
> + reg = <0x80048000 0x10>;
> + clocks = <&acc CLKID_SYS_WDT>, <&acc CLKID_AHB_WDT>;
> + clock-names = "mod", "ahb";
> + interrupts = <55>;
> + timeout-sec = <30>;
> + alphascale,mode = "hw";
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt b/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
> deleted file mode 100644
> index 75b265a04047..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/alphascale-asm9260.txt
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -Alphascale asm9260 Watchdog timer
> -
> -Required properties:
> -
> -- compatible : should be "alphascale,asm9260-wdt".
> -- reg : Specifies base physical address and size of the registers.
> -- clocks : the clocks feeding the watchdog timer. See clock-bindings.txt
> -- clock-names : should be set to
> - "mod" - source for tick counter.
> - "ahb" - ahb gate.
> -- resets : phandle pointing to the system reset controller with
> - line index for the watchdog.
> -- reset-names : should be set to "wdt_rst".
> -
> -Optional properties:
> -- timeout-sec : shall contain the default watchdog timeout in seconds,
> - if unset, the default timeout is 30 seconds.
> -- alphascale,mode : three modes are supported
> - "hw" - hw reset (default).
> - "sw" - sw reset.
> - "debug" - no action is taken.
> -
> -Example:
> -
> -watchdog0: watchdog@80048000 {
> - compatible = "alphascale,asm9260-wdt";
> - reg = <0x80048000 0x10>;
> - clocks = <&acc CLKID_SYS_WDT>, <&acc CLKID_AHB_WDT>;
> - clock-names = "mod", "ahb";
> - interrupts = <55>;
> - resets = <&rst WDT_RESET>;
> - reset-names = "wdt_rst";
> - timeout-sec = <30>;
> - alphascale,mode = "hw";
> -};
> --
> 2.40.0
>
>
On 18/04/2023 07:16, Om Parikh wrote: > Makes alphascale-asm9260 dt bindings adhere to the dt json-schema > by replacing txt file with yaml file. > > Signed-off-by: Om Parikh <hack3r-0m@proton.me> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
© 2016 - 2025 Red Hat, Inc.