From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95EECC7EE25 for ; Fri, 9 Jun 2023 07:43:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6CAD9860CF; Fri, 9 Jun 2023 09:42:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="jUzqBF7t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AFBAD8470B; Fri, 9 Jun 2023 09:42:56 +0200 (CEST) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 CADC68470B for ; Fri, 9 Jun 2023 09:42:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f70fc4682aso10357225e9.1 for ; Fri, 09 Jun 2023 00:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686296573; x=1688888573; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rFG9j05UOgF16iXBGVSmzTFrN5mHxiFyc5GU4BRIET4=; b=jUzqBF7thEj3e1XkFpWSRM92xik5WYmvfa95K+49qUUp+epwLaLq4Ff9gL3pMQBxyG 8uU0FuXzRxt6y7NEQU9n6OgSuLoGcspzfWiRz6pzASYkwnQhnKzFUlJIF/I3UuDRQQZA SFsWrlV5UWb8e3Kb37wd8tGvEg7nXVf1fqTVlojnINaVDXAB5Uc5BGN/ed9CfBMnBwwS qYw2JMp2zMT6hUlugUvyBzWXPfd9zy9VzygAKHJ50c5r2uhe/qaiXPKwwVtwSSBukM9J i1vUTM3/gHPevAHmBOFG0T6SzSsJkERlFMo8HB4tCt2y9mMVrfLBST8hiKm5+AncdEX4 +agg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686296573; x=1688888573; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rFG9j05UOgF16iXBGVSmzTFrN5mHxiFyc5GU4BRIET4=; b=cS69gfPNDsDsv/SuJzoP0oMB8oDzEIoYLXQp5SiLF+PcazxW6fsMb6KnS69fO9iBaO JJ2RWvijatPZsgQqAzihIvWbnS5T47MTyNxgfT2V9Zlx6PuDnt1XdIzls87nRrZ3VUvS J75m49LUdWhMVMlJJLuCzAh9O65Dynck6ZM8mFm5C9v8okQrjTx0DitXuBNXoFWjmipI 5B0YVFzriU7wfK5CexiU515aEdp0axy1iRDl78tN7dKr0Y9LVEEDwD8NbmODOr5aNtfx gwRxLplkpTEb+L/LA7ooeaiZJO7YrJftN+4Jn0S1NeSsigHBYwDD8qKWy0988ep7xKsZ J7tQ== X-Gm-Message-State: AC+VfDzsrcm6WLMeX4Wynh3Dhy2qBjNAS8j44fPynHioFtjKVqLmbIbr 9faLlO7ve089Bdzl5oD+HcaLcQ== X-Google-Smtp-Source: ACHHUZ7dhhKNO+fjy2zyJ83dvMUM2LqDmzfNPjfjKkMVSnO4T8cj3HcibKA6gqVWZoZZJAlAydEBSg== X-Received: by 2002:a5d:4fc2:0:b0:306:37ac:ef8e with SMTP id h2-20020a5d4fc2000000b0030637acef8emr254452wrw.56.1686296573139; Fri, 09 Jun 2023 00:42:53 -0700 (PDT) Received: from hades (ppp089210114029.access.hol.gr. [89.210.114.29]) by smtp.gmail.com with ESMTPSA id a4-20020adffac4000000b00307c46f4f08sm3674289wrs.79.2023.06.09.00.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 00:42:52 -0700 (PDT) Date: Fri, 9 Jun 2023 10:42:50 +0300 From: Ilias Apalodimas To: jassisinghbrar@gmail.com Cc: u-boot@lists.denx.de, sughosh.ganu@linaro.org, etienne.carriere@linaro.org, trini@konsulko.com, sjg@chromium.org, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, Jassi Brar Subject: Re: [PATCH v6 1/7] dt/bindings: fwu-mdata-mtd: drop changes outside FWU Message-ID: References: <20230306231747.1888513-1-jassisinghbrar@gmail.com> <20230306231814.1888547-1-jassisinghbrar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230306231814.1888547-1-jassisinghbrar@gmail.com> 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 On Mon, Mar 06, 2023 at 05:18:14PM -0600, jassisinghbrar@gmail.com wrote: > From: Jassi Brar > > Any requirement of FWU should not require changes to bindings > of other subsystems. For example, for mtd-backed storage we > can do without requiring 'fixed-partitions' children to also > carry 'uuid', a property which is non-standard and not in the > bindings. > The existing bindings were constructed like that in case we wanted to upstream the dt-bindings. But I think we are fine keeping it as an internal ABI for now. Note here that we will need to strip this eventually before we hand over the dtb into linux, but that's a different story. In any case as long as the DT comes from u-boot I don't think we will have a risk of introducing compatibility issues if we ever upstream this and go back to the old format. Acked-by: Ilias Apalodimas > There exists no code yet, so we can change the fwu-mtd bindings > to contain all properties within the fwu-mdata node. > > Signed-off-by: Jassi Brar > --- > .../firmware/fwu-mdata-mtd.yaml | 105 +++++++++++++++--- > 1 file changed, 91 insertions(+), 14 deletions(-) > > diff --git a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml > index 4f5404f999..6a22aeea30 100644 > --- a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml > +++ b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml > @@ -1,13 +1,13 @@ > # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > %YAML 1.2 > --- > -$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-sf.yaml# > -$schema: http://devicetree.org/meta-schemas/core.yaml# > +$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-mtd.yaml# > +$schema: http://devicetree.org/meta-schemas/base.yaml# > > title: FWU metadata on MTD device without GPT > > maintainers: > - - Masami Hiramatsu > + - Jassi Brar > > properties: > compatible: > @@ -15,24 +15,101 @@ properties: > - const: u-boot,fwu-mdata-mtd > > fwu-mdata-store: > - maxItems: 1 > - description: Phandle of the MTD device which contains the FWU medatata. > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Phandle of the MTD device which contains the FWU MetaData and Banks. > > - mdata-offsets: > + mdata-parts: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > minItems: 2 > - description: Offsets of the primary and secondary FWU metadata in the NOR flash. > + maxItems: 2 > + description: labels of the primary and secondary FWU metadata partitions in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node. > + > + patternProperties: > + "fwu-bank[0-9]": > + type: object > + description: List of FWU mtd-backed banks. Typically two banks. > + > + properties: > + id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Index of the bank. > + > + label: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + minItems: 1 > + maxItems: 1 > + description: label of the partition, in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node, that holds this bank. > + > + patternProperties: > + "fwu-image[0-9]": > + type: object > + description: List of images in the FWU mtd-backed bank. > + > + properties: > + id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Index of the bank. > + > + offset: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Offset, from start of the bank, where the image is located. > + > + size: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Size reserved for the image. > + > + uuid: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + minItems: 1 > + maxItems: 1 > + description: UUID of the image. > + > + required: > + - id > + - offset > + - size > + - uuid > + additionalProperties: false > + > + required: > + - id > + - label > + - fwu-images > + additionalProperties: false > > required: > - compatible > - fwu-mdata-store > - - mdata-offsets > - > + - mdata-parts > + - fwu-banks > additionalProperties: false > > examples: > - | > - fwu-mdata { > - compatible = "u-boot,fwu-mdata-mtd"; > - fwu-mdata-store = <&spi-flash>; > - mdata-offsets = <0x500000 0x530000>; > - }; > + fwu-mdata { > + compatible = "u-boot,fwu-mdata-mtd"; > + fwu-mdata-store = <&flash0>; > + mdata-parts = "MDATA-Pri", "MDATA-Sec"; > + > + fwu-bank0 { > + id = <0>; > + label = "FIP-Bank0"; > + fwu-image0 { > + id = <0>; > + offset = <0x0>; > + size = <0x400000>; > + uuid = "5a66a702-99fd-4fef-a392-c26e261a2828"; > + }; > + }; > + fwu-bank1 { > + id = <1>; > + label = "FIP-Bank1"; > + fwu-image0 { > + id = <0>; > + offset = <0x0>; > + size = <0x400000>; > + uuid = "a8f868a1-6e5c-4757-878d-ce63375ef2c0"; > + }; > + }; > + }; > +... > -- > 2.34.1 >