From patchwork Mon Mar 6 23:18:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 659270 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2085109wrb; Mon, 6 Mar 2023 15:18:30 -0800 (PST) X-Google-Smtp-Source: AK7set8GuzA41/5aFJBRbwb8Pu49jZJU8/VHWPvtXI7hk8cbDWnzFcQ7mmhHUDOIkBH4yUNXiMZO X-Received: by 2002:adf:f011:0:b0:2cd:cf97:61c9 with SMTP id j17-20020adff011000000b002cdcf9761c9mr9403868wro.4.1678144710222; Mon, 06 Mar 2023 15:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144710; cv=none; d=google.com; s=arc-20160816; b=kVlRc+nGZ84mw3L95gcwdKEdHhKVA98T1LBzrYc2YrAgcyteo6e0+xnO2id3BNscaO dx7fKTXUnP8Oe1XzryP4/AwvVDKMnocJt9Vlgj3l1W6EQ3jflbWsj77t/lhjye6N6/j/ bERm9mSMwOTbfxhq8X9j+hD5fIH/k3s2n2+/bWyiDFenxNu9UhXqd43oAqL2NdcDQMm2 smDaDjVllMyqNofmD7SPP7YZazm7cLCGhZQWDpncko+4lU1Yy0iSDAeqJ5wkgnaRPSuV QoS41l/icc+bd1zmZg4YLbdul5ChqzgjLAHyKhMYd3oJd0EdtEtrG8aCIjfLu5QNjxHZ pR4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+E8m7ieBpVlsWhoFJW82RX/1CKobe1W8HEo0R8tU1Rk=; b=xfpejoiHdtjp32behx2mUCUOdYPIhO2DgIdoRqnlwr+TTMG4vAIxFU0lKV+mvj1/VU SrOSuP6BqoClQ1fhDlJ+ekdc9TpjmhXVDLskBBytEk5sjviUL2RT14DCDkzyIWQX380a oxetLK+SciTTdZI2CBuW8MesiXNVAmQKthFRftLTAbsZXtW+zgs5uuN+23V0MVqg7aw6 UN3hgB/dFbZU/bPgfZQ8QxdzdDSK3HA5/2PwE3lF9B7PtICCduxQLCS+kjJqwbLzUhuG C2vT9R0TiVAv0P1K7R/4MZnpOkGQXU9NEGG+S+3nO3akpSfzHXsCmuu4H56qwEn038uq 5rOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lF2kv32f; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id t17-20020adfe451000000b002c546f2f844si8907727wrm.803.2023.03.06.15.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 15:18:30 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lF2kv32f; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B3A768593D; Tue, 7 Mar 2023 00:18:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="lF2kv32f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A5EA8595C; Tue, 7 Mar 2023 00:18:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 72034859E1 for ; Tue, 7 Mar 2023 00:18:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jassisinghbrar@gmail.com Received: by mail-qt1-x831.google.com with SMTP id d7so12562725qtr.12 for ; Mon, 06 Mar 2023 15:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678144699; 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=+E8m7ieBpVlsWhoFJW82RX/1CKobe1W8HEo0R8tU1Rk=; b=lF2kv32fFps2jLmHFAz8/kOCwDPCnpexJZFk4iVv+GVKjTVGqcGAeiVzfXzUD6FB57 zEVffyD7qky0vJApFdglTBNQXuoR3bBcDG9Vt5MfXAFgHdvgW4GpmeIQTqyReUMimvsm sw1OeD1dZeQSwlE8qIRuBUKpJgNrZR1TPw6kFQ3qfio9QxpiScr+roRxZhLotQOGDIMA 41Eoo8HPq3J5/KimI/E8y4cjQfrEROSRPooW0k3poW4lyu1RTNXl8jqe7Ss4JGxg8ePA so0tBUMJn4DX2aYbw/Apck6vi015ql8ANZNPvRv1VoG47YXzv8zB/1SQifp7EJyg3OlF gBUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678144699; 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=+E8m7ieBpVlsWhoFJW82RX/1CKobe1W8HEo0R8tU1Rk=; b=JsnT4iBbzZRDcBMoMqG3A/UQ6o5W/MfZPTYmJkbiyoa/r64cJlZUAkMB7E8VN/eWgS YQHkKj9EKcrIrZtHB1Q8RBPBhM6ET6DdnW50ie1XriSp8/Vx4e8cBInph2gruqJA3+R4 5gt9+qEmJ2xIpypiX4h0Z4/RdkZneW6GMMB00WJQw5CJSKpYfxCmXRNmE/ZfL8mpNfUk 0rhEzXETeMDVLVF2cMK1Y+0eklhV6xXBE9ArVz9FZGP+D+Vui3QQVI//ILGHeDjfK0rE 9Pf/EMo8WTaBr9O1xsDbQ6aLuLFFbnw+1h8sKYHa/4+HaURA37jTchX5maEXKxD3yPNx eDow== X-Gm-Message-State: AO0yUKXYd3mbu9/Fcz6uENJmMDkOMYEHI0X8fjxib9PNQV44N0lakoMC EJE94aAx5YbIE2XBwwj4bc7oqTT7A+M= X-Received: by 2002:ac8:7dcb:0:b0:3bd:1647:9333 with SMTP id c11-20020ac87dcb000000b003bd16479333mr18275078qte.28.1678144698733; Mon, 06 Mar 2023 15:18:18 -0800 (PST) Received: from jassi-desktop.. (wnpgmb0311w-ds01-45-177-228.dynamic.bellmts.net. [206.45.177.228]) by smtp.gmail.com with ESMTPSA id w20-20020a05622a135400b003b691385327sm8681309qtk.6.2023.03.06.15.18.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 15:18:18 -0800 (PST) From: jassisinghbrar@gmail.com To: u-boot@lists.denx.de Cc: ilias.apalodimas@linaro.org, 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: [PATCH v6 1/7] dt/bindings: fwu-mdata-mtd: drop changes outside FWU Date: Mon, 6 Mar 2023 17:18:14 -0600 Message-Id: <20230306231814.1888547-1-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306231747.1888513-1-jassisinghbrar@gmail.com> References: <20230306231747.1888513-1-jassisinghbrar@gmail.com> MIME-Version: 1.0 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 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. 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 Acked-by: Ilias Apalodimas --- .../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"; + }; + }; + }; +...