From patchwork Tue May 10 13:26:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?QWxsZW4tS0ggQ2hlbmcgKOeoi+WGoOWLsyk=?= X-Patchwork-Id: 1629168 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: 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=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4KyJvj2kzvz9sFx for ; Tue, 10 May 2022 23:35:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243636AbiEJNji (ORCPT ); Tue, 10 May 2022 09:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244996AbiEJNiU (ORCPT ); Tue, 10 May 2022 09:38:20 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 162877CB3F; Tue, 10 May 2022 06:26:48 -0700 (PDT) X-UUID: 70e6850d7a3049e59b528378dcb9bfea-20220510 X-CID-P-RULE: Spam_GS6885AD X-CID-O-INFO: VERSION:1.1.4,REQID:9311d884-b6ce-4cac-8643-6400c2ebcbdc,OB:0,LO B:10,IP:0,URL:25,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,RULE:Spam_GS6885AD ,ACTION:quarantine,TS:120 X-CID-INFO: VERSION:1.1.4,REQID:9311d884-b6ce-4cac-8643-6400c2ebcbdc,OB:0,LOB: 10,IP:0,URL:25,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,RULE:Spam_GS981B3D,A CTION:quarantine,TS:120 X-CID-META: VersionHash:faefae9,CLOUDID:ec71ea16-2e53-443e-b81a-655c13977218,C OID:c055b30c21f2,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,File:nil ,QS:0,BEC:nil X-UUID: 70e6850d7a3049e59b528378dcb9bfea-20220510 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1167358095; Tue, 10 May 2022 21:26:40 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 10 May 2022 21:26:39 +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.3 via Frontend Transport; Tue, 10 May 2022 21:26:39 +0800 From: Allen-KH Cheng To: Srinivas Kandagatla , Matthias Brugger , Rob Herring , "Krzysztof Kozlowski" CC: Lala Lin , , , , , , "Chen-Yu Tsai" , Allen-KH Cheng Subject: [PATCH v4 1/3] dt-bindings: nvmem: mediatek: Convert efuse binding to YAML Date: Tue, 10 May 2022 21:26:35 +0800 Message-ID: <20220510132637.5864-2-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220510132637.5864-1-allen-kh.cheng@mediatek.com> References: <20220510132637.5864-1-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=no 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 Convert MediaTek eFuse devicetree binding to YAML. Signed-off-by: Allen-KH Cheng --- .../bindings/nvmem/mediatek,efuse.yaml | 57 +++++++++++++++++++ .../devicetree/bindings/nvmem/mtk-efuse.txt | 43 -------------- 2 files changed, 57 insertions(+), 43 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml new file mode 100644 index 000000000000..529f5888d93f --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek eFuse + +maintainers: + - Lala Lin + - Allen-KH Cheng + +allOf: + - $ref: "nvmem.yaml#" + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt8173-efuse + - mediatek,efuse + description: + Only mt8173 SoC-specific compatible with generic fallback should be + used + - items: + - enum: + - mediatek,mt7622-efuse + - mediatek,mt7623-efuse + - mediatek,mt8183-efuse + - mediatek,mt8192-efuse + - mediatek,mt8195-efuse + - mediatek,mt8516-efuse + - const: mediatek,efuse + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + efuse: efuse@10206000 { + compatible = "mediatek,mt8173-efuse"; + reg = <0x10206000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + + /* Data cells */ + thermal_calibration: calib@528 { + reg = <0x528 0xc>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt deleted file mode 100644 index 39d529599444..000000000000 --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt +++ /dev/null @@ -1,43 +0,0 @@ -= Mediatek MTK-EFUSE device tree bindings = - -This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs. - -Required properties: -- compatible: should be - "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622 - "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623 - "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173 - "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192 - "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195 - "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516 -- reg: Should contain registers location and length -- bits: contain the bits range by offset and size - -= Data cells = -Are child nodes of MTK-EFUSE, bindings of which as described in -bindings/nvmem/nvmem.txt - -Example: - - efuse: efuse@10206000 { - compatible = "mediatek,mt8173-efuse"; - reg = <0 0x10206000 0 0x1000>; - #address-cells = <1>; - #size-cells = <1>; - - /* Data cells */ - thermal_calibration: calib@528 { - reg = <0x528 0xc>; - }; - }; - -= Data consumers = -Are device nodes which consume nvmem data cells. - -For example: - - thermal { - ... - nvmem-cells = <&thermal_calibration>; - nvmem-cell-names = "calibration"; - }; From patchwork Tue May 10 13:26:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?QWxsZW4tS0ggQ2hlbmcgKOeoi+WGoOWLsyk=?= X-Patchwork-Id: 1629169 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: 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=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4KyJvk5Qcfz9sFx for ; Tue, 10 May 2022 23:35:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243641AbiEJNjk (ORCPT ); Tue, 10 May 2022 09:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244994AbiEJNiU (ORCPT ); Tue, 10 May 2022 09:38:20 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4AF978FD4; Tue, 10 May 2022 06:26:46 -0700 (PDT) X-UUID: 1c74c865f4274979a191b4a5e158c64e-20220510 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.4,REQID:5085cbc3-0c16-49d5-87d2-0290c09d47af,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:faefae9,CLOUDID:45164ab3-56b5-4c9e-8d83-0070b288eb6a,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,File:nil,QS:0,BEC:nil X-UUID: 1c74c865f4274979a191b4a5e158c64e-20220510 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 117476740; Tue, 10 May 2022 21:26:42 +0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Tue, 10 May 2022 21:26:41 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 May 2022 21:26:40 +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.3 via Frontend Transport; Tue, 10 May 2022 21:26:40 +0800 From: Allen-KH Cheng To: Srinivas Kandagatla , Matthias Brugger , Rob Herring , "Krzysztof Kozlowski" CC: Lala Lin , , , , , , "Chen-Yu Tsai" , Allen-kh Cheng , Allen-KH Cheng Subject: [PATCH v4 2/3] dt-bindings: nvmem: mediatek: document deprecated efuse property Date: Tue, 10 May 2022 21:26:36 +0800 Message-ID: <20220510132637.5864-3-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220510132637.5864-1-allen-kh.cheng@mediatek.com> References: <20220510132637.5864-1-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,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: devicetree@vger.kernel.org From: Allen-kh Cheng We mark mediatek,mt8173-efuse and mediatek,efuse as deprecated to prevent them from being the single compatible in the future. The mediatek,efuse compatible should be used as generic fallback for all MediaTek chipsets. Signed-off-by: Allen-KH Cheng --- .../devicetree/bindings/nvmem/mediatek,efuse.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml index 529f5888d93f..04ecf5980b2e 100644 --- a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml @@ -16,16 +16,18 @@ allOf: properties: compatible: oneOf: - - enum: - - mediatek,mt8173-efuse - - mediatek,efuse + - const: mediatek,mt8173-efuse # Don't use this in new dts files + deprecated: true + - const: mediatek,efuse + deprecated: true description: - Only mt8173 SoC-specific compatible with generic fallback should be - used + Please use mediatek,efuse as generic fallback to enable the MediaTek + eFuse support. - items: - enum: - mediatek,mt7622-efuse - mediatek,mt7623-efuse + - mediatek,mt8173-efuse - mediatek,mt8183-efuse - mediatek,mt8192-efuse - mediatek,mt8195-efuse @@ -44,7 +46,8 @@ unevaluatedProperties: false examples: - | efuse: efuse@10206000 { - compatible = "mediatek,mt8173-efuse"; + compatible = "mediatek,mt8173-efuse", + "mediatek,efuse"; reg = <0x10206000 0x1000>; #address-cells = <1>; #size-cells = <1>;