From patchwork Tue Apr 18 05:16:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Om Parikh X-Patchwork-Id: 13215029 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB9F0C77B71 for ; Tue, 18 Apr 2023 05:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbjDRFQb (ORCPT ); Tue, 18 Apr 2023 01:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjDRFQa (ORCPT ); Tue, 18 Apr 2023 01:16:30 -0400 X-Greylist: delayed 86324 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 17 Apr 2023 22:16:27 PDT Received: from mail-40138.protonmail.ch (mail-40138.protonmail.ch [185.70.40.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C801C40EF for ; Mon, 17 Apr 2023 22:16:27 -0700 (PDT) Date: Tue, 18 Apr 2023 05:16:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1681794985; x=1682054185; bh=+w7z3alPLwzNkvvn0KLBZKtp9RjVXYgSCWgZ1BS3+8I=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Khq572Bk4K5UafoQEWcO8lCaHSfx0kzISL94FuV8E0Aei94bwWqFWAuLvy4mvQFwz rfFYyeSiQy6rjFWByzMUk9bL9hjxM49uoQn3g2AqXDUf3wl0aCum9obVSijzsKT6b6 WhtlyERSHCW6H8AlVpOoFacuOMasSLQ1sSPyL8K7hnyAPBGz0Ro2nVpZeIGZ4TXRoX 48bhZDm0hTqb16D8egF2SgLjdNOE8dWV1j93TDYTY6MkpszP0kHOJO+iMeEBFu26yv uVx48JVYooaRSxzVEOePMYJonc96BjkzkCsr0JL7ZxVrLbgPJjvB9tlYkB+OyvLNri 9X+umVSiOelAA== To: hack3r-0m@proton.me From: Om Parikh Cc: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Oleksij Rempel , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] dt-bindings: watchdog: alphascale-asm9260: convert to DT schema Message-ID: <20230418051446.24288-1-hack3r-0m@proton.me> Feedback-ID: 58440162:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Makes alphascale-asm9260 dt bindings adhere to the dt json-schema by replacing txt file with yaml file. Signed-off-by: Om Parikh Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck --- 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 -- 2.40.0 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 + +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 + 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"; -};