From patchwork Fri Apr 12 15:32:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1923207 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@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=RIJh/CH+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4VGMPx0Y1fz1yYL for ; Sat, 13 Apr 2024 02:26:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA90B88204; Fri, 12 Apr 2024 18:25:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="RIJh/CH+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A90F7881A8; Fri, 12 Apr 2024 17:32:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2805488020 for ; Fri, 12 Apr 2024 17:32:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7d644c91834so42233739f.1 for ; Fri, 12 Apr 2024 08:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712935974; x=1713540774; darn=lists.denx.de; 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=mVk91NoB1mb4Ya4VZgNI4Mqy/+sMIdBT8JrdncMceds=; b=RIJh/CH+4SpDe9Rtea4VeMiKTSG8SynO37XHZOIDCvEy5apz9TiaoCJFJxtaAMmnET J5u8WqOIaUJgiOwExm7pSD+fwQ5V6I/CbVxdESF6VeAhQJNl5bi5Z00iOYI6cnW+VpSa tklIqqIDMDeQDpj02lSb3sGWHbQeMB8QZiJIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712935974; x=1713540774; 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=mVk91NoB1mb4Ya4VZgNI4Mqy/+sMIdBT8JrdncMceds=; b=pq7ADoO3o3kiRvDMZsbLlYmRUc8wSWp8b/dK7/ttYoucDamYQQXSl1Afyf2/ghJovj 8RmLNhazsHPSBcCM/3VYTILa+WrUForkV775axPxQZhwshtr1FlfMSMwT/zsvPAsEtzA GocAqbL/V++SQJ0tdXgRPcr3JcfbNOtIh+uHKD90uLx1DLqvzk6L7L54BZ5ax7jNkDwm sUyFpOVjIUu1bnb2pVMUMQZKsNhpued1bkPLfsSIe5RiKlzk6/xmK2U2dE5ZUuYXJsUQ JIXuzDGDNF3Cg5mdAsNPTLdQLn4Hpf98GR9plh59xIBuhRN48RVYSobP4NQa5K9gUxvw aiAA== X-Gm-Message-State: AOJu0YxGskGd388Hy/4y2UBCtCTtfSb965nGQANPQPuMisrd9mJAgCqg 0qPnxh+hVkdoL8mKllomoz519XXXxal4yIRSqZ49ztyRNs9LWjwPPtT2vPhtXQ== X-Google-Smtp-Source: AGHT+IGkiz6PwnIU+zNzBRMsgrX6Di+Gl2zPGrx8z9DynYpgkn7YBpjO4V9dGup0bH7vtQLmpvwvBw== X-Received: by 2002:a05:6602:3d6:b0:7d5:f3d4:201c with SMTP id g22-20020a05660203d600b007d5f3d4201cmr3209346iov.21.1712935973913; Fri, 12 Apr 2024 08:32:53 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id ik14-20020a0566026c0e00b007d65a95d95csm1093828iob.42.2024.04.12.08.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 08:32:53 -0700 (PDT) From: Simon Glass To: devicetree@vger.kernel.org Cc: U-Boot Mailing List , Michael Walle , Tom Rini , linux-mtd@lists.infradead.org, Miquel Raynal , Rob Herring , Simon Glass , Conor Dooley , Krzysztof Kozlowski , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: [PATCH v11 2/2] dt-bindings: mtd: fixed-partition: Add binman compatibles Date: Fri, 12 Apr 2024 09:32:49 -0600 Message-Id: <20240412153249.100787-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240412153249.100787-1-sjg@chromium.org> References: <20240412153249.100787-1-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 12 Apr 2024 18:25:40 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Rob Herring --- (no changes since v10) Changes in v10: - Drop binman,entry since it is likely not necessary - Put the description back Changes in v8: - Switch the patch ordering so the partition change comes first 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 | 53 +++++++++++++++++++ .../bindings/mtd/partitions/partition.yaml | 21 ++++++++ MAINTAINERS | 5 ++ 3 files changed, 79 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..bb4b08546184 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml @@ -0,0 +1,53 @@ +# 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: | + This corresponds to a binman 'entry'. It is a single partition which holds + data of a defined type. + + Binman uses the type to indicate what data file / type to place in the + partition. There are quite a number of binman-specific entry types, such as + section, fill and files, to be added later. + +maintainers: + - Simon Glass + +allOf: + - $ref: /schemas/mtd/partitions/partition.yaml# + +properties: + compatible: + enum: + - 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/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml index 31bbeb161396..80d0452a2a33 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml @@ -118,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>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index b1b074ce2cf3..b1a4ca692578 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3684,6 +3684,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: Rasmus Villemoes