Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2498789pxb; Thu, 11 Feb 2021 14:06:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5MQsSEY+jSViA5nzTndX0Lo4tnVK0Li8VCsezRLNaNOWoPMyzidxjH2tcpUEHvm2IT2Wq X-Received: by 2002:a17:906:3916:: with SMTP id f22mr10520953eje.328.1613081205139; Thu, 11 Feb 2021 14:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613081205; cv=none; d=google.com; s=arc-20160816; b=DlqOlFvbHYJ8fKULusEYGJMl1HmpTU8hypNOjFiO2QzU20gTGThJcxJQtwmk9lMeXT K3wURFv+eJVh/GvUoiUHPH2OCml4bida6uUEq7KUXj5MS+avI8Y0cKehNagdqAhG1wlS c3Pplu/LSOUZo41DEUoRhf9NPnXVkJJyMDd/WOgdGlhp6P/n6A1k9Xr/hfTJghCdxAKg ESl6Y4p0TKGX7k+w7SxjWCIA9wB785Tr9Usxfse27m40s8s9ZnzmhOdcKaLadIUOGRWS eF+QHLfis7TR8r67Uj8jjPrLpLi75X+WdKnWWolWCt/jT0YQnfdolvYIyufRZMv1NJsG TmrA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Klq+8tOZRYNtsr93x0bkE0OFCVkNgyAVAYrNdy6LlIA=; b=uMdxRvxAox94pHsPkrzOusElAGfKNfHjDSUZMk2t2R9OjMbNsPNhgTZzwoVeH8yjW1 5DqXt0P2cgjUL0DKRwb2pAavmqWI2tkdTnq/x3H7WmFCAJdEdOgwOUoHreXjlNOVdaIo /JBf6ZnUgf8aCcWkSbN1dsBkTdLNCeDUOzsQX8VWTUaA8FQI9mwN2TwTSHmZtP5TuWdP U4Xnpk9Ml32l3153QWLY0TWj/kOqMdtMui6x6mBR27pDu3NNetAOB+pKfpNuis5zU+k/ k4ac01TqUgzZ/rz8LyfsI+ESoxrzqXqUD09Z6QHbdQht4UfPJKNfUamGM4u3+z1Go6D7 z+Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="oYiGIo/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds7si5573021ejc.212.2021.02.11.14.06.21; Thu, 11 Feb 2021 14:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="oYiGIo/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbhBKWFt (ORCPT + 99 others); Thu, 11 Feb 2021 17:05:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbhBKWFo (ORCPT ); Thu, 11 Feb 2021 17:05:44 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 734C4C061574; Thu, 11 Feb 2021 14:05:04 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id m22so10371988lfg.5; Thu, 11 Feb 2021 14:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Klq+8tOZRYNtsr93x0bkE0OFCVkNgyAVAYrNdy6LlIA=; b=oYiGIo/8ghS7Kt+K/u7rrUNxTWDlauSpHl0PtnNPH9ThzvUYO7QnDSAyxINKWXb24Q eF3xHjP6xtziLYrGp2Wlkw3Qa6o3MqeV0VOQDDxYIcO9UWEmMKOV3JhCYtdBtatNC/lA Qo137FbEYUS2NgpXEfP05ZyI75q3/SqJzzjrCGFK0wXYh9IeDaSUvlfZ21oSuVZpHoHv gOdf9WTCG72wCRkwR7Y72lvZbjBpTmntx4IzICa6dWs5nZP19Rvo8N/rsZbG2DghHp6V X6smJe+qQzBFcswQOH++x7FI3ZPS83NddHyceTF38Ds/351Gmd5XOCY1t0GFXgYKXkRh BR4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Klq+8tOZRYNtsr93x0bkE0OFCVkNgyAVAYrNdy6LlIA=; b=jBJqP/Le2h5Esaql7G4RBdAvXCQVE6DTy1XbhVKvz7qqL03FkMZGHob4U0WkaLaAcO n4Yti7NTfTk8UG6SnL1JW7zdEbp3IClHX3iyQ9Di8tFD6pFSOBX1+DM/9NYtxJYNitE4 /fuX4k+OJGAYZrcVrVgFl2gx6mi0kZjOfSZ8IXO2W0dkjylXx3ilVeMQy5DfgRz4vX47 LKDZ6ZhKYVnYxfnD0Yvjb5zxvNc80thur61bNV7MqTqvra1vXc5tl2gNHH5F37KKUEWQ +Bqsp5qobkXiK8yYWKHNx2R58ln++yizPfxhXWGm2moLXpfkeGmirlUtIA1OPfp00Vjk uTow== X-Gm-Message-State: AOAM5304xV9ASC19eNcd5bmPKJQV1EB0eIObt3He/5mivPz9VXebdBvS a7BlaEZ9BqLHEM3lC9xOuF/+KPkNKH0= X-Received: by 2002:ac2:4152:: with SMTP id c18mr27958lfi.616.1613081102987; Thu, 11 Feb 2021 14:05:02 -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 o14sm1056649ljp.48.2021.02.11.14.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 14:05:02 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring Cc: Boris Brezillon , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Rob Herring Subject: [PATCH V3 mtd/next 1/3] dt-bindings: mtd: move partition binding to its own file Date: Thu, 11 Feb 2021 23:04:25 +0100 Message-Id: <20210211220427.27104-1-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafał Miłecki Single partition binding is quite common and may be: 1. Used by multiple parsers 2. Extended for more specific cases Move it to separated file to avoid code duplication. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring --- .../mtd/partitions/fixed-partitions.yaml | 33 +------------ .../bindings/mtd/partitions/partition.yaml | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/partition.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index 6d4a3450e064..ea4cace6a955 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -27,38 +27,7 @@ properties: patternProperties: "@[0-9a-f]+$": - description: node describing a single flash partition - type: object - - properties: - reg: - description: partition's offset and size within the flash - maxItems: 1 - - label: - description: The label / name for this partition. If omitted, the label - is taken from the node name (excluding the unit address). - - read-only: - description: This parameter, if present, is a hint that this partition - should only be mounted read-only. This is usually used for flash - partitions containing early-boot firmware images or data which should - not be clobbered. - type: boolean - - lock: - description: Do not unlock the partition at initialization time (not - supported on all devices) - type: boolean - - slc-mode: - description: This parameter, if present, allows one to emulate SLC mode - on a partition attached to an MLC NAND thus making this partition - immune to paired-pages corruptions - type: boolean - - required: - - reg + $ref: "partition.yaml#" required: - "#address-cells" diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml new file mode 100644 index 000000000000..e1ac08064425 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/partition.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Partition + +description: | + This binding describes a single flash partition. Each partition must have its + relative offset and size specified. Depending on partition function extra + properties can be used. + +maintainers: + - Rafał Miłecki + +properties: + reg: + description: partition's offset and size within the flash + maxItems: 1 + + label: + description: The label / name for this partition. If omitted, the label + is taken from the node name (excluding the unit address). + + read-only: + description: This parameter, if present, is a hint that this partition + should only be mounted read-only. This is usually used for flash + partitions containing early-boot firmware images or data which should + not be clobbered. + type: boolean + + lock: + description: Do not unlock the partition at initialization time (not + supported on all devices) + type: boolean + + slc-mode: + description: This parameter, if present, allows one to emulate SLC mode + on a partition attached to an MLC NAND thus making this partition + immune to paired-pages corruptions + type: boolean + +required: + - reg + +additionalProperties: true -- 2.26.2