Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1032662rbb; Sun, 25 Feb 2024 16:23:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUoM9jx0c9kXogs8WZDB10LyIRR1iNhAOp1lZ6NYxPZbZJSYy0DN5uYHPCzhPLu/9kPv5jtaiR5HrbIj0IWCwv98VpC9LBcP2Hhq6VqFg== X-Google-Smtp-Source: AGHT+IG6Y99YdevBT01zN5P3SfeYfN9PG2wjkEv1jT95O2ssXiN+mMBmysKpQ5JdlRUObYQ3tGzA X-Received: by 2002:a0c:e2c1:0:b0:68f:eb03:9c95 with SMTP id t1-20020a0ce2c1000000b0068feb039c95mr5017044qvl.0.1708906995443; Sun, 25 Feb 2024 16:23:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708906995; cv=pass; d=google.com; s=arc-20160816; b=U5NHrMfODYIyO3jBSqOxQGRnjP2T27Sbc2osyx4QmppE4WXbmUcDLPHHy/pJOEo5DD rSzhz9VSYdbJ6Vc4HuauqdbzdhYnFJgFwDqFWGS+kdDotE/v5gMvwPZ9XRx/3XGLjjhM C+9CBw5GlCOzvDGVZPb09WNuEbQXwswElZyLj9CAZ/eIvwigKLCm18tEz8ZwzvhMSHAE KclF88lslGVewOZAK/pkBQjpxc0ZPxU88XCsfBeQYBvJDBwLtH5uhSKhg27Uht+KF4hf tfqKRQKVHD3UaAqW+L6+/bK7kefuB+UKbR8bhWKxQddOSzQ2TCP4kndxDop1XGRCHwjP t5bw== ARC-Message-Signature: i=2; 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=K897jtd7agDoAyjFfuSzLu4uK9t4wqV1HleoEHOHRwM=; fh=iCY7pZACTeEM/aV1VSRdKj3GWTB74ZtqN+MwTbm3QUU=; b=IHY8qv3+Eeb+QHCxhgtxWXzo8XhsMVJ38ZRuEVMY2hcuzSfYXSAUfeUbSh5G0WBiI+ s6dKUEOasy6e+j7e8UNDVd5tJs2iCMoaME9UotgVyn3kfu7tpPrcz5rD6gHzID85wyDV a28s6LdBo0UEfo1yRM+G4nkMtZe35VNWR7y2hpnqFKU9fZlJ/rSRs9ylb0DfTp9orEzB 7WiHywsXY3jse/+8c1TUZ3y1u0q08Nq661t037PgjzY3oMXt8q0MtiF4/qnLPLEXfz1x jeQUGcw3Um6367ZZLNJaqxf3ucGJG5+edzcAXlFak/Ts9ZEcGWvocbr5u5A4RaHpf015 wIBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-80355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80355-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y3-20020a0ce803000000b0068feccf8d45si3582179qvn.412.2024.02.25.16.23.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 16:23:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-80355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80355-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 35A531C20B17 for ; Mon, 26 Feb 2024 00:23:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFF99D502; Mon, 26 Feb 2024 00:22:59 +0000 (UTC) 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 B72B263CF; Mon, 26 Feb 2024 00:22:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708906979; cv=none; b=hd0y2R7Eush67pqpZoxChdOtezzt33n27RrQsbPMLqvjlzX35cjOnZdnaAax0AfVYgfpGW+I88Zu322uxPPpkRbH3VmEiX7/BywRGY49DeUMA5FV/bwjvsFCGUMtGdf5HQGUAll2nuWCkOelmOEQtWxTlG3kHiKt+XtnnGQQSb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708906979; c=relaxed/simple; bh=AgDEO5cuzyw+bS553r/f/Vla8GBJw1Usm5KqzQ0CBMw=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lMwBjK/nHQc7yj4wF22yj9R3TfROnUYwdBzpsojWdK1cyzyw1BKIfipNjsPkQTiNlOuOOWZqvuuCQxc9i44nmNL4oR6kd3E8efxcroHOW40j/Pjn71wFEstXs8+Xcv4xqfAZUnEBcXDWVqRP9L7vGXGqZDqn/ZGJMlUKsuvyxJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 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 1reOlf-0001nU-17; Mon, 26 Feb 2024 00:22:51 +0000 Date: Mon, 26 Feb 2024 00:22:48 +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 v8 1/7] dt-bindings: mtd: add basic bindings for UBI Message-ID: <6c53f1cb8eb3b47fd51eec9797118e13e104c768.1708906456.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..1e3f04dedc01d --- /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.44.0