From patchwork Wed Feb 16 10:41:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 543045 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp1224801imn; Wed, 16 Feb 2022 02:42:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwVyhPtIRgI0NaE5ctZuMZQvoPmfa4r8LyVrIHP5OxNmjQ+WcVxXq25mOUz93jP1QCsUcC X-Received: by 2002:a17:90a:7f03:b0:1b8:8d90:b194 with SMTP id k3-20020a17090a7f0300b001b88d90b194mr1006211pjl.2.1645008169305; Wed, 16 Feb 2022 02:42:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645008169; cv=none; d=google.com; s=arc-20160816; b=Rcv6H2RtPnZtOxHYwT/QyZU2YNTI8Gbo6xxBjknTEsWyBRXJKCMYaCtinHmjejfyfX P4KYd9lIupRx+XQl+IEMsbYla7GDPOEFEVtu4JHv9UDHNUPEbXUReFvoX5aq5wqqg/09 EZDP7ke6jEqAB5ydM0xRo26zDm/pD7XE6fi+TQ/RCbW2I0J1d3HCYI9k0X4auX0UZ6pw Wz7coji88hWx6vG4yiLZ+jmizvwwAFg2HmSVcFpojDdIYplC/QMCJiqzP/MA7zHaxMYm ZDsaeZP6YfEPhIn+VQez/SuGQQ0GCpJdmHv6J+G9ZLYZHtAIDPiAU46q28NeKCmwV7gJ RvjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-signature; bh=jBn64sQYNxxtLdh+bidagMRnTM0Q3YxRFzFt6cNgkNw=; b=DzFfMe72q3UaaNo5BgqfAFsPWdLusGDsIB6oAwJl2TVb46+LzBg1EWTWs+Fjd1ZMyj UzYv5F7Y9g5ZURnA+IvIo9upJeCBBGdkldATtHI1YVnQoMlVTd9iktYAFb51l8uqP/Zv dIlTLeYq1mYKRburs8R0ZsMqHJWe/nRUPVHxCsUrxo/qV253FnB3klBIpm8jW+Hmr9Ge dvh36j8+PQQCLFoOzoPsMegQ23x0DPDQE3UuhtzZbx8ES3CDM+hwRncTRH9KI3f2b94E Jj7h06ZWUR36p7/Al+1pmqqs4wjPIHxgbOhWN/ujHC1ccA6cujYJPiCxYmKhddvBvb2W Nr+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=JPk02zuZ; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=GIzSA99Z; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id x22si5373242pgk.297.2022.02.16.02.42.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 02:42:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=JPk02zuZ; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=GIzSA99Z; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jBn64sQYNxxtLdh+bidagMRnTM0Q3YxRFzFt6cNgkNw=; b=JPk02zuZi+Gyw9 VJUTQvfmEpUR3EyZpUONwLr25Hc1OUd5kS6JzIaeTyCx4yrjRek0CG5c4+L5n3D2fNBm5gtwz0g7R 8gWuFX1zEb32BuaRf8IH9h3x3sxE9dlKTxbEc0Go1NH340DcSsBMZXL67RpdZrU89Oxvezn5+S2Ny vMM1kO3RIaCDKNmbTlHoaQlSITOgsvr/gbJZAkT2xp/0etJ2C4Bjc9vAmNRGe9WDjjvPCqVHPQADk 414v/DbB5DN4UT90ewf897zN91yazAUtkrSlYZBbVi4TEbKFBCkymVwDK+5QJWBJvAxFss3JVJc4N DrR/nA5VLBOnAjZC7nlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKHkh-006aoa-GT; Wed, 16 Feb 2022 10:41:39 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKHkd-006amo-P8 for linux-mtd@lists.infradead.org; Wed, 16 Feb 2022 10:41:37 +0000 Received: by mail-lf1-x136.google.com with SMTP id u20so3039829lff.2 for ; Wed, 16 Feb 2022 02:41:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=knI7tMDeWVfdMzmxEcs3NisycvR0bIvCJkXVBxJ8CJw=; b=GIzSA99Z3MG1nlY/Y+cAHx2IZg7ZJibSFsyz7M4fOBgftf4YIj7h7HcVOmVVm3a5Ym CEoaC0lKL51ULHHXu0FeUvZD760/VslVE5D3CnoLdJj+Ak+KgfeTf1R1dNu1jPWxFr9x B4KO+AKHQI+tbjEmwGHBc+ovMHB2ga2j01egJ6qxr6DYLhdblZK3dddTs62rRADO1liG gCVtL01Fwtiz5P9BSsdKTpyH0Gd2A6P6moJsFkBSoVoulpZ3r7Ijy0XyC9qlxWhgLD9F oeRZNHHFUbT3H9rFHko74Bu6vvOpZhMeYra7opXA/3iwWggyWW3yfmAfQ0iVgO8pMsLU zfuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=knI7tMDeWVfdMzmxEcs3NisycvR0bIvCJkXVBxJ8CJw=; b=18oqojgauA/2ElLmKBffLYCbD24IF3/+iDcyjbhZu2CIrYyhl0u7Yv0giSLGdi0Or3 OfTBTDiZLKMS9vw1VrgrWro7ZfIQOjZU8PbzY2kK4SLl824RI8bLbAKHMYYF2OvHkSKz u6Qk+zWt8A/WUBo4Byi6yujI2T89UrFAtDTyIfbeizceRaOh19B/wx3ODtgWRE3BEUhW vJ/zGLOuIvdWBW+gcW/oUYLW5Ba8pkkGKhm1P7cqA3tvL5Q1YrsvcFvi3faWvUINz4oM CXe8QLyCn2Yg0q5ylc/lQO4jFY1FRpEUKxrQ+RxIEW7U9aryZjcB9Wu+mQkQho9MGvHf P+Rw== X-Gm-Message-State: AOAM532rbIefC1t624+EJhpdO/EMNeEen1aFWHAKxEgdVehyknXZVqgB Eytx/JnERkxlz4/8SOboqoY= X-Received: by 2002:ac2:420d:0:b0:443:63f4:28f1 with SMTP id y13-20020ac2420d000000b0044363f428f1mr1523823lfh.443.1645008092959; Wed, 16 Feb 2022 02:41:32 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id n4sm188328lfl.296.2022.02.16.02.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 02:41:32 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring Cc: Krzysztof Kozlowski , Hauke Mehrtens , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] dt-bindings: mtd: partitions: convert Broadcom's TRX to the json-schema Date: Wed, 16 Feb 2022 11:41:26 +0100 Message-Id: <20220216104126.31284-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220216_024135_849065_94076A1B X-CRM114-Status: GOOD ( 18.82 ) X-Spam-Score: 0.1 (/) X-Spam-Report: =?utf-8?q?Spam_detection_software=2C_running_on_the_system_?= =?utf-8?q?=22bombadil=2Einfradead=2Eorg=22=2C?= =?utf-8?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_original?= =?utf-8?q?_message_has_been_attached_to_this_so_you_can_view_it_or_label?= =?utf-8?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?utf-8?q?_the_administrator_of_that_system_for_details=2E?= =?utf-8?q?_?= =?utf-8?q?_Content_preview=3A__From=3A_Rafa=C3=85=C2=82_Mi=C3=85=C2=82ecki_T?= =?utf-8?q?his_helps_validating_DTS_files=2E_Signed-off-by=3A?= =?utf-8?q?_Rafa=C3=85=C2=82_Mi=C3=85=C2=82ecki_---_=2E=2E=2E/bindings/mtd/pa?= =?utf-8?q?rtitions/brcm=2Ctrx=2Etxt_=7C_42_=2E=2E=2E/bindings/mtd/partition?= =?utf-8?q?s/brcm=2Ctrx=2Eyaml?= =?utf-8?q?_=7C_51_+++++++++++++++++++_2_files_changed=2C_51_insertions=28+?= =?utf-8?q?=29=2C_=5B=2E=2E=2E=5D_?= =?utf-8?q?_?= =?utf-8?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_required?= =?utf-8?q?=29?= =?utf-8?q?_?= =?utf-8?q?_pts_rule_name______________description?= =?utf-8?q?_----_----------------------_-------------------------------------?= =?utf-8?q?-------------?= =?utf-8?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_at_https?= =?utf-8?q?=3A//www=2Ednswl=2Eorg/=2C?= =?utf-8?q?_no_trust?= =?utf-8?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoxMzYgbGlzdGVkIGluXQ==?= =?utf-8?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?utf-8?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_record?= =?utf-8?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publish_an_?= =?utf-8?q?SPF_Record?= =?utf-8?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_abused_en?= =?utf-8?q?duser_mail?= =?utf-8?q?_provider?= =?utf-8?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?utf-8?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freemail_use?= =?utf-8?q?rname_ends?= =?utf-8?q?_in_digit?= =?utf-8?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?utf-8?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM_or_DK_?= =?utf-8?q?signature_from?= =?utf-8?q?_author=27s_domain?= =?utf-8?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_valid_DK?= =?utf-8?q?IM_or_DK_signature?= =?utf-8?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_signature?= =?utf-8?q?=2C_not_necessarily?= =?utf-8?q?_valid?= =?utf-8?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM_or_DK_?= =?utf-8?q?signature_from?= =?utf-8?q?_envelope-from_domain?= X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org From: Rafał Miłecki This helps validating DTS files. Signed-off-by: Rafał Miłecki --- .../bindings/mtd/partitions/brcm,trx.txt | 42 --------------- .../bindings/mtd/partitions/brcm,trx.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 42 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt create mode 100644 Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt deleted file mode 100644 index c2175d3c82ec..000000000000 --- a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt +++ /dev/null @@ -1,42 +0,0 @@ -Broadcom TRX Container Partition -================================ - -TRX is Broadcom's official firmware format for the BCM947xx boards. It's used by -most of the vendors building devices based on Broadcom's BCM47xx SoCs and is -supported by the CFE bootloader. - -Design of the TRX format is very minimalistic. Its header contains -identification fields, CRC32 checksum and the locations of embedded partitions. -Its purpose is to store a few partitions in a format that can be distributed as -a standalone file and written in a flash memory. - -Container can hold up to 4 partitions. The first partition has to contain a -device executable binary (e.g. a kernel) as it's what the CFE bootloader starts -executing. Other partitions can be used for operating system purposes. This is -useful for systems that keep kernel and rootfs separated. - -TRX doesn't enforce any strict partition boundaries or size limits. All -partitions have to be less than the 4GiB max size limit. - -There are two existing/known TRX variants: -1) v1 which contains 3 partitions -2) v2 which contains 4 partitions - -There aren't separated compatible bindings for them as version can be trivialy -detected by a software parsing TRX header. - -Required properties: -- compatible : (required) must be "brcm,trx" - -Optional properties: - -- brcm,trx-magic: TRX magic, if it is different from the default magic - 0x30524448 as a u32. - -Example: - -flash@0 { - partitions { - compatible = "brcm,trx"; - }; -}; diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml new file mode 100644 index 000000000000..ec871c9cf605 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/brcm,trx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom TRX Container Partition + +description: | + TRX is Broadcom's official firmware format for the BCM947xx boards. It's used + by most of the vendors building devices based on Broadcom's BCM47xx SoCs and + is supported by the CFE bootloader. + + Design of the TRX format is very minimalistic. Its header contains + identification fields, CRC32 checksum and the locations of embedded + partitions. Its purpose is to store a few partitions in a format that can be + distributed as a standalone file and written in a flash memory. + + Container can hold up to 4 partitions. The first partition has to contain a + device executable binary (e.g. a kernel) as it's what the CFE bootloader + starts executing. Other partitions can be used for operating system purposes. + This is useful for systems that keep kernel and rootfs separated. + + TRX doesn't enforce any strict partition boundaries or size limits. All + partitions have to be less than the 4GiB max size limit. + + There are two existing/known TRX variants: + 1) v1 which contains 3 partitions + 2) v2 which contains 4 partitions + + There aren't separated compatible bindings for them as version can be trivialy + detected by a software parsing TRX header. + +maintainers: + - Rafał Miłecki + +properties: + compatible: + const: brcm,trx + + brcm,trx-magic: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TRX magic, if it is different from the default 0x30524448 + +additionalProperties: false + +examples: + - | + partitions { + compatible = "brcm,trx"; + };