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: 19606 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2043058wru; Mon, 14 Nov 2022 01:04:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf5RyVeovHpu3pD8XSfqvDiOd58q0rVGIhNsXPyQ4jmnLWMGym2t0N6LzUcM9mERxRBp0ytY X-Received: by 2002:a17:907:2348:b0:78d:f796:c00d with SMTP id we8-20020a170907234800b0078df796c00dmr9277175ejb.251.1668416689028; Mon, 14 Nov 2022 01:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668416689; cv=none; d=google.com; s=arc-20160816; b=tEQrsYFCW9ngA3r/RIut5PwYQJokmflSTCJohWOwLquPBzSjLxKGtni7wWeDM/jsSP gfnDDI0RQVHZjTHUazbI74yarmIse65H004TJcO/RQ5QsGsa0B8ZAePJyomdgOAeeA/G fJdGMdwjUepwX1Ux99qESUDmZJDfJvQZyQsiGfwteVqnSl9HznntrLhD3qIhRPTTtON9 D0CkW40WpmZ0OOrPHIbYcGrC0AVelpC5rJJwhtZufvBH9PGF5x/nis8XF+vGNSsiCqyi JwiitQx+aleXxbnP0k+IjBW7hEMOommtosUxraWTXVj4keuiv5UgGQ6uaqudDTit5+Bv ADsA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AuBIlMKCZZIuUuj5REra2VmiQWnswPU4OmSCifTO9M0=; b=F3igrcnA4NEteInjZBIR9k3IpTFxoLQW882AgOr301/zL636i/1HrsvQS2O5GJOvGo p9wLfSW4IsB+RTTfBa8tJO1FKuoWGeks3sZH+0Rvgm2OvXp4W7C7VnEkCps920mzBP7K arQh/n5U0nq0C6bT5Osw9Z/p4lnN8u6YjPCK5upi76PapXc+elZMvT4X5+RJPPkh3bbZ bC3pjM7r7dCRMRQZr/VP19CTTuxCG2+WIgF1GpxQh7W8g1k46AWKDNrAw4OW/0eEOqDZ j6KarRicbaU8EbfvAIvs/SIQmZWjQ596dni6ddPUToUkjOyNoHC9RegMDZ0+ycceNMgh OSbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Owkgcgfy; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji3-20020a170907980300b007ae7d12bef1si9020685ejc.909.2022.11.14.01.04.25; Mon, 14 Nov 2022 01:04:49 -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=@bootlin.com header.s=gm1 header.b=Owkgcgfy; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236816AbiKNJDt (ORCPT + 99 others); Mon, 14 Nov 2022 04:03:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236784AbiKNJDf (ORCPT ); Mon, 14 Nov 2022 04:03:35 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A0DF1D0FC; Mon, 14 Nov 2022 01:03:21 -0800 (PST) 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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?1749461697810733191?= X-GMAIL-MSGID: =?utf-8?q?1749461697810733191?= 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