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 From patchwork Mon Oct 9 20:10:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 150310 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2097697vqo; Mon, 9 Oct 2023 13:10:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbmyeV2PmAXV0jmL0EU5rWUrvR1BUwGJndJh+vxM6cRzDYodUEVilI/1AHNI9pv60UYAaA X-Received: by 2002:a05:6a00:a08:b0:691:2d4:23a2 with SMTP id p8-20020a056a000a0800b0069102d423a2mr17794738pfh.31.1696882237328; Mon, 09 Oct 2023 13:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696882237; cv=none; d=google.com; s=arc-20160816; b=OoA1XYJmjpIXNGc5s2WlE+D9JcZNHzaaU5Ks2R5tR1GsikAluZ6HlJR3BmCUO6TBHe j9NKJdD9YnNAEiQDveFW4s0ZQBoqGGoPlisO4e89UPkSS2K1xDpLKt5WayDm3Sch2NWj NFij+bEn2aeZ/al3NpydeiinQCnhps0WEJc/LQykfRcDTei4BnmVkhjhItEqQ33xcciw JV5FAV2ff5YNjw8vNUs1bD5mpcURvQE6zumaBYACkIBv9RgqJt3td7l5v1Dc69oI6Azr 1bt9Dy+7KB82TsKktPbB6HWLtCQVEJeaOgtCMyswzg/EdqqAMnyNS2YfOC1LRVWsmMBd CHag== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b3GY1i1RwOxFPsx3r0WAP41F76rpcBgk99acMMB0WNM=; fh=TSzAEZ8HxX5NkEr1YM7XuF/tG6QZbKbriINJIzyHcX8=; b=Fof64/9/SqP9Qnx9AlCeRqn6RBuBEWV4ScewplGpJ/SGi+/j/Mb5WSiuZ2i+YZhF3I cXrGSVKtOxGToIcy4QpAi9V51bacahKcivE+M7EcXzelbhPF2sjxVcoNUIlOn0SCpCLJ 5S6QJjn283G1CUoDN4KHtj5bocvrz2A+93mf28r03+69zlbeFlzv2SSxfz3XppPDGwq9 JnmhA/DHP95+NN31eh35N2lctae3o44K9y7PdCSAfb/U6w2Z0XHEybqiucWY+wqgkd8F 0wekF1J9ZZIK6RE2ee3WnyeoCyfms0HpS7oJOEJAXWS81tge+BucPdpEWqTTx7BKb2s4 E37w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mBHh+J33; 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 v15-20020a63f84f000000b00578b9fb24f3si10458145pgj.633.2023.10.09.13.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:10:37 -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=mBHh+J33; 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 61CFB801B1BD; Mon, 9 Oct 2023 13:10:36 -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 S1378567AbjJIUKZ (ORCPT + 18 others); Mon, 9 Oct 2023 16:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378541AbjJIUKU (ORCPT ); Mon, 9 Oct 2023 16:10:20 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A8B8A4 for ; Mon, 9 Oct 2023 13:10:16 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-77acb04309dso218718739f.2 for ; Mon, 09 Oct 2023 13:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696882215; x=1697487015; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b3GY1i1RwOxFPsx3r0WAP41F76rpcBgk99acMMB0WNM=; b=mBHh+J33A6HeXlgQPT/G6YWkrSEhSWtMiWsNYcuXUmhcj7h4k4YKzna+TynjHDxlzy D6WjXyyqnQPE0xB5s1lj6ogTA0llshaKdCOf0kaa8Th9C9+SP9Gz4KC6zx+kUy9Tzeuf GCDQ19q1xnX6DnF++M2NbwwwmgNWoSJ0Lfcs0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696882215; x=1697487015; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b3GY1i1RwOxFPsx3r0WAP41F76rpcBgk99acMMB0WNM=; b=lryWNAZfLigEoLd42+N5DlRX4AyXLoC/HuswnCcFxAoFDjm912Qtfr64b6Ftsj05js Xi4irPJYI1b57O8aTJsJDfNsuKKm62irUwtccxWqUAw3a0ENwiRHjLxUraeBwkUH1Jg1 Iep9E4a9F1VmvoaDy+ITilwbFZzrtJHED7z1dSDYVbwKAfo9plC4E8hRhvInXW5RFQ4l mlCyzkN7ce+NdVuiR++wJcyy8/RJ63ezmvMGTBderHJuZ9I+JWihQ7HZTelTc4ZsO+cX QlW8a4C2nCRU/5ItgAUAv1weNOqmPpoYwiw0pE4P8Hi2gVEkGbTCKHkGPs1ym2Qjc1IA iN/A== X-Gm-Message-State: AOJu0YximETCAAhLqcZaRAuwOY8NBjznU71zozrPv3IyHrXlD2h72ulV tSZZytWYRbZozPRmRNOYY2roAQ== X-Received: by 2002:a05:6602:220e:b0:786:f352:e3d4 with SMTP id n14-20020a056602220e00b00786f352e3d4mr19797645ion.7.1696882215555; Mon, 09 Oct 2023 13:10:15 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:10:15 -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 , Krzysztof Kozlowski , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] dt-bindings: mtd: binman-partition: Add binman compatibles Date: Mon, 9 Oct 2023 14:10:00 -0600 Message-ID: <20231009201005.1964794-2-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog In-Reply-To: <20231009201005.1964794-1-sjg@chromium.org> References: <20231009201005.1964794-1-sjg@chromium.org> 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]); Mon, 09 Oct 2023 13:10:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779309988469107988 X-GMAIL-MSGID: 1779309988469107988 Add two compatible for binman entries, as a starting point for the schema. Note that, after discussion on v2, we decided to keep the existing meaning of label so as not to require changes to existing userspace software when moving to use binman nodes to specify the firmware layout. Signed-off-by: Simon Glass --- Changes in v3: - Drop fixed-partitions from the example - Use compatible instead of label Changes in v2: - Use plain partition@xxx for the node name .../mtd/partitions/binman-partition.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml new file mode 100644 index 000000000000..754f804524a5 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml @@ -0,0 +1,48 @@ +# 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-partition.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Binman partition + +maintainers: + - Simon Glass + +select: false + +description: | + This corresponds to a binman 'entry'. It is a single partition which holds + data of a defined type. + +allOf: + - $ref: /schemas/mtd/partitions/partition.yaml# + +properties: + compatible: + items: + enum: + - u-boot # u-boot.bin from U-Boot projec6t + - atf-bl31 # bl31.bin or bl31.elf from TF-A project + +additionalProperties: false + +examples: + - | + partitions { + compatible = "binman"; + #address-cells = <1>; + #size-cells = <1>; + + partition@100000 { + compatible = "u-boot"; + reg = <0x100000 0xf00000>; + }; + + partition@200000 { + compatible = "atf-bl31"; + reg = <0x200000 0x100000>; + }; + }; From patchwork Mon Oct 9 20:10:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 150312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2097719vqo; Mon, 9 Oct 2023 13:10:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVfoVo1wkmB0KBRQ+UvbU/L1JcKg7Ic2tBoVCrn6fV/6DHYpmMjRDfuVzB+0Em8IzcuraO X-Received: by 2002:a17:903:11c7:b0:1c7:36ff:1ffd with SMTP id q7-20020a17090311c700b001c736ff1ffdmr16408815plh.61.1696882241006; Mon, 09 Oct 2023 13:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696882240; cv=none; d=google.com; s=arc-20160816; b=kF5cVyP/9fBMYs5jAR7O1EJfh5sqYdJj/AfdEMWl6R8ExTloktU/e7Wk4OQyoqLfab UmSKYfeZdI+AP88U7GNdvm/eUKBD7bXJV/CKA1N900HKBy5REiwyRvB18iR3rEC/wFGa 0BuqTwZyOBANh+CAxsPgvAKxFVD6QM2FB6dtHY3YXOVBPverG0jupK5CBEKCNrBN5bmF fJdB3UCSQCgvBk6bKhVzoV3XDN/OflXjVfyF+y8dvx//vnEyykYlA7jhlXn7f0v6swD6 LR4mqMuQIGFhzqix+s1dQI0OS48BYgv22NObOkuOLMnsA1d/5CxWz5k1i7r0TjFRS8r7 R1Pg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qDwYllgCxpOVaDPdnj1bCUl1esI4hxS9Uu4gTGnxNxA=; fh=TSzAEZ8HxX5NkEr1YM7XuF/tG6QZbKbriINJIzyHcX8=; b=R4m/IcEl89hpXG1liMJw/C1r2imrR1imugXezhyj13BFKgTOdcDGQit5ndC/+MWD54 o/wy71iyLyDczWNIzr6Hq9F2ytkS5ooiuf5eg/4rf2eCB/2gvUlvmqmcpt6l4ATSrynJ awQUM/QuNCs0Z5aN3JG1lHeq5+3af9tST81wrYkA71uKEYFmvstrvUAQKjS1WtG1ldfO E4EAFPwKMwlyVARAmHKYfeogQnd63zifNJqbeYa5F98x/5SzIFEn8y5P5FlsIBkBovGu jO+iWELJMMxmkDl6YI80PdULAJWRbE3buNFDqiR0YTUtAdNBuA6eCjY4ofZHj16TQE+r hbTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="YQw0p4m/"; 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 l13-20020a170902f68d00b001c5844a4db7si11228851plg.562.2023.10.09.13.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:10:40 -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="YQw0p4m/"; 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 3FA3B801B1BB; Mon, 9 Oct 2023 13:10:40 -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 S1378580AbjJIUK2 (ORCPT + 18 others); Mon, 9 Oct 2023 16:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378540AbjJIUKV (ORCPT ); Mon, 9 Oct 2023 16:10:21 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10B53AF for ; Mon, 9 Oct 2023 13:10:17 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-79fe6da0049so206229939f.1 for ; Mon, 09 Oct 2023 13:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696882216; x=1697487016; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qDwYllgCxpOVaDPdnj1bCUl1esI4hxS9Uu4gTGnxNxA=; b=YQw0p4m/ETeVFreg/NrLrJKpjnhYlAdPAekPGKVkS0iPtlGBQUmmmT/+HD8ol8HDVY zehNXaWEKgFNx/waGK2nUGFX3tve6ENKRWfGMhG+sXhCeiQaaDgdr5jUxEjUYqbATD0c RbDkszf+H2d2Y5WqWKvBWmhIDyHQ+Xa+dpU2w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696882216; x=1697487016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qDwYllgCxpOVaDPdnj1bCUl1esI4hxS9Uu4gTGnxNxA=; b=gdRCjVu0qZB7FhbD+l58u4EaQ8po5kuWOTullouaLxLFwba30Pu3B70PeRARK9dlv/ AlTOPXvxNHbTKqO21oLkxJlEociMmqiCam1PZDcDm2B1SwkHo+cacEzmO8mxsQk16zp0 JRVAsaKTFlBQsIU2dxpuewk4hPBw/xV8g3QKHaY5ptl6NF0iNrTcz6XO2hn5UMkX4xm5 hFVE+t98Mq69duFot0c4qnfKkXstEWspHulg1u6eZcvTByALwO6xBa/aHVTEcQ8Em9vt DxGkk+FFmQi86HohUpGpDH2SqMQj4ODhSGbcZZkuJpE6lHYlJSPxhRm46kbSWa+aEqBZ I5cA== X-Gm-Message-State: AOJu0YyuQeOJhUk/mxFaW6KQFVMoGo2W3tTTVZzq2gZtK5CCu0WfmUVB /ep0uaH6s27dUF3L1yi5SE/CGg== X-Received: by 2002:a6b:651a:0:b0:780:ce72:ac55 with SMTP id z26-20020a6b651a000000b00780ce72ac55mr20002656iob.10.1696882216398; Mon, 09 Oct 2023 13:10:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:10:16 -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 , Krzysztof Kozlowski , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] dt-bindings: mtd: binman-partitions: Add alignment properties Date: Mon, 9 Oct 2023 14:10:01 -0600 Message-ID: <20231009201005.1964794-3-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog In-Reply-To: <20231009201005.1964794-1-sjg@chromium.org> References: <20231009201005.1964794-1-sjg@chromium.org> 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]); Mon, 09 Oct 2023 13:10:40 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779309992572619977 X-GMAIL-MSGID: 1779309992572619977 Add three properties for controlling alignment of partitions, aka 'entries' in binman. For now there is no explicit mention of hierarchy, so a 'section' is just the 'binman' node. These new properties are inputs to the packaging process, but are also needed if the firmware is repacked, to ensure that alignment constraints are not violated. Therefore they are provided as part of the schema. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Fix 'a' typo in commit message .../mtd/partitions/binman-partition.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml index 754f804524a5..350014a93da4 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml @@ -27,6 +27,42 @@ properties: - u-boot # u-boot.bin from U-Boot projec6t - atf-bl31 # bl31.bin or bl31.elf from TF-A project + align: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This sets the alignment of the entry. The entry offset is adjusted + so that the entry starts on an aligned boundary within the containing + section or image. For example ‘align = <16>’ means that the entry will + start on a 16-byte boundary. This may mean that padding is added before + the entry. The padding is part of the containing section but is not + included in the entry, meaning that an empty space may be created before + the entry starts. Alignment should be a power of 2. If ‘align’ is not + provided, no alignment is performed. + + align-size: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This sets the alignment of the entry size. For example, to ensure + that the size of an entry is a multiple of 64 bytes, set this to 64. + While this does not affect the contents of the entry within binman + itself (the padding is performed only when its parent section is + assembled), the end result is that the entry ends with the padding + bytes, so may grow. If ‘align-size’ is not provided, no alignment is + performed. + + align-end: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This sets the alignment of the end of an entry with respect to the + containing section. Some entries require that they end on an alignment + boundary, regardless of where they start. This does not move the start + of the entry, so the contents of the entry will still start at the + beginning. But there may be padding at the end. While this does not + affect the contents of the entry within binman itself (the padding is + performed only when its parent section is assembled), the end result is + that the entry ends with the padding bytes, so may grow. If ‘align-end’ + is not provided, no alignment is performed. + additionalProperties: false examples: @@ -39,10 +75,13 @@ examples: partition@100000 { compatible = "u-boot"; reg = <0x100000 0xf00000>; + align-size = <0x1000>; + align-end = <0x10000>; }; partition@200000 { compatible = "atf-bl31"; reg = <0x200000 0x100000>; + align = <0x4000>; }; };