Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp234475rdb; Fri, 6 Oct 2023 01:38:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTFsT0G5HKt0k5GugA0Jhk7VWDKjl1sIFwoDgdUamiawb4Cj62RHqlijZL7+9wrxvgU23S X-Received: by 2002:a05:6a20:9191:b0:152:4615:cb9d with SMTP id v17-20020a056a20919100b001524615cb9dmr5924844pzd.12.1696581480181; Fri, 06 Oct 2023 01:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696581480; cv=none; d=google.com; s=arc-20160816; b=IKA/WcerzPKo1T2h613Ylz7a7MIH0m3+PXt7luuXbLEjckRPYGWEWR9QhS+npZSIoO Qzif1UnS7OI2M+S5Rj9Qz52Uy6bREjIyQErDz1kzSL74EzfSo0fK9yLpLazOz0hRKh6L PpY2u56qeIWCNIwBb/1oSnUUWj8w//JN2mlRjtgsH+U4UUdKKk3z8rL3Jj8SFXk6IqjF xT/SGjpcXmddtSow303V5Vg255eooby1SLz7JEnHkkA6F9wBEFEabb9NCMKEwl0AYdv7 GTmWs4cFalgRsg6P9hix3svhDypWjC65+MEvXFtHEugQ11UjU1xyL0bLsP/NZ/l2uSrM gMZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=lVtHS9NY83IPc0rtawL47m+GEkIG66wA1klqWCikVyw=; fh=MIrssD8jS1pE2mhYjdPf8t4cXprX6mpXu+KwD+BqtZE=; b=hL/Uc3BEkL7kdWQLmgcZjxLZx9hVn/Ng/ThRvGMaWasg85aI8EvvjggkPtQ5+HNkDO CiQu+6GlXbufvQ+LW8I5NV7OV23ExKAUQAiYYwaybPiDfv4LBsre0eVdnJ5D9PP2pTAo WOL1SDk3bPNSTs2IAG7/oDtkfZwBIZ74A0wCf5/4XYVztfJFsgDpFr/acLVDKu4y7mFx wvY54n+h78Ts3mrekF4FO0RApKw9vX3iujUJ8Ds6FSP1tmbuN4W9pnDOn9y8jas54lJ6 Y35si3oSUrQS+L18XY0t4UFXISQZu3omavVS2/eBV+yxmkBbLHtN5giRJYtgRljZv+0F ESmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iH3wJagT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id z126-20020a633384000000b0057767db4334si3087935pgz.218.2023.10.06.01.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 01:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iH3wJagT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A8D418095F75; Fri, 6 Oct 2023 01:37:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbjJFIhu (ORCPT + 99 others); Fri, 6 Oct 2023 04:37:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbjJFIhs (ORCPT ); Fri, 6 Oct 2023 04:37:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD51393 for ; Fri, 6 Oct 2023 01:37:47 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23CC7C433C7; Fri, 6 Oct 2023 08:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696581467; bh=FgJYm01/N7btQ6Qz+G8RgkTRmDSNcZ+Y3gfxNpLK3Tg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iH3wJagTAe22K+Ho9b7VGPb4l4lwixmsS4OrGinVrtNjm56X8TWlcag3S4Pe0akve GMwvi2ADg93Sb0+A/dIQFcv+QWfjRof7It7afH70n+Zc/SHU1tNrI8cv4O0YPv/S5Y vfBrwcAP5o2I7/khzmM5esD2aO+XNle5mqK0pUMIRf+SGmzDAOaPpS8Al/gmwrbsB8 LNJVySamIQ6vTUofquyw5J+5/NzthSkN0pXcO0zTj3QY1SMC3Xom7VwBa2rWa2uFN2 QBLgX31TpeS0lfMQ116AnrP4EKQ3wHQqMVZq+YCz5kpLXJLsze3Rqin2tnaPlq8BEr QcqJ5gPkLtD/A== MIME-Version: 1.0 Date: Fri, 06 Oct 2023 10:37:41 +0200 From: Michael Walle To: Simon Glass Cc: miquel.raynal@bootlin.com, conor+dt@kernel.org, devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, ptyadav@amazon.de, rafal@milecki.pl, richard@nod.at, robh+dt@kernel.org, robh@kernel.org, trini@konsulko.com, u-boot@lists.denx.de, vigneshr@ti.com Subject: Re: [PATCH v2 1/3] dt-bindings: mtd: fixed-partitions: Add binman compatible In-Reply-To: References: <20231004093620.2b1d6917@xps-13> <20231004113458.531124-1-mwalle@kernel.org> <9e588e3ec8c0c321a2861723d0d42b9a@kernel.org> Message-ID: <27d37d4c7cf353d99737a1e7a450f9f7@kernel.org> X-Sender: mwalle@kernel.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 06 Oct 2023 01:37:57 -0700 (PDT) Hi, >> I'm still not sure why that compatible is needed. Also I'd need to >> change >> the label which might break user space apps looking for that specific >> name. >> >> Also, our board might have u-boot/spl or u-boot/spl/bl31/bl32, right >> now >> that's something which depends on an u-boot configuration variable, >> which >> then enables or disables binman nodes in the -u-boot.dtsi. So in linux >> we only have that "bootloader" partition, but there might be either >> u-boot+spl or u-boot+spl+bl31+bl32. >> >> Honestly, I'm really not sure this should go into a device tree. > > I think we might be getting a bit ahead of ourselves here. I thought > that the decision was that the label should indicate the contents. > If you have multiple things in a partition then it would become a > 'section' in Binman's terminology. Either the label programmatically > describes what is inside or it doesn't. We can't have it both ways. > What do you suggest? As Rob pointed out earlier, it's just a user-facing string. I'm a bit reluctant to use it programatically. Taking my example again, the string "bootloader" is sufficient for a user. He doesn't care if it's u-boot with spl or u-boot with tfa, or even coreboot. It just says, "in this partition is the bootloader". If you have an "bootloader" image you can flash it there. If it has a label "u-boot" and I want to switch to coreboot, will it have to change to "coreboot"? I really don't think this is practical, you are really putting software configuration into the device tree. > At present it seems you have the image described in two places - one > is the binman node and the other is the partitions node. I would like > to unify these. And I'm not sure that will work for all the corner cases :/ If you keep the binman section seperate from the flash partition definition you don't have any of these problems, although there is some redundancy: - you only have compatible = "binman", "fixed-partition", no further compatibles are required - you don't have any conflicts with the current partition descriptions - you could even use the labels, because binman is the (only?) user But of course you need to find a place where to put your node. > What does user space do with the partition labels? I'm not sure. Also I'm not sure if it really matters, I just wanted to point out, that you'll force users to change it. -michael >> >> What if a board uses eMMC to store the firmware binaries? Will that >> >> then >> >> be a subnode to the eMMC device? >> > >> > I thought there was a way to link the partition nodes and the device >> > using a property, without having the partition info as a subnode of >> > the device. But I may have imagined it as I cannot find it now. So >> > yes, it will be a subnode of the eMMC device. >> >> Not sure if that will fly. > > I can't find it anyway. There is somelike like that in > simple-framebuffer with the 'display' property. > > Regards, > SImon