Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2165946rda; Tue, 24 Oct 2023 14:41:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiBJVToS86yIrjbAL4bJyEMmnbY0Qkxb43BLqlvD5EZKQ5C0BGb62eGnlevWw650KQXE7z X-Received: by 2002:a05:6a20:e598:b0:173:318:b1ec with SMTP id ng24-20020a056a20e59800b001730318b1ecmr3304695pzb.35.1698183697254; Tue, 24 Oct 2023 14:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698183697; cv=none; d=google.com; s=arc-20160816; b=qZGVzlL4yjIy/h0jSKUaoz1csKkSm+Zo+f6XXK2Dhs5G+Lwal/pLBc575yHHlI4OTi Orl6DbeqWVFWWLLAEhStjjgUcApKc2lztseu+jfmgTDzyvwqpQe41125DVE4taadC4N6 TCL7LZ3Rgzv/8V8O2i1pTKOs/N81VJMwObQLV2CIgt0BwdZf7wq4cHw1Z71Y5jWcsk7e w5o77b5pmC89fj3A52qNRS6NvC9tcLUUSGQ+D5uMBfrf1sIMeBJs5owlYjoJyz5kztuz RH5uGVR+ZMQD7PlvwjSAjabua4ekyw4B0aE7XjdXwKL2DBwRfGCXcOg+W2ciZNHgd9GK vZaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=G+PJMUDgFS0mbnTyh5WsQidRx6hFK5cmXyxRNKDFwO8=; fh=pRJTaRfAMbjmn3Dnig+Saoyssf9cPy0Zf2XeyVHCFC4=; b=d9Wremr9WSzpNWacFQ0h3VionoFUn9xvYftIwPqspslzOZ2ZMIswbdxxJiSCLXRgK2 H+u2X0WMU6axCs1T8mI9nWEb+5DzFOpbQTh7SMohHcZ4z5uAoZSz3onZhDebGaSS/WE4 JYfQ/zesc70so+JZvAAuZkaX4FKzX+dxelzyP96xJpm+Srfe1cfsuuV84PqNscPjHtyG e2Dof2qUN7/W8xlO7mIPHh6PZvAyuHebzF1sb5ae95eFAvRUtF2nSGcYpopR1E7njUvG N1LyrRvjCU0m9OiXgIFmiQlYuaNNVXTf0z9k4OaMxkEGjKRHrNHaH8KO5Da9wI/+gII1 Rc5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JM1FghlT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id ls8-20020a17090b350800b002680f00f8f3si9484031pjb.17.2023.10.24.14.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 14:41:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JM1FghlT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 985E38097A38; Tue, 24 Oct 2023 14:41:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344405AbjJXVlR (ORCPT + 99 others); Tue, 24 Oct 2023 17:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344393AbjJXVlO (ORCPT ); Tue, 24 Oct 2023 17:41:14 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18C38186 for ; Tue, 24 Oct 2023 14:41:12 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1cacde97002so29765565ad.2 for ; Tue, 24 Oct 2023 14:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1698183671; x=1698788471; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G+PJMUDgFS0mbnTyh5WsQidRx6hFK5cmXyxRNKDFwO8=; b=JM1FghlTZIwKQRB3L1Wl3W03bl1JKoC1X2UTARXuc+rfgtDMsi1t0aeB9U7YDHJmLF fm1AJXtCzWpzjvjY3J5OK/2r7RldQSwGY3xJunIKA9LLGX6GxoEpSDQ4vfJzX5m19j6a +wFPUQEcY35nonJJwWED2woquExZUxEPCoC5M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698183671; x=1698788471; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G+PJMUDgFS0mbnTyh5WsQidRx6hFK5cmXyxRNKDFwO8=; b=vzI1wNGd5HredBulpBjCi91Ou7YhM6l1g/w2qFGudu9HelSSlLDXgGuZKOqVQBpMIz E/vyfewza9e1u/d3dkYaw9JH5IgpX9vP9yb8myD95TZzXz0LFe7BW9WrA2EnEE2+npiv roBaI0eTKGyxD/A30XSrRR4oQ1z/yYUj+qKZj1YWYH0WjpwxUc6Zcf1pM3BKgAGYPuDQ w0MNzfbWP7ahKL4h3S0N0I/6zhdoME1V91L1bhBqLIjcSEX8zDCVr0ow2ugZqnrAKF74 ZIBEcJtslCVJaVFA3rpwkuHlro0SQJG1Bc00U42PHT9aN6K7mkqHe84FdhWeD4cbHZMO HxlQ== X-Gm-Message-State: AOJu0Yw0i73+z4wTdLfDUGZ21ERndH+hvb7+1HP+ppyVfd6osa9DHZYY Cx+BGG1QYdRwJe2xxZvNiCodAA== X-Received: by 2002:a17:902:f7cd:b0:1ca:86a9:cace with SMTP id h13-20020a170902f7cd00b001ca86a9cacemr10914915plw.2.1698183671410; Tue, 24 Oct 2023 14:41:11 -0700 (PDT) Received: from sjg1.roam.corp.google.com ([202.144.206.130]) by smtp.gmail.com with ESMTPSA id 18-20020a170902c21200b001c5f7e06256sm7861055pll.152.2023.10.24.14.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 14:41:11 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: linux-mtd@lists.infradead.org, U-Boot Mailing List , Michael Walle , Tom Rini , Miquel Raynal , Rob Herring , Simon Glass , Conor Dooley , Dhruva Gole , Krzysztof Kozlowski , Pratyush Yadav , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v5 1/3] dt-bindings: mtd: partitions: Add binman compatible Date: Wed, 25 Oct 2023 10:39:16 +1300 Message-ID: <20231024213940.3590507-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 14:41:34 -0700 (PDT) Add a compatible string for binman, so we can extend fixed-partitions in various ways. Signed-off-by: Simon Glass --- Changes in v5: - Add #address/size-cells and parternProperties - Drop $ref to fixed-partitions.yaml - Drop 'select: false' Changes in v4: - Change subject line Changes in v3: - Drop fixed-partition additional compatible string - Drop fixed-partitions from the example - Mention use of compatible instead of label Changes in v2: - Drop mention of 'enhanced features' in fixed-partitions.yaml - Mention Binman input and output properties - Use plain partition@xxx for the node name .../bindings/mtd/partitions/binman.yaml | 68 +++++++++++++++++++ .../bindings/mtd/partitions/partitions.yaml | 1 + MAINTAINERS | 5 ++ 3 files changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/binman.yaml b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml new file mode 100644 index 00000000000000..329217550a98cc --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Google LLC + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Binman firmware layout + +maintainers: + - Simon Glass + +description: | + The binman node provides a layout for firmware, used when packaging firmware + from multiple projects. It is based on fixed-partitions, with some + extensions, but uses 'compatible' to indicate the contents of the node, to + avoid perturbing or confusing existing installations which use 'label' for a + particular purpose. + + Binman supports properties used as inputs to the firmware-packaging process, + such as those which control alignment of partitions. This binding addresses + these 'input' properties. For example, it is common for the 'reg' property + (an 'output' property) to be set by Binman, based on the alignment requested + in the input. + + Once processing is complete, input properties have mostly served their + purpose, at least until the firmware is repacked later, e.g. due to a + firmware update. The 'fixed-partitions' binding should provide enough + information to read the firmware at runtime, including decompression if + needed. + + Documentation for Binman is available at: + + https://u-boot.readthedocs.io/en/latest/develop/package/binman.html + + with the current image-description format at: + + https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#image-description-format + +properties: + compatible: + const: binman + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^partition(-.+|@[0-9a-f]+)$": + $ref: partition.yaml + +additionalProperties: false + +examples: + - | + partitions { + compatible = "binman"; + #address-cells = <1>; + #size-cells = <1>; + + partition@100000 { + label = "u-boot"; + reg = <0x100000 0xf00000>; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml index 1dda2c80747bd7..849fd15d085ccc 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml @@ -15,6 +15,7 @@ maintainers: oneOf: - $ref: arm,arm-firmware-suite.yaml + - $ref: binman.yaml - $ref: brcm,bcm4908-partitions.yaml - $ref: brcm,bcm947xx-cfe-partitions.yaml - $ref: fixed-partitions.yaml diff --git a/MAINTAINERS b/MAINTAINERS index 2d13bbd69adbc1..b9441eec979a42 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3542,6 +3542,11 @@ F: Documentation/filesystems/bfs.rst F: fs/bfs/ F: include/uapi/linux/bfs_fs.h +BINMAN +M: Simon Glass +S: Supported +F: Documentation/devicetree/bindings/mtd/partitions/binman* + BITMAP API M: Yury Norov R: Andy Shevchenko -- 2.42.0.758.gaed0368e0e-goog