Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp351182rdb; Fri, 6 Oct 2023 05:39:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5kQ2u7M2ScQjbHVWd9xOqgjctB3S9yRBgv+epaLlFG401YLimcqlPtHJcB4BcVifJ7fZ2 X-Received: by 2002:a05:6e02:2143:b0:351:4b68:ec3b with SMTP id d3-20020a056e02214300b003514b68ec3bmr10198423ilv.10.1696595994179; Fri, 06 Oct 2023 05:39:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696595994; cv=none; d=google.com; s=arc-20160816; b=qZNYxrLcmnpaiwVsVmjYHW92y4U0FT8H0vMYnK2RXQqjb/i3uiAP2cA/1YtwpNVSf5 TGxUjQ+WIIBHEAZntY0HfCGIgxEEuavqkyKkhqq4tt3paw2n9LsSvv/8r9iNxWWcbGvw c5IqG+7rW+MXrXoow8MJzoQzpwtHooXUgKYHkrpDNcs+o90kBQLvp4gTmrts8AgJHXI+ fOP0tu7YLtbF351folC0w74MFvyw9Y2CSZWnb3PESmTwQgukZlT38X/sFnQ+dZFUlAge qZVXIZL9bx1SP+WwKUeVzk77DSWHFfY/CQO+IzofUcyDoflajjmDCzCYd7/x/BctU/zx dmsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zSVbwuMngsJ15cLY6pR9vh3z/k0osdSclV2xxkOB8v0=; fh=FF9xv0CUMMnOD86Z1AH6BKQzck15vECsuw3gpo5E7K0=; b=dW9XXrYXVTOqruC5b9oIUQaMdjhISwz0mE4tucVST92vW93oP9it0f6Qxp3F+6XcQC TkKpf7b/9XIowlfveOvSs//AXb8TmDcxlUAbbmAK274fdFd8tglj1o56a2sEN1bRtR7B xwQ/kNMP3yi7GwM8az5WAqcaxIkAgza2YT9jxJnOjvujU0UDyOgw6yKyuSVvUzQyugLB k0LGA54kCesDNgqcNTvUB3c7A0oagEZ4+eRb+uPKCP3m3uZTcYBn3OiR930BdEq8/Vpe VrjF0bLTTZAjsofAqA7yXpcUpmirjVKBM+FzramBUzkPR/it5Bqp+kAn8AvSW2HOyZng oB3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gJQofOvW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b0055c95e91f67si3370884pgv.155.2023.10.06.05.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 05:39:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gJQofOvW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 5792C80A1355; Fri, 6 Oct 2023 05:39:50 -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 S231891AbjJFMjj (ORCPT + 99 others); Fri, 6 Oct 2023 08:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbjJFMji (ORCPT ); Fri, 6 Oct 2023 08:39:38 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D316C2 for ; Fri, 6 Oct 2023 05:39:36 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9ada2e6e75fso385998366b.2 for ; Fri, 06 Oct 2023 05:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696595975; x=1697200775; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zSVbwuMngsJ15cLY6pR9vh3z/k0osdSclV2xxkOB8v0=; b=gJQofOvWKSI91TgYvaCG3Iw9Li6ENlejfD2PB5BVL31oJpbfNrpIfY8DSMu78Z0KWv t9jPtxhNIvRnNViPROZE7ekLYA7oEFYc6TFi+MGxibTiyctAGHAecyOMJfc/OACO5WHL hyqC9V27dU6aALCpyNhQ6600oSqsOfndJ7rBs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696595975; x=1697200775; h=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=zSVbwuMngsJ15cLY6pR9vh3z/k0osdSclV2xxkOB8v0=; b=hqjHhdFwpZ/KZNBNGe5IZt62ri/IRrjbGTuh3PcA8JUCyfyKxdw4CfivzjmG1Bqy9z PEOt1JTXN5mwaE8Jxk2OVgygZPTpa9+GiXexjZzycRxn5R7THDdfVNxFfmPZ9diBr2Ex KTgx/veUszi1GK8kc6DIqHmL4nz8NG1Dg+sdSnqGTG9M8cyfKFoV68RHCJp1o5CzimcI 1nZrsFhKdgZDvrUavBttUjn495YCLnZo0PrCTNWEQe5NOvJdAXcT7RZBNsfkEz6vMYgH e50yYKVBeXX6VXB0xHjFNSEnDqZiVbLovEpeNj+jpbuO9Cjd22ovEdOlvHS/YbR1c5mV xWYA== X-Gm-Message-State: AOJu0YzKZ2lwYxR9QWT+ELOUzYEWWDGbvsjKWkQqfJ1IfdWvjEiWov8j RyWA1jOzS81CszmWV/k9Rv9U5qu0gYA1iDhVPpLN6A== X-Received: by 2002:a17:906:5342:b0:9ad:ef08:1f32 with SMTP id j2-20020a170906534200b009adef081f32mr7684677ejo.37.1696595974780; Fri, 06 Oct 2023 05:39:34 -0700 (PDT) MIME-Version: 1.0 References: <20231004093620.2b1d6917@xps-13> <20231004113458.531124-1-mwalle@kernel.org> <9e588e3ec8c0c321a2861723d0d42b9a@kernel.org> <27d37d4c7cf353d99737a1e7a450f9f7@kernel.org> In-Reply-To: <27d37d4c7cf353d99737a1e7a450f9f7@kernel.org> From: Simon Glass Date: Fri, 6 Oct 2023 06:39:16 -0600 Message-ID: Subject: Re: [PATCH v2 1/3] dt-bindings: mtd: fixed-partitions: Add binman compatible To: Michael Walle 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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 05:39:50 -0700 (PDT) X-Spam-Level: ** Hi Michael, On Fri, 6 Oct 2023 at 02:37, Michael Walle wrote: > > 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. I thought Rob changed his mind on that? I agree that compatible would make things easier. We could then continue to use 'label' for whatever it currently has. Note that some kernel drivers or user space will want to look at what is there, e.g. to provide a way to extract, check or update a particular part of the firmware. > > > 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. Sure, but I was pointed to partitions as the place where this should live. > > > 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. OK I'll send a version that uses compatible strings and see if that makes any progress. Regards, Simon > > -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