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: 13050785 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8EDDBC4332F for ; Mon, 21 Nov 2022 11:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0Dm0fkPt8GZEcmbGIZTr7WPNoL+ojLRtxdgzeMI3JGY=; b=r9YlBRjjyEPgSW gUR3+PrPyzavpjPeqHkTGLk3Mi7Ix+EjruzOndH5cjZKcfwIWA2JsGFtCAIGV/YXUyBr0PkzWABrN 3a3v9XAt8catHJnlBDyRcU+zwMhCnkGrwCGokUIlegsbF8BMlEVX0lmzB2Z4ACx8C6S6DeWH8ExyQ 5ZghlWl1gAXC5xBplBQOzGRO2JoAqCvtINjlkX1ELBdWps/k12oeaaDNRQot8FS128sbDBHNbQ/1G OUUaH93/VeHtJlocRaik54X4ofUnux1JHEC/2FFoiVItz9Z/DBIYjms6uY0ULHsnX5wOyI3V0Fy4p Irzy//5g1HhXSW3mgLOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox5Gn-00D3PF-6o; Mon, 21 Nov 2022 11:47:25 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox5Gg-00D3KF-Te; Mon, 21 Nov 2022 11:47:20 +0000 Received: by mail-ed1-x534.google.com with SMTP id x102so15930178ede.0; 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=kZAUGf6hhWOfq1mAabR6nGx1i2HMQ6/BXBBvFMyNU+gwvcwmqjPIObf5mqbIH8ffg8 mOOyeeElUbnInnRY0+tBnYO5j+4I6Ll56T8fZ6rCt+VtEUgqfWGQAN96sM+jj063RZ2x GIgYBzt66bjgLoAOkvqV2KordrMESHYYbJzvaZd2XzM/pGjLzCWsdzfxbNKKiH1Je8rG UiPte0qvnrLpICXRQAcCpSI24mnrYqeN2w+K+s0jzr6xSOdyJBVnvPl2CjcD2geNxVfd 1nOzJWImdxuBli1LtVXBNxx2B4CXcwbY3/cSMSN7sB0uYaMjpEDiyHBuAPqYnbXsWsuQ 5oFg== X-Gm-Message-State: ANoB5pnf9A+X4RBikWCdOzQWhFdQK9Fj4FWF5maIiiQ/9lU0UAg8ZSmG ltoUKRwMJjFv0IEC1jVIE2s= X-Google-Smtp-Source: AA0mqf4aDDhBcDN72x3wx/EDR7Z7QMMR9UBxCv5euJ+PDL5gyJvUvP5LZEM7gvGXLJvBRYzMteJtaw== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221121_034718_999911_7EEA1B22 X-CRM114-Status: GOOD ( 14.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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