From patchwork Fri Nov 4 02:06:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen-KH Cheng X-Patchwork-Id: 15276 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp114750wru; Thu, 3 Nov 2022 19:09:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68umqwP3X5fQi+5rJqba9rOYMvTER1Qm4PlzfVNpjegyav0YoBtiBDMLUdnw4EpXFJl6sm X-Received: by 2002:aa7:cb09:0:b0:461:e6b6:4bad with SMTP id s9-20020aa7cb09000000b00461e6b64badmr10002208edt.27.1667527742843; Thu, 03 Nov 2022 19:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667527742; cv=none; d=google.com; s=arc-20160816; b=HVcXcBXrLa0vE0iiXDW+yVNRpdUEmDm514P7EclqyoOY6ofUsyxgKcNRLzJM39J5h3 UAWq6p2XH9c4Ja78bk0k3KSFOb9NM+RM+fjOccMD7KNsnfxeQ3fRtG791iNe4m/8x/+t JdOLhh9tDY618HAnNrsPLSHdlZMtQsfiCScZYAEMEjRfKUoTTKo7QEGQ/zu92uhfBO+t nN8QjYGAXhSzYUqaWIxpVRa5m1mU2vtoom/4lFGQ0Bpx487EVtK9vwvH0yb3gw56GfWk wqE9cl3RPClOAG78VYQvklIjQbBuQFFW/vbhIBdhq6lFrHjr0zoVKMy5y+ELkIYosv7b ZcYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hqt2qDFNbfsmqWFHQYYGGsgfhqmp4gbQQHYsgXAQHGQ=; b=U0EVGDb/QEJIh7zd19iPdfm9UcyGPR9gBd1kxv15ANBSz2h+dD0Xjg6j49ny1ApFk/ qzlNFSNZSTUXe+uA95bv3yGGgdxFnZg6oUL96hYdFijp3tktHn1OCBHbDnWLZWRguVkr xJAH3SGbCa7zRVdA8ZgICXraxKLHGAn6iZulTwOC8kikWEO56Z3TzI+NVvYr5LSbIsdD TgRXjzwizr6hp8rjPzpsKcUNLzG/CbNkfPWg08H8wFHa/oMKAIoYEOaaDJMjioallp6M Nz7yL8b7hTYObyBlmncLuwJ4vWjmbszp/YfdSnMBIYy3h/x5JILdzF2GBlm+VzvihjEA yD/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mWkH5GB1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs16-20020a170906dc9000b0073da4a0f01csi3355441ejc.743.2022.11.03.19.08.38; Thu, 03 Nov 2022 19:09:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mWkH5GB1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231338AbiKDCHc (ORCPT + 99 others); Thu, 3 Nov 2022 22:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231253AbiKDCHS (ORCPT ); Thu, 3 Nov 2022 22:07:18 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C7EC23EBD; Thu, 3 Nov 2022 19:07:13 -0700 (PDT) X-UUID: 329c62df54d24eb8a7e024f9f7345a5e-20221104 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=hqt2qDFNbfsmqWFHQYYGGsgfhqmp4gbQQHYsgXAQHGQ=; b=mWkH5GB16TmazzF9ewTsrSgnK1owlbQ/DCY0Gl4KrpbYs6raqvh2a2DCBFkY8O41u0G4kKQJuaEuBgooTENGssCzVCNxDJZn0q0tMHnKQkJwzgFuMwosurvTz0OGmMKRQZg80MzRoY5Q77pe+15pUi533UrW9+aRRe8Xx9x73sg=; X-CID-P-RULE: Spam_GS6885AD X-CID-O-INFO: VERSION:1.1.12,REQID:370f3244-dda6-4e4b-92cb-185394c812fe,IP:0,U RL:25,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS6885AD,ACT ION:quarantine,TS:120 X-CID-INFO: VERSION:1.1.12,REQID:370f3244-dda6-4e4b-92cb-185394c812fe,IP:0,URL :25,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:120 X-CID-META: VersionHash:62cd327,CLOUDID:db929ef3-a19e-4b45-8bfe-6a73c93611e9,B ulkID:221104100708SGBLK8VT,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 329c62df54d24eb8a7e024f9f7345a5e-20221104 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 696190955; Fri, 04 Nov 2022 10:07:07 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 4 Nov 2022 10:07:05 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 4 Nov 2022 10:07:05 +0800 From: Allen-KH Cheng To: Wim Van Sebroeck , Guenter Roeck , Krzysztof Kozlowski , Matthias Brugger , Rob Herring CC: , , , , , , , , Allen-KH Cheng Subject: [PATCH v4 5/7] dt-bindings: watchdog: mediatek: Convert mtk-wdt to json-schema Date: Fri, 4 Nov 2022 10:06:59 +0800 Message-ID: <20221104020701.24134-6-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221104020701.24134-1-allen-kh.cheng@mediatek.com> References: <20221104020701.24134-1-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY autolearn=ham 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: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748529570521190502?= X-GMAIL-MSGID: =?utf-8?q?1748529570521190502?= From: AngeloGioacchino Del Regno Convert the MediaTek watchdog bindings to schema. The original binding only had 4 without a fallback but there is a reset controller on the "mediatek,mt7986-wdt", "mediatek,mt8186-wdt", "mediatek,mt8188-wdt" and "mediatek,mt8195-wdt" Since there is no reset controller for the mt6589, we remove "mediatek,mt6589-wdt" as a fallback. Signed-off-by: AngeloGioacchino Del Regno Co-developed-by: Allen-KH Cheng Signed-off-by: Allen-KH Cheng Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Reviewed-by: NĂ­colas F. R. A. Prado --- .../bindings/watchdog/mediatek,mtk-wdt.yaml | 78 +++++++++++++++++++ .../devicetree/bindings/watchdog/mtk-wdt.txt | 43 ---------- 2 files changed, 78 insertions(+), 43 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml delete mode 100644 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt diff --git a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml new file mode 100644 index 000000000000..b3d2273f323b --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/mediatek,mtk-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek SoCs Watchdog timer + +maintainers: + - Matthias Brugger + +description: + The watchdog supports a pre-timeout interrupt that fires + timeout-sec/2 before the expiry. + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt2712-wdt + - mediatek,mt6589-wdt + - mediatek,mt7986-wdt + - mediatek,mt8183-wdt + - mediatek,mt8186-wdt + - mediatek,mt8188-wdt + - mediatek,mt8192-wdt + - mediatek,mt8195-wdt + - items: + - enum: + - mediatek,mt2701-wdt + - mediatek,mt6582-wdt + - mediatek,mt6797-wdt + - mediatek,mt7622-wdt + - mediatek,mt7623-wdt + - mediatek,mt7629-wdt + - mediatek,mt8516-wdt + - const: mediatek,mt6589-wdt + + reg: + maxItems: 1 + + interrupts: + items: + - description: Watchdog pre-timeout (bark) interrupt + + mediatek,disable-extrst: + description: Disable sending output reset signal + type: boolean + + '#reset-cells': + const: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + watchdog@10007000 { + compatible = "mediatek,mt8183-wdt"; + reg = <0 0x10007000 0 0x100>; + interrupts = ; + mediatek,disable-extrst; + timeout-sec = <10>; + #reset-cells = <1>; + }; + }; diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt deleted file mode 100644 index b900c85d4560..000000000000 --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +++ /dev/null @@ -1,43 +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,mt8188-wdt", "mediatek,mt6589-wdt": for MT8188 - "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>; -};