From patchwork Sun Dec 17 22:19:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 180079 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp909691dyi; Sun, 17 Dec 2023 14:19:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3KSB8+0STsz69MXoA6MSlVJTE0ftao0YQ2T8qh7wO7WMd1Eo8qGSobzNnIMVEv1YkZ2VC X-Received: by 2002:a50:cc9c:0:b0:551:9caa:fad1 with SMTP id q28-20020a50cc9c000000b005519caafad1mr3941977edi.25.1702851596372; Sun, 17 Dec 2023 14:19:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702851596; cv=none; d=google.com; s=arc-20160816; b=Fqd0tE0ue0r+iXmQuRQQO8QyFG7DDTvKnwh23E0OZvi5PsByp4nU4/YoDLx/KTljxf eYle3KWIe/rvC4OB6D0y3CIM50AANJBMT18QadMndgxmMPNUKRp2fTY4BlhuNa+5FU9o c8L+v80807L1RKEGB9ZhWG2i7lpl6w0nrMXHAhdl3kX7jiUq3P9qsF7lTpHpI+596zqy JqujcWDTsFLCRXdQ0SHh3IGBr3VypchyS0VCpbc+URS+08+Ds3xTzBWLu2Ymkx++lPe/ b+BiK6Mqo3iqEYUDA0LcqnDJ0ZWG3Z+3c7B6K7gjkRKVFumC1vOilJU572WnkcrZOoaY BdFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:to :from:date; bh=TtbKEQI955vM5FZR7nSDB78wyTckVQ0EAgdMnyDZgrM=; fh=75NJMYqoRo4jeDl32jx04p3D1q0Fgi4sqch+OCznfHk=; b=SBwltwNEk/26xyP4jcAoAslRUUfXmvrzTZnD9BXlCKP+zpf/FKOnow1BI+KhMwhPr3 k4smI9vlmjlDj9/N0k6ZQK7phL7IH57R9BY7Dy0xaDGxeKMDCeqDtXMOOVz781YMv8oj Ncxm6cMJhYXX+fYzVQtEDOYN/akcB4Jb2V9VzKJGFX9tO9h8YMdNnMYL0GG78gI3raOV SrrdTc/RUf+cZ4opjICd97jIIus5ity+4rkY/nJHbfwRZfZF7lUPmvLHL9bqWQsY3bER RFZ78L+ZAJ4gr3AyprLTe4GhmcOTSl4iQ6C99SEtoiZU6pbMnEHuW5VoFEyu2H3gYrEC ie/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2846-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2846-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t14-20020a50d70e000000b00551f0189761si4985919edi.110.2023.12.17.14.19.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 14:19:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2846-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2846-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2846-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CDE8D1F21EF7 for ; Sun, 17 Dec 2023 22:19:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D80B4B128; Sun, 17 Dec 2023 22:19:32 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F1264AF76; Sun, 17 Dec 2023 22:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rEzTm-0001ah-2E; Sun, 17 Dec 2023 22:19:23 +0000 Date: Sun, 17 Dec 2023 22:19:21 +0000 From: Daniel Golle To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/7] dt-bindings: mtd: add basic bindings for UBI Message-ID: <4fb8e00ec2c558e4a59a98dcf8035adac73d7a20.1702850093.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785569315910221187 X-GMAIL-MSGID: 1785569315910221187 Add basic bindings for UBI devices and volumes. Signed-off-by: Daniel Golle Reviewed-by: Rob Herring --- .../bindings/mtd/partitions/linux,ubi.yaml | 65 +++++++++++++++++++ .../bindings/mtd/partitions/ubi-volume.yaml | 35 ++++++++++ 2 files changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml new file mode 100644 index 0000000000000..7084a1945b310 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unsorted Block Images + +description: | + UBI ("Unsorted Block Images") is a volume management system for raw + flash devices which manages multiple logical volumes on a single + physical flash device and spreads the I/O load (i.e wear-leveling) + across the whole flash chip. + +maintainers: + - Daniel Golle + +allOf: + - $ref: partition.yaml# + +properties: + compatible: + const: linux,ubi + + volumes: + type: object + description: UBI Volumes + + patternProperties: + "^ubi-volume-.*$": + $ref: /schemas/mtd/partitions/ubi-volume.yaml# + + unevaluatedProperties: false + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x100000>; + label = "bootloader"; + read-only; + }; + + partition@100000 { + reg = <0x100000 0x1ff00000>; + label = "ubi"; + compatible = "linux,ubi"; + + volumes { + ubi-volume-caldata { + volid = <2>; + volname = "rf"; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml new file mode 100644 index 0000000000000..c17d0caf07d97 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: UBI volume + +description: | + This binding describes a single UBI volume. Volumes can be matches either + by their ID or their name, or both. + +maintainers: + - Daniel Golle + +properties: + volid: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: + Match UBI volume ID + + volname: + $ref: "/schemas/types.yaml#/definitions/string" + description: + Match UBI volume ID + +anyOf: + - required: + - volid + + - required: + - volname + +# This is a generic file other binding inherit from and extend +additionalProperties: true