From patchwork Wed Sep 27 20:20:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 145800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3123282vqu; Thu, 28 Sep 2023 00:06:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZwMiY80bflY34wJT7Rts/Nt/dySoMANuDvxkqf1Qj15H48i5ZQUm79kcU1wyxpsC7CzEz X-Received: by 2002:a05:6358:6f9e:b0:143:1063:d1f4 with SMTP id s30-20020a0563586f9e00b001431063d1f4mr284344rwn.13.1695884778454; Thu, 28 Sep 2023 00:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695884778; cv=none; d=google.com; s=arc-20160816; b=iSYFpk33DP+Y7XW11myjmaZJQx/o7ph5N21GwYqgnB3egwNgH3nEozVLYMhIodniWE ao62jmMHJF4SqY0XMsB0+R1OmCA1JBXn5m1ojOPa0QgNXSPklEOMGU/NF9QS17NodSKJ bx7qB4dHYkQYWefVeOEEByBsyM9TtPv6yFTeJ6gzlYTvvaQ+6tAZBPF9sjOugzTKME/0 ZpR+m+NXU/HAKpSKFtF9VYcI7UHZo40iZguVkUkCy0+jHQZSAwuHERRKuwmKI/DZeRMe 7h1zRZvTp8pH3vduaJySE2uVnZWs/YvOEPM50nn37mGb1JvieRminif4hT4HNRiVNwr0 2sGA== 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=IIjs+rwErzRuI8OpZgfCnKlE1NGemok/NR/4pjhGmqU=; fh=kINqmPZpvP8PQ+TKNJVeF/MUBhzh40DYTsdZg8LHqCc=; b=0Kgk+RUaw1vI5HJPmqWWJhfov7O+g+uA5y/hUyCf58Kn3gsC05X5ODuyq4kWmXCjHn m1Em8Aws6BzSFmNTV4+zxO2BUoW0BfaU3HEyJXjEXNZtQit4+iRYDFyC+puxzI5JG2Wh 10HGFByO2cGTap/a8UPtARjdZnniGDv1SjycuYIONIkly0nno4s5FRNHFKYCjG+KWOit Tx83n1VZPQ77gLkUCJVNE6xBIhESB35rSWChK5KZGeQj6G8hrVUwKMZaRJ70qLKmWGAm 9jO2dXdvqGc7RPtbuTczLmkiWmF5Ucxe40YqcJjZITsxK3nI/NkrRlV9MyYlNdPeDK10 sF5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Y/iVW9V7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s30-20020a63925e000000b00578cbee11e2si18232425pgn.642.2023.09.28.00.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 00:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Y/iVW9V7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 129BB809A819; Wed, 27 Sep 2023 13:21:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbjI0UVM (ORCPT + 20 others); Wed, 27 Sep 2023 16:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjI0UVK (ORCPT ); Wed, 27 Sep 2023 16:21:10 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9615A10E for ; Wed, 27 Sep 2023 13:21:08 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-79fe6da0049so127134339f.1 for ; Wed, 27 Sep 2023 13:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695846068; x=1696450868; 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=IIjs+rwErzRuI8OpZgfCnKlE1NGemok/NR/4pjhGmqU=; b=Y/iVW9V7jGTlHL2EpgLQKoiRlIlWiatJ87pARD7bNAKZCshdOcRNxJtxnIkwJfkjXF Pb+mOknWCvtMBEnboet0aVlw6uC58WRRvOfKH9FtzNgEff9TvWBkA7hHWQ0BLL33pVkV P7BBAjX7QDEsds7p3Y5DCjS2IA4F0el5oXjhU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695846068; x=1696450868; 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=IIjs+rwErzRuI8OpZgfCnKlE1NGemok/NR/4pjhGmqU=; b=XHnhCitIduwhdFW32Eo83NF8gp0nYjVMMKw67spEvG42gAtOYiMbLuESbEhkuN+lCL RKRyKRIqS8dVV9HB6QUpvb781QwSO7p7TBhrLbSYnTMJE48J8plVj/9ggSSV8xd7VWFb TCD9qyQC3gW/QNLe0OpY8QyPV+Tie4gEdnd31vkbaimdk+uWbImNSaZnNBni4LSew3d1 PjkQQEl/dMWX39sPM7Mz9tvF04CIjJ7YpKRSpJaLgaeaXVEGjO8W0CXnbxHbYjJt7Sgw kq4kD1QRqssvmu32G6l+GqFR7TTsLOsyCBh1G8vdrptnhY31wViYkQrjsY8Dw7KkzPTg Irkw== X-Gm-Message-State: AOJu0YyZjwPyTshSVz99S29EudeLfcr+1jnWOvHUARSSuuUXDkiagXUQ c7zQ5TeFSXqqFvzdARXWlU6Lrg== X-Received: by 2002:a5e:dd02:0:b0:79a:b526:2f1c with SMTP id t2-20020a5edd02000000b0079ab5262f1cmr3230494iop.21.1695846067982; Wed, 27 Sep 2023 13:21:07 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:5d4f:fe51:5575:6f76]) by smtp.gmail.com with ESMTPSA id ei15-20020a05663829af00b0042fec8620e4sm4113299jab.57.2023.09.27.13.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 13:21:07 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: linux-mtd@lists.infradead.org, U-Boot Mailing List , Tom Rini , Rob Herring , Simon Glass , Conor Dooley , Dhruva Gole , Krzysztof Kozlowski , Miquel Raynal , Pratyush Yadav , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: mtd: fixed-partitions: Add binman compatible Date: Wed, 27 Sep 2023 14:20:51 -0600 Message-ID: <20230927202057.3676497-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 27 Sep 2023 13:21:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778264077004952312 X-GMAIL-MSGID: 1778264077004952312 Add a compatible string for binman, so we can extend fixed-partitions in various ways. Signed-off-by: Simon Glass --- .../bindings/mtd/partitions/binman.yaml | 49 +++++++++++++++++++ .../mtd/partitions/fixed-partitions.yaml | 6 +++ .../bindings/mtd/partitions/partitions.yaml | 1 + MAINTAINERS | 5 ++ 4 files changed, 61 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 000000000000..34fd10c1a318 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml @@ -0,0 +1,49 @@ +# 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 + +select: false + +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. + + 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 + +allOf: + - $ref: /schemas/mtd/partitions/fixed-partitions.yaml# + +properties: + compatible: + const: binman + +additionalProperties: false + +examples: + - | + partitions { + compatible = "binman", "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition-u-boot@100000 { + label = "u-boot"; + reg = <0x100000 0xf00000>; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index 331e564f29dc..1c04bc2b95af 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -14,6 +14,9 @@ description: | The partition table should be a node named "partitions". Partitions are then defined as subnodes. + The Binman tool provides some enhanced features, so provides a compatible + string to indicate that these are permitted. + maintainers: - Rafał Miłecki @@ -24,6 +27,9 @@ properties: - items: - const: sercomm,sc-partitions - const: fixed-partitions + - items: + - const: binman + - const: fixed-partitions "#address-cells": true diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml index 1dda2c80747b..849fd15d085c 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 5f18c6ba3c3c..367c843ec348 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3517,6 +3517,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