Received: by 2002:a05:7412:361b:b0:f9:2edb:3e4d with SMTP id ie27csp56263rdb; Sun, 17 Dec 2023 14:21:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFf1uxaXhpHDxZRie4TrLxiSeBrRgGAkZwYp+g9/FUxT2ylsD23Cf66xPJEzEWaMTVfxiXt X-Received: by 2002:a17:903:3209:b0:1d3:b2f5:f40 with SMTP id s9-20020a170903320900b001d3b2f50f40mr772107plh.14.1702851718661; Sun, 17 Dec 2023 14:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702851718; cv=none; d=google.com; s=arc-20160816; b=qmFjMTHBkE+cmpl7AfmU5bSmv72yai0XHPofXqDx1LQd3M2JPnhFRBRA65VNh/Ripp vd1xLBpNi7RiBTsyI0Ew2OGC3fEvmrIal9MU059i6F9TXnYgTXxnx3fkpCajgi61/kPq /stk88pkIl00qrdY/LeNH6N28hadXCNKDihLeAQn4Gzz5Jst/fAj23sCl5ymImeUTkK8 BtgK+xpJlaprDzsj4oIQAvKbt1x46AgvivfE9fQUrJ1+zSc14wM6F1gg0i127Sj28TbF Vv/FeisBYE4psfKa1eY+3+NqHNLrT50xP9qN2mtxHuueoM4ZyPDo7K9irldsqfTl5w8l 1v2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:to :from:date; bh=TtbKEQI955vM5FZR7nSDB78wyTckVQ0EAgdMnyDZgrM=; fh=75NJMYqoRo4jeDl32jx04p3D1q0Fgi4sqch+OCznfHk=; b=SBwltwNEk/26xyP4jcAoAslRUUfXmvrzTZnD9BXlCKP+zpf/FKOnow1BI+KhMwhPr3 k4smI9vlmjlDj9/N0k6ZQK7phL7IH57R9BY7Dy0xaDGxeKMDCeqDtXMOOVz781YMv8oj Ncxm6cMJhYXX+fYzVQtEDOYN/akcB4Jb2V9VzKJGFX9tO9h8YMdNnMYL0GG78gI3raOV SrrdTc/RUf+cZ4opjICd97jIIus5ity+4rkY/nJHbfwRZfZF7lUPmvLHL9bqWQsY3bER RFZ78L+ZAJ4gr3AyprLTe4GhmcOTSl4iQ6C99SEtoiZU6pbMnEHuW5VoFEyu2H3gYrEC ie/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2846-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2846-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 203-20020a6302d4000000b005cd849e08fdsi2585238pgc.262.2023.12.17.14.21.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 14:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2846-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2846-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2846-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0BA98B21A2E for ; Sun, 17 Dec 2023 22:19:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A61649F7E; Sun, 17 Dec 2023 22:19:31 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F1264AF76; Sun, 17 Dec 2023 22:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rEzTm-0001ah-2E; Sun, 17 Dec 2023 22:19:23 +0000 Date: Sun, 17 Dec 2023 22:19:21 +0000 From: Daniel Golle To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/7] dt-bindings: mtd: add basic bindings for UBI Message-ID: <4fb8e00ec2c558e4a59a98dcf8035adac73d7a20.1702850093.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Add basic bindings for UBI devices and volumes. Signed-off-by: Daniel Golle Reviewed-by: Rob Herring --- .../bindings/mtd/partitions/linux,ubi.yaml | 65 +++++++++++++++++++ .../bindings/mtd/partitions/ubi-volume.yaml | 35 ++++++++++ 2 files changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml new file mode 100644 index 0000000000000..7084a1945b310 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unsorted Block Images + +description: | + UBI ("Unsorted Block Images") is a volume management system for raw + flash devices which manages multiple logical volumes on a single + physical flash device and spreads the I/O load (i.e wear-leveling) + across the whole flash chip. + +maintainers: + - Daniel Golle + +allOf: + - $ref: partition.yaml# + +properties: + compatible: + const: linux,ubi + + volumes: + type: object + description: UBI Volumes + + patternProperties: + "^ubi-volume-.*$": + $ref: /schemas/mtd/partitions/ubi-volume.yaml# + + unevaluatedProperties: false + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x100000>; + label = "bootloader"; + read-only; + }; + + partition@100000 { + reg = <0x100000 0x1ff00000>; + label = "ubi"; + compatible = "linux,ubi"; + + volumes { + ubi-volume-caldata { + volid = <2>; + volname = "rf"; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml new file mode 100644 index 0000000000000..c17d0caf07d97 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: UBI volume + +description: | + This binding describes a single UBI volume. Volumes can be matches either + by their ID or their name, or both. + +maintainers: + - Daniel Golle + +properties: + volid: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: + Match UBI volume ID + + volname: + $ref: "/schemas/types.yaml#/definitions/string" + description: + Match UBI volume ID + +anyOf: + - required: + - volid + + - required: + - volname + +# This is a generic file other binding inherit from and extend +additionalProperties: true -- 2.43.0