Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp246366pxm; Wed, 2 Mar 2022 14:30:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQxUNqHmnMUy+UeiHjzZ9yION2JGn864fezgV3ymbNhzUl0iP6i84ssgA4gjlbJ0y+sDyK X-Received: by 2002:a17:902:a40b:b0:151:6aef:e037 with SMTP id p11-20020a170902a40b00b001516aefe037mr17047339plq.142.1646260206889; Wed, 02 Mar 2022 14:30:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646260206; cv=none; d=google.com; s=arc-20160816; b=B2Qs13crEE7pXwHV2LRunhR4w5nx/hO7zBet0cVdF8OhXWfn8Kl0XdlBQ9QoxSHDgy V0wD4FxvXb9wsBFbtjspKLbLNY4L2bV2va1uWD+fihXk8w3qBwD3R0Isz/BgRAJEVpJ3 PO8GdoAHxtjEf2D6qGMClnsK5Vxyt/qA76wzKUQf9MBPKOSfck/QV8P20DHHPQIJSBkQ qq3SZ49436X6m/hr6l+XQ/VfD5/pX5VJ3AwwuM7N5OjZqcnBSoIc2awBg3cuz9pztyop njAkfZpdbAD92M+LgQWgquKdN6UMYTkRC5LD+fts7VBr+G636MtuqXci0v3sViedWGpm XESQ== 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=Qu1UuB2p88jejBUeTppCLZmThyB2NBuh2qoIYxclrJ0=; b=RznbbkEOTnA6tT10xREtsuBR2sp8P7ILWzflepK0AZ4+doo0C9yfWqYZ+K0jBpdTxf ISjd7gGpb/VRWHXvGBvNYJiEFsnDcSg8/r+ryxGXYtwkmgCtP2gX20WpqF1UdVMNosP6 IDwUcoYePAPSct9igmp1M/fdfX2/gN7oHuIa9/V1zmePEiOQWpuqnT8klz9481/vC05r slZ2s4/xXm0NoqzCZIVnbRKyYdH7fJFzqO8Aox8rsKRZ2LGmlt8EIySk0i3/JquWaanQ qcSaXtac+eAYm+MmfpijsWOG5kQfcyF+qKEDH6nKQzqPwQ7mWpNQl5NgRH7V+Gz5kDzl 9CQQ== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n5-20020a62e505000000b004e12e13947esi310825pff.187.2022.03.02.14.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 14:30:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46E04E7ADC; Wed, 2 Mar 2022 14:28:14 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237711AbiCBWAP (ORCPT + 99 others); Wed, 2 Mar 2022 17:00:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236858AbiCBWAN (ORCPT ); Wed, 2 Mar 2022 17:00:13 -0500 Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2F44C7D6A; Wed, 2 Mar 2022 13:59:29 -0800 (PST) Received: by mail-oo1-f54.google.com with SMTP id h16-20020a4a6f10000000b00320507b9ccfso3572140ooc.7; Wed, 02 Mar 2022 13:59:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Qu1UuB2p88jejBUeTppCLZmThyB2NBuh2qoIYxclrJ0=; b=n5bBArR3jkfYhep6CeU4mbyHHnVeOQUI//JdmXqdAKmf9PrgWUa5ycylsMt5Z3Nl79 remijbuvSEUSq0yuDFYyxKT5E9MXfQeRHvHhAIZudhIj1tFM2rJLvj/NlvEW7zO83cX6 KQIfjLitE+3fdh6l71llNMyBODj1OxdiMWcp399TzsrjoipTFeTksNBQpgxJQ/CYKFXz Ip2fLVqz6QsuBtPvNLJ1qfN0SbbJhYI1bOLGEveUu7AmpNRcBzs2ISEAjPNDeqh/Z7HU QNEbDQVcSM6ThCXEaib8GekbqZL9PVsvHwXy5fGVdkWPKIQ++gLPOF55sW1nrt1gFHXE 3u1A== X-Gm-Message-State: AOAM533hkHi3odbmpYLlgcfppXt0NaqAz3Yviw6lU/ogMvmgTmR1lDmE NO3gIMMC2R+1TbBFJZBCSA== X-Received: by 2002:a05:6870:c05:b0:d6:fa9f:bcd1 with SMTP id le5-20020a0568700c0500b000d6fa9fbcd1mr1663709oab.108.1646258368953; Wed, 02 Mar 2022 13:59:28 -0800 (PST) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id l14-20020a4ac60e000000b002e0e75dcb82sm98740ooq.12.2022.03.02.13.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 13:59:26 -0800 (PST) Received: (nullmailer pid 133360 invoked by uid 1000); Wed, 02 Mar 2022 21:59:25 -0000 Date: Wed, 2 Mar 2022 15:59:25 -0600 From: Rob Herring To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: 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=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 > --- > .../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"; Why not do 'compatible = "u-boot,env";' to align with normal partitions? Or 'label'? We have enough ways to identify things, I don't think we need another. > + }; > + > + calibration: volume-1 { Are 0 and 1 meaningful or just made up indexing? > + volume-id = <99>; > + }; > + }; > + }; > -- > 2.34.1 > >