From patchwork Thu Mar 14 02:17:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1911956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=RHEkZv3j; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Qs2TetS5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (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 4Tw9z53WGBz1yX0 for ; Thu, 14 Mar 2024 13:18:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0tedYH8f9a3QJ1nlBoJxcE+oAZfjT26fOV4ExHMkkZI=; b=RHEkZv3jcTnCbA Fl95tZYCSEgW0ZTdGxR5RxBVGicAU21TP5pmSadcRiAOHa0dznds+cgJcCegSwTBMS5jryvUl+Ifu L/4Coh7of45+At/BlELwy3b274VXx0INb+Mqcn5GxrAQbRoFBfGOMhbKfObAT9qkgQi6WDNYFRjf3 QvxR1saXfD4lzqi9pJvy8P1Jnobo7dAQiUf+I5VYc/QWu7apu7znnJIcuT6P2Q4IYT9ljbBQb98rI ite63ehObLB9viTjOXv7ZCC8mslcnbENS9JgnVct5zYZzpWHHkcx9GFxn4iagbH8CgjW/cWLQRYSR J4O7KEbQ7nsrSt1FNdmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkafd-0000000Cf5F-26YP; Thu, 14 Mar 2024 02:18:13 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkafa-0000000Cf4f-0Usb for linux-mtd@lists.infradead.org; Thu, 14 Mar 2024 02:18:11 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5dbcfa0eb5dso365619a12.3 for ; Wed, 13 Mar 2024 19:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1710382688; x=1710987488; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bw/+Z7r/txSTQl3/VBt2dWxefijuFQx/eWY4cCx1Vxc=; b=Qs2TetS5SL7xIg13mwE3hkVtDAVz5wbUsqTSlxbDvu/GnjPfEtJm8PB983ZVgLrhsZ 48rRz0Rt1YbJPkeuFpjSVyxIKqW9MDzk5pkEwtCQZuM5AG6W4YFYAIClWFKdG2Zmiex2 4qWK+OLIEoi3bMIlYcHxjvhw++X80a5DuE8wY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710382688; x=1710987488; 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=bw/+Z7r/txSTQl3/VBt2dWxefijuFQx/eWY4cCx1Vxc=; b=MfvdAGHlzivOSjVf3WWOjq5dc0e7Vk3s/ybd41mKT8aArIQMGTShTESlai/gxDgdan kN5+/GGF9m9PM9cLSAz1cRK7TzS+y3EfC5B5Nc11QT+l6241wgyY8ciEtLvLEzEKNsva PtYVsAN8lztKRotzlKcoq0coAIoQcPIBcoNsWsITyM+CQxHYHLD3zFiZiGGJjalL7hOh tPfbWLqdVaMjAscmRKwLc2Wn1FmOBvrAG8a0CT9LOwj0GWRPwY8lbXiKu/MIUIdmHeb6 bXkPODTRDcU4tjjcuw9m6MnIWEGVXcPDrTvFWnlDXNSYGXxxvid0o4lOjoeeSj6R+ipP ph1w== X-Forwarded-Encrypted: i=1; AJvYcCW0C3kf36MTiTYUPGzNqDLoNlhkshpE0k0t2yVXbvOE807g979rGirmIl8WBpAREMXiik4zuQNfLLaVJiULMu/KxiEFfm2a6ku3NfNqLw== X-Gm-Message-State: AOJu0Yy/YrWpj2V/KKgFbM1gCvx/QLOeGzyHfi9C7H+/UmVm7QeeOgqD pMEz2Ak9Smi8c41P03k81DcCq3Az285tBlXqLi59Iq+iG8CDNrFf0lCZCU8TqQ== X-Google-Smtp-Source: AGHT+IEGCQ0dir7xQW4xKnBdRv5fD3d9jdrPjgJZwAI2oEu7UpTxG2WSBqCuGmEu9uHnxxEjUnqRMw== X-Received: by 2002:a17:90a:d18e:b0:29c:289b:1eb3 with SMTP id fu14-20020a17090ad18e00b0029c289b1eb3mr452033pjb.6.1710382688593; Wed, 13 Mar 2024 19:18:08 -0700 (PDT) Received: from chromium.org ([118.149.82.233]) by smtp.gmail.com with ESMTPSA id o1-20020a17090aac0100b0029bc25f7181sm1993937pjq.54.2024.03.13.19.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 19:18:08 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: Miquel Raynal , Michael Walle , Rob Herring , linux-mtd@lists.infradead.org, Simon Glass , Conor Dooley , Krzysztof Kozlowski , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v7 1/2] dt-bindings: mtd: fixed-partition: Add binman compatibles Date: Thu, 14 Mar 2024 15:17:53 +1300 Message-Id: <20240314021754.84557-1-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240313_191810_241034_4606E71F X-CRM114-Status: GOOD ( 17.60 ) X-Spam-Score: -1.2 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add two compatibles 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 [...] Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:534 listed in] [list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add two compatibles 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. Note also that, after discussion on v6, we decided to use the same 'fixed-partition' schema for the binman features, so this version adds a new 'binman.yaml' file providing the new compatibles to the existing partition.yaml binding. Signed-off-by: Simon Glass --- Changes in v7: - Adjust MAINTAINERS entry - Put compatible strings into the 'fixed-partition' binding Changes in v5: - Add mention of why 'binman' is the vendor - Drop 'select: false' - Tidy up the compatible setings - Use 'tfa-bl31' instead of 'atf-bl31' 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 .../bindings/mtd/partitions/binman.yaml | 49 +++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 54 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..83417ad5cee9 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Binman entries + +description: | + TBD + +maintainers: + - Simon Glass + +allOf: + - $ref: /schemas/mtd/partitions/partition.yaml# + +properties: + compatible: + enum: + - binman,entry # generic binman entry + - u-boot # u-boot.bin from U-Boot project + - tfa-bl31 # bl31.bin or bl31.elf from TF-A project + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@100000 { + compatible = "u-boot"; + reg = <0x100000 0xf00000>; + align-size = <0x1000>; + align-end = <0x10000>; + }; + + partition@200000 { + compatible = "tfa-bl31"; + reg = <0x200000 0x100000>; + align = <0x4000>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 1aabf1c15bb3..66f5e09e2d70 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3576,6 +3576,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 Thu Mar 14 02:17:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1911958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zxGIic90; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=CzgBcHtL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (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 4Tw9zX5Xc3z1yX0 for ; Thu, 14 Mar 2024 13:18:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PN1BQYNLqvwI+LbCrt4oXl+MRyBuOI0ERIl1ITfZJnU=; b=zxGIic90yHB14U gmr4tXR9KirdrDCDf5nP4rlZm37elAhhDnvcPSmhwK+UDzWQ4nL3sasM+mtM2gNW2lHQLXYvXCaC3 JA37tTGknMPaTeteHrIitbPs0rXcS1/i/3JTzRD9nWNg3tBcVZB0dqsnEILNb6fqWZ43rTDBw8/Qo xHSe8UB7HWIkwtDTXf1Lk6RxHxDkuIsjma2eoSzNbvVjxbxtrt2fT0v6qZiOJGIj+lw63SSBS8biD 0a2e6dvcYtJQj6Wh6ShlbY8yvAyaj030dtN71CAXK0A3JTnxQX3ySf5vN8G04xu+xysmBC2KMPf2J F+KqMEW4qxda6Ssu72mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkag1-0000000CfBr-3ZIc; Thu, 14 Mar 2024 02:18:37 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkafy-0000000CfAw-2UJi for linux-mtd@lists.infradead.org; Thu, 14 Mar 2024 02:18:35 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-29c6a917a8dso451113a91.1 for ; Wed, 13 Mar 2024 19:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1710382713; x=1710987513; darn=lists.infradead.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=NMXxgYFB39c3JQb86pcYzX4ejK9UB61sydOSCe9B0SI=; b=CzgBcHtLpXUD9FyCL0Knlfax0JusXh1Du8RG5JdQA+ucbvVxvgbQzx+Wvj5UZjQ3ci qzma8SG7OboccGQgrtphtG3D5YF8rrpZwsmuqdfOiyRU+Z3E7z47/EZG+qFo/zNB7Wnh wU2NLeWc9DY88rXau1X8Y3J8iswmtqhzCiHZU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710382713; x=1710987513; 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=NMXxgYFB39c3JQb86pcYzX4ejK9UB61sydOSCe9B0SI=; b=UlVe42+Dw796ljQOha9KQhGR/cVnR0uzZWqf/S1pIata8/Ai6g3lU0mWXJBumlYHlI 43NEN2vRU2gMo//sq4diHRO8VxDoKGdc7RbNbG7xrWkudxvS2XMeZ7ZSGqN40T6BZ9Y2 rbYk7U3QZ4d58OFwr3tfDfeuEH+Q/+WVrf8Nm0grCmd6VBvPkMTHrT8x5TWXpnsqhGC5 6YC7FEZriowEZNNtMid4EFMRL8MSpdKI6izubjuyGIMqAUAtiu2Muh2+pItLozycBFN2 dcjGXa7ofwdtx4Q+NWlXAfdewbpVCX2a4xJj2I4istoopooRpVe+zEgrHK1Tt01W8odW MxJA== X-Forwarded-Encrypted: i=1; AJvYcCVUiuCC2LIg3kGizJFO1ytALNXoT9JBgXIuY8JEpxqox38As4pVA1lqdmUQdFrCoYQ4yzco0gY/L71IrhpoW8gAuJH0yRdgcGMDUdF1tA== X-Gm-Message-State: AOJu0YxdWkhiQ9g/lHEN7YcDMZaaIft/h3HUnYwSGXKCkyY9KjJomgy0 4cLCopzWZD6sqDmBvqgJrMk+z3jHc8/xJxUX2rbteUTPYClr8lORIskGWxwo8N/5r9SrfrCSQbw = X-Google-Smtp-Source: AGHT+IEC8GLkKGjjgaPvX0/xnlGwn3qQtPhlBt8R9T5fCKZBAWzvZ9Yc2/prutcWFyDk7dnjBytK6g== X-Received: by 2002:a17:90a:f288:b0:29a:caf9:de64 with SMTP id fs8-20020a17090af28800b0029acaf9de64mr414882pjb.40.1710382713471; Wed, 13 Mar 2024 19:18:33 -0700 (PDT) Received: from chromium.org ([118.149.82.233]) by smtp.gmail.com with ESMTPSA id o1-20020a17090aac0100b0029bc25f7181sm1993937pjq.54.2024.03.13.19.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 19:18:33 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: Miquel Raynal , Michael Walle , Rob Herring , linux-mtd@lists.infradead.org, Simon Glass , Conor Dooley , Krzysztof Kozlowski , =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= , Richard Weinberger , Rob Herring , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v7 2/2] dt-bindings: mtd: fixed-partitions: Add alignment properties Date: Thu, 14 Mar 2024 15:17:54 +1300 Message-Id: <20240314021754.84557-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314021754.84557-1-sjg@chromium.org> References: <20240314021754.84557-1-sjg@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240313_191834_686705_1BB603A3 X-CRM114-Status: GOOD ( 22.82 ) X-Spam-Score: -1.2 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add three properties for controlling alignment of partitions, aka 'entries' in fixed-partition. 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 Binman packaging process, but are also needed if the firmware is repacked, to ensure that alignment constraints are not violated. Therefore they are provided as [...] Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1030 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add three properties for controlling alignment of partitions, aka 'entries' in fixed-partition. 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 Binman 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 --- Changes in v7: - Drop patch 'Add binman compatible' - Put the alignment properties into the fixed-partition binding Changes in v6: - Correct schema-validation errors missed due to older dt-schema (enum fix and reg addition) Changes in v5: - Add value ranges - Consistently mention alignment must be power-of-2 - Mention that alignment refers to bytes Changes in v2: - Fix 'a' typo in commit message .../bindings/mtd/partitions/partition.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml index 1ebe9e2347ea..3df12df06116 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml @@ -57,6 +57,57 @@ properties: user space from type: boolean + align: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 0x80000000 + multipleOf: 2 + description: + This sets the alignment of the entry in bytes. + + 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 + must be a power of 2. If ‘align’ is not provided, no alignment is + performed. + + align-size: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 0x80000000 + multipleOf: 2 + description: + This sets the alignment of the entry size in bytes. It must be a power + of 2. + + 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 + minimum: 1 + maximum: 0x80000000 + multipleOf: 2 + description: + This sets the alignment (in bytes) of the end of an entry with respect + to the containing section. It must be a power of 2. + + 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. + if: not: required: [ reg ] @@ -67,3 +118,24 @@ then: # This is a generic file other binding inherit from and extend additionalProperties: true + +examples: + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@100000 { + compatible = "u-boot"; + reg = <0x100000 0xf00000>; + align-size = <0x1000>; + align-end = <0x10000>; + }; + + partition@200000 { + compatible = "tfa-bl31"; + reg = <0x200000 0x100000>; + align = <0x4000>; + }; + };