From patchwork Mon Oct 9 22:04:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 731152 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49DD6374E2 for ; Mon, 9 Oct 2023 22:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eicau85/" Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B932DE9 for ; Mon, 9 Oct 2023 15:04:40 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-3527428a402so16963705ab.0 for ; Mon, 09 Oct 2023 15:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696889080; x=1697493880; 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=Y9yY9Pt5Z+lcy2ZFBIazS1/xG4eT3Pf+M3kQNkzl3b8=; b=eicau85/ADe5/MNhNknc28k7+RJBMV/zN0PHGnmrJs5R1fSllzzxnDsqFRAQLjXMam RD0zkPQqEWTpLzcxh81AKddbJ33+mPn3BC+1foTqBERf1QO2VKRAEAP5cZpGT21+b8K0 q/6v7poi9W5Zavi3cU6BITyeIaV2CVNRrDU+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696889080; x=1697493880; 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=Y9yY9Pt5Z+lcy2ZFBIazS1/xG4eT3Pf+M3kQNkzl3b8=; b=ps7GwI1kCGXGvP5r3V8P6WyyQ5vKAmAspSJ/D19+fN88b5y9x46ReXbAs7dBBPXVSc nS08TUN5Eikm+LzwBReZCq5dwQM8G6nUcqGWfhZ/XUET1jo+5QMqBdF3ARI4pVXdBOUH wVOX9SUOu31JAHbUboa5uJAfkxbknzL62UB4D8xZ0uTvHboWVu4m7hXV5WkY5/nbHCEk hsJiihkTh+KTSxMX8WGTI+LWyi495SozlGSepzNx7yYPBbAt2w6l1wWFD1q4/nbpC1C9 3AIUSLazC8YNZEEwIzmGoby6uaVLcf/hFfo2ZsV0c/wUAEFo6paweSNZjgeCHOuu+/lq H26Q== X-Gm-Message-State: AOJu0YzMNk6bsrHlOCk+bcPQ7iZLwhOYvDgxaNYmusuItjoeGObqm6Bt n9asXzcerOFJdory4FJ4YDP/wC3mSOkky05ucXg= X-Google-Smtp-Source: AGHT+IHMwP21W95ioWGQ6VOzQP6LMsWXCq8+TyNwoBR7DWbu8eIaeSo0UsHUkY1Q1hFP6Dc4enAPYw== X-Received: by 2002:a05:6e02:1a2e:b0:351:4f0c:b95d with SMTP id g14-20020a056e021a2e00b003514f0cb95dmr20621874ile.22.1696889079842; Mon, 09 Oct 2023 15:04:39 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:138c:cf57:c18d:20f5]) by smtp.gmail.com with ESMTPSA id o3-20020a92d4c3000000b0034cd2c0afe8sm3164063ilm.56.2023.10.09.15.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 15:04:39 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: linux-mtd@lists.infradead.org, Miquel Raynal , Michael Walle , Rob Herring , U-Boot Mailing List , Tom Rini , 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 v4 1/3] dt-bindings: mtd: partitions: Add binman compatible Date: Mon, 9 Oct 2023 16:04:13 -0600 Message-ID: <20231009220436.2164245-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Add a compatible string for binman, so we can extend fixed-partitions in various ways. Signed-off-by: Simon Glass --- 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 | 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 22:04:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 731601 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0140A374E2 for ; Mon, 9 Oct 2023 22:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZJfn2IU2" 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 C7501C6 for ; Mon, 9 Oct 2023 15:04:41 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7a27254cd12so199588139f.3 for ; Mon, 09 Oct 2023 15:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696889081; x=1697493881; 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=8Oy3/oDIsrYxVx08XCzjcM9Z9wsmpIMgRcvueEjHv/4=; b=ZJfn2IU2szW2+wKn4i2QWfHoCcNMc3YKOnf9totCsBGNOUaK+ZnF7jTC71aMcXkZRr FgDUWey/IU3+CvX6H7XaK1UDSjM8XwimcHzxup7WrbgkTQAfGAxBEz9q+PZWqE+tTM5q jlR6r9fCYm6Xnq/+98MOvAS5aTxWJ/IGVMxb0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696889081; x=1697493881; 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=8Oy3/oDIsrYxVx08XCzjcM9Z9wsmpIMgRcvueEjHv/4=; b=jQlG2+x8jZ7AmE3Iq2iXUmZP4vsVcKwgb48vr9ah5DpKw/OL1TOpVeEafOyWp0AUmP 0DEzDPpK9k5zyrbwxRSf0xyT0sRVO0sQqXM0rQIVcCpSVsxiCO+PBgLJPJI2dx3mAEdZ qVdg5Hbvl9DebHX9o0+n5zrabSpYoDAANdU/A4PHFF00J1dcCPNbABJQ89bEWH95PHs9 DkwHX16laB5GlbmgZRz0wtlV45KBnwGfr5fsoaPK2zRcCjV8szAc0WNcQFFkz2F6tiWR jeHvfd/bdKg7ufBAs8hlEzCj2epEJ8N6vGbSxrqJ65fbhsoEBx4RvMngmPOsyKA8gmfd XQag== X-Gm-Message-State: AOJu0YyzxoQKTF66OnrsgHFXq4kXIUPu7Foi0fJBU9Pqqq+BQEx1moVx vFc1VhqwfIM4lO6aOmv0k6EqEltzPzf6WR28htk= X-Google-Smtp-Source: AGHT+IFwSMMRzbI9ukD+T9rudHAv5MuufQsbRJFD77HiKbqNVg7VVe4MkQLuLmI2ApcxREzIG9BR/A== X-Received: by 2002:a05:6e02:170c:b0:350:f510:3990 with SMTP id u12-20020a056e02170c00b00350f5103990mr23056007ill.2.1696889081061; Mon, 09 Oct 2023 15:04:41 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:138c:cf57:c18d:20f5]) by smtp.gmail.com with ESMTPSA id o3-20020a92d4c3000000b0034cd2c0afe8sm3164063ilm.56.2023.10.09.15.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 15:04:40 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: linux-mtd@lists.infradead.org, Miquel Raynal , Michael Walle , Rob Herring , U-Boot Mailing List , Tom Rini , Simon Glass , Conor Dooley , Krzysztof Kozlowski , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] dt-bindings: mtd: binman-partition: Add binman compatibles Date: Mon, 9 Oct 2023 16:04:14 -0600 Message-ID: <20231009220436.2164245-2-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog In-Reply-To: <20231009220436.2164245-1-sjg@chromium.org> References: <20231009220436.2164245-1-sjg@chromium.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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 v4: - Correct selection of multiple compatible strings 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 | 49 +++++++++++++++++++ 1 file changed, 49 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..35a320359ec1 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman-partition.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-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: + oneOf: + - const: binman,entry # generic binman entry + - items: + - const: u-boot # u-boot.bin from U-Boot project + - const: 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 22:04:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 731151 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E78DC4446C for ; Mon, 9 Oct 2023 22:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="M79vWm+R" Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07CACE4 for ; Mon, 9 Oct 2023 15:04:42 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3527428a402so16963785ab.0 for ; Mon, 09 Oct 2023 15:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696889082; x=1697493882; 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=KzMuw4I+Nd8N8oi2Xxm8m0QPQBwYQL/tbGvCzQaub7A=; b=M79vWm+ReC50aLzytD5ElBjwafChrifxWBUUHjdM/oiwIIn0JpbNNGIOinmaCmmlVl g++16RL3lyOTQ+rG62yAA2nKNRHwZsoKflNznyq0LuEPlAt6jNbSlQICHhJDY824RVHs HrIwuuGPX3T8tp2DG4D2hWeSSGpKG9aXIidhk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696889082; x=1697493882; 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=KzMuw4I+Nd8N8oi2Xxm8m0QPQBwYQL/tbGvCzQaub7A=; b=TbByvQgN7iQWsmkmo0tH71CW2h8xnD6KzgAtsuVu+sL7dUsW81nAARE850T4kyH2jo IKQ0sHi+8TVJB4Xwhjs9Hp+9Mf3tfyQ3Pn8hxOqK+ZifCk2h9HFws8XZR6yKaSxvCsA+ 0kIeVZhyn/c9+JVcediAi7T6Um9x5YX5nbX4CuCpJjfl2JuvPuAthYiPHb3VQUwVKEgR QhpFgcfwMWOhyNsSECdmHEEb3t1xjYICIIE2FSxpMdQ+4kjDOKvYrwBc//oRAg8Rj5c6 imliW6aRmdDR2iNO590kcXjZX0VVC5d1Ker03EE3fusBnO99uUcZrH0drTyZoHd8QF0I htUQ== X-Gm-Message-State: AOJu0YySPs4wHEicVUTc1Eg9BGMlByUK8SCTfY4Xxvt0pnuiLZSUe3dl 7Kya5h5tcdLtlWaUBsfRxWiugAR23qZkcamfYKY= X-Google-Smtp-Source: AGHT+IHvK9QConjcBvixojUyIyEr2xvgdQipUvlCIBgg0tv4RZCg9G9yvZ9PkNArpEDRXj4vHK+oAw== X-Received: by 2002:a05:6e02:1a2e:b0:351:4f0c:b95d with SMTP id g14-20020a056e021a2e00b003514f0cb95dmr20621948ile.22.1696889082165; Mon, 09 Oct 2023 15:04:42 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:138c:cf57:c18d:20f5]) by smtp.gmail.com with ESMTPSA id o3-20020a92d4c3000000b0034cd2c0afe8sm3164063ilm.56.2023.10.09.15.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 15:04:41 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: linux-mtd@lists.infradead.org, Miquel Raynal , Michael Walle , Rob Herring , U-Boot Mailing List , Tom Rini , Simon Glass , Conor Dooley , Krzysztof Kozlowski , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v4 3/3] dt-bindings: mtd: binman-partitions: Add alignment properties Date: Mon, 9 Oct 2023 16:04:15 -0600 Message-ID: <20231009220436.2164245-3-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog In-Reply-To: <20231009220436.2164245-1-sjg@chromium.org> References: <20231009220436.2164245-1-sjg@chromium.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 35a320359ec1..8e8a3b6d4d14 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/binman-partition.yaml @@ -28,6 +28,42 @@ properties: - const: u-boot # u-boot.bin from U-Boot project - const: 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: @@ -40,10 +76,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>; }; };