Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp746551rdg; Thu, 10 Aug 2023 19:59:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHx6pPIVOJkLnI6BMlwiLirNXlp14Bjq481l55iiLbOzD/2cqZsRVWif8i380Q1hZfUaO3 X-Received: by 2002:a05:6a20:6a10:b0:132:cd2d:16fd with SMTP id p16-20020a056a206a1000b00132cd2d16fdmr907198pzk.38.1691722792385; Thu, 10 Aug 2023 19:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691722792; cv=none; d=google.com; s=arc-20160816; b=Wl59UPfV1AuS9OYCtfDgxlExA0TWitbnWXt1JU8aifFV84qBJPZtgXJyhesdjXsMyi s7VZ/Qhwvzuqz7LTiOaHYCApPaxl9ed7veAaYSmOW+KnzG6AWJQ++ax2FHJHKrN8ypfG mNyPv2A54Ko9f8UI+choFnD109yHtdis8YIOUsYgXvvzRsxbw/0Xc9BWMlOw98B2xRhV wXavcscdfuzp3hMWedywjHUDC1iKDBYzShw6PpkPZJXxZv7QLH4hI7g1JOS/071YfTWI katqDifznYHtxUBqnace0RMSen7I7v8pO12jmCj6uS4R1ZU/j9yw6Xt1qNwNkJgF4LGJ NWjw== 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-disposition:mime-version :references:message-id:subject:to:from:date; bh=x+VRO1GA0fkXhho+VyjcJKVNnc+XMjPqj1/0hr4r2h8=; fh=fqW8oMY9ydixFpWZdFhmrmd4m3lvFBw58fIoJyq/l8o=; b=T7Ao5HrVQkaaaiOYCc2N3Epiw6d81zDxZbfGLEiHtxLU/eJwb2Mg18iLNfmDGU2wzO oUEV8735hqM6wX0nszcEFYkGOAdF7p9y/HQjCRVXkK7N3oOe44EC5LDRi2bxuwbs3pcH 6aQomwqbYPlrLYnk5htEqk4scUsq8KCZTsLzw2/Mi2CcHToUDeyJVVpY9kMJIjALJSJa 4Ux0YKa4prK0+RXCGX1YXhfy1TUwrdY5UZzrN7x+4ktUsr3CFaoFUqvZViXku4bJCCzd f7FWwaQZd0SCAnfkogV9zZkuwCL29/JggRS1VpgUUhm+BkZSLZjrM9J7wLma7c5IkBWI lu6Q== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k23-20020a63ba17000000b0053f23442f24si2656774pgf.502.2023.08.10.19.59.39; Thu, 10 Aug 2023 19:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232065AbjHKBhE (ORCPT + 99 others); Thu, 10 Aug 2023 21:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbjHKBhC (ORCPT ); Thu, 10 Aug 2023 21:37:02 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 760412D59; Thu, 10 Aug 2023 18:37:02 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qUH52-000530-0d; Fri, 11 Aug 2023 01:36:45 +0000 Date: Fri, 11 Aug 2023 02:36:37 +0100 From: Daniel Golle To: Randy Dunlap , 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 v4 1/8] dt-bindings: mtd: add basic bindings for UBI Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 Add basic bindings for UBI devices and volumes. Signed-off-by: Daniel Golle --- .../bindings/mtd/partitions/linux,ubi.yaml | 65 +++++++++++++++++++ .../bindings/mtd/partitions/ubi-volume.yaml | 36 ++++++++++ 2 files changed, 101 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..a06c1666d5184 --- /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 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 { + volume-id = <2>; + volume-name = "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..e14c85bbeeb91 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml @@ -0,0 +1,36 @@ +# 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: + compatible: true + + volume-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Match UBI volume ID + + volume-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Match UBI volume name + +anyOf: + - required: + - volume-id + + - required: + - volume-name + +unevaluatedProperties: false -- 2.41.0