ARM: dts: BCM5301X: Correct description of TP-Link partitions
authorRafał Miłecki <rafal@milecki.pl>
Tue, 8 Nov 2022 11:07:08 +0000 (12:07 +0100)
committerFlorian Fainelli <f.fainelli@gmail.com>
Thu, 10 Nov 2022 18:15:21 +0000 (10:15 -0800)
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 <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20221108110708.13693-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts

index 19a7971b5a00fb294f861d692ff1fa714b7e89cf..db9a37d70ef35756f6a0924f10b62e8e44aacaf3 100644 (file)
        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;
                };
        };
 };
index 11d1068160da9257b8bbec234036376634ffb889..2cfb105f631a78b7521fc396989bef8567918c18 100644 (file)
        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;
                };
        };
 };