Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp451633rdb; Sat, 16 Dec 2023 16:10:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzPlfXvHAKjleE9w4kcKCi49hj4Xe7JDPhoSqhfJs15UxpaLieppnrjGl3VKlmZXUGeqnf X-Received: by 2002:a05:6a20:5610:b0:191:b753:752 with SMTP id ir16-20020a056a20561000b00191b7530752mr7183816pzc.36.1702771817155; Sat, 16 Dec 2023 16:10:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702771817; cv=none; d=google.com; s=arc-20160816; b=WCyjIR4ZxGAj8bC9AQoqIRwuAmah5+asDukR3dZ3cONfHSBmukrWAtgxt5l11xlDgz Ny/6Ml3oxa4vrFPUOeYe6BCUsTTD1zpb8/3pJ1plwYpTmrjdy2XJXQbo8clys3KNBaFD YXOvSzf7vihZcYqKWvXdo5VfvwPQ0dofM2Hunnl/A5NNUpjozY3BTSewFthBcG2cu9Yw GNljtI6LWE4geKWl94dguJI3Q3Vs8HTLPVE9uY0XskJTE+4cGL3mqge9DjiVtqMEjDn3 s5WyC2UIwEGJg4Td4GbIXu95u6KBDUqwFIfUdAKPh85gR/rWC08sI1y2K04gMdKM0kYs /xxg== 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=5bIxX+8Q2F12pGFVmnG3HzpNbtBBrVn5m/ZU/0LXEV8=; b=C1ODy1Dq/twWJAhvKkCLpTmlXZF9hRjBLRSm+YjzXYeVtYHFt4n/tXo9kXg5JBcsjK qSYEDsfFLrar/DLfBX22C8DaNJsKSIUtFFuwwfsfRI7TUI0xnhj+HubhtY6OxJ2+8xR/ fyT1PFDif6EiAaqA5Fqk8Fkx5gr1pTW0MmsyzsceCbK6QsK+wGiHBneEyeCgAijmCbT8 m6237CMg2F287jxBQaUVQ1U3bx9M8C/svtVTuVdN8yDt6ghsiMTQGtm03l3DWVYBBbER owEM9FNiL3OHgFPPMUvY00IsTMnhgQPytdDYPcLyBM49tYQGh5GB86qJMT6rHabut1Gs RqsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2405-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o14-20020a63e34e000000b005c1b30b1b65si15661575pgj.648.2023.12.16.16.10.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 16:10:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2405-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CD877283B5D for ; Sun, 17 Dec 2023 00:10:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05C4115CB; Sun, 17 Dec 2023 00:09:55 +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 DDD83A35; Sun, 17 Dec 2023 00:09:52 +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 1rEeiq-00064i-1T; Sun, 17 Dec 2023 00:09:33 +0000 Date: Sun, 17 Dec 2023 00:09:30 +0000 From: Daniel Golle To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/7] dt-bindings: mtd: add basic bindings for UBI Message-ID: 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