From patchwork Fri Nov 4 16:47:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 15689 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp518466wru; Fri, 4 Nov 2022 09:48:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM66kvStfsRFLdFAAnJMEUivFlyqGDMsK2F36WwTKUYkO+3kmwmqVHkwYr0bajGs+ToXJyEh X-Received: by 2002:a17:907:88ca:b0:7ad:b635:2f1c with SMTP id rq10-20020a17090788ca00b007adb6352f1cmr33565668ejc.6.1667580526826; Fri, 04 Nov 2022 09:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667580526; cv=none; d=google.com; s=arc-20160816; b=lb7nvqLfiUHhfheRIbHrTOI41exJ8pNbTKp/CWSPGjUJznyhGppk6HTPLRwJyYKyw2 gsqgM624OghG9fgBXD5T+RXbcvkv3AEhu0F6XOgmT7uMAf75qiA2LsVDrMomllmELxmv 28NNvddvpwv8yNG98b3vVMRDT5fxXWKKWNoJpPixDPbp+pdLSu0hN/m7bFvgr4mkaFDN Sx2yxKND6kdK25ZXfdoFqt5B3OmmOHBMGtvSiL7wNWwiY25DQBA7kBJ9KVNLgl+4WZnu zhg27LbieAC8ZlA9pXF4a77WwGTFBiGbb4V1YrAJS1CwkhxRW92X7j+baZ7VCPT7+RGp tLjQ== 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=9JEZ1c2lp6KpEcCyVREwYutRhrJJex3PSE0UiYvaYr4=; b=nP1xUaB0F/Hp6EipiHH0hXF+NM6k1RCRot7QkUoqGCwTiymkvfzeISA46iki8/F7iC P5uMY2spdFLEnw1IEOwMO+y7+OKlz+bZJNCV1LZjz094NsLvplJl43oMP/v6aIgJtrN4 KPjtV4BSZwiILIRiAFecbA+xol3+DG5n0+sA4jOElG1gmgYAPbfI3oJ/6w5/kWWOZmG0 RvmyAWZlBzrITRYAh9nPAGH5uzDqQThW+QkaxgKeOhgF4DXugpaiCx95Tbq1+3lKSC9l Zy5MV41x152F0JTl3nma7y5qBUn/IJgT90VO4SfhsERRlh7B/lzD/xkq0jr59Uvtrgcg HyTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Em0KXUoG; 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 r14-20020a05640251ce00b00461e426dcb0si6267793edd.609.2022.11.04.09.48.22; Fri, 04 Nov 2022 09:48:46 -0700 (PDT) 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=Em0KXUoG; 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 S231470AbiKDQr2 (ORCPT + 99 others); Fri, 4 Nov 2022 12:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiKDQrY (ORCPT ); Fri, 4 Nov 2022 12:47:24 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 836BA31EFC; Fri, 4 Nov 2022 09:47:22 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 6286A4000A; Fri, 4 Nov 2022 16:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667580441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9JEZ1c2lp6KpEcCyVREwYutRhrJJex3PSE0UiYvaYr4=; b=Em0KXUoGDMROIrOx9PdU72KhBktqNT1SHNCvhQpHbvfiBKU28pFDzVM9/QGxx8mLC8rEKf U6UTIs6mEVebIvcrw9Q66Sdgcd1u1RpCb+qJ4ChoHHZIafC27i39MPLzQkI7C/UKRwQwnn HNPyZ+N0XFrZFflHRXRqJh/ZUduxVtW9UHGyy/7JtY9NSsnAroyJFUoP/Awi/zfZEoRScO LhcAXvDu3epR5+Or5MJupp8Mdn0SyX2Ynolqno4cyt2sk/eZYwhcgUppPXv3HG2Kv6naqQ +1HXxb4q7IhEdZrvAmQBy+FOS7Bo34XKl8jZk9Q/maBxzLTl3t7HvZ1TB842LQ== 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 , Srinivas Kandagatla , , Miquel Raynal Subject: [PATCH v2 01/17] dt-bindings: mtd: Clarify all partition subnodes Date: Fri, 4 Nov 2022 17:47:02 +0100 Message-Id: <20221104164718.1290859-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221104164718.1290859-1-miquel.raynal@bootlin.com> References: <20221104164718.1290859-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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?1748584918616533345?= X-GMAIL-MSGID: =?utf-8?q?1748584918616533345?= 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 --- .../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