apm821xx: use nested fixed-partitions
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 14 May 2022 08:44:58 +0000 (10:44 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 14 May 2022 09:08:45 +0000 (11:08 +0200)
This makes it possible to fix Netgear WNDAP620+660 DTS ugliness.
Bring back the dtb and firmware partitions for the WNDR4700.
Thank you, mans0n.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
target/linux/apm821xx/dts/netgear-wndr4700.dts

index c6f112d240e07aa78e1af44cc656be3bcdfc6991..8a15a78dce6ea70ed96250c80fe27449d6337965 100644 (file)
                                read-only;
                        };
 
-                       partition@110000,0 {
+                       partition@110000 {
                                label = "firmware";
                                reg = <0x00110000 0x01ac0000>;
-                       };
-
-                       partition@110000,1 {
-                               /*
-                                * The u-boot bootloader will look at this
-                                * offset (0x110000) for an uImage binary.
-                                */
-                               label = "kernel";
-                               reg = <0x00110000 0x005f0000>;
-                       };
 
-                       partition@700000 {
-                               label = "ubi";
-                               reg = <0x00700000 0x014d0000>;
+                               compatible = "fixed-partitions";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               partition@0 {
+                                       /*
+                                        * The u-boot bootloader will look at this
+                                        * offset (0x110000) for an uImage binary.
+                                        */
+                                       label = "kernel";
+                                       reg = <0x00000000 0x005f0000>;
+                               };
+
+                               partition@5f0000 {
+                                       label = "ubi";
+                                       reg = <0x005f0000 0x014d0000>;
+                               };
                        };
 
                        partition@1bd0000 {
index fe0f7139430f08ae3f316abfb8561fb1355e6611..342f9a01dbdfd9410793f89a887478c349c437d0 100644 (file)
                        };
 
                        partition@180000 {
-                               label = "kernel";
-                               reg = <0x00180000 0x00380000>;
+                               label = "firmware";
+                               reg = <0x00180000 0x01860000>;
+
+                               compatible = "fixed-partitions";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               partition@0 {
+                                       label = "kernel";
+                                       reg = <0x00000000 0x00380000>;
+
+                                       compatible = "fixed-partitions";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       /*
+                                        * device-tree is @ 0x00180000 - 0x0019ffff
+                                        * kernel starts from 0x20000.
+                                        * this is coded into netgear's u-boot.
+                                        */
+                                       partition@0 {
+                                               label = "dtb";
+                                               reg = <0x00000000 0x20000>;
+                                       };
                                /*
-                                * device-tree is @ 0x00180000 - 0x001fffff
-                                * kernel starts from 0x200000.
-                                * this is coded into netgear's u-boot.
-                                *
                                 * this partition will also contain a
                                 * fake/empty rootfs at the end to fool
                                 * Netgear's uboot rootfs integrety checks.
                                 */
-                       };
+                               };
 
-                       partition@500000 {
-                               label = "ubi";
-                               reg = <0x00500000 0x014e0000>;
+                               partition@380000 {
+                                       label = "ubi";
+                                       reg = <0x00380000 0x014e0000>;
+                               };
                        };