Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1330273iol; Fri, 10 Jun 2022 05:27:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcugcGu/AHxAeIc8My7mAU/JswpSOEQxWHoPd/aHlYtt7ps7O/uh6D5AvQtSCi0SsJAGPk X-Received: by 2002:a63:f257:0:b0:3fd:dd13:5dae with SMTP id d23-20020a63f257000000b003fddd135daemr20758280pgk.109.1654864053067; Fri, 10 Jun 2022 05:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654864053; cv=none; d=google.com; s=arc-20160816; b=MY912wnM3x+4t4jIQNrIjvt8mDA8BPAQyl3mtaxrc0YVJNj4AAAZeECcUjrITiELk9 Aosj8Ik9U015IWak7bMnZ96xqOC0NCCMelW7aCpFhvoIabtr7MPA6G5+tqEXf8zz519B fe8uslxk6eSGzg7cjm5CORuRMLB0rjTMIsJyQQZMNx62jPSvKkak13pHAgFROOnum0WJ iJb9T4FT9nxk+B0rmoca84w03LqvaUXSeqWKWiSsN8+hBCjJTwl1azgYtiO2tUc0wt5r itwIfLiYYzRwV++NAzVhcQ9aoUp6w78YH59vQHt2MTZAgm51bkNcXuYlgtfSAH1h2If+ wmGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ikcJYbE1QCu0M1wOdAFNbVWKyrutP3LgxNEhGZU5PJ8=; b=D4pYL9JGB0XNkZ6ZiC8JKJ6fsiDqJt0pLZpQSN35dC3wlTisTmVud0gLc7MrTYyVTH P5U5AOE/0r0Ao9fZubJEhc8J53tJWNbQgG7fLC3dsBvrlh4Od+YsdZ2cCRUq6nIBeMqi FYNjMUQ5IwrfxYOQY4sXRNLhSs3mG6S6La/Rpef4zznQ9SKMhmKh7fD12kfxJ6eYarG3 e7j5ICJ4INeWkFs+9Kcq/XeIQeacWkyhVq0cxLXGSluj9+7IfrI9p7AjfFzHRs0Cxtfk 2NduWTs0mQ0CcX06M83qcxPtL0o4mhSpUIc+7FaMRpWIHYET8xs8OOMqVIAoAUQTK+rX xmHQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a170902d70d00b00163cdf1a201si32911710ply.265.2022.06.10.05.27.16; Fri, 10 Jun 2022 05:27:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244605AbiFJMUE (ORCPT + 99 others); Fri, 10 Jun 2022 08:20:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239840AbiFJMUC (ORCPT ); Fri, 10 Jun 2022 08:20:02 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B712CFE8B for ; Fri, 10 Jun 2022 05:19:59 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1nzdbt-000793-Ry; Fri, 10 Jun 2022 14:19:30 +0200 Date: Fri, 10 Jun 2022 13:19:24 +0100 From: Daniel Golle To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Rob Herring , Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rini , Ricardo Salveti , Michal Simek , Jorge Ramirez-Ortiz , Sean Anderson , u-boot@lists.denx.de, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH] dt-bindings: mtd: partitions: add UBI binding Message-ID: References: <20220217102448.27586-1-zajec5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220217102448.27586-1-zajec5@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Thu, Feb 17, 2022 at 11:24:48AM +0100, Rafał Miłecki wrote: > From: Rafał Miłecki > > UBI is often used on embedded devices to store UBI volumes with device > configuration / calibration data. Such volumes may need to be documented > and referenced for proper boot & setup. > > Some examples: > 1. U-Boot environment variables > 2. Device calibration data > 3. Default setup (e.g. initial password) > > Signed-off-by: Rafał Miłecki This is very useful and can replace the downstream hacks we are currently using for this purpose in OpenWrt. Reviewed-by: Daniel Golle > --- > .../bindings/mtd/partitions/ubi.yaml | 67 +++++++++++++++++++ > 1 file changed, 67 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > new file mode 100644 > index 000000000000..cd081f06d4cb > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > @@ -0,0 +1,67 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/partitions/ubi.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: UBI (Unsorted Block Images) device > + > +description: | > + UBI is a layer providing logical volumes (consisting of logical blocks) on top > + of raw flash devices. It deals with low-level flash issues (bit-flips, bad > + physical eraseblocks, wearing) providing a reliable data storage. > + > + UBI device is built and stored in a single flash partition. > + > + Some (usually embedded) devices use UBI volumes of specific names or indexes > + to store setup / configuration data. This binding allows describing such > + volumes so they can be identified and referenced by consumers. > + > +maintainers: > + - Rafał Miłecki > + > +allOf: > + - $ref: partition.yaml# > + > +properties: > + compatible: > + const: ubi > + > +patternProperties: > + "^volume-[0-9a-f]+$": > + type: object > + description: UBI volume > + properties: > + volume-name: > + $ref: /schemas/types.yaml#/definitions/string > + volume-id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + anyOf: > + - required: > + - volume-name > + - required: > + - volume-id > + > +unevaluatedProperties: false > + > +examples: > + - | > + partitions { > + compatible = "fixed-partitions"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + compatible = "ubi"; > + reg = <0x0000000 0x1000000>; > + label = "filesystem"; > + > + env: volume-0 { > + volume-name = "u-boot-env"; > + }; > + > + calibration: volume-1 { > + volume-id = <99>; > + }; > + }; > + }; > -- > 2.34.1 >