From mboxrd@z Thu Jan 1 00:00:00 1970 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 82F24C433FE for ; Fri, 22 Apr 2022 15:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1449251AbiDVPsD (ORCPT ); Fri, 22 Apr 2022 11:48:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449378AbiDVPrq (ORCPT ); Fri, 22 Apr 2022 11:47:46 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FE625EBDB for ; Fri, 22 Apr 2022 08:44:24 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id k23so17196771ejd.3 for ; Fri, 22 Apr 2022 08:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=JemFIsNtCjKL4LPEQBY/hGFmz6ljVMLTFme29Py2nSY=; b=kE/4yTd0BeJARbm77TZxpuVTgL9v+x0jEMOVZU0iv8mB4Q/g9GO6hh5+am0qj/rd/t u+A52haGAJ/7nt9iC+R4z2XOc/1dpqW3HlNeU65zPR8tscx47q6/cYR3Z/1HkOljee9v DCSYOZ88FcIQlkkqV84NK7eQuH9+MiiPF9mlTLCHzkOe5LU8efKWDR9PmW71uAyKYS5R EZLNGpjRSttXrn5kv6lyCkk/2jGGYWvN5oqmjFSnZv3JRmbnx692DdN2oUN7TWo2g/Op IaUxLeYJ3/Yx1wZ104lFif6x6UO2fQ9tXUQ3C6xP3XuBabvHOw+S7xI3FQ4SWLmPnrdP oYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=JemFIsNtCjKL4LPEQBY/hGFmz6ljVMLTFme29Py2nSY=; b=14SXwo6yLbWz7kwBY7sYp+V5uf4/IvCRxQmCYaBinqNYP4k1z6UvBTeIZbgIk47INN vzu5iWhBUElVv8EaVkakAirSG9Z7+BObNHeqjOV6vj8pyj+w5JscLCsJWkTmcPsZ2bvW CxSemSR5tXA6aVBenIgZmUmOsea+hSD22vp+fwNniloO9SkEkHMw5H2eGCbeTJw2T6XL nChT4qh4MVFRYwKP985GLXgD1hWxrdILwI/slvHZ8YOj5VjfyRcbQ15jBLgE7sYJ7ThN GwMraTbvJ3e3+Mi8vOUmDJU72On0j73jln7kb8qdRdi/0+AZ2iPJJjeH3YOiQKMD3YZ4 oODQ== X-Gm-Message-State: AOAM531UBVq70w9dCVLn/A/TMD9JrF1SSB0IRPkGrZo95fW7X4zyCm8c vi6UtdyJrc/G5MvBcQNgKpfPvQ== X-Google-Smtp-Source: ABdhPJxuA+3Y8AE3ukYq9N7qqdw5yx7eXG2giExj/lpkeyAWZqsokfAbfxqRUhRzv4xOHYacE1Cwuw== X-Received: by 2002:a17:907:3f9e:b0:6f2:b3d8:63c0 with SMTP id hr30-20020a1709073f9e00b006f2b3d863c0mr2938068ejc.86.1650642263097; Fri, 22 Apr 2022 08:44:23 -0700 (PDT) Received: from [192.168.0.232] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id s2-20020a1709066c8200b006e4e1b1f875sm866663ejr.199.2022.04.22.08.44.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Apr 2022 08:44:22 -0700 (PDT) Message-ID: Date: Fri, 22 Apr 2022 17:44:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 2/2] dt-bindings: watchdog: mediatek: Convert binding to YAML Content-Language: en-US To: Allen-KH Cheng , Wim Van Sebroeck , Guenter Roeck , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , nfraprado@collabora.com Cc: Project_Global_Chrome_Upstream_Group@mediatek.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, Chen-Yu Tsai , Ryder Lee References: <20220422121017.23920-1-allen-kh.cheng@mediatek.com> <20220422121017.23920-3-allen-kh.cheng@mediatek.com> From: Krzysztof Kozlowski In-Reply-To: <20220422121017.23920-3-allen-kh.cheng@mediatek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/04/2022 14:10, Allen-KH Cheng wrote: > Convert Mediatek watchdog devicetree binding to YAML. > > Signed-off-by: Allen-KH Cheng > --- > .../devicetree/bindings/watchdog/mtk-wdt.txt | 42 ---------- > .../devicetree/bindings/watchdog/mtk-wdt.yaml | 76 +++++++++++++++++++ > 2 files changed, 76 insertions(+), 42 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > create mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > > diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > deleted file mode 100644 > index 762c62e428ef..000000000000 > --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > +++ /dev/null > @@ -1,42 +0,0 @@ > -Mediatek SoCs Watchdog timer > - > -The watchdog supports a pre-timeout interrupt that fires timeout-sec/2 > -before the expiry. > - > -Required properties: > - > -- compatible should contain: > - "mediatek,mt2701-wdt", "mediatek,mt6589-wdt": for MT2701 > - "mediatek,mt2712-wdt": for MT2712 > - "mediatek,mt6582-wdt", "mediatek,mt6589-wdt": for MT6582 > - "mediatek,mt6589-wdt": for MT6589 > - "mediatek,mt6797-wdt", "mediatek,mt6589-wdt": for MT6797 > - "mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622 > - "mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623 > - "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 > - "mediatek,mt7986-wdt", "mediatek,mt6589-wdt": for MT7986 > - "mediatek,mt8183-wdt": for MT8183 > - "mediatek,mt8186-wdt", "mediatek,mt6589-wdt": for MT8186 > - "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 > - "mediatek,mt8192-wdt": for MT8192 > - "mediatek,mt8195-wdt", "mediatek,mt6589-wdt": for MT8195 > - > -- reg : Specifies base physical address and size of the registers. > - > -Optional properties: > -- mediatek,disable-extrst: disable send output reset signal > -- interrupts: Watchdog pre-timeout (bark) interrupt. > -- timeout-sec: contains the watchdog timeout in seconds. > -- #reset-cells: Should be 1. > - > -Example: > - > -watchdog: watchdog@10007000 { > - compatible = "mediatek,mt8183-wdt", > - "mediatek,mt6589-wdt"; > - mediatek,disable-extrst; > - reg = <0 0x10007000 0 0x100>; > - interrupts = ; > - timeout-sec = <10>; > - #reset-cells = <1>; > -}; > diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > new file mode 100644 > index 000000000000..5788617027c8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/watchdog/mtk-wdt.yaml# File name: mtk,wdt.yaml I assume all future MediaTek watchdogs (even these unpublished and developed in some years) will fit into this schema. :) If not, then maybe better to name the file by the compatible... but it's not a must. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek SoCs Watchdog timer > + > +maintainers: > + - Runyang Chen > + - Allen-KH Cheng > + > +description: |+ > + The watchdog supports a pre-timeout interrupt that fires timeout-sec/2 > + before the expiry. > + > +allOf: > + - $ref: "watchdog.yaml#" > + > +properties: > + compatible: > + oneOf: > + - const: mediatek,mt2712-wdt > + - const: mediatek,mt6589-wdt > + - const: mediatek,mt8183-wdt > + - const: mediatek,mt8192-wdt All these four entries should be an enum. > + > + - items: > + - enum: > + - mediatek,mt2701-wdt > + - mediatek,mt6582-wdt > + - mediatek,mt6797-wdt > + - mediatek,mt7622-wdt > + - mediatek,mt7623-wdt > + - mediatek,mt7629-wdt > + - mediatek,mt7986-wdt > + - mediatek,mt8173-wdt > + - mediatek,mt8183-wdt > + - mediatek,mt8186-wdt > + - mediatek,mt8192-wdt > + - mediatek,mt8195-wdt > + - mediatek,mt8516-wdt > + - const: mediatek,mt6589-wdt > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + '#reset-cells': > + const: 1 > + > + timeout-sec: true You do not need this, it's coming from watchdog schema. > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + watchdog@10007000 { > + compatible = "mediatek,mt8183-wdt", > + "mediatek,mt6589-wdt"; > + mediatek,disable-extrst; Did you test your bindings? Does not look like. Please run dt_binding_check (see writing-schema for instructions). > + reg = <0x10007000 0x100>; > + interrupts = ; Wrong interrupt flag. > + timeout-sec = <10>; > + #reset-cells = <1>; > + }; > + > +... Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 227F3C433F5 for ; Fri, 22 Apr 2022 15:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5zfPa7p6DIVEKw64QEvL194/vOhJFMP5ftu99WnZndY=; b=qrTSQY8H91eNev OkFED2hyfDovia9ExDt0uDU1hoGAuktsLmmuheqGuIE1PCVYJZOHpol2Ckh0/AFCRPjhsybkPmbX7 kQkB9PmOGaFk/p6QPGwuemHkqXHnAlaIpBGwqSnZRvkRo1A7TYVP0a00XEcOlTtF8pGlvAsFKmg6u ibmvUTVwmLwsW7Ra5amySadEawBuHZI/WNGuyDQZQOvr6CCuuDd2M3uYNEv+xTuXQKfBoa9lRnsXZ FRlu0j7G4Rln4mX1iJCeUwWgjaGBC7tSMun5tN1vblEOYiuZy9mqOkhpHsUFmjwGgUzjf7+cKOG1q AKUfaMSFod+vJoS9dpvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvVy-001D7Q-JP; Fri, 22 Apr 2022 15:48:10 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvSM-001BdG-Qs for linux-mediatek@lists.infradead.org; Fri, 22 Apr 2022 15:44:28 +0000 Received: by mail-ej1-x629.google.com with SMTP id g13so17195376ejb.4 for ; Fri, 22 Apr 2022 08:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=JemFIsNtCjKL4LPEQBY/hGFmz6ljVMLTFme29Py2nSY=; b=kE/4yTd0BeJARbm77TZxpuVTgL9v+x0jEMOVZU0iv8mB4Q/g9GO6hh5+am0qj/rd/t u+A52haGAJ/7nt9iC+R4z2XOc/1dpqW3HlNeU65zPR8tscx47q6/cYR3Z/1HkOljee9v DCSYOZ88FcIQlkkqV84NK7eQuH9+MiiPF9mlTLCHzkOe5LU8efKWDR9PmW71uAyKYS5R EZLNGpjRSttXrn5kv6lyCkk/2jGGYWvN5oqmjFSnZv3JRmbnx692DdN2oUN7TWo2g/Op IaUxLeYJ3/Yx1wZ104lFif6x6UO2fQ9tXUQ3C6xP3XuBabvHOw+S7xI3FQ4SWLmPnrdP oYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=JemFIsNtCjKL4LPEQBY/hGFmz6ljVMLTFme29Py2nSY=; b=1LSyE+d3TBbkOFc5tXVe1J68WHdhrjuKoNjLv9Trzz1RPy2MJTFiY46W4Qc2ZK6s8J 2tVADFvWgkHn5SpwjmTmNSIhdO7SYk5szcu52bM7CG3jeFdkTM7p18cpzEYdsPHUkE2x 9RqeoCZxjv8toqFTYrtyQH47cAWUp3dXM1uFKa6Lf7LynfDEd2JXaBlcfKp7MgxrPYKJ O83Fthy5kEjbSQpfxeNJewXzFXkUl+kdTjzMXeSBupo/1IfJDN2GGuJuKL5rJRf30pPI wY2R9Ormuyd6DhdAO+XUpMHCl7aaQgg8DcGmiMjawp2MHNQckqTjAsAMOm2SurxrYLIt rKog== X-Gm-Message-State: AOAM532jd4c2N0DB/pU0GVmLChWiOBgwsaDbb+aSf6ET1/3zBDInz20U uaSeZuQo4R1ysxDpCstM7ltEtA== X-Google-Smtp-Source: ABdhPJxuA+3Y8AE3ukYq9N7qqdw5yx7eXG2giExj/lpkeyAWZqsokfAbfxqRUhRzv4xOHYacE1Cwuw== X-Received: by 2002:a17:907:3f9e:b0:6f2:b3d8:63c0 with SMTP id hr30-20020a1709073f9e00b006f2b3d863c0mr2938068ejc.86.1650642263097; Fri, 22 Apr 2022 08:44:23 -0700 (PDT) Received: from [192.168.0.232] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id s2-20020a1709066c8200b006e4e1b1f875sm866663ejr.199.2022.04.22.08.44.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Apr 2022 08:44:22 -0700 (PDT) Message-ID: Date: Fri, 22 Apr 2022 17:44:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 2/2] dt-bindings: watchdog: mediatek: Convert binding to YAML Content-Language: en-US To: Allen-KH Cheng , Wim Van Sebroeck , Guenter Roeck , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , nfraprado@collabora.com Cc: Project_Global_Chrome_Upstream_Group@mediatek.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, Chen-Yu Tsai , Ryder Lee References: <20220422121017.23920-1-allen-kh.cheng@mediatek.com> <20220422121017.23920-3-allen-kh.cheng@mediatek.com> From: Krzysztof Kozlowski In-Reply-To: <20220422121017.23920-3-allen-kh.cheng@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_084427_014333_3EDCAF5B X-CRM114-Status: GOOD ( 20.73 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 22/04/2022 14:10, Allen-KH Cheng wrote: > Convert Mediatek watchdog devicetree binding to YAML. > > Signed-off-by: Allen-KH Cheng > --- > .../devicetree/bindings/watchdog/mtk-wdt.txt | 42 ---------- > .../devicetree/bindings/watchdog/mtk-wdt.yaml | 76 +++++++++++++++++++ > 2 files changed, 76 insertions(+), 42 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > create mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > > diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > deleted file mode 100644 > index 762c62e428ef..000000000000 > --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > +++ /dev/null > @@ -1,42 +0,0 @@ > -Mediatek SoCs Watchdog timer > - > -The watchdog supports a pre-timeout interrupt that fires timeout-sec/2 > -before the expiry. > - > -Required properties: > - > -- compatible should contain: > - "mediatek,mt2701-wdt", "mediatek,mt6589-wdt": for MT2701 > - "mediatek,mt2712-wdt": for MT2712 > - "mediatek,mt6582-wdt", "mediatek,mt6589-wdt": for MT6582 > - "mediatek,mt6589-wdt": for MT6589 > - "mediatek,mt6797-wdt", "mediatek,mt6589-wdt": for MT6797 > - "mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622 > - "mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623 > - "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 > - "mediatek,mt7986-wdt", "mediatek,mt6589-wdt": for MT7986 > - "mediatek,mt8183-wdt": for MT8183 > - "mediatek,mt8186-wdt", "mediatek,mt6589-wdt": for MT8186 > - "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 > - "mediatek,mt8192-wdt": for MT8192 > - "mediatek,mt8195-wdt", "mediatek,mt6589-wdt": for MT8195 > - > -- reg : Specifies base physical address and size of the registers. > - > -Optional properties: > -- mediatek,disable-extrst: disable send output reset signal > -- interrupts: Watchdog pre-timeout (bark) interrupt. > -- timeout-sec: contains the watchdog timeout in seconds. > -- #reset-cells: Should be 1. > - > -Example: > - > -watchdog: watchdog@10007000 { > - compatible = "mediatek,mt8183-wdt", > - "mediatek,mt6589-wdt"; > - mediatek,disable-extrst; > - reg = <0 0x10007000 0 0x100>; > - interrupts = ; > - timeout-sec = <10>; > - #reset-cells = <1>; > -}; > diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > new file mode 100644 > index 000000000000..5788617027c8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/watchdog/mtk-wdt.yaml# File name: mtk,wdt.yaml I assume all future MediaTek watchdogs (even these unpublished and developed in some years) will fit into this schema. :) If not, then maybe better to name the file by the compatible... but it's not a must. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek SoCs Watchdog timer > + > +maintainers: > + - Runyang Chen > + - Allen-KH Cheng > + > +description: |+ > + The watchdog supports a pre-timeout interrupt that fires timeout-sec/2 > + before the expiry. > + > +allOf: > + - $ref: "watchdog.yaml#" > + > +properties: > + compatible: > + oneOf: > + - const: mediatek,mt2712-wdt > + - const: mediatek,mt6589-wdt > + - const: mediatek,mt8183-wdt > + - const: mediatek,mt8192-wdt All these four entries should be an enum. > + > + - items: > + - enum: > + - mediatek,mt2701-wdt > + - mediatek,mt6582-wdt > + - mediatek,mt6797-wdt > + - mediatek,mt7622-wdt > + - mediatek,mt7623-wdt > + - mediatek,mt7629-wdt > + - mediatek,mt7986-wdt > + - mediatek,mt8173-wdt > + - mediatek,mt8183-wdt > + - mediatek,mt8186-wdt > + - mediatek,mt8192-wdt > + - mediatek,mt8195-wdt > + - mediatek,mt8516-wdt > + - const: mediatek,mt6589-wdt > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + '#reset-cells': > + const: 1 > + > + timeout-sec: true You do not need this, it's coming from watchdog schema. > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + watchdog@10007000 { > + compatible = "mediatek,mt8183-wdt", > + "mediatek,mt6589-wdt"; > + mediatek,disable-extrst; Did you test your bindings? Does not look like. Please run dt_binding_check (see writing-schema for instructions). > + reg = <0x10007000 0x100>; > + interrupts = ; Wrong interrupt flag. > + timeout-sec = <10>; > + #reset-cells = <1>; > + }; > + > +... Best regards, Krzysztof _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A1A4C433F5 for ; Fri, 22 Apr 2022 15:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ldylvzRWUQutAhNhoZ8aXb00dnOoiIeFlERN5uqAapo=; b=v67s1puSfT/o1S bHb/ExjtafBzAjvfJPnfuvB5ciOn8HftToJhB3/nIbKnLgdVRK1zXPrNBEpH7O+O4vxzYH4QI8Gmc P7NpRcoKmo84k9Smz//KmixnUwEGAI8jxsSh1RXKwT66M9Cf9+QsV/z9llMRWJ3Cqk1GaQa1+f5Oe YXjH8mc246I9oite61oC19w8TLcDhlO7JWc6TJhAox6K+TDp92dxu1IgASHgWm+XEXN4NblizI2U3 4T1y2unh2124+qvw+a6p5/XSxv1Q6DVHUuntS+h6iNLO7hYt1f3WE4mquQ+kLt+GcAjErP2br3XC6 79u7q5OydgkvQIKrpX7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvW3-001D8Q-02; Fri, 22 Apr 2022 15:48:16 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvSM-001BdH-Qv for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 15:44:29 +0000 Received: by mail-ej1-x629.google.com with SMTP id y10so17128779ejw.8 for ; Fri, 22 Apr 2022 08:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=JemFIsNtCjKL4LPEQBY/hGFmz6ljVMLTFme29Py2nSY=; b=kE/4yTd0BeJARbm77TZxpuVTgL9v+x0jEMOVZU0iv8mB4Q/g9GO6hh5+am0qj/rd/t u+A52haGAJ/7nt9iC+R4z2XOc/1dpqW3HlNeU65zPR8tscx47q6/cYR3Z/1HkOljee9v DCSYOZ88FcIQlkkqV84NK7eQuH9+MiiPF9mlTLCHzkOe5LU8efKWDR9PmW71uAyKYS5R EZLNGpjRSttXrn5kv6lyCkk/2jGGYWvN5oqmjFSnZv3JRmbnx692DdN2oUN7TWo2g/Op IaUxLeYJ3/Yx1wZ104lFif6x6UO2fQ9tXUQ3C6xP3XuBabvHOw+S7xI3FQ4SWLmPnrdP oYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=JemFIsNtCjKL4LPEQBY/hGFmz6ljVMLTFme29Py2nSY=; b=pypYEi+SVawKdM41G5D2K3fbkUIPLlTMKiUlblS+mO7L06S64LjJogBarIMe5hk5VV ahc6o4OdLYJULiEKGUu6PJ2tkEa3FZnkZCeSWh4Efbdpi/qDMvZU48lvfvqvRQpZqvqU HI+ve1/K+ux4tfbYOiVdfAToWmTEtEm455q9zA3csLKfZCXiyVAAvPSzfUoHC9RWDUXH 1cav30R+kTXnUv6gSnzC9G8ikLwfSO5TIMLvX+0FwW6CzCxogg9KVndN21nW9A2acu4J /KMTIWV7T7TgxAcNxkgTdYzPHIk6Cz+DMoyQyU3BfnqpuSbXRw4qF1Dw5foJPrY3f5XS 6qVg== X-Gm-Message-State: AOAM532MvtuEDzlcHw4OicL9+ncxKLXIETyqb1ss5C9Ty4gcWn58E3Ex ICyqGCBRweHYMuK7pn2UPzwxGw== X-Google-Smtp-Source: ABdhPJxuA+3Y8AE3ukYq9N7qqdw5yx7eXG2giExj/lpkeyAWZqsokfAbfxqRUhRzv4xOHYacE1Cwuw== X-Received: by 2002:a17:907:3f9e:b0:6f2:b3d8:63c0 with SMTP id hr30-20020a1709073f9e00b006f2b3d863c0mr2938068ejc.86.1650642263097; Fri, 22 Apr 2022 08:44:23 -0700 (PDT) Received: from [192.168.0.232] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id s2-20020a1709066c8200b006e4e1b1f875sm866663ejr.199.2022.04.22.08.44.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Apr 2022 08:44:22 -0700 (PDT) Message-ID: Date: Fri, 22 Apr 2022 17:44:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 2/2] dt-bindings: watchdog: mediatek: Convert binding to YAML Content-Language: en-US To: Allen-KH Cheng , Wim Van Sebroeck , Guenter Roeck , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , nfraprado@collabora.com Cc: Project_Global_Chrome_Upstream_Group@mediatek.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, Chen-Yu Tsai , Ryder Lee References: <20220422121017.23920-1-allen-kh.cheng@mediatek.com> <20220422121017.23920-3-allen-kh.cheng@mediatek.com> From: Krzysztof Kozlowski In-Reply-To: <20220422121017.23920-3-allen-kh.cheng@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_084427_024121_FFFD6C31 X-CRM114-Status: GOOD ( 22.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/04/2022 14:10, Allen-KH Cheng wrote: > Convert Mediatek watchdog devicetree binding to YAML. > > Signed-off-by: Allen-KH Cheng > --- > .../devicetree/bindings/watchdog/mtk-wdt.txt | 42 ---------- > .../devicetree/bindings/watchdog/mtk-wdt.yaml | 76 +++++++++++++++++++ > 2 files changed, 76 insertions(+), 42 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > create mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > > diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > deleted file mode 100644 > index 762c62e428ef..000000000000 > --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt > +++ /dev/null > @@ -1,42 +0,0 @@ > -Mediatek SoCs Watchdog timer > - > -The watchdog supports a pre-timeout interrupt that fires timeout-sec/2 > -before the expiry. > - > -Required properties: > - > -- compatible should contain: > - "mediatek,mt2701-wdt", "mediatek,mt6589-wdt": for MT2701 > - "mediatek,mt2712-wdt": for MT2712 > - "mediatek,mt6582-wdt", "mediatek,mt6589-wdt": for MT6582 > - "mediatek,mt6589-wdt": for MT6589 > - "mediatek,mt6797-wdt", "mediatek,mt6589-wdt": for MT6797 > - "mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622 > - "mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623 > - "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 > - "mediatek,mt7986-wdt", "mediatek,mt6589-wdt": for MT7986 > - "mediatek,mt8183-wdt": for MT8183 > - "mediatek,mt8186-wdt", "mediatek,mt6589-wdt": for MT8186 > - "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 > - "mediatek,mt8192-wdt": for MT8192 > - "mediatek,mt8195-wdt", "mediatek,mt6589-wdt": for MT8195 > - > -- reg : Specifies base physical address and size of the registers. > - > -Optional properties: > -- mediatek,disable-extrst: disable send output reset signal > -- interrupts: Watchdog pre-timeout (bark) interrupt. > -- timeout-sec: contains the watchdog timeout in seconds. > -- #reset-cells: Should be 1. > - > -Example: > - > -watchdog: watchdog@10007000 { > - compatible = "mediatek,mt8183-wdt", > - "mediatek,mt6589-wdt"; > - mediatek,disable-extrst; > - reg = <0 0x10007000 0 0x100>; > - interrupts = ; > - timeout-sec = <10>; > - #reset-cells = <1>; > -}; > diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > new file mode 100644 > index 000000000000..5788617027c8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/watchdog/mtk-wdt.yaml# File name: mtk,wdt.yaml I assume all future MediaTek watchdogs (even these unpublished and developed in some years) will fit into this schema. :) If not, then maybe better to name the file by the compatible... but it's not a must. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek SoCs Watchdog timer > + > +maintainers: > + - Runyang Chen > + - Allen-KH Cheng > + > +description: |+ > + The watchdog supports a pre-timeout interrupt that fires timeout-sec/2 > + before the expiry. > + > +allOf: > + - $ref: "watchdog.yaml#" > + > +properties: > + compatible: > + oneOf: > + - const: mediatek,mt2712-wdt > + - const: mediatek,mt6589-wdt > + - const: mediatek,mt8183-wdt > + - const: mediatek,mt8192-wdt All these four entries should be an enum. > + > + - items: > + - enum: > + - mediatek,mt2701-wdt > + - mediatek,mt6582-wdt > + - mediatek,mt6797-wdt > + - mediatek,mt7622-wdt > + - mediatek,mt7623-wdt > + - mediatek,mt7629-wdt > + - mediatek,mt7986-wdt > + - mediatek,mt8173-wdt > + - mediatek,mt8183-wdt > + - mediatek,mt8186-wdt > + - mediatek,mt8192-wdt > + - mediatek,mt8195-wdt > + - mediatek,mt8516-wdt > + - const: mediatek,mt6589-wdt > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + '#reset-cells': > + const: 1 > + > + timeout-sec: true You do not need this, it's coming from watchdog schema. > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + watchdog@10007000 { > + compatible = "mediatek,mt8183-wdt", > + "mediatek,mt6589-wdt"; > + mediatek,disable-extrst; Did you test your bindings? Does not look like. Please run dt_binding_check (see writing-schema for instructions). > + reg = <0x10007000 0x100>; > + interrupts = ; Wrong interrupt flag. > + timeout-sec = <10>; > + #reset-cells = <1>; > + }; > + > +... Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel