From patchwork Mon Nov 21 11:47:08 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: 23692 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1537770wrr; Mon, 21 Nov 2022 03:57:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf5b+SV1j8qj0RdcCnXzvMfKcVIlY7rrNhqI2I7BufCpEnqAo/R+/9ziR2BTgsLLwEB5Gp/N X-Received: by 2002:a17:902:a511:b0:187:3bc8:fc56 with SMTP id s17-20020a170902a51100b001873bc8fc56mr300414plq.83.1669031852773; Mon, 21 Nov 2022 03:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669031852; cv=none; d=google.com; s=arc-20160816; b=gfo7xYxRVcylQJAcSpdocFCBP5vYprR1kXTAAjxdIn8nPUnOioyJ22MTpfKApL2PlD 2C4yF0OpoGiQR7bOTLPpgY9FnxpV+55cs4KaScb0a7j7L7nrpMsjfuRNiiAlhQFQFT3i flEsuH5d4rPaGZDlEtrwSNQo6Hpn/DL2MHYY42wvsyuwAzqiuK2hGd7J9W1dLf9nOOu2 DJynPzk0mwfP3Sx6FEzi+KvsMm0Iqcox0yv8S3NjCj+BOAguKpBX+Kz45+obPHrx7V2L tfehjNkKG6yoJZ22YeXTWYoSGwzBwIeQEdf+zgypMtH8oWXgy34ndsXZyx/vVW8UgN5f aOLQ== 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=uJJXhf0ZouG6Lq8s9N2QMo51VNGYLGy26YpCtzoJ2sk=; b=gbScIp7FLgszQVLLSqOAhMUlYAqiIKcuRqlUpolJKbVBgteytq/I77k0araFoFbx8i PePBXTMcMKtlWUZGoVSVv6JOC+eGdkigWsrm51hULBwFK0vBVVlSfASvLiP3y9hTgLP+ 6gXT4oQY8gLxkFLzxMFzNoj8SjMkkvWU+bIIOyJcLVnLGI1RItXYiKU7v4uhUIl3YCYM eejD/Oe+XzktdElbsebeKmmF0q1K0bce1llAbl+H1EBcK61NIZ7aiyCdXytykVeCQLvd mBJJz0ocTVX9uaqZQYfApZrTxi1in6HbxYG7nbETAPNtU8uzzTxixDkbxu4OCWBUIMlr w05w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OMnwEgxN; 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 w11-20020a170902ca0b00b00186b84c723bsi9749474pld.419.2022.11.21.03.57.18; Mon, 21 Nov 2022 03:57:32 -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=OMnwEgxN; 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 S230505AbiKULrZ (ORCPT + 99 others); Mon, 21 Nov 2022 06:47:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbiKULrS (ORCPT ); Mon, 21 Nov 2022 06:47:18 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9B783899; Mon, 21 Nov 2022 03:47:16 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id f7so15854343edc.6; Mon, 21 Nov 2022 03:47:16 -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=uJJXhf0ZouG6Lq8s9N2QMo51VNGYLGy26YpCtzoJ2sk=; b=OMnwEgxNbalqU/91dk07RZKyJeY3LIN8hoJUoyi4ZUcDCO+SznDrmQyTrPKMwZ+6Wl Qx6cuVY6MXEr6ldwwjhpkfF4DIr4risDwAoafJ8GuvHjrmIOZZoeOWz6sO48LUNvANFD MqRyS29A1kTIVBC28vvCAw0lsAzuf9x7BfmPloqQ+vlgtaYm+mYM9h/RFXx5yW4CaF8M 9ROox944URXG6anEIGWGT4Ezw/LNG+Q24qfIP/fPe0SW7ms7CHGfVC0+iHDwsw/YpU2H xO7Oo+mcOi0t2DpeAC8c7jJhjSId5Um7B0OqFN2SguJ8z+8Gar9OMea5VVmTWxIw9l8Y S2Sw== 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=uJJXhf0ZouG6Lq8s9N2QMo51VNGYLGy26YpCtzoJ2sk=; b=5HXyZM4hHfu1T04WNQFR6Qp+tQkZeb7Rbi8/A8XQLbb6cNoJUIPsOhOXR2nRV7CTVJ TB1EqQjroi14TbvhFXpFNRHg51kbXrlimzrr+KMedM/dNu1D3UqNL842TLuZ7S1BDPoa s0s/FE7O9M9EWDRo+NwxTLB0D+ycxPRujW1EMryDclPFZLpsuWtYj7sq222DctKv8p1I S36ghXNw6c63Bu9HCyPuKFAUnBr4yjruYe/PZY3Gjst7qSwkcp15Tlp2m8JmjhQFzLmo DpjXLOarUNH8noleh2V+gOoY0XiKs7tnL4PFgsQTdw7aNqsszXuq6PqTB7iZfPKjEemn Vtmw== X-Gm-Message-State: ANoB5pl9tM71OBOQRKbdBtMA4G12W0TlTBIw/eRNQwyvIQX4CTBuHBgU UuMqt/IcJayXVY02H+vk4eY= X-Received: by 2002:aa7:d3c9:0:b0:459:aa70:d4b6 with SMTP id o9-20020aa7d3c9000000b00459aa70d4b6mr16023510edr.224.1669031235224; Mon, 21 Nov 2022 03:47:15 -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 ay12-20020a170907900c00b00780982d77d1sm4913753ejc.154.2022.11.21.03.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 03:47:14 -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 V2 dt-schema.git] schemas: add NVMEM cell with #nvmem-cell-cells Date: Mon, 21 Nov 2022 12:47:08 +0100 Message-Id: <20221121114708.10161-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?1750106744043086008?= 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 --- V2: Drop redundant quotes (thanks Krzysztof) Please note there is ongoing work by Michael who chose to modify meta-schema in his work: https://github.com/devicetree-org/dt-schema/pull/89 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 --- 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..1a1741d --- /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