4c4ed036b90266f1e597f6e09e9ae6a0eba41b8a
[openwrt/staging/rmilecki.git] /
1 From c8ee9f119bfb4244f76c9971c341ec06b49332cd Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Tue, 8 Nov 2022 12:07:08 +0100
4 Subject: [PATCH] ARM: dts: BCM5301X: Correct description of TP-Link partitions
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 TP-Link routers have flash space partitioned according to the partitions
10 table. It may look like fixed partitioning but those partitions can be
11 actually reorganized. New can be added (or some removed), offsets and
12 sizes may change.
13
14 Fix DT to use binding for the TP-Link SafeLoader partitioning method.
15
16 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 Link: https://lore.kernel.org/r/20221108110708.13693-1-zajec5@gmail.com
18 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
19 ---
20 .../boot/dts/bcm47081-tplink-archer-c5-v2.dts | 25 ++++---------------
21 .../boot/dts/bcm4709-tplink-archer-c9-v1.dts | 25 ++++---------------
22 2 files changed, 10 insertions(+), 40 deletions(-)
23
24 --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
25 +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
26 @@ -95,30 +95,15 @@
27 status = "okay";
28
29 partitions {
30 - compatible = "fixed-partitions";
31 - #address-cells = <1>;
32 - #size-cells = <1>;
33 + compatible = "tplink,safeloader-partitions";
34 + partitions-table-offset = <0xe50000>;
35
36 - boot@0 {
37 - label = "boot";
38 - reg = <0x000000 0x040000>;
39 - read-only;
40 - };
41 -
42 - os-image@100000 {
43 - label = "os-image";
44 - reg = <0x040000 0x200000>;
45 + partition-os-image {
46 compatible = "brcm,trx";
47 };
48
49 - rootfs@240000 {
50 - label = "rootfs";
51 - reg = <0x240000 0xc00000>;
52 - };
53 -
54 - nvram@ff0000 {
55 - label = "nvram";
56 - reg = <0xff0000 0x010000>;
57 + partition-file-system {
58 + linux,rootfs;
59 };
60 };
61 };
62 --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
63 +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
64 @@ -104,30 +104,15 @@
65 status = "okay";
66
67 partitions {
68 - compatible = "fixed-partitions";
69 - #address-cells = <1>;
70 - #size-cells = <1>;
71 + compatible = "tplink,safeloader-partitions";
72 + partitions-table-offset = <0xe50000>;
73
74 - boot@0 {
75 - label = "boot";
76 - reg = <0x000000 0x040000>;
77 - read-only;
78 - };
79 -
80 - os-image@100000 {
81 - label = "os-image";
82 - reg = <0x040000 0x200000>;
83 + partition-os-image {
84 compatible = "brcm,trx";
85 };
86
87 - rootfs@240000 {
88 - label = "rootfs";
89 - reg = <0x240000 0xc00000>;
90 - };
91 -
92 - nvram@ff0000 {
93 - label = "nvram";
94 - reg = <0xff0000 0x010000>;
95 + partition-file-system {
96 + linux,rootfs;
97 };
98 };
99 };