From patchwork Fri Aug 11 01:36:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 134294 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp826325vqi; Thu, 10 Aug 2023 20:13:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFM5gZgIpDjAldZg006fMEVja/a/9vlepUVIkFrAO7cTkcqpt9BTaVse8GEv9gvghKTmxf+ X-Received: by 2002:a05:6870:82a4:b0:1bb:5480:4b4 with SMTP id q36-20020a05687082a400b001bb548004b4mr830518oae.8.1691723631569; Thu, 10 Aug 2023 20:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691723631; cv=none; d=google.com; s=arc-20160816; b=S+SuQ9cTFQRA+IGNb8zaUZxbr/wltNJzVsBXZKCSLO59N1gFL+cPxRNTIYlaqkOGan wQEsB9zWERckoyFXJ23Ktpr2BDoiC7jSkoTPOs3iJepAgLEk1MHLErgwZaGNK+tAL2wR 0ZBmOq+tzUOXVhqjMCsrAYN9rfAiBtWBLCIuSxQCB49NA+4gxqtrvIX+HJg63WI91ARe uOG9b49YqI3wf8Txw/qQJrexBNZf3FHFrI+ZxUwtkJ9TeM0Qwhjg33Rmq7+uudP0cftj 2A0Zyn6CZMLSIK7hbfmKBWMjWfLS7jaG13+vORqAhL3nKBD51gDqk5laOj1FKc2noMyK XfoA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a17090a598200b0025eeb3cc4b2si2568929pji.9.2023.08.10.20.13.38; Thu, 10 Aug 2023 20:13:51 -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 S232071AbjHKBhE (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-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773900798500125230 X-GMAIL-MSGID: 1773900798500125230 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 | 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