From patchwork Tue Nov 8 11:07:08 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: 13036153 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BDE2C433FE for ; Tue, 8 Nov 2022 11:09:28 +0000 (UTC) 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=xf73tb3dDcS42tWLHbqm8fyR9kq0bfvLr/XhdaJDfyo=; b=t4+NjlhzHBoYf7 /xoJcborZKeOo4G8mpGvpvXf+yWZfZJ3rH7Q3QZFOLeyugF8Vm6ZWrEO799Eiwpr+73OhRZTsYEZz AN3CPTQ6L/GUE6U/zu+/Sm0HADlEvD5uv+P5S3Y6yHY8wPYnX26VFLleZm7/lxtk0PI7oHdrPGb5z T6ZiiCAKBJF9XKlDUS3YLifbcvo6f77ajNczWmeTFtlIuk8/gMPstm7UiCaE8TJUA5qIJuK+eHxBB Bcvsm7zNc4tNKZAfmuLJstkehY9Hum7LG4jtHaQQ5LoLiPxhPJ9OTN9410XgLDl7TViRD9ESB0Dmc y8WpkC7eJ/aJnVfXPSnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osMSf-004lA5-Rm; Tue, 08 Nov 2022 11:08:10 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osMRp-004kYL-R2 for linux-arm-kernel@lists.infradead.org; Tue, 08 Nov 2022 11:07:19 +0000 Received: by mail-ed1-x534.google.com with SMTP id 21so21927355edv.3 for ; Tue, 08 Nov 2022 03:07:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=i6eJzNDN+gsbEDAuZNAIfykBQHXQ4r/YYwVGmrZbCUU=; b=PWaEklpz7JlLx/Z3msBdcteW6+byjD8JBtmPSomOIqDTIqmerqFZBGeqz5v2I4FC2Q mzsVj0MDWsMJSgcZM3vQuBsEvFG4fIFHVt/AFeAlDbqmpi1rkBpvGeKmFZv8fzbXOoOy kYqUbl6Toe/zWjA3eByJk9o+3hUjrfyoIxuO/cP20XtTVZSOsnlVZTa5BxprwTE/MB95 P3kjstQl+oM5adrALwvIz8lIjPvWlwx/QB9sD4zld+94FoDzEJpMNUj0D6mLGHiij+D1 +54wXwozwNA+HeC8xXpasHNob77nogeDce880kq5Z8aUs/6dHfJiNGHSvZ7e6TENJc8m S6Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i6eJzNDN+gsbEDAuZNAIfykBQHXQ4r/YYwVGmrZbCUU=; b=NI3MI8XzcvJE+tTUjKzsPnK/BEQaRXJVt6qIjoQLLTwPLSQFKREYuBr1fiizORx8Oi f8BGWQVZKzrMjp183WGua1o/f+YmHPbJCMTJgnKdikFAJND19EV2rXVVbTIwfi2Xmnas VGRuovTcC5IK4UFj8RVonm3rquxwZIqjci2L8ReCbOI2NCHqr1td6lLcA8uWUxVEjQ4s tcKTue0kRZOPC9eCkggIjmmWhBE/KGbsS9X1lr+sYHwZXNNvkOjXfirxdmf5Kpm915fR PA9EPfZ4G0uNN9oBTLyglGJKx5wXUI0vgM9V1GpLZ55aIM/FYZjLtWaSiyP4IWpxHAND VTyQ== X-Gm-Message-State: ACrzQf2bpG7bLifxZu+XcWqh5S8TAsHFNYemedtnSbz6RQA1Co/memcN VuZn2s83hZJtHLLpIgcgtEohsShHxY4= X-Google-Smtp-Source: AMsMyM4Z1EZxBKVs8DwaNKh3xbsGY0C6QeFIjzQFRdZxF83oiVN4cajOXZVYwBx3zz2KTZjRLiZr6Q== X-Received: by 2002:a05:6402:655:b0:464:d83:d02c with SMTP id u21-20020a056402065500b004640d83d02cmr33122636edx.335.1667905634004; Tue, 08 Nov 2022 03:07:14 -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 h6-20020a170906828600b00731803d4d04sm4476323ejx.82.2022.11.08.03.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 03:07:13 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Florian Fainelli Cc: Hauke Mehrtens , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] ARM: dts: BCM5301X: Correct description of TP-Link partitions Date: Tue, 8 Nov 2022 12:07:08 +0100 Message-Id: <20221108110708.13693-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-20221108_030717_958553_48DBD8EC X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki TP-Link routers have flash space partitioned according to the partitions table. It may look like fixed partitioning but those partitions can be actually reorganized. New can be added (or some removed), offsets and sizes may change. Fix DT to use binding for the TP-Link SafeLoader partitioning method. Signed-off-by: Rafał Miłecki --- .../boot/dts/bcm47081-tplink-archer-c5-v2.dts | 25 ++++--------------- .../boot/dts/bcm4709-tplink-archer-c9-v1.dts | 25 ++++--------------- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts index 19a7971b5a00..db9a37d70ef3 100644 --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts @@ -95,30 +95,15 @@ &spi_nor { status = "okay"; partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot@0 { - label = "boot"; - reg = <0x000000 0x040000>; - read-only; - }; + compatible = "tplink,safeloader-partitions"; + partitions-table-offset = <0xe50000>; - os-image@100000 { - label = "os-image"; - reg = <0x040000 0x200000>; + partition-os-image { compatible = "brcm,trx"; }; - rootfs@240000 { - label = "rootfs"; - reg = <0x240000 0xc00000>; - }; - - nvram@ff0000 { - label = "nvram"; - reg = <0xff0000 0x010000>; + partition-file-system { + linux,rootfs; }; }; }; diff --git a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts index 11d1068160da..2cfb105f631a 100644 --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts @@ -104,30 +104,15 @@ &spi_nor { status = "okay"; partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot@0 { - label = "boot"; - reg = <0x000000 0x040000>; - read-only; - }; + compatible = "tplink,safeloader-partitions"; + partitions-table-offset = <0xe50000>; - os-image@100000 { - label = "os-image"; - reg = <0x040000 0x200000>; + partition-os-image { compatible = "brcm,trx"; }; - rootfs@240000 { - label = "rootfs"; - reg = <0x240000 0xc00000>; - }; - - nvram@ff0000 { - label = "nvram"; - reg = <0xff0000 0x010000>; + partition-file-system { + linux,rootfs; }; }; };