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: 1840422 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Y/iVW9V7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=permerror (SPF Permanent Error: More than 10 MX records returned) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=devicetree+bounces-3992-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rwp0V3Ftpz1yp0 for ; Thu, 28 Sep 2023 06:21:14 +1000 (AEST) Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sy.mirrors.kernel.org (Postfix) with ESMTP id EA7D1B20C16 for ; Wed, 27 Sep 2023 20:21:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECED04CFA5; Wed, 27 Sep 2023 20:21:11 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org 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 629347490 for ; Wed, 27 Sep 2023 20:21:10 +0000 (UTC) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C9A114 for ; Wed, 27 Sep 2023 13:21:08 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-79f92726f47so407201439f.3 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=gSfnSM+BrDwsc91HkAP+ezclEhdsT9gWg5dOXiLRmHc72+peZ4DCwFJvkOWlGlM02h 36DrmmnhXODDEqn1aPfFq5ZwDXl5hdXVhFiZjhqEgDX4B5hPovXq+rDBvN9L1bVmi6LT n+bwLKTJgiHCEpBuVhemdy9mC1rFUGUla9vObP+Fyoe+DyQTcmTXibgPC2LhA098Qcg/ LzKrjGMxQWW6rhda5mG/khVdcEOT6ssIVCqPigUD9uV++P/j/cB3Cb8yjCtbpBdF3Hem fBFqtFNrhZ5fWuZsT8jR7jaF7D4ReyJC81b5J9p8CNRAtd1GWOfeDQfXLQ+yyF9VSGtG b+5w== X-Gm-Message-State: AOJu0YyH7uWLPJCO7UaJZfSRvXjT426GKtJRt/a5rivKYR3MwleMwK8+ FpRSPP/UikY71zvFiT4UyAzjy4DqzbcXeYi4Zu4= X-Google-Smtp-Source: AGHT+IE/xm+sDlsbj5TMwcIX6s89wG1zzgEzTIKDltB0ZdFPBg7kOF1N3Y/GeFEAB8keQ7aPZmfbKQ== 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 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 --- .../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 From patchwork Wed Sep 27 20:20:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1840423 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=JcwztSVL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=permerror (SPF Permanent Error: More than 10 MX records returned) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-3993-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rwp0Y3PCRz1yp0 for ; Thu, 28 Sep 2023 06:21:17 +1000 (AEST) Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by ny.mirrors.kernel.org (Postfix) with ESMTP id 2AF671C20981 for ; Wed, 27 Sep 2023 20:21:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A55D38F86; Wed, 27 Sep 2023 20:21:14 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org 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 903ED7490 for ; Wed, 27 Sep 2023 20:21:12 +0000 (UTC) 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 7949D122 for ; Wed, 27 Sep 2023 13:21:10 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-79fe612beabso131883639f.3 for ; Wed, 27 Sep 2023 13:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695846070; x=1696450870; 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=1kq9WoSgqEviF42jhwFTI980vH31ePAvDcikVyQPxtc=; b=JcwztSVLq69Lbxb/oyjJw8+PibiGvIjJ5thiZUJOm2Dep/lmTNYXE4YEbQ1c7qu7p3 faHR06qLKFPWogsRMB3FDWeOktENmTLEfDiU+Pk/PqoyANg1xCcZOxwpQpkI+4caQbO+ kRfXg1knzZQf+MmrpAUJx2uIcPvdnc7NbIKes= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695846070; x=1696450870; 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=1kq9WoSgqEviF42jhwFTI980vH31ePAvDcikVyQPxtc=; b=s7JY1WzKnJjVaCSKjQoFTmgnGck1br4Xa2ERj6QUjBGojF2r8mIem/ZV0/DXo4bRBk eaCdOKTNiO2RwkZ/EU+uKbvW1PYVUzsJbE908zeDZCU/za+zzL3oHjebvVIQUVFbMEVi lGLR40NSUqgB3dOJHfUWWZxV2HCNBUtp/RiYKYSqLmHeGQWHy59L6AYMgFUV7XsL7C2A 7kluldIrA4zukrZ3SNZKvouj8zpPbiQShV5sgjjedimDn7ydlslVdUqrUgXqZ28V8PIj hKwPMvoGx/i2IiU5atNBa1z1cJE35Rrj4jyEpCX5lZkbehlPZ6EZnhqe1NvwPU+xyri0 uLvA== X-Gm-Message-State: AOJu0YwAILlIGTXi1wsdc8OKO+KTm3wS23qeDnRUoN8BCcXiQVJvc+mI XmJod6bwkIg1Vju/JrHasONAnit8HjVh1K6DUKQ= X-Google-Smtp-Source: AGHT+IFhPJEncrLdXnOVjxjuTHH/e94XYzo89HB1tZ1pWdiwxx4ZhAkrwcRurxLK1zLwja0dnf6dQQ== X-Received: by 2002:a5e:a610:0:b0:795:16b8:85fc with SMTP id q16-20020a5ea610000000b0079516b885fcmr2995614ioi.0.1695846069701; Wed, 27 Sep 2023 13:21:09 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 13:21:09 -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 , Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] dt-bindings: mtd: binman-partition: Add binman labels Date: Wed, 27 Sep 2023 14:20:52 -0600 Message-ID: <20230927202057.3676497-2-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog In-Reply-To: <20230927202057.3676497-1-sjg@chromium.org> References: <20230927202057.3676497-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_BLOCKED,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 two labels for binman entries, as a starting point for the schema. Signed-off-by: Simon Glass --- .../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..6ee832cb4c4c --- /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: + label: + 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", "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition-u-boot@100000 { + label = "u-boot"; + reg = <0x100000 0xf00000>; + }; + + partition-atf-bl31t@200000 { + label = "atf-bl31"; + reg = <0x200000 0x100000>; + }; + }; From patchwork Wed Sep 27 20:20:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1840424 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=NFPIdVfV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=permerror (SPF Permanent Error: More than 10 MX records returned) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=devicetree+bounces-3994-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rwp0Z4Blkz1ypS for ; Thu, 28 Sep 2023 06:21:18 +1000 (AEST) Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sv.mirrors.kernel.org (Postfix) with ESMTP id 14D1B283A3C for ; Wed, 27 Sep 2023 20:21:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E12A4CFA5; Wed, 27 Sep 2023 20:21:15 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org 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 904394CFA9 for ; Wed, 27 Sep 2023 20:21:12 +0000 (UTC) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C7E010E for ; Wed, 27 Sep 2023 13:21:11 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-79fa2dbd793so354242539f.2 for ; Wed, 27 Sep 2023 13:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695846071; x=1696450871; 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=t/WPzSaDS9c+jiadSigu8kAq3wHnfTKelNMfiF3LTzM=; b=NFPIdVfVm9Cs8hzkeVsa84P9bc5aJOExpVnEr16PwbTM5gi6VTllZdBDI14c/F79th MaCLFOXmFm1SVOfSy0WA8RpUwNjX4/R2AP2/dUX3ZwpMc7BtoaN0qQzqkhXHodiHreQO I4TJllASEqF6WEezGq0r0+0ZqkUH6f4DjQ7o4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695846071; x=1696450871; 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=t/WPzSaDS9c+jiadSigu8kAq3wHnfTKelNMfiF3LTzM=; b=aAPCkblLOOi51nf9vNI4DoVoFL7wZL6Lx3CU1KhfxhZNg6GsWHus5bX7WAyHURagld 1Zx0b0S5zmAKUh6hFRMQ2kOqRSbfUvy+Wmq9hZSomzhv59HkGihI3ho+o20nQkBtd/ts abDrgh4exI75ho/+sSvm/XD7J5A8j6X/cGtjCzDJ6juiNem/LiZE/VDAH01LrtNUkzIk pO9yK3wwN8F1d8GgleNI/mgo623Y5hRmKnE0xx4GYqkJsW0RgTSccbGu0JD3JyhaXK7q LZq++n+csvQSIReLQYVRz6x+pzYwVhPJBydcODdtxtMvZgpef9Njtt9OBz+2Am1xsiC1 bEVQ== X-Gm-Message-State: AOJu0YxqZDGWVyCdfHS56F8pEpL91Nhm77sv6t902DVBdOvI7V/z6bw1 bMNfXS++s4jBBcM89aVqrtbeEId1z4+47ZMAUB8= X-Google-Smtp-Source: AGHT+IFRbrRAe8Dnju3UVQpeWZ5Tyu9bkia5NuOv1VLGeo8FMF3tFtAq/tcjBk0rXfAM+4qlRibD1A== X-Received: by 2002:a92:ca0b:0:b0:34c:e7a3:894 with SMTP id j11-20020a92ca0b000000b0034ce7a30894mr4107520ils.16.1695846070751; Wed, 27 Sep 2023 13:21:10 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 13:21:10 -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 , Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] dt-bindings: mtd: binman-partitions: Add alignment properties Date: Wed, 27 Sep 2023 14:20:53 -0600 Message-ID: <20230927202057.3676497-3-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog In-Reply-To: <20230927202057.3676497-1-sjg@chromium.org> References: <20230927202057.3676497-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_BLOCKED,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 'fixed-partitions' 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 a provided as part of the schema. Signed-off-by: Simon Glass --- .../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 6ee832cb4c4c..9cd424447e76 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-u-boot@100000 { label = "u-boot"; reg = <0x100000 0xf00000>; + align-size = <0x1000>; + align-end = <0x10000>; }; partition-atf-bl31t@200000 { label = "atf-bl31"; reg = <0x200000 0x100000>; + align = <0x4000>; }; };