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: 1594112 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LTXEeGyT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=puBtr+eD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JzrZV1nRZz9sCD for ; Thu, 17 Feb 2022 21:25:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0IYU5mTg82P9Esk5ISaq2oO0O9VrkJmPi1PsLu4BoEE=; b=LTXEeGyTtMbM78 jLYivyVuCsR4IhPR6jJqbGrvgGfFTBcN9JDYLfr/s2AKU0gEikYxz9ac+pcLv6H7qGcVzRAzuVysj H9BrirzHkTRnoMF2i6ynwMDHPr4PxktfjB4BZj1o31BJkXbTuwdq+JW/Gft1aBgCq1U6qEdBNKYCt BWRjXiyWM2P9i/BUKyhrEQuZDAm9OEEjjRQtCbqcbfGEUjs8tD+jhGPhPZJrCz3cbGwbCzlN2wXtr TiWyLJGYlbhYeZmxLLHl4f4zTMB+M810RAuYewVsBnW/9o9xxxuIr51wUtgbnG/tcDEowtJcCMY7x Up0fL98rlTuhkV1e5gQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKdyB-009tpi-2m; Thu, 17 Feb 2022 10:25:03 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKdy7-009tmU-29 for linux-mtd@lists.infradead.org; Thu, 17 Feb 2022 10:25:00 +0000 Received: by mail-lf1-x12f.google.com with SMTP id e5so8998093lfr.9 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=Cc0E6QmqvAUuF5IgSQL2tvWspcBKlsvZjWtOdDySo+HDC0H2isj4NdcUg0aIDzP7gl dYwkpeUtm/4KTDyEIyPANym91zqG7FRtPV2OmYSrffzWvSw01ijWJtRcZAzBaqWiGaKG F8toN7Fg1CZ7N4CLR0hk2Zi16E5o47vMF6/2pWoi6nJyMlLsdInCvCp4G3gFVTsakxP4 71lMmtoxeSA2mdWA408oDTE9AIss74+QIigU+ygvt7hoJ2qc80+ITfRW3dgk39PS+g1/ +aQMxK+JvbiWmo/5XF8fM9b8Q5lcBs6BX+UXOJ0aoQC/w93I5Zl7aG5nm+xAzQuz2ObN 3Eug== X-Gm-Message-State: AOAM533TyzA0PLbOQf6r3GvWp6MIkHhGooS2nYFTIHbjRi6XVKrKlBE3 TL1IriTZK5OLuZyLaqmoBm4= 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?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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_022459_135154_F741C565 X-CRM114-Status: GOOD ( 14.00 ) X-Spam-Score: 0.1 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__From=3A_Rafa=C5=82_Mi=C5=82ecki_UBI_is?= =?unknown-8bit?q?_often_used_on_embedded_devices?= =?unknown-8bit?q?_to_store_UBI_volumes_with_device_configuration_/_calibrati?= =?unknown-8bit?q?on_data=2E_Such_volumes?= =?unknown-8bit?q?_may_need_to_be_documented_and_referenced_for_proper_boot_?= =?unknown-8bit?q?=26_setup=2E_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_no_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoxMmYgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_ab?= =?unknown-8bit?q?used_enduser_mail?= =?unknown-8bit?q?_provider?= =?unknown-8bit?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freem?= =?unknown-8bit?q?ail_username_ends?= =?unknown-8bit?q?_in_digit?= =?unknown-8bit?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_domain?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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>; + }; + }; + };