From patchwork Thu Feb 17 10:24:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 543378 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp263240imn; Thu, 17 Feb 2022 02:25:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKUh5AIXcmmo7ObXcrSXeGOqv0XCMzMasbrGpDHGp5jYMwkdNs2eDsdEX9931CK4r9PwS2 X-Received: by 2002:a17:906:a148:b0:6cd:50c7:8d4d with SMTP id bu8-20020a170906a14800b006cd50c78d4dmr1727577ejb.641.1645093509967; Thu, 17 Feb 2022 02:25:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645093509; cv=none; d=google.com; s=arc-20160816; b=jRstqjdNFCtHV3cBVEWubj1LK9YOGlDRj/SmrgfnGeg9W+AftBI61WF1WcLaDm6Pif 3EO9HytptdPGrmqinWXiPJNgES0FU7WNCQgPtmkG6ffhB4ubKYAJPJwDt4y0iym26MHd e2De33ty3FbLLlHtghGXlbGGfyrA9rsyO/gLDtgdrLWn5ZhMA4I6xP+TxZT5J1D+Xwh2 rUPUUvkhiro5d8ayG5XpYCJ3R6Hl95OIEih3fAr46hUCmY2+ugHH5PzoSDF2s1gh5fpp YfrVOvLCXKv7SIVX5ZEkGQFLlk5yhrcdiyE3YmtCVAc6KI0If3SmSw69FUIzvYYNBUR/ MS8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=IP7PcCy1//3+2eLuk3yMfPvTyyCntet0laQmLiMhwkY=; b=k83YduJ3fDX8ZyGolGWYIxoY+0RyhdPJyts/k9v/+FXR66kaTcFiePPudqIuJP1IDs piUjV/Vpi6h0yB4f2FEbURUAkcilx91kaa/iv3wimNs3L+Jol37FuybH1QvvXHY8T9w1 lUTvEFr6pow/9pUs62OUluLHTMxqk3afvPPtmq6GO1+lYqee/FVgzsiDduD5+U4bPysW pnglupoPhu0uNk+m9G6PJrft6yoBarj2Qupq1V9PdHE1c7MGhd8z2M4TRD4y0U8BqtIK 3n9l0YDFqdreTvumQjuWWwt9InLVDkuPNm0uFX7oBsMQt45/In/Ga36G9naIMeAyKUf0 fsnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=puBtr+eD; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id gm1si1858053ejc.503.2022.02.17.02.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 02:25:09 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=puBtr+eD; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9EF7283A7B; Thu, 17 Feb 2022 11:25:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="puBtr+eD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EFA7A83A8C; Thu, 17 Feb 2022 11:25:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2C8B583A30 for ; Thu, 17 Feb 2022 11:24:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=zajec5@gmail.com Received: by mail-lf1-x131.google.com with SMTP id o2so9070729lfd.1 for ; Thu, 17 Feb 2022 02:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IP7PcCy1//3+2eLuk3yMfPvTyyCntet0laQmLiMhwkY=; b=puBtr+eDzVX5eCmyW9kBNnDrGEiAPkPMgWdkrIoIy1ZlzhGT6FWsStw+nHU2z3Y770 IfBqQH+lFQuRzGQNw+P6W+AOW8bac49XWSCziqO3J20Mqc2Datidjnvmy1uWcFRV6fx4 MltDn2QDShy95zzuLRGw4SRiLlznzvUXvsTcTVUBoKbXkDQI8KYrHRCtfJn2I17SsJDV 3CSGueqBnM9uKrEZHg++Psyd9OS8cuhBR5KjYf/tn5QxqMu3rLnXSewRk72P1XyczO4D fUcONK4wXVgJq5oSepJYFxZ7XR7bWT7hckF7jpv3gT7gSRl5U72DT6+DcohFalf/0/a0 dI6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IP7PcCy1//3+2eLuk3yMfPvTyyCntet0laQmLiMhwkY=; b=EwbVoo67oV94/pMVmlFzYHBRhidMoFjy5FnAiVq98Dm4gtxwLk5Hrzf7zoar/VSxg8 zzIRg+oVXMlc5PpWBaYck7xbNEhLfHQJM0tYI80Tvn3P1cqdNqd1Kuiv75N6LXU3UfGG JdYCAleVIAI0hjreyQ6wlEse35jdYSt19hzXtfg4txvuz+YfwKf76FTq4MfZ/2B4IrZh vYeErBPNXlTczPc5Pm1ltWjCL/9YId2xhEMbedVfMFzz0RWcFyOFCQUJgmBOplXCxGhV lMLnveHdDPUXt3I9l8oI8+Lv7PaXamXyf8NUZSyNz3TYkAne4SfvF/9QciTuLX5RQGaN nv2g== X-Gm-Message-State: AOAM530988eltnennnmkwk/Ap9toXATfwRChX1KfiuDUVykvrBm32WCg D9lzj4tdGAu2qDQcrFz3MsE= X-Received: by 2002:ac2:5fe1:0:b0:443:3c53:b941 with SMTP id s1-20020ac25fe1000000b004433c53b941mr1536110lfg.146.1645093497226; Thu, 17 Feb 2022 02:24:57 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id w8sm1303858lfr.242.2022.02.17.02.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 02:24:56 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: 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: [PATCH] dt-bindings: mtd: partitions: add UBI binding Date: Thu, 17 Feb 2022 11:24:48 +0100 Message-Id: <20220217102448.27586-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 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>; + }; + }; + };