Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3010319rdb; Fri, 22 Sep 2023 15:21:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEPOMIVDD58a6Drx9zbn3S+QWhWdGBkGwFu8siKRH+stWc7NmineQujvjGnHnwrTRIMkebE X-Received: by 2002:a05:6a00:179a:b0:690:d620:7801 with SMTP id s26-20020a056a00179a00b00690d6207801mr758415pfg.11.1695421306514; Fri, 22 Sep 2023 15:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695421306; cv=none; d=google.com; s=arc-20160816; b=Zcg5RjNLeu14JVk4XkTdntvRV+Jvm6cSDz03zO/guv8buzYa2WODqQb17bp3Ge/OoT M/Gi/URC5tnboCzhqV2KgtFCZtyFpYWS7oKVTVZAHIlrnM+/QfdesJcN4igQS1Dlzui7 xVPdYHF62Vw5ktcqC6FV75tFlibhe+DnAYz67fLeyusSBFNPkBMTXnSTeeDJGgj4RziZ UWQVTCMrxk0OLx8dsk1RXXZ4QoQWvGnM3Nea+mEhbP09lhgLKS6BfXyObgaZf5pEm+01 YJPSoXgE2gqvCkKj1L+FnyuGzQO+EYAapexxSBNbPMQNwWuuBHG+5JtGv+2nhAoM97j+ vAuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EKwr2XjhB87XY1eJcNFIWSnRqkfq4gGTTTV7rcfgoQg=; fh=45Whl7lPTefq0oFaGyz9A5JaF9AMZXCL9LfS9b+/aVU=; b=xo+ie6i6G8bkpOg/DoIZE/WjLEpXRg4+jwxXnS/LwvtB6PIH3cBYsS6ruD/IWovsuW 0ug9q3BabN7iGWppmcZT6MyFUMtOk78nAG5JWwJQK1TelOn4yz86V6DOTAsDbqUPjxED eAw5uAqZ61vul3pBEQ7gdgpLyGdhAc41TXw5kRM3x38KmmidvtZT820zwKleBPU3KQGL a/pnn7myGATPhQJc1OO2GJ32DKNRy+/eKzff7KkUEqFjeps+GNincKCjKBq1eHEm5XkO opojyFCps7/PQDEb3rnDianI8tneA21rNDzeyf+PGjO22m5cV7VvpFtC1Swjpn1e7dPy u4CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LpsF6LYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h2-20020a056a00230200b0068e390d86b4si4998828pfh.133.2023.09.22.15.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 15:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LpsF6LYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id D1E8A839F063; Fri, 22 Sep 2023 11:13:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbjIVSMu (ORCPT + 99 others); Fri, 22 Sep 2023 14:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjIVSMt (ORCPT ); Fri, 22 Sep 2023 14:12:49 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 394E2C2 for ; Fri, 22 Sep 2023 11:12:33 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-530a6cbbb47so3097072a12.0 for ; Fri, 22 Sep 2023 11:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695406351; x=1696011151; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EKwr2XjhB87XY1eJcNFIWSnRqkfq4gGTTTV7rcfgoQg=; b=LpsF6LYmtOp2WOyI/N+C7UpruCLsKErGUCoYr/byu2GVQFTvkWa12O87SzGWUdrriv E1dDBCZZmi53zQ8onyp3z8F64JeIyM4ZuFxr5twJ533R7qfT0NjOytWq9xBxsdkrrSzH rdK+6w9AKDCyEojuX6muvRmArZB/wZJSRKTGw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695406351; x=1696011151; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EKwr2XjhB87XY1eJcNFIWSnRqkfq4gGTTTV7rcfgoQg=; b=eUHjQ9aBtDAXSkemBlDeuqayruzGUTQmiWpztEinigvf/jSPzgtmlqxq9iv8SIEDtE +BfSibzvnyfOuyYsJ4F4U3NmoRMjUx3GFKZ0+MtPDh4qG/D8uH345rTHu5W7zDUH5e2k P0DibOx4+sR6wv0r5LY9VBlLqsG8B/8Te5Ub7FZ+lXQP0NAjCOmqw2QEnXtPC3z/7ncm Gk0fvdnmlxbV0ConaYvd1YfHXCwUqXbdljq4JwGhxfGlcE4EDQL8niE5SoBcVFy+Gdi6 rfeivdxs5SHyI72nun2kkPD+cddoCKg4l+gd9/lDl1ISTU/bJ4IgjtoyQ+3p4bXbMhTq mCXA== X-Gm-Message-State: AOJu0YzHh2MeR9TXlZxIJQR6ggn4gF1HiWQEGSFwCYtsftLIqH5/YG3w /z1oNIxoCCbHQvG+qZ1gyPJQ0fO516X/9Dyk4daDFQ== X-Received: by 2002:aa7:dc17:0:b0:533:926:da9d with SMTP id b23-20020aa7dc17000000b005330926da9dmr220253edu.18.1695406351489; Fri, 22 Sep 2023 11:12:31 -0700 (PDT) MIME-Version: 1.0 References: <20230921124459.1.I91ddcfacf9b234af5cc3eabea4b62edb31153317@changeid> <20230922174649.GA3320366-robh@kernel.org> In-Reply-To: <20230922174649.GA3320366-robh@kernel.org> From: Simon Glass Date: Fri, 22 Sep 2023 12:12:20 -0600 Message-ID: Subject: Re: [PATCH] dt-bindings: mtd: Add a schema for binman To: Rob Herring Cc: devicetree@vger.kernel.org, U-Boot Mailing List , linux-mtd@lists.infradead.org, Tom Rini , Conor Dooley , Dhruva Gole , Krzysztof Kozlowski , Miquel Raynal , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 11:13:47 -0700 (PDT) Hi Rob, On Fri, 22 Sept 2023 at 11:46, Rob Herring wrote: > > On Fri, Sep 22, 2023 at 11:01:18AM -0600, Simon Glass wrote: > > Hi Rob, > > > > On Fri, 22 Sept 2023 at 10:00, Rob Herring wrote: > > > > > > On Thu, Sep 21, 2023 at 1:45=E2=80=AFPM Simon Glass wrote: > > > > > > > > Binman[1] is a tool for creating firmware images. It allows you to > > > > combine various binaries and place them in an output file. > > > > > > > > Binman uses a DT schema to describe an image, in enough detail that > > > > it can be automatically built from component parts, disassembled, > > > > replaced, listed, etc. > > > > > > > > Images are typically stored in flash, which is why this binding is > > > > targeted at mtd. Previous discussion is at [2] [3]. > > > > > > > > [1] https://u-boot.readthedocs.io/en/stable/develop/package/binman.= html > > > > [2] https://lore.kernel.org/u-boot/20230821180220.2724080-3-sjg@chr= omium.org/ > > > > [3] https://www.spinics.net/lists/devicetree/msg626149.html > > > > > > You missed: > > > > > > https://github.com/devicetree-org/dt-schema/pull/110 > > > > > > where I said: We certainly shouldn't duplicate the existing partition= s > > > bindings. What's missing from them (I assume we're mostly talking > > > about "fixed-partitions" which has been around forever I think (befor= e > > > me))? > > > > > > To repeat, unless there is some reason binman partitions conflict wit= h > > > fixed-partitions, you need to start there and extend it. From what's > > > posted here, it neither conflicts nor needs extending. > > > > I think at this point I am just hopelessly confused. Have you taken a > > look at the binman schema? [1] > > Why do I need to? That's used for some tool and has nothing to do with a > device's DTB. However, I thought somewhere in this discussion you showed > it under a flash device node. Yes, that is the intent (under a flash node). > Then I care because then it overlaps with > what we already have for partitions. If I misunderstood that, then just > put your schema with your tool. Only users of the tool should care about > the tool's schema. OK. I believe that binman will fit into both camps, since its input is not necessarily fully formed. E.g. if you don't specify the offset of an entry, then it will be packed automatically. But the output is fully formed, in that Binman now knows the offset so can write it to the DT. > > > > > I saw this file, which seems to extend a partition. > > > > Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partition= s.yaml > > IIRC, that's a different type where partition locations are stored in > the flash, so we don't need location and size in DT. OK. > > > > > I was assuming that I should create a top-level compatible =3D "binman" > > node, with subnodes like compatible =3D "binman,bl31-atf", for example. > > I should use the compatible string to indicate the contents, right? > > Yes for subnodes, and we already have some somewhat standard ones for > "u-boot" and "u-boot-env". Though historically, "label" was used. Binman has common properties for all entries, including "compress" which sets the compression algorithm. So perhaps I should start by defining a new binman,bl31-atf which has common properties from an "binman,entry" definition? > > Top-level, meaning the root of the DT? That sound like just something > for the tool, so I don't care, but it doesn't belong in the DTB. Sorry, I mean 'top-level' with respect to the partitions. > > > > > Re extending, what is the minimum I can do? Are you looking for > > something like a "compress" property that indicates that the entry is > > compressed? > > > > I'm really just a bit lost. > > Me too. Regards, Simon