Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 616D0C433F5 for ; Thu, 17 Feb 2022 10:25:08 +0000 (UTC) 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) 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-Google-Smtp-Source: ABdhPJy9iN3pbnOBG9o3EF6L1/K5/6fnHQMeqcpOcXXTomGaoWM7oLrKjntmJZ0Orf/6bctKmhz+KQ== 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?q?Rafa=C5=82=20Mi=C5=82ecki?= 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?q?Rafa=C5=82=20Mi=C5=82ecki?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../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