From nobody Sun Sep 22 04:40:00 2024 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 70D7CC433EF for ; Fri, 22 Apr 2022 12:38:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1447604AbiDVMl2 (ORCPT ); Fri, 22 Apr 2022 08:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447587AbiDVMl0 (ORCPT ); Fri, 22 Apr 2022 08:41:26 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6142556C27; Fri, 22 Apr 2022 05:38:31 -0700 (PDT) X-UUID: 74ff8eeb8e1744ee97353dea4a953e6c-20220422 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.4,REQID:5666115f-19d2-4d39-9523-37e12c688575,OB:0,LO B:0,IP:0,URL:25,TC:0,Content:-20,EDM:0,RT:0,SF:95,FILE:0,RULE:Release_Ham, ACTION:release,TS:100 X-CID-INFO: VERSION:1.1.4,REQID:5666115f-19d2-4d39-9523-37e12c688575,OB:0,LOB: 0,IP:0,URL:25,TC:0,Content:-20,EDM:0,RT:0,SF:95,FILE:0,RULE:Spam_GS981B3D, ACTION:quarantine,TS:100 X-CID-META: VersionHash:faefae9,CLOUDID:e7ba9ff0-da02-41b4-b6df-58f4ccd36682,C OID:9b458f515bca,Recheck:0,SF:13|15|28|17|19|48,TC:nil,Content:0,EDM:-3,Fi le:nil,QS:0,BEC:nil X-UUID: 74ff8eeb8e1744ee97353dea4a953e6c-20220422 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1301413892; Fri, 22 Apr 2022 20:38:26 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Fri, 22 Apr 2022 20:38:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 22 Apr 2022 20:38:25 +0800 From: Allen-KH Cheng To: Srinivas Kandagatla , Matthias Brugger , Rob Herring , "Krzysztof Kozlowski" CC: Lala Lin , , , , , , "Chen-Yu Tsai" , Ryder Lee , Allen-KH Cheng Subject: [PATCH] dt-bindings: nvmem: mediatek: Convert binding to YAML Date: Fri, 22 Apr 2022 20:38:23 +0800 Message-ID: <20220422123823.24577-1-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert Mediatek EFUSE devicetree binding to YAML. Signed-off-by: Allen-KH Cheng --- .../devicetree/bindings/nvmem/mtk-efuse.txt | 43 ------------ .../devicetree/bindings/nvmem/mtk-efuse.yaml | 69 +++++++++++++++++++ 2 files changed, 69 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt create mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.yaml diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Docume= ntation/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 @@ -=3D Mediatek MTK-EFUSE device tree bindings =3D - -This binding is intended to represent MTK-EFUSE which is found in most Med= iatek 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 - -=3D Data cells =3D -Are child nodes of MTK-EFUSE, bindings of which as described in -bindings/nvmem/nvmem.txt - -Example: - - efuse: efuse@10206000 { - compatible =3D "mediatek,mt8173-efuse"; - reg =3D <0 0x10206000 0 0x1000>; - #address-cells =3D <1>; - #size-cells =3D <1>; - - /* Data cells */ - thermal_calibration: calib@528 { - reg =3D <0x528 0xc>; - }; - }; - -=3D Data consumers =3D -Are device nodes which consume nvmem data cells. - -For example: - - thermal { - ... - nvmem-cells =3D <&thermal_calibration>; - nvmem-cell-names =3D "calibration"; - }; diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.yaml b/Docum= entation/devicetree/bindings/nvmem/mtk-efuse.yaml new file mode 100644 index 000000000000..307c05f69cb9 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/mtk-efuse.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek eFuse device tree bindings + +maintainers: + - Lala Lin + - Allen-KH Cheng + +allOf: + - $ref: "nvmem.yaml#" + +properties: + compatible: + oneOf: + - const: mediatek,efuse + - const: mediatek,mt8173-efuse + - 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 + +patternProperties: + "^.*@[0-9a-f]+$": + type: object + + properties: + reg: + maxItems: 1 + description: + Offset and size in bytes within the storage device. + + required: + - reg + + additionalProperties: false + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + + efuse: efuse@10206000 { + compatible =3D "mediatek,mt8173-efuse"; + reg =3D <0x10206000 0x1000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* Data cells */ + thermal_calibration: calib@528 { + reg =3D <0x528 0xc>; + }; + }; +... --=20 2.18.0