From patchwork Mon Oct 9 20:09:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 150311 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2097715vqo; Mon, 9 Oct 2023 13:10:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGF1+2O6K7uDw4uIfXPgfuT2c7DjtS/nB8XHvvDiZAargCg7Gk4PCW28NY76dghDD9AC0MG X-Received: by 2002:a17:902:d490:b0:1c6:19da:b29d with SMTP id c16-20020a170902d49000b001c619dab29dmr16266327plg.44.1696882239566; Mon, 09 Oct 2023 13:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696882239; cv=none; d=google.com; s=arc-20160816; b=e90jYVXiCDYW6ufL9ErkZ7cjMv2ZoBs8bbReFVfNQnHBomPIM9jJG/oPSocOxA/9Ud 4tOW+XCBQtePT4j3tFfdcSjOXbiyMLK5pow1dWiIab2OkfIBBo8mXhz60kRkbnoc/cwn aJfeqEgsYVVwcTMBuSIwsLp6mzA7QntK+AAtpW38BirXuTvj8y9dOuUsz5ed9s8gkX/R RkUNBfzyhJwEpgN47sPGUfER/Gxy9AodQDJAOkf+R7AEq8rAIMdkhNcrfliQXMWkWmpi 59iIphajt+OIPNiDophjGwHeqEotfQAOruEABeuGkUHQQuE3EhYKxxsuRVFMjh6xRkqY GWhA== 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=lAmVpfxtEjWeqhBym/9INAYp/SD9oxrd9k5tq3qUHeQ=; fh=klqXOOSp8X8KAfp67QzA7GyWQCbRhvU+/PnGsvOnjxg=; b=e54v7Vb1PyCttdCuyXGy3/ISVUjFrhqs4AbtKqzRBKNNDCKnlPaGxKJYwL8/OOtgZv oym7xMqeCezkCNzNWA1ThcsIQT/w4as/95bxyq4zO6DN3Og9bV/CZfHwUtr4ju0DEN7F jIlYzI0o5VcHOVCE6dc0GOIoQhfdi+OKTBaialzHPQ2Li3EKBzoGEWkn0S6trHw8GkYI OCl7WDk1ETSqRLHtaljo0mF0H8iEnCr+vYWw1VkVaqWTPLuGoa0LPieSAj79xilYCIKY kgF0LSgxKQYYtGHBTd0HA+DuieKbLLAMz8A5hODQuJJI+fodVdFkxqJEay6E1wxV9NQ2 FCTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JH1Fn6ny; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id g12-20020a170902740c00b001c722b269b4si10156075pll.620.2023.10.09.13.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:10:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JH1Fn6ny; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 9D7B6805690C; Mon, 9 Oct 2023 13:10:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378530AbjJIUKT (ORCPT + 18 others); Mon, 9 Oct 2023 16:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234540AbjJIUKQ (ORCPT ); Mon, 9 Oct 2023 16:10:16 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF176C6 for ; Mon, 9 Oct 2023 13:10:14 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7a2bfd584f0so228361739f.0 for ; Mon, 09 Oct 2023 13:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696882214; x=1697487014; 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=lAmVpfxtEjWeqhBym/9INAYp/SD9oxrd9k5tq3qUHeQ=; b=JH1Fn6ny5INYVBlReSKe9b7xcV7o1yCCSfFFVlBJIbKU3p/IOA3VQhk+MQW7Ay2pRc My8Clpli5yhbm8Rx30skIrkGxhfFRHDd7L6YUvBuUjetsX1EFsOATRdi8qAkiu2l1toR 1rk4jm8ds3djQlEBPRMtpQPNJ0dpK6cC6Z2sQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696882214; x=1697487014; 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=lAmVpfxtEjWeqhBym/9INAYp/SD9oxrd9k5tq3qUHeQ=; b=G4H12s84+zTNBtLAPLJbjBiCtOeR07ggASbdy9PYmGtm5AOOo7nWeOa1u5slagcPZL AG1/Xs74b1Lmqopb9Y4QBlbeNRqLYMNBijT+EXPQnElEENFIK6cRkBKI9RWRoXud5lQY t05oeEDPg1iRVEZYwjMTTIsxUs2wkasBwh3m/08w6n6CwJVYsUAfM59WrShBOY9my6qk TBs4kfUCOohxX5WRZsDThQCsLvMMlBe6+BvANOs3BKxySryMov6G3QYwYm4/Ls2g6KK+ u7Hb9yp5nITUXeTfpVuwY6KJD9sT8Q1CEnRZjgnlA7IfDzrrxXWWhqWXJK7YTISRInor Lotg== X-Gm-Message-State: AOJu0YxIuRQ9aswDTxxSxShAOz8r3cbcVcqLEqxWrpwfRk1x7BfelHRT vpKJxDBZVWUfuzmwblIWk2PlfQ== X-Received: by 2002:a6b:f209:0:b0:79f:9574:b93c with SMTP id q9-20020a6bf209000000b0079f9574b93cmr16364103ioh.0.1696882214221; Mon, 09 Oct 2023 13:10:14 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:138c:cf57:c18d:20f5]) by smtp.gmail.com with ESMTPSA id q21-20020a02a315000000b0042b2df337ccsm2215294jai.76.2023.10.09.13.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:10:13 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: U-Boot Mailing List , linux-mtd@lists.infradead.org, Michael Walle , Tom Rini , Rob Herring , Miquel Raynal , Simon Glass , Conor Dooley , Dhruva Gole , Krzysztof Kozlowski , =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] dt-bindings: mtd: fixed-partitions: Add binman compatible Date: Mon, 9 Oct 2023 14:09:59 -0600 Message-ID: <20231009201005.1964794-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog MIME-Version: 1.0 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 09 Oct 2023 13:10:34 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778680625559526159 X-GMAIL-MSGID: 1779309991558112298 Add a compatible string for binman, so we can extend fixed-partitions in various ways. Signed-off-by: Simon Glass --- 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 | 63 +++++++++++++++++++ .../bindings/mtd/partitions/partitions.yaml | 1 + MAINTAINERS | 5 ++ 3 files changed, 69 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..7d6c8bd738f5 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml @@ -0,0 +1,63 @@ +# 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, 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 + +allOf: + - $ref: /schemas/mtd/partitions/fixed-partitions.yaml# + +properties: + compatible: + const: binman + +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 c934244acc31..ebc8158fe67d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3536,6 +3536,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