From patchwork Wed Oct 25 21:06:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 158300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp238687vqb; Wed, 25 Oct 2023 14:07:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEBERZPofwj4yz30K7LjjyYKOX5Nsw/A/CNajpqHI1U47qXnPbZlQ1TGSuEMlH7foLGMqWQ X-Received: by 2002:a25:ccd4:0:b0:da0:7106:a159 with SMTP id l203-20020a25ccd4000000b00da07106a159mr3149877ybf.8.1698268026321; Wed, 25 Oct 2023 14:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698268026; cv=none; d=google.com; s=arc-20160816; b=ODPDEXIVS5RGhwUQLbF38NPOttRR64krg2gWCy3CiSNrDnQgdkEtxoFwhK7WTX0qCL ga2rlCiUOqzxF1YmzcTqmHiHKmuHijDY/faq39FcXODb4bdLarPX+w5DCND/MRvcu1pD EQ1KFdqES27t5RJ/a1ixLwOX0wiebQzueQYp+VlcZRCzsyjA3fZaMipvwCpF/qiv6zKQ yXgYCGj3LOrKbRZLuIe2X/pzx0qWiuopFyuKY0X24cSRsqaJWYIRHSz62kj/4g6AxzIP HPrWoaCLYYllTQmyEV/KRWONN7QSYtnskW/fSs2PVofFLWMO67sIx+sza9uDZZT0d+Kc TOnQ== 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=WnXMZq3u2P4hkyafsQIarDOhM2i0PYXnQvhdzNae9NQ=; fh=KN5G/YHBtL6M7DUiEQkRcCI+I9IUnWQinFHQVKXCjxE=; b=CvMD7drW973mCHuYxP7NDUyJ1p5+eIxommkOPLwPS/g6fdFp+px/Iwe4f9CvFAe0g4 JMthmFepe5LbZeEnsX01GbkLpoxUnL3iy7I8YdhwM0f0wDue9lCIsNLwJOcyjv+aX4pK XcazEHeojceNWjg6xPrcfD20LZ6FKO9l9uDO2qJwKk/YCxG+ghSSdfQhSCqq/eFWlcxt KOU1HdeiUJQ3o8WDgNauhrJkeNO3Mvvfxue3Dmqw9aYC83nva8MXVHgVt4JqhuamfGw+ +0FY2c3u3ftIyKi3xs62hEwScY/6Kh/mi6wbL0+2ieFfgGK+iWDT7MytgbM1Hr8C8exC 3ZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LES5SJL3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e65-20020a251e44000000b00d9ca992162esi11433601ybe.727.2023.10.25.14.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 14:07:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LES5SJL3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 7493D81A3355; Wed, 25 Oct 2023 14:06:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjJYVGx (ORCPT + 25 others); Wed, 25 Oct 2023 17:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230037AbjJYVGv (ORCPT ); Wed, 25 Oct 2023 17:06:51 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B03182 for ; Wed, 25 Oct 2023 14:06:48 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1ca215cc713so979175ad.3 for ; Wed, 25 Oct 2023 14:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1698268008; x=1698872808; 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=WnXMZq3u2P4hkyafsQIarDOhM2i0PYXnQvhdzNae9NQ=; b=LES5SJL3G9mPesbDOETZb/4ZH+A56/X31ajPTrjx5g/OD5W4HBbgk0Z4CZFLfplc7X 492KMD1UjIvxu8aypCqpA8uCODZPfaz+RBttrdN+lLQBAfPJ/Dkucy06QrlUVy3L5/k2 zowk3iacBegxLCF7WDprC6GHxJLt9YBQN2gtQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698268008; x=1698872808; 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=WnXMZq3u2P4hkyafsQIarDOhM2i0PYXnQvhdzNae9NQ=; b=vsWPXgbYkjmiKFpsNWll9qo+hFRn7g44qDVB4Od5IhXEf4g5VZ1296aVIFNM0O46Br GshlU351aYMwNxzHCTi+FD9O/JRe4TWPjR2UVlgWZMw34q4rPavU0V13kwncDyTRteJN fPLaGHVeuDr+oJgFGDZHBYglR9vtBUYmXvJ/vdV0iYG7tosE30SdpwAfVLbO8MwN5i7H Kr7ig79JnPSRd2lD7K8C0xtLKzIWfLpCZC1oTPfwfzS0Ffkmvpi0tCyrTkTkFlXF2Wcm O7nyTRhZS0t994UDXPa1jklfCxCzb6hwU4KKjLngT7++t5CpaKsHMJ+FpgNKhIdSKKwY cdcg== X-Gm-Message-State: AOJu0YzSjeapL5WKiv3TliCzScza+AxsCiXKaYCuymx4j7BId1Nrq9Rq XiW+u/3ZcfxGtcSYjLlgI3bZgA== X-Received: by 2002:a17:902:ce91:b0:1ca:3d53:2867 with SMTP id f17-20020a170902ce9100b001ca3d532867mr15084532plg.15.1698268007804; Wed, 25 Oct 2023 14:06:47 -0700 (PDT) Received: from sjg1.roam.corp.google.com ([202.144.206.130]) by smtp.gmail.com with ESMTPSA id ix4-20020a170902f80400b001bc5dc0cd75sm9689447plb.180.2023.10.25.14.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 14:06:47 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: Michael Walle , U-Boot Mailing List , Tom Rini , Rob Herring , linux-mtd@lists.infradead.org, Miquel Raynal , Simon Glass , Conor Dooley , Dhruva Gole , Krzysztof Kozlowski , Pratyush Yadav , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v6 1/3] dt-bindings: mtd: partitions: Add binman compatible Date: Thu, 26 Oct 2023 10:06:10 +1300 Message-ID: <20231025210616.3201502-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-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_BLOCKED,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 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 14:06:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780763093624578072 X-GMAIL-MSGID: 1780763093624578072 Add a compatible string for binman, so we can extend fixed-partitions in various ways. Signed-off-by: Simon Glass --- (no changes since v5) 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 000000000000..329217550a98 --- /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 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 2d13bbd69adb..b9441eec979a 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