Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2299243imw; Wed, 6 Jul 2022 03:39:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1VTam5gDSGHHjwv+bwUD3w2AiTqSCYZ3xfYm5OpAWOjrN24W2rIK5V38D6kJbYfIXa5Hy X-Received: by 2002:a17:903:283:b0:16a:6db9:3f02 with SMTP id j3-20020a170903028300b0016a6db93f02mr45873582plr.173.1657103985078; Wed, 06 Jul 2022 03:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657103985; cv=none; d=google.com; s=arc-20160816; b=PAnEsB24JNNbi8gIsPWJ5yJzdA5xfZrb93FaNZouujS5mvkynjpIbs5RMbatZYGZtg eanV74vMGMoMO0ufjBxWvlaR2EBrj8zpyKUvmc/7VvUvEC+zmjLhY0RNk4q1jfGyDwaw 33rHztdyqfC5pGFkG5JYjmwv5tNvYIm9pX06OadSm4q1RFE0KysnTdE0ZED45hVW0/Ok 1ehkHGD4gFke2AoTphQX5grzkj6BNm8oOBSkcELwKrw9mUJ4Ql9ELmk/4YGC+5D6p1n6 BgsCGRfzmROdXH4UKRjIvg/eRGJ4aKg1SdM3z6BNNKYb+YA/5pv8QzLsIxArsvFxS8Qg CX+Q== 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=RV7crcrnHKpDR+JNHqiUBuQdjQCZb9VboNC1TvQ0gW8=; b=StUwGM4NniVKs6l61F7oKAYGAVgFrNZ8rK0JAIcD0UMO+T3/LaES1fI7HvgbQ95BdT UijfFA1PCh9EgzzsIXa/GQQgvAXYd31tqz4AesQWRabqjvLqplrYr5RT8+1NOM+a2ggf tQjb70+4/Ht345geJZNUnhLvRfph3cZsOmmOsxSlaTTWXkwcEKTuW3aytL9OxnTYrD1i cZb2Fu9YXNVnESaiU8nt2UMZboV+eXecS2QQBVVBhPFTNZnw4so2J6/rT6d/PVBBXejH jEsbChoEHXcE8BfoieXyyDKbFtybKJF3b698Q0ls7KHYq+N/vqvglfsbW6GEociDU0z2 ocYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zJUCSNvP; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja17-20020a170902efd100b0016bd8c26cc4si14040343plb.466.2022.07.06.03.39.33; Wed, 06 Jul 2022 03:39:45 -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=@linaro.org header.s=google header.b=zJUCSNvP; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232918AbiGFKIS (ORCPT + 99 others); Wed, 6 Jul 2022 06:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232812AbiGFKHo (ORCPT ); Wed, 6 Jul 2022 06:07:44 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7024D255AE for ; Wed, 6 Jul 2022 03:07:33 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id r14so15527759wrg.1 for ; Wed, 06 Jul 2022 03:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RV7crcrnHKpDR+JNHqiUBuQdjQCZb9VboNC1TvQ0gW8=; b=zJUCSNvP9yZ+p4ALIcEWbwB922qRIYqUJVITA2czxsD6ZIQEUTbLfBNpLINcHzMJeo 4aEo/MxYDJKeUBNvZhinZBh4HD+ncGq/Bdx7rDsjmP4e8x7FoAQ7l1+GNNbmvC9v8b0C WUjZzAADOPJffgFIfN+n1MVs83XedLrQ78MWi1901rjT55Puzw4JpbHNurAwiQC0nZX9 ru7IpD6az0PPFppMQt7ws4bjs2YNUuhk089MizGAbxDULrqRgvoDAaOt1qG0QgQL08UJ DZPn4PnffwtRnLQy7k3NSfo7S05XN8YRFaQ1cKyNZSrR+RNBiyXJIbSyHVzhvowFn+03 3j3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RV7crcrnHKpDR+JNHqiUBuQdjQCZb9VboNC1TvQ0gW8=; b=Nu1KcamkDwVVNrvulh44WCiBOgJnGjvBdKlQndVdYOIHaGYK7PklFrjy1UA9A8rOjX vgaanyL///+DERzv+Wg9y66dG0BeBLBMH8wWm+MaSnn9AwJDCJGGOhQ3gQBYtf4ZLn8n 7fI+sqb41EUkwqmKqHCRW/0TVCsXQfC02MH3C+OSi7Sw05CyskoD6CPcopVAbvJEQXrt fdCaETDswrkOq8EoMHZSSDK4ai++xuQ/MWs75CIGy+6FACEmKUq2QU7e1AwiXd7P7Xwb So32n+7vek8AQ82BzbKlnFF1l85Y/p6bAhEbuWb/UxR3Yy4lwD56/8ni4dwrb7v024Ds iVBg== X-Gm-Message-State: AJIora+v3rIyQeyivcvZUe7ADSYB4USxuPLu1unHXwX3ZGhdJgWF6gRn GmMZ4GU8E+SN2VViLso+ZvuM+A== X-Received: by 2002:a05:6000:237:b0:21d:4d65:32b3 with SMTP id l23-20020a056000023700b0021d4d6532b3mr24855054wrz.169.1657102051976; Wed, 06 Jul 2022 03:07:31 -0700 (PDT) Received: from srini-hackbase.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id n35-20020a05600c3ba300b003a039054567sm24678143wms.18.2022.07.06.03.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 03:07:31 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Chunfeng Yun , Krzysztof Kozlowski , Rob Herring , Srinivas Kandagatla Subject: [PATCH 4/7] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema Date: Wed, 6 Jul 2022 11:06:24 +0100 Message-Id: <20220706100627.6534-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220706100627.6534-1-srinivas.kandagatla@linaro.org> References: <20220706100627.6534-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Chunfeng Yun Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Signed-off-by: Srinivas Kandagatla --- .../bindings/nvmem/mediatek,efuse.yaml | 87 +++++++++++++++++++ .../devicetree/bindings/nvmem/mtk-efuse.txt | 43 --------- 2 files changed, 87 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..f6e01ddb7499 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only 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 + +description: | + MediaTek's efuse is used for storing calibration data, it can be accessed + on ARM devices usiong I/O mapped memory. + +maintainers: + - Andrew-CT Chen + - Lala Lin + +allOf: + - $ref: "nvmem.yaml#" + +properties: + $nodename: + pattern: "^efuse@[0-9a-f]+$" + + compatible: + oneOf: + - items: + - enum: + - mediatek,mt7622-efuse + - mediatek,mt7623-efuse + - mediatek,mt8173-efuse + - mediatek,mt8192-efuse + - mediatek,mt8195-efuse + - mediatek,mt8516-efuse + - const: mediatek,efuse + - const: mediatek,mt8173-efuse + deprecated: true + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + efuse@11c10000 { + compatible = "mediatek,mt8195-efuse", "mediatek,efuse"; + reg = <0x11c10000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + + u3_tx_imp_p0: usb3-tx-imp@184,1 { + reg = <0x184 0x1>; + bits = <0 5>; + }; + u3_rx_imp_p0: usb3-rx-imp@184,2 { + reg = <0x184 0x2>; + bits = <5 5>; + }; + u3_intr_p0: usb3-intr@185 { + reg = <0x185 0x1>; + bits = <2 6>; + }; + comb_tx_imp_p1: usb3-tx-imp@186,1 { + reg = <0x186 0x1>; + bits = <0 5>; + }; + comb_rx_imp_p1: usb3-rx-imp@186,2 { + reg = <0x186 0x2>; + bits = <5 5>; + }; + comb_intr_p1: usb3-intr@187 { + reg = <0x187 0x1>; + bits = <2 6>; + }; + u2_intr_p0: usb2-intr-p0@188,1 { + reg = <0x188 0x1>; + bits = <0 5>; + }; + u2_intr_p1: usb2-intr-p1@188,2 { + reg = <0x188 0x2>; + bits = <5 5>; + }; + }; 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"; - }; -- 2.25.1