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: 145800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3123282vqu; Thu, 28 Sep 2023 00:06:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZwMiY80bflY34wJT7Rts/Nt/dySoMANuDvxkqf1Qj15H48i5ZQUm79kcU1wyxpsC7CzEz X-Received: by 2002:a05:6358:6f9e:b0:143:1063:d1f4 with SMTP id s30-20020a0563586f9e00b001431063d1f4mr284344rwn.13.1695884778454; Thu, 28 Sep 2023 00:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695884778; cv=none; d=google.com; s=arc-20160816; b=iSYFpk33DP+Y7XW11myjmaZJQx/o7ph5N21GwYqgnB3egwNgH3nEozVLYMhIodniWE ao62jmMHJF4SqY0XMsB0+R1OmCA1JBXn5m1ojOPa0QgNXSPklEOMGU/NF9QS17NodSKJ bx7qB4dHYkQYWefVeOEEByBsyM9TtPv6yFTeJ6gzlYTvvaQ+6tAZBPF9sjOugzTKME/0 ZpR+m+NXU/HAKpSKFtF9VYcI7UHZo40iZguVkUkCy0+jHQZSAwuHERRKuwmKI/DZeRMe 7h1zRZvTp8pH3vduaJySE2uVnZWs/YvOEPM50nn37mGb1JvieRminif4hT4HNRiVNwr0 2sGA== 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=IIjs+rwErzRuI8OpZgfCnKlE1NGemok/NR/4pjhGmqU=; fh=kINqmPZpvP8PQ+TKNJVeF/MUBhzh40DYTsdZg8LHqCc=; b=0Kgk+RUaw1vI5HJPmqWWJhfov7O+g+uA5y/hUyCf58Kn3gsC05X5ODuyq4kWmXCjHn m1Em8Aws6BzSFmNTV4+zxO2BUoW0BfaU3HEyJXjEXNZtQit4+iRYDFyC+puxzI5JG2Wh 10HGFByO2cGTap/a8UPtARjdZnniGDv1SjycuYIONIkly0nno4s5FRNHFKYCjG+KWOit Tx83n1VZPQ77gLkUCJVNE6xBIhESB35rSWChK5KZGeQj6G8hrVUwKMZaRJ70qLKmWGAm 9jO2dXdvqGc7RPtbuTczLmkiWmF5Ucxe40YqcJjZITsxK3nI/NkrRlV9MyYlNdPeDK10 sF5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Y/iVW9V7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s30-20020a63925e000000b00578cbee11e2si18232425pgn.642.2023.09.28.00.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 00:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Y/iVW9V7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 129BB809A819; Wed, 27 Sep 2023 13:21:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbjI0UVM (ORCPT + 20 others); Wed, 27 Sep 2023 16:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjI0UVK (ORCPT ); Wed, 27 Sep 2023 16:21:10 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9615A10E for ; Wed, 27 Sep 2023 13:21:08 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-79fe6da0049so127134339f.1 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=XHnhCitIduwhdFW32Eo83NF8gp0nYjVMMKw67spEvG42gAtOYiMbLuESbEhkuN+lCL RKRyKRIqS8dVV9HB6QUpvb781QwSO7p7TBhrLbSYnTMJE48J8plVj/9ggSSV8xd7VWFb TCD9qyQC3gW/QNLe0OpY8QyPV+Tie4gEdnd31vkbaimdk+uWbImNSaZnNBni4LSew3d1 PjkQQEl/dMWX39sPM7Mz9tvF04CIjJ7YpKRSpJaLgaeaXVEGjO8W0CXnbxHbYjJt7Sgw kq4kD1QRqssvmu32G6l+GqFR7TTsLOsyCBh1G8vdrptnhY31wViYkQrjsY8Dw7KkzPTg Irkw== X-Gm-Message-State: AOJu0YyZjwPyTshSVz99S29EudeLfcr+1jnWOvHUARSSuuUXDkiagXUQ c7zQ5TeFSXqqFvzdARXWlU6Lrg== 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 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 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 (howler.vger.email [0.0.0.0]); Wed, 27 Sep 2023 13:21:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778264077004952312 X-GMAIL-MSGID: 1778264077004952312 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: 145613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2926742vqu; Wed, 27 Sep 2023 15:06:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHN+47d6c/OasVHh2R2uCuxnqRzIhAf65EqeVkDhOdKQ74tawkm+/zx9/Qewd6iJFBHzTiy X-Received: by 2002:a05:6871:689:b0:1b0:408a:1d14 with SMTP id l9-20020a056871068900b001b0408a1d14mr3827380oao.44.1695852413267; Wed, 27 Sep 2023 15:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695852413; cv=none; d=google.com; s=arc-20160816; b=hoO0Jm1jER7nwxWjtEg6S/Zd0SLX1N282fTnLe7z2TyA8or2iB4ijGCDCusROF22ay MMuRX2MKITLb8Lfy+HEQE5mY/MeRkmAEk20mb5YB8IOf7KfCukUzbQCWMP0z/1ugrXPg 3A5LSZNpHpBzb6dy8javcSNRarYgFFIZNsDoFQE0vCdyXAcJCJ5B7RcID5YSsXo/Iopw j50CTv5ezyp/fXASqH2ZXn3BYhL11R5UOLbzkiml/Dv7GLZgDC+Nln4R7NewG2ptjNjC 3+6b5uTWQTQfEPKEx66bEC4EOHHVGu3rbImCbd8YJXj0jHwYBYK0PqsXVosvbZ3QvmKx QsOw== 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=1kq9WoSgqEviF42jhwFTI980vH31ePAvDcikVyQPxtc=; fh=YNbY7hirlEqbuzE6BAFKYb5HbQhO8eCJw1uEp6+i2Ds=; b=JAXL3zNXervqEPE7+qlr4zbqeGXK7axHe2D30+5QZwGpfvS9LBFV3O2xxqQYRhXi0a AdvB0RWLDz9nL6r1sBc4igC67sQ9YjKvuVlcRScVsm6Qfdb2OUk/nicWZfIdU4yslex0 YZQ1KEqHobWEKvnlcVVge7kxkQ6qBeECiuZ28ibvGkEtL0dE2ti1glrGe9KlaxrUE67n eQNkPPMXc+KIALX7DUFzoySsBmwB5l3AadbuPVLgJEgH1w+8GpeGjtVx1f+klUiLiuLc xvEaRjgMVyA8cumSZn0taSOSoYmlGOxr/HWx8DFGRvfWt40Sf4Zdm184KLQ3N/dL2oeW c2VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=f8G63bW0; 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 m19-20020a637113000000b00584e731e7fbsi4870399pgc.280.2023.09.27.15.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 15:06:53 -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=f8G63bW0; 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 8C77282224FB; Wed, 27 Sep 2023 13:21:19 -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 S229796AbjI0UVO (ORCPT + 20 others); Wed, 27 Sep 2023 16:21:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjI0UVL (ORCPT ); Wed, 27 Sep 2023 16:21:11 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5469C10E for ; Wed, 27 Sep 2023 13:21:10 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-79fa416b7ffso367363139f.2 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=1695846069; x=1696450869; 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=f8G63bW0U7k/6Ocv1LYU381gT0auO5VWNBu+Q78y1TcTXuaT7TS+5kRzrKlWDr5TOs Hs98Gr0iD2V9OOjmsSOc9zqlfTNVNQ1jMyHCL4Bt7P3m1WhByHNEFV4+1yF2Ovy8t0Cz +iZDNiZUi3Ibm7jrS7Ny2ND7aaxEOgNxNJTDk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695846069; x=1696450869; 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=av/pqw2CgAiXs3s7Sg/jqp39k4SA1OegPm6Cqy1RV7rb2zZbD98xCCLxWq7gh4dW20 QP9xNysvHEvJ4aXq8rHdqsGnimsy978M//dU6lTgPoCzzg+jm2xh80/ZLwHYVrLYR9UF r/frPcOEf8WR9axTy3UjVB12kQxc5GXDwHBOHHrOntGB306aYGnLwLg+zWKWbVLd4Z4j WDfb9DBFK4yYG+7si9VOzfMXMW/ZGPTg6Vm90w6cKGq5Qdm0hHpCaRqLEOnVkOAskcGK OsJINbZ33DrqcLQMyN4BXX67a9qDprHIiRWSm5viysY9HRDqCbgGnrQcr8mNUPEAiLyE HMqg== X-Gm-Message-State: AOJu0Yxac4Hlaxnc2nYg1DkWrCvnAqd+ePXsCrljfl7xVPnFvK1I9ufv HvAs5mp//4WLmObUSOX/WZa/Jg== 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> 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]); Wed, 27 Sep 2023 13:21:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778230139784651484 X-GMAIL-MSGID: 1778230139784651484 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: 145648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2986430vqu; Wed, 27 Sep 2023 17:30:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDYw+dsumJAo61+iWBBRxJp0ObVmNEvrVRlYUNqD2/XS7+rt4RXqDn1qcJnf5WG5AZhwD4 X-Received: by 2002:a9d:4d86:0:b0:6c4:bf61:7f21 with SMTP id u6-20020a9d4d86000000b006c4bf617f21mr3520417otk.3.1695861031534; Wed, 27 Sep 2023 17:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695861031; cv=none; d=google.com; s=arc-20160816; b=QiKXxJ+xG17w/CyqPfCQhb7OrU6fYTGoROzeGRFN+fuCFma0qwv+65l0CJcX9W62aW f7Zd+43oSDmxd8kWBhjVcVtx3tTMb584v29vGoJbQRrtRmo1sjwghqzHvcDyUwF0fl08 o+m7WafemZcRjO/SS1L52UL/H7kmbWC1jX88i6Pd/hkDVw+AHwhDjxZYultYsIZDAENg A7Cwc/x9aCui4yxzTHICrCUaZnd5gQd/FiHzcI+6avL/U/++p4jEtguE3Ngh3QCEvOAa CkKQ4Uvr1ox2GyiVhGFDqdKWO3GkFhgoZpSIpTlQNHwLi2oBNu9vG3LrpmfM+SWLpZ3x kXIQ== 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=t/WPzSaDS9c+jiadSigu8kAq3wHnfTKelNMfiF3LTzM=; fh=YNbY7hirlEqbuzE6BAFKYb5HbQhO8eCJw1uEp6+i2Ds=; b=ha8kF4NXJS3i7xKRy7pBxfrz5k9sxauixFlyQJUBSyNcFv6Y7DnFXMFDZPRjrgPpSO coSQGJFbU9BEptO7tChkIBKAQuNHUyH/8onXrGT+673Z0dy+XNbv+ahXDldt/e/oZamt eNCLvd69kd8W4u6TecPDU6rT8bZ6DcKC8+qou+7pkYfYNEXaVevdgHc+UOVIo1fC2QOh ll6HFaMciN7dlZewrsAfHE30H2RSKtbSLXZES/u52E1oWny6TkSz8GCHGoK8Kvjj+zeF KfnTMbvOkvVIENzNQthDBVPSLItGHPcc0LQ4IDbEI84KPg8YH68OnyJRXVHykefNXnBU doNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NFPIdVfV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id f20-20020a63f114000000b00565db2812a0si17637096pgi.60.2023.09.27.17.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 17:30:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NFPIdVfV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id C226581C5262; Wed, 27 Sep 2023 13:21:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229753AbjI0UVR (ORCPT + 20 others); Wed, 27 Sep 2023 16:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjI0UVM (ORCPT ); Wed, 27 Sep 2023 16:21:12 -0400 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6181E10A for ; Wed, 27 Sep 2023 13:21:11 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-35135f69de2so25519225ab.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=mq8h/k4y7IzsYN2l7VwO4Ba2kr74ErOsBX1m+I5Tgf9+hf+2JPzMHDjPS7KpudBr4F tHKtO5rTNrXCOE4qVVx70m8gwn8l8h3qHu7aCkoAVuhvQ1y3qJOv0yX21Yfw+qUDSsD6 f7pCdo96ecKi7k0Tnc6zeSRPLM9LZjOWlp4989GbytmzdDF0ISHyR/+9pGflm20ZOWc8 ChYDR+4IOwa5qSyyXyVI4WE+90NqcxhjgrBDmeGqLc99K3HzSg2JHElvwhKYazC7TDK+ ZI78YpSXv6ashXRZiz/7x8h3lcvGcyPAL4sHJFq3LU/eIueEfhHHfs+vl0T6M6Q0U7y9 P5YA== X-Gm-Message-State: AOJu0YyY06p3uld/7sctiygp8CtYY4z2xgbtPhUf7ji1nMzqcCRVWgVa YXxktRFydOKXA2r01bcsRH3HFhANyTj//r4/Ns0= 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> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 13:21:33 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778239177389742248 X-GMAIL-MSGID: 1778239177389742248 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>; }; };