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: 13050609 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 9F1F4C4332F for ; Mon, 21 Nov 2022 10:59:44 +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=NR1NYIFMGqaVkEzM7DhD3c8FYFxyT15yMpYWjS4AqZQ=; b=W4iZtepsG0sWPk M6oXf0HAQVrL2nKbFHJ5cx+0yhh1tG+E4v1wxk0HpQEySJ/EhQZXti9JlVBAKAgDr86160oeo4rWp DWFJ9Sl5SxqRRj2zNuZ3AQR+NSWoUcEXppwYIPwjnKXJju3/SlIYYaYu4DIWChAds3jWjwnt2V1pl AtMk8swcXPyu2/5A/D3tuPhNfSrkCiuSngWErQefk+ydKoHDEOLXfKFrBwlSLDU9sl0hxNgZe7hUJ nrO95PnUpD7TXXQpFptlHlOM7Vv/RQuQTxtK5Fxyi7Sp+FY0ORSfqBHWNp3Hdhi3+LCBP0hCv7OeB zFABnTRFxxRKw0bwVd9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox4Vg-00CkqF-LO; Mon, 21 Nov 2022 10:58:44 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox4Vb-00CkoR-E2; Mon, 21 Nov 2022 10:58:40 +0000 Received: by mail-ej1-x62f.google.com with SMTP id n12so27527761eja.11; 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=lQkcYcrYZ6BnUM01brgK8fnaIKveVxqRRJsc3uaHMARkiSzvYx+UuxAD7KYPTMQuZ9 d8pi8qUXfdvFYYlfpjES3G2caCVKUDag6FIo+ZZJ4JtkkPRECVH4ZUDcareXIRSFi69p AJYpG4mAqeX35R49kxAc8QWCaexKS17Kgbjoc5jAHW9AlFNZMmdMJNgotT43IC7LIa+5 xmnJht0vHOSnycl3rl0n1+f76VOCKGk19NqYHsShtdP3s37vAfO1DrFmYWEmhOrA6HkA gtXDpG75uMs5dFU7V56G4eWLMxCgAcIA/rbx158k8TEg5Waht+bJ3snv/x4iiPkoDGLJ 2Vpw== X-Gm-Message-State: ANoB5pl8B7d5xKb2dkjJECxq8aQRCrLgyi9D0RmlnLtDOm/o3DNYtYcC 34lZSBm1zRGRQ5eEzporSQo= X-Google-Smtp-Source: AA0mqf54asC375YIqRZi1ostE5mdXb4wOP9ZiJG3ecr1g4Kt9CqeEvbwGhIPZ6W7NP+kX0CDNqsmpQ== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221121_025839_494452_29E59D3C X-CRM114-Status: GOOD ( 14.90 ) 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 --- 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