From patchwork Mon Nov 14 09:02:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1703466 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=VO/d6X1X; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=Owkgcgfy; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N9k0L60nDz23mQ for ; Mon, 14 Nov 2022 20:04:50 +1100 (AEDT) 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:References:In-Reply-To: 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: List-Owner; bh=4EEqeLb3UF/I0pryn5/sx8V6wtnKn8NMzLgWXu+OOKc=; b=VO/d6X1XSf9snc knU4DDN9Qp5mOZ3livv454aNW3FAgmv9jFl8plFJ6U6bkJLAAUf3y/aC/HoWQJrXwyoge13mWdzYx hyiu0Td/A+JXIcK56KOnjdjweeRhmTI+whfRUyWzYhJZGvlbBAJwWJcGy+68KZf/S8Bd4s6oZuZS7 6aurhckydY5SsW4pu0i0omvWoe3PFfo7Qmds8XIz013w8Z1QkcGppneD/F8p8ShNeS50QeqVwXRq2 /dP6/8uNyptaqUBye9YkfLVKdcnI0cX5y0//0LV4SIZ0BQK0zp9xe1Iah7ooIZxsVFXcGsvVNdfmA MWrNxPqWWrNnrcODfAdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouVO4-00H2IB-7G; Mon, 14 Nov 2022 09:04:16 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouVNC-00H1n1-Aw for linux-mtd@lists.infradead.org; Mon, 14 Nov 2022 09:03:25 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7E557FF80F; Mon, 14 Nov 2022 09:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668416600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AuBIlMKCZZIuUuj5REra2VmiQWnswPU4OmSCifTO9M0=; b=OwkgcgfymZPogF7Sg5bekGuc6M86gRrTodsVWU1fvBH43cK9P/rZ+SigCoZt65MP4v4xLX /nl+ooXqfGRb4ZsGjdEaZVA0C3UpBZHif1G4mIFRQl9WajX7g+A5XManeA95+sfwki6Abu sJOB/ijxtZ2TPqHPmsHJ1F+r0ixXxlx1q0QndSe1Izczop6Rk4tfuHFx0Mjat6F7s7NhiO xOorKDNKYCNMQpZQQBc5ky7teyQvtLrsRNQK0pp0G7cus03SNr7TiphU9MibQ+MiKCx16l /RkSXquGK9DJeJv/mDGxnLyLhhtYvm/x3A2gm60xH5X/9eIWxc9l76qOJdKRLg== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , , Thomas Petazzoni , , Miquel Raynal , Rob Herring Subject: [PATCH v3 01/17] dt-bindings: mtd: Clarify all partition subnodes Date: Mon, 14 Nov 2022 10:02:59 +0100 Message-Id: <20221114090315.848208-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221114090315.848208-1-miquel.raynal@bootlin.com> References: <20221114090315.848208-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221114_010322_671249_47DD0495 X-CRM114-Status: GOOD ( 13.11 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Over time the various ways to define MTD partitions has evolved. Most of the controllers support several different bindings. Let's define all possible choices in one file and mark the legacy ones depr [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.199 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.199 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Over time the various ways to define MTD partitions has evolved. Most of the controllers support several different bindings. Let's define all possible choices in one file and mark the legacy ones deprecated. This way, we can just reference this file and avoid dupplicating these definitions. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring --- .../devicetree/bindings/mtd/mtd.yaml | 17 ++++++++++ .../bindings/mtd/partitions/partitions.yaml | 33 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/partitions.yaml diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml index 3498e485679b..a6b498bbdbb6 100644 --- a/Documentation/devicetree/bindings/mtd/mtd.yaml +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml @@ -21,7 +21,24 @@ properties: based name) in order to ease flash device identification and/or describe what they are used for. + '#address-cells': + deprecated: true + + '#size-cells': + deprecated: true + + partitions: + $ref: /schemas/mtd/partitions/partitions.yaml + patternProperties: + "@[0-9a-f]+$": + $ref: partitions/partition.yaml + deprecated: true + + "^partition@[0-9a-f]+": + $ref: partitions/partition.yaml + deprecated: true + "^otp(-[0-9]+)?$": type: object $ref: ../nvmem/nvmem.yaml# diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml new file mode 100644 index 000000000000..ff65795de285 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Partitions + +description: | + This binding is generic and describes the content of the partitions container + node. All partition parsers must be referenced here. + +maintainers: + - Miquel Raynal + +properties: + compatible: true + + '#address-cells': + enum: [1, 2] + + '#size-cells': + enum: [1, 2] + +patternProperties: + "partition(-.+|@[0-9a-f]+)": + $ref: partition.yaml + +required: + - compatible + +# Temporary value, should be set to false when constraining the parsers list +additionalProperties: true