From patchwork Wed Feb 16 10:41:35 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: 543044 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp1224780imn; Wed, 16 Feb 2022 02:42:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrCip7NuQVc5nr/whgdGWx0V66vTHnA3FQOy/wq4YO94kBNJfH9rJeVYLQCmUeLojYPlJA X-Received: by 2002:a65:6c0a:0:b0:373:8387:6b1d with SMTP id y10-20020a656c0a000000b0037383876b1dmr234470pgu.100.1645008167426; Wed, 16 Feb 2022 02:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645008167; cv=none; d=google.com; s=arc-20160816; b=gN7RrmFsFKahqqbmb/mOYDdoQVp6RdVTDhOjLyzJHxnZJijXEhrlPXqJt/k9zj0Zm9 WO+/xaIX+RI1/mgcSa0hyzL5uZaxmfp/gQYhJDIcf8atii4zWIsEUGLbJ52u0nhrYWXp NZwyUcJhWffadt1v7YFQ3z8j9tQQ2hxKCjI219gF6riI2HkPJYNfjIKzb6axhrpPoSwP RGnOFMzUjuGRrG4O7LFIJ0yLR2/62OKYI849BraYav/c5T6PUDVRYbwQg+j+LAuLTZpb tfiD4+1K87zCP3GqI4G9TA44UcZkBCGe96lEH2pupeXSWdmsONlHT17c6Qn7mn3f3e5T IqUw== 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=EjqNzWFmqgaVHMjvd5BbVtcNvQ6zGgQ3lCp6acwwNI0=; b=lDtvCUJjFdWJ9N5u9f50jLa5RJAxE1vrr4IFb517ss1Ax/BwCIujkDguiIlTUXMQ4Y RjQFu+eFSNFFR4sDm+G/ilD/+gp0phPze5kXBYoxfQcerYrQUotp/F4tTkvPqgfitxkS pO/OIhZPiNYkl0KBX27vZQlYO4TwGP1UDuDzwfpTRG2YZuxAlfCyCGtTCiZAdj0fMhxG HIDlOJ1Jzj4hPD77wXw0qjDYK5VUkfFbhndqQo8+g0/j+lGBXAaa4HmkVrJKNOF2LJ1I AZuqzwM3P2jysAIq0NNVJCXtCvHBoBObFnU/y96dT8KU14/ohtzmAJh1VtnHWwj59oZ8 Kyyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=2TScIKeb; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=cZwt+qi3; 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 w8si19427622plg.258.2022.02.16.02.42.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 02:42:47 -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=2TScIKeb; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=cZwt+qi3; 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=EjqNzWFmqgaVHMjvd5BbVtcNvQ6zGgQ3lCp6acwwNI0=; b=2TScIKebR0M7F9 +lPip+HLe+5E2in4JfHXbF63f+8hPbMVt309ZQww53zlQvEOYe7ueJYuKS9bDzDQQlzhRiPotXtv5 HCaUfAQVvoILTOj3NaNhKK7M/B4m6AbMj9dMaEsfZQTXseseBCjkt1bucEvQSnllTfEZNKk68RbQR ge0dFD/dyuNkJvHh2+rrlWDtH1ZFWsezcJ+E0RF9g8SLjrv1BpHMN9oFlwOB6/Xsj/UrWcpfY7deC em0CEZ/scvgRww/HxVZkT+XwtuvXBGBcWxx9TIj52L0mZatFoIJgmXzd0bHcnbzBtvAcYXLz6KQny MjFuAylgwW5cr6QUzrYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKHks-006arU-Hs; Wed, 16 Feb 2022 10:41:50 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKHkh-006aoF-W8 for linux-mtd@lists.infradead.org; Wed, 16 Feb 2022 10:41:41 +0000 Received: by mail-lj1-x236.google.com with SMTP id e17so2622279ljk.5 for ; Wed, 16 Feb 2022 02:41:39 -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=uxkPFNaxaicsQbfNmfxnU1cSsYNSvzImPtTbPcKo1nE=; b=cZwt+qi3n5u+E1+HrihyYZD1w9BAxIRkRA3JLqFGQQeADLsKGTKb+NMR+igqKxOHMf loN+JMfEZ1RbI/3P7i4KipfSah5R0GHwwGeDhdfy6rRYzksxWPg1xUOJ+9s4uTVvdYFu x9JBIKgU2IB/FJJiNZJ75UYjjypovvxGsni34uLwd0CLuyFE8N04jeYmuVoh9txJm8mw s7mvKdIIzp9CT9/dqja0LVj6jywvI+VPaCZJvVI5GLpG6Apdeu6BP/V/avIWc7+ddBqe Xqhqvlj4W6HfqiDUk3ZRDjhcA9gkWaYUjqQOnv2EFCcNJODBHIPlxI7nN/LQzmXTqP0P sAIg== 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=uxkPFNaxaicsQbfNmfxnU1cSsYNSvzImPtTbPcKo1nE=; b=Md0wF3iHP4bNNsEry+ls1zWc3Uyz1/YZ2kt1KFmvobgib6oNu3eVvWaWUBzeqh1Yk3 OP59HIeW37VjJlQ+QjLhlF2EpwpNMDowBjeQ4PCNhP+4NzTQkwmRKa1Fjg0W5Rccz+Pl pAmEBUiRCNel/C2JUS1zUe7x4e6gEmxjwekBtyo7dTVaZaYOT/asuELVoFbFeZ0Y9Pso VJcz9A0RAz1ZGY+bfX/wU4djXr4u4cWVm5OeaFAwkl1ts/AC3LhmPHnppRSWCggaHrSZ qDDY+Rr+6eQovxPscmzAGcGEM3Lge1YFJBhwY6W5C3sjG9Ly7xGrkF9NdaGAInj2Cnai o3ZQ== X-Gm-Message-State: AOAM532XA9BaHBvU40kTbb//fwnkO5inhWxWSHK/sVpeMYpc5zYcIFYM nVDUHndJfOLvYG+NqVcAEGCks6SmPYk= X-Received: by 2002:a2e:6818:0:b0:235:3ae:c2c8 with SMTP id c24-20020a2e6818000000b0023503aec2c8mr1535212lja.252.1645008097873; Wed, 16 Feb 2022 02:41:37 -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 v18sm2814082lft.281.2022.02.16.02.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 02:41:37 -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 BCM47xx to the json-schema Date: Wed, 16 Feb 2022 11:41:35 +0100 Message-Id: <20220216104135.31307-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_024140_068941_90DC9F3B X-CRM114-Status: GOOD ( 15.73 ) 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?b?IFJhZmHDhcKCIE1pw4XCgmVja2kgLS0tIC4uLi9icmNtLGJjbTk0N3h4LWNmZS1w?= =?utf-8?b?YXJ0aXRpb25zLnR4dCB8IDQyIC4uLi9icmNtLGJjbTk0N3h4LWNmZS1wYXJ0aXRp?= =?utf-8?b?b25zLnlhbWw=?= =?utf-8?q?_=7C_48_+++++++++++++++++++_2_files_changed=2C_48_insertions=28+?= =?utf-8?q?=29=2C_42_del_=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?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoyMzYgbGlzdGVkIGluXQ==?= =?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 Reviewed-by: Rob Herring --- .../brcm,bcm947xx-cfe-partitions.txt | 42 ---------------- .../brcm,bcm947xx-cfe-partitions.yaml | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 42 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.txt create mode 100644 Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.txt b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.txt deleted file mode 100644 index 1d61a029395e..000000000000 --- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.txt +++ /dev/null @@ -1,42 +0,0 @@ -Broadcom BCM47xx Partitions -=========================== - -Broadcom is one of hardware manufacturers providing SoCs (BCM47xx) used in -home routers. Their BCM947xx boards using CFE bootloader have several partitions -without any on-flash partition table. On some devices their sizes and/or -meanings can also vary so fixed partitioning can't be used. - -Discovering partitions on these devices is possible thanks to having a special -header and/or magic signature at the beginning of each of them. They are also -block aligned which is important for determinig a size. - -Most of partitions use ASCII text based magic for determining a type. More -complex partitions (like TRX with its HDR0 magic) may include extra header -containing some details, including a length. - -A list of supported partitions includes: -1) Bootloader with Broadcom's CFE (Common Firmware Environment) -2) NVRAM with configuration/calibration data -3) Device manufacturer's data with some default values (e.g. SSIDs) -4) TRX firmware container which can hold up to 4 subpartitions -5) Backup TRX firmware used after failed upgrade - -As mentioned earlier, role of some partitions may depend on extra configuration. -For example both: main firmware and backup firmware use the same TRX format with -the same header. To distinguish currently used firmware a CFE's environment -variable "bootpartition" is used. - - -Devices using Broadcom partitions described above should should have flash node -with a subnode named "partitions" using following properties: - -Required properties: -- compatible : (required) must be "brcm,bcm947xx-cfe-partitions" - -Example: - -flash@0 { - partitions { - compatible = "brcm,bcm947xx-cfe-partitions"; - }; -}; diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml new file mode 100644 index 000000000000..3484e06d6bcb --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM47xx Partitions + +description: | + Broadcom is one of hardware manufacturers providing SoCs (BCM47xx) used in + home routers. Their BCM947xx boards using CFE bootloader have several + partitions without any on-flash partition table. On some devices their sizes + and/or meanings can also vary so fixed partitioning can't be used. + + Discovering partitions on these devices is possible thanks to having a special + header and/or magic signature at the beginning of each of them. They are also + block aligned which is important for determinig a size. + + Most of partitions use ASCII text based magic for determining a type. More + complex partitions (like TRX with its HDR0 magic) may include extra header + containing some details, including a length. + + A list of supported partitions includes: + 1) Bootloader with Broadcom's CFE (Common Firmware Environment) + 2) NVRAM with configuration/calibration data + 3) Device manufacturer's data with some default values (e.g. SSIDs) + 4) TRX firmware container which can hold up to 4 subpartitions + 5) Backup TRX firmware used after failed upgrade + + As mentioned earlier, role of some partitions may depend on extra + configuration. For example both: main firmware and backup firmware use the + same TRX format with the same header. To distinguish currently used firmware a + CFE's environment variable "bootpartition" is used. + +maintainers: + - Rafał Miłecki + +properties: + compatible: + const: brcm,bcm947xx-cfe-partitions + +additionalProperties: false + +examples: + - | + partitions { + compatible = "brcm,bcm947xx-cfe-partitions"; + };