mvebu: fix partition node dtc warnings for Synology DS213j
authorShiji Yang <[email protected]>
Mon, 19 May 2025 13:56:58 +0000 (21:56 +0800)
committerHauke Mehrtens <[email protected]>
Sun, 19 Oct 2025 19:55:34 +0000 (21:55 +0200)
Add missing #address-cells and #size-cells to fix the
following dtc warnings:

armada-370-synology-ds213j.dts:288.5-35: Warning (reg_format): /soc/spi@10600/flash@0/partitions/partition@0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
armada-370-synology-ds213j.dts:294.5-35: Warning (reg_format): /soc/spi@10600/flash@0/partitions/partition@c0000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
armada-370-synology-ds213j.dts:299.5-35: Warning (reg_format): /soc/spi@10600/flash@0/partitions/partition@100000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
armada-370-synology-ds213j.dts:304.5-35: Warning (reg_format): /soc/spi@10600/flash@0/partitions/partition@110000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
armada-370-synology-ds213j.dts:308.5-35: Warning (reg_format): /soc/spi@10600/flash@0/partitions/partition@7d0000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
armada-370-synology-ds213j.dts:327.5-35: Warning (reg_format): /soc/spi@10600/flash@0/partitions/partition@7e0000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)

Signed-off-by: Shiji Yang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18242
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/mvebu/patches-6.12/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch

index 135952ee5f05c487ab6553ddfcaa94b162deda6a..83193fa7df9f9d2507c457023088b7d522b98842 100644 (file)
@@ -42,7 +42,7 @@
  };
  
  &pinctrl {
-@@ -259,48 +280,50 @@
+@@ -259,48 +280,52 @@
                reg = <0>; /* Chip select 0 */
                spi-max-frequency = <20000000>;
  
 -              };
 +              partitions {
 +                      compatible = "fixed-partitions";
--              partition@c0000 { /* uImage */
--                      label = "zImage";
--                      reg = <0x000c0000 0x002d0000>; /* 2880KB */
--              };
++                      #address-cells = <1>;
++                      #size-cells = <1>;
++
 +                      partition@0 { /* u-boot */
 +                              label = "u-boot";
 +                              reg = <0x00000000 0x000c0000>; /* 768KB */
 +                              read-only;
 +                      };
  
--              partition@390000 { /* uInitramfs */
--                      label = "rd.gz";
--                      reg = <0x00390000 0x00440000>; /* 4250KB */
+-              partition@c0000 { /* uImage */
+-                      label = "zImage";
+-                      reg = <0x000c0000 0x002d0000>; /* 2880KB */
 -              };
 +                      mtd_gap: partition@c0000 { /* gap */
 +                              label = "gap";
 +                              reg = <0x000c0000 0x00040000>; /* 256KB */
 +                      };
  
--              partition@7d0000 { /* MAC address and serial number */
--                      label = "vendor";
--                      reg = <0x007d0000 0x00010000>; /* 64KB */
+-              partition@390000 { /* uInitramfs */
+-                      label = "rd.gz";
+-                      reg = <0x00390000 0x00440000>; /* 4250KB */
 -              };
 +                      partition@100000 { /* u-boot-env */
 +                              label = "u-boot-env";
 +                              reg = <0x00100000 0x00010000>; /* 64KB */
 +                      };
  
--              partition@7e0000 {
--                      label = "RedBoot config";
--                      reg = <0x007e0000 0x00010000>; /* 64KB */
+-              partition@7d0000 { /* MAC address and serial number */
+-                      label = "vendor";
+-                      reg = <0x007d0000 0x00010000>; /* 64KB */
 -              };
 +                      mtd_kernel: partition@110000 {
 +                              label = "kernel";
 +                              reg = <0x00110000 0x006c0000>; /* 6912KB */
 +                      };
  
--              partition@7f0000 {
--                      label = "FIS directory";
--                      reg = <0x007f0000 0x00010000>; /* 64KB */
+-              partition@7e0000 {
+-                      label = "RedBoot config";
+-                      reg = <0x007e0000 0x00010000>; /* 64KB */
+-              };
 +                      partition@7d0000 { /* MAC address and serial number */
 +                              reg = <0x007d0000 0x00010000>; /* 64KB */
 +                              label = "vendor";
 +                                      };
 +                              };
 +                      };
-+
+-              partition@7f0000 {
+-                      label = "FIS directory";
+-                      reg = <0x007f0000 0x00010000>; /* 64KB */
 +                      mtd_gap2: partition@7e0000 {
 +                              label = "gap2";
 +                              reg = <0x007e0000 0x00020000>; /* 128KB */