From patchwork Mon Nov 21 10:58:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 23660 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1511890wrr; Mon, 21 Nov 2022 03:01:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ZqEguJxWUpjkemKUdXPVT/UqO2O3iJDR+8IPikJ6qcK+BrIolXVO6eRhgq/4c17oM90Ot X-Received: by 2002:a65:6c11:0:b0:477:2bc0:f1b with SMTP id y17-20020a656c11000000b004772bc00f1bmr69722pgu.566.1669028468043; Mon, 21 Nov 2022 03:01:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669028468; cv=none; d=google.com; s=arc-20160816; b=yXGrY/SrDRFvwQUInnyzIAyDcD7rCQxszPkfSxx6MwYx0eQAtfijkxRB1xx1pfY39a e6dltVVTdbNZxKfJRn4yCSPRJY+Z6B7HjPJZEexWO+26l2FXj1j4/iTlgNReAdl1WipV XzZ12Dc2UFffQ7UXGkkIlOwh19/xjOWG8GR8FuFsT4Y4d528yj77W+5zz6JccUQquOPW MJS/OoFzAopNsFwiO5EFa1DyqRjVAc9b2/qEgvI/+guumpLd0I4VICGJOUHEMv9CZ8Ly NBww/G5/GAfvCWPgeg1E3vao0ATPVcKZV+oOqwbS3avdFkqEYKc2XPgDVJ0paEv/rjZi bJbw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=yuufDN8MAkZ+z/1NDCLZ9tHt7lifmvSE7ROToVJ/Z04=; b=s930d0txycWBNKL/FctQ1z0KHKqkaaTjdNMS/2xsOYGEm6lKbA5oLYkPip36nH5n0/ TdnFc/f/QSaSsBtc2J0X9JQXXe4XxJAOcB5OypWoTpTv3EVdOgwajfs8T7j+OZg3gPYC DlL6DhF9HJsWQLSZls+u7lYRWDLMWq5RlyStjgWiRMWbFH74UF4v91ODss2Jo/3zyeaF RneQnsqSQcl3K3VVyFuoqxqlDGtNT2trHsdkSeygyEBzHHRd0w9QjCMYoptgAfYK/nCa WyiZlUr/TJasinzlDnktmUo3PW5Djq+wHFoZ/+LkN673V+IleW1EiCEKjacfCqEHRAK/ FYEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZLoPWLho; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 124-20020a630982000000b00477037e706bsi10678794pgj.727.2022.11.21.03.00.50; Mon, 21 Nov 2022 03:01:08 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=ZLoPWLho; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbiKUK6k (ORCPT + 99 others); Mon, 21 Nov 2022 05:58:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiKUK6i (ORCPT ); Mon, 21 Nov 2022 05:58:38 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC6749E951; Mon, 21 Nov 2022 02:58:36 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id bj12so27514078ejb.13; Mon, 21 Nov 2022 02:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yuufDN8MAkZ+z/1NDCLZ9tHt7lifmvSE7ROToVJ/Z04=; b=ZLoPWLhoKYxmHi/+IEWgDRPnqyYviYWLV2Jv3fhHz4fokTK+GyWrKFeWB7iIwuoSTz Quf2F9gQ7o0rGRz0uKepfni+gYMcuVSWOXz8HuXsvBJcxzEc1Z49vHixl0t6xsU4sBYH FN/3u2GhJ+gEC8xhq7k6JBDttv/s3SbT5fNUgDAAUWjgaTdlsaHfQUvdxVzOvh0XY2NN II+b9Hrg8zgRJ1FxdZpxY9RRrhVxg0EWAda9OKconHCmHU2uk9rTF+9t2RVuBcc/SnG7 HK4W+EjgDr0EDbn41X0qNZkiMuVir3Dhy2Q4v0rKlXZkIB7AKHsiiibfm6TTRYYGPO2K GdXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yuufDN8MAkZ+z/1NDCLZ9tHt7lifmvSE7ROToVJ/Z04=; b=6hna8scE0Je+fjLlbhtjSC8mw7j6xtlloCMp0u9H9odR5RJdLUAtm4SOIO6OMqVt0V 7oOf644ls8ARMdPTrPF34ucDnPinTjFws4IiQRSTqUaE28/Lm2uSiW0pmNRxrU8MiyLC vowt7Vn9+eFuMsAZTdGUWIACGgreOcKvFoVyWPmuS9M+3ngURxlH9uGO2jmHefybUp2K gBAAEMhXpTFzpaV5yMSehlWA421rbcjR/HxXSlODQxDL8Lfyq6vxgjQS/mMhLwNWIOHF +VEZVfmEKvnCq3MNL5GeP5hyd79z9eE8jaw1L/yZUaE47zun5GuPFuGdaw6a+ObWyu2J 9OPQ== X-Gm-Message-State: ANoB5pk9J9q9DUO5V/L0PEJeWEvjmtJenbB1rop41kLYsjNVp4QCJ9l0 7k3oA8BlrXw7rOC5wszrmic= X-Received: by 2002:a17:906:901:b0:7ae:23c:3cb4 with SMTP id i1-20020a170906090100b007ae023c3cb4mr14566927ejd.599.1669028315126; Mon, 21 Nov 2022 02:58:35 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id mf20-20020a1709071a5400b0078a543e9301sm4869041ejc.200.2022.11.21.02.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 02:58:34 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Michael Walle , Srinivas Kandagatla , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH dt-schema.git] schemas: add NVMEM cell with #nvmem-cell-cells Date: Mon, 21 Nov 2022 11:58:30 +0100 Message-Id: <20221121105830.7411-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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?1750103194971738230?= X-GMAIL-MSGID: =?utf-8?q?1750103194971738230?= From: Rafał Miłecki Some NVMEM cells may provide more than 1 value. An example can be base MAC address that is used for calculating multiple MACs (for few different devices). For specifying value to read phandle needs to be used with an argument. Cc: Srinivas Kandagatla" Cc: Michael Walle Signed-off-by: Rafał Miłecki --- This bit is required for moving forward with the [PATCH v2 00/20] nvmem: core: introduce NVMEM layouts https://lore.kernel.org/linux-arm-kernel/20220901221857.2600340-1-michael@walle.cc/ As pointed out by Rob #nvmem-cell-cells should be added to the dt-schema and not a Linux binding: Re: [PATCH v2 15/20] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout https://lore.kernel.org/linux-arm-kernel/20220912192038.GA1661550-robh@kernel.org/ sl28 is one example that needs #nvmem-cell-cells u-boot,env is another one Please let me know if I got this binding right at all. --- dtschema/schemas/nvmem/nvmem-cell.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dtschema/schemas/nvmem/nvmem-cell.yaml diff --git a/dtschema/schemas/nvmem/nvmem-cell.yaml b/dtschema/schemas/nvmem/nvmem-cell.yaml new file mode 100644 index 0000000..dfa99b8 --- /dev/null +++ b/dtschema/schemas/nvmem/nvmem-cell.yaml @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: BSD-2-Clause +$id: "http://devicetree.org/schemas/nvmem/nvmem-cell.yaml#" +$schema: "http://devicetree.org/meta-schemas/base.yaml#" + +title: NVMEM Cell Common Properties +description: "Schema for NVMEM cell devicetree bindings" +maintainers: + - Rafał Miłecki + - Srinivas Kandagatla + +# always select the core schema +select: true + +properties: + "#nvmem-cell-cells": + $ref: "/schemas/types.yaml#/definitions/uint32" + description: > + Some NVMEM cells may consist of raw data that requires some extra + processing. They may provide more than 1 value. + + Passing extra argument(s) allows selecting data to access. + +additionalProperties: true