From patchwork Mon Apr 17 05:17:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Om Parikh X-Patchwork-Id: 674828 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 7CC74C77B70 for ; Mon, 17 Apr 2023 05:17:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbjDQFRt (ORCPT ); Mon, 17 Apr 2023 01:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjDQFRs (ORCPT ); Mon, 17 Apr 2023 01:17:48 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32F531989 for ; Sun, 16 Apr 2023 22:17:46 -0700 (PDT) Date: Mon, 17 Apr 2023 05:17:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=v4v5elwsenamxmvcu2ko4nipba.protonmail; t=1681708661; x=1681967861; bh=eyEEFuJ6J03iyuYUhTw6txWj7lanqGKlF05HL7VvWs4=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=aJcnCwLaG0gx0uqeNj4g36x5lutATDQ8idrUUvqscCox/mo1P6LUPMIQEX/owSZzP Dw0j9wYpjWBPoQ6D7JiC9xH6GxkggNFn6YzGcidf7L+T4cA4MxuW5AZMY7k11DRp6K niHq/QQay5ZagajFEpHbLJd7kn79Zy8JOrnsSJuw5TQS7X1JzZiXOR9ovwM4ualQ4t uPehRD8CnhG6kowxeNEMAqO/FQ3LVWhBjmz/rMcg7JhQX8L4I2p1j46VyNItjJapTj aX0CE7gv1sD+kP8PAUTKajUvzcaeUbk+raXWlgdK2jkjqHZCaNbwrhSRyH/XjT4Bmn cRM8PicrHn4Qw== 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 v2] dt-bindings: watchdog: alphascale-asm9260: convert to DT schema Message-ID: <20230417051641.3832314-1-hack3r-0m@proton.me> Feedback-ID: 58440162:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Makes alphascale-asm9260 dt bindings adhere to the dt json-schema by replacing txt file with yaml file. CHANGELOG from v1: - 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 Signed-off-by: Om Parikh --- .../watchdog/alphascale,asm9260-wdt.yaml | 69 +++++++++++++++++++ .../bindings/watchdog/alphascale-asm9260.txt | 35 ---------- 2 files changed, 69 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..aefcb0cf3e3a --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml @@ -0,0 +1,69 @@ +# 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 + + timeout-sec: true + + alphascale,mode: + description: to specify the reset mode of operation + $ref: /schemas/types.yaml#/definitions/string + enum: [hw, sw, debug] + +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"; -};