From patchwork Tue Apr 4 02:21:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Om Parikh X-Patchwork-Id: 1764673 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=proton.me header.i=@proton.me header.a=rsa-sha256 header.s=protonmail header.b=Ta+OCzSm; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PrBNM3qbkz1yZS for ; Tue, 4 Apr 2023 12:21:55 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232321AbjDDCVx (ORCPT ); Mon, 3 Apr 2023 22:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbjDDCVw (ORCPT ); Mon, 3 Apr 2023 22:21:52 -0400 X-Greylist: delayed 92329 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 03 Apr 2023 19:21:48 PDT Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66911BEA for ; Mon, 3 Apr 2023 19:21:48 -0700 (PDT) Date: Tue, 04 Apr 2023 02:21:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1680574906; x=1680834106; bh=Qz/nY1nVK+mYxZEsq/SpNw5eBg+A/ANSmY1kTqZoS4M=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Ta+OCzSmaZVOhWvRpFwYnfh/qF1s5peeue0eCyOb8ZS/Vt1c5mWag1LUb8k/0FlCi v/l2BvzCuNMOyQ9wFBq8d2x2szSxCaHY5HlnCIS+VPpnEN+8X29k5slz4x8fDMqaKB 4y/hZ/0ku4b9v2rG5sTRT0XP7b1yFUgUOR34t8yqeoh+dj2NbtGEw3RILMstrhq/bR SWzHyIylRC/X2ESCKDoiaUQe0/K7RRBCU0y04hgiiyQLe382Ww1xyRtx2kr1pUDJhh tSaptBKcucNkn5T54VujgcifvhF984Vp9RvEHZWzX7G2vtkTYi8aBSwZ0jQpSxEJ8g knEMFfzPX4Y0A== To: Om Parikh From: Om Parikh Cc: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Oleksij Rempel , Olof Johansson , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: watchdog: alphascale-asm9260: convert to DT schema Message-ID: <20230404022015.754177-1-hack3r-0m@proton.me> In-Reply-To: <20230403004138.326482-1-hack3r-0m@proton.me> References: <20230403004138.326482-1-hack3r-0m@proton.me> Feedback-ID: 58440162:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TO_EQ_FM_DIRECT_MX autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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. Signed-off-by: Om Parikh --- .../watchdog/alphascale,asm9260-wdt.yaml | 73 +++++++++++++++++++ .../bindings/watchdog/alphascale-asm9260.txt | 35 --------- 2 files changed, 73 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..ceee5f086e4a --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml @@ -0,0 +1,73 @@ +# 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 + - Olof Johansson + +properties: + compatible: + enum: + - 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: + items: + - description: phandle pointing to the system reset controller with line + index for the watchdog. + + 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"; -};