ramips: mt7621: update dts and old NAND driver to use sub node
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Sun, 3 Nov 2019 01:10:22 +0000 (09:10 +0800)
committerPetr Štetiar <ynezz@true.cz>
Fri, 6 Dec 2019 22:24:24 +0000 (23:24 +0100)
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
target/linux/ramips/dts/mt7621_netgear_r6220.dts
target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
target/linux/ramips/dts/mt7621_netis_wf-2881.dts
target/linux/ramips/dts/mt7621_ubiquiti_edgerouterx.dtsi
target/linux/ramips/dts/mt7621_xiaomi_mir3g.dts
target/linux/ramips/dts/mt7621_xiaomi_mir3p.dts
target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch

index 7e433d34d60dcfbae19ecd1d901c1bb229aeb165..78c8dbbd484fe177ff4c61bc3a26605ce76c9b24 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0xe0000>;
-                       read-only;
-               };
-
-               partition@e0000 {
-                       label = "u-boot-env";
-                       reg = <0xe0000 0x100000>;
-                       read-only;
-               };
-
-               factory: partition@1e0000 {
-                       label = "factory";
-                       reg = <0x1e0000 0x100000>;
-                       read-only;
-               };
-
-               factory2: partition@2e0000 {
-                       label = "factory2";
-                       reg = <0x2e0000 0x100000>;
-                       read-only;
-               };
-
-               partition@3e0000 {
-                       label = "kernel";
-                       reg = <0x3e0000 0x400000>;
-               };
-
-               partition@7e0000 {
-                       label = "ubi";
-                       reg = <0x7e0000 0x2e00000>;
-               };
-
-               partition@35e0000 {
-                       label = "firmware2";
-                       reg = <0x35e0000 0x3200000>;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0xe0000>;
+                               read-only;
+                       };
+
+                       partition@e0000 {
+                               label = "u-boot-env";
+                               reg = <0xe0000 0x100000>;
+                               read-only;
+                       };
+
+                       factory: partition@1e0000 {
+                               label = "factory";
+                               reg = <0x1e0000 0x100000>;
+                               read-only;
+                       };
+
+                       factory2: partition@2e0000 {
+                               label = "factory2";
+                               reg = <0x2e0000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@3e0000 {
+                               label = "kernel";
+                               reg = <0x3e0000 0x400000>;
+                       };
+
+                       partition@7e0000 {
+                               label = "ubi";
+                               reg = <0x7e0000 0x2e00000>;
+                       };
+
+                       partition@35e0000 {
+                               label = "firmware2";
+                               reg = <0x35e0000 0x3200000>;
+                       };
                };
        };
 };
index ae6ddda394d2e6504b181a1a1d8bd9763da0884e..1ce6a649d4983092749a3255da5e89517de07149 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x80000>;
-                       read-only;
-               };
-
-               partition@80000 {
-                       label = "debug";
-                       reg = <0x80000 0x80000>;
-                       read-only;
-               };
-
-               factory: partition@100000 {
-                       label = "factory";
-                       reg = <0x100000 0x40000>;
-                       read-only;
-               };
-
-               partition@140000 {
-                       label = "kernel";
-                       reg = <0x140000 0x200000>;
-               };
-
-               partition@340000 {
-                       label = "ubi";
-                       reg = <0x340000 0x1E00000>;
-               };
-
-               partition@2140000 {
-                       label = "hw_panic";
-                       reg = <0x2140000 0x80000>;
-                       read-only;
-               };
-
-               partition@21c0000 {
-                       label = "bdinfo";
-                       reg = <0x21c0000 0x80000>;
-                       read-only;
-               };
-
-               partition@2240000 {
-                       label = "backup";
-                       reg = <0x2240000 0x80000>;
-                       read-only;
-               };
-
-               partition@22c0000 {
-                       label = "overly";
-                       reg = <0x22c0000 0x1000000>;
-               };
-
-               partition@32c0000 {
-                       label = "firmware_backup";
-                       reg = <0x32c0000 0x2000000>;
-               };
-
-               partition@52c0000 {
-                       label = "oem";
-                       reg = <0x52c0000 0x200000>;
-               };
-
-               partition@54c0000 {
-                       label = "opt";
-                       reg = <0x54c0000 0x2ac0000>;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x80000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "debug";
+                               reg = <0x80000 0x80000>;
+                               read-only;
+                       };
+
+                       factory: partition@100000 {
+                               label = "factory";
+                               reg = <0x100000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@140000 {
+                               label = "kernel";
+                               reg = <0x140000 0x200000>;
+                       };
+
+                       partition@340000 {
+                               label = "ubi";
+                               reg = <0x340000 0x1E00000>;
+                       };
+
+                       partition@2140000 {
+                               label = "hw_panic";
+                               reg = <0x2140000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@21c0000 {
+                               label = "bdinfo";
+                               reg = <0x21c0000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@2240000 {
+                               label = "backup";
+                               reg = <0x2240000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@22c0000 {
+                               label = "overly";
+                               reg = <0x22c0000 0x1000000>;
+                       };
+
+                       partition@32c0000 {
+                               label = "firmware_backup";
+                               reg = <0x32c0000 0x2000000>;
+                       };
+
+                       partition@52c0000 {
+                               label = "oem";
+                               reg = <0x52c0000 0x200000>;
+                       };
+
+                       partition@54c0000 {
+                               label = "opt";
+                               reg = <0x54c0000 0x2ac0000>;
+                       };
                };
        };
 };
index 59ab9ab70eaaa24dea2c2d37efac408b32075a5d..4adfae7ecb46edbd33623d088ec5c5d4b20005b7 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "uboot";
-                       reg = <0x00000 0x80000>; /* 64 KB */
-               };
-
-               partition@80000 {
-                       label = "uboot_env";
-                       reg = <0x80000 0x80000>; /* 64 KB */
-               };
-
-               partition@100000 {
-                       label = "factory";
-                       reg = <0x100000 0x40000>;
-               };
-
-               partition@140000 {
-                       label = "rootfs";
-                       reg = <0x140000 0xec0000>;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "uboot";
+                               reg = <0x00000 0x80000>; /* 64 KB */
+                       };
+
+                       partition@80000 {
+                               label = "uboot_env";
+                               reg = <0x80000 0x80000>; /* 64 KB */
+                       };
+
+                       partition@100000 {
+                               label = "factory";
+                               reg = <0x100000 0x40000>;
+                       };
+
+                       partition@140000 {
+                               label = "rootfs";
+                               reg = <0x140000 0xec0000>;
+                       };
                };
        };
 };
index 3a47fca22a3799d49079e34a16b79b690e751a44..3d9335fe66b781df51559910da25edd2a72512ea 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x100000>;
-                       read-only;
-               };
-
-               partition@100000 {
-                       label = "SC PID";
-                       reg = <0x100000 0x100000>;
-                       read-only;
-               };
-
-               partition@200000 {
-                       label = "kernel";
-                       reg = <0x200000 0x400000>;
-               };
-
-               partition@600000 {
-                       label = "ubi";
-                       reg = <0x600000 0x1c00000>;
-               };
-
-               factory: partition@2e00000 {
-                       label = "factory";
-                       reg = <0x2e00000 0x100000>;
-                       read-only;
-               };
-
-               partition@4200000 {
-                       label = "reserved";
-                       reg = <0x4200000 0x3c00000>;
-                       read-only;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       partition@100000 {
+                               label = "SC PID";
+                               reg = <0x100000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x400000>;
+                       };
+
+                       partition@600000 {
+                               label = "ubi";
+                               reg = <0x600000 0x1c00000>;
+                       };
+
+                       factory: partition@2e00000 {
+                               label = "factory";
+                               reg = <0x2e00000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@4200000 {
+                               label = "reserved";
+                               reg = <0x4200000 0x3c00000>;
+                               read-only;
+                       };
                };
        };
 };
index d15bb2f8048e561a054b585799108d8ce425514a..d8f891b6a3a23aea9e78b1046b7b3f41834294bf 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x100000>;
-                       read-only;
-               };
-
-               partition@100000 {
-                       label = "SC PART_MAP";
-                       reg = <0x100000 0x100000>;
-                       read-only;
-               };
-
-               partition@200000 {
-                       label = "kernel";
-                       reg = <0x200000 0x400000>;
-               };
-
-               partition@600000 {
-                       label = "ubi";
-                       reg = <0x600000 0x2800000>;
-               };
-
-               partition@2e00000 {
-                       label = "reserved0";
-                       reg = <0x2e00000 0x1800000>;
-                       read-only;
-               };
-
-               factory: partition@4600000 {
-                       label = "factory";
-                       reg = <0x4600000 0x200000>;
-                       read-only;
-               };
-
-               partition@4800000 {
-                       label = "reserved1";
-                       reg = <0x4800000 0x3800000>;
-                       read-only;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       partition@100000 {
+                               label = "SC PART_MAP";
+                               reg = <0x100000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               label = "kernel";
+                               reg = <0x200000 0x400000>;
+                       };
+
+                       partition@600000 {
+                               label = "ubi";
+                               reg = <0x600000 0x2800000>;
+                       };
+
+                       partition@2e00000 {
+                               label = "reserved0";
+                               reg = <0x2e00000 0x1800000>;
+                               read-only;
+                       };
+
+                       factory: partition@4600000 {
+                               label = "factory";
+                               reg = <0x4600000 0x200000>;
+                               read-only;
+                       };
+
+                       partition@4800000 {
+                               label = "reserved1";
+                               reg = <0x4800000 0x3800000>;
+                               read-only;
+                       };
                };
        };
 };
index 51150d3d7345b583491d431c91154459fe90af5d..c5e696547d085eb037a614f7bbb114f0da5108f2 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x80000>;
-                       read-only;
-               };
-
-               partition@80000 {
-                       label = "config";
-                       reg = <0x80000 0x80000>;
-                       read-only;
-               };
-
-               factory: partition@100000 {
-                       label = "factory";
-                       reg = <0x100000 0x40000>;
-                       read-only;
-               };
-
-               partition@140000 {
-                       compatible = "denx,uimage";
-                       label = "firmware";
-                       reg = <0x140000 0x7e40000>;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x80000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "config";
+                               reg = <0x80000 0x80000>;
+                               read-only;
+                       };
+
+                       factory: partition@100000 {
+                               label = "factory";
+                               reg = <0x100000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@140000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x140000 0x7e40000>;
+                       };
                };
        };
 };
index ddbb9b46b94aef18ebbf8b7c0dad0447a58ab7fe..76c0517bff7737783a67c05b7ab5e8698fc262a4 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x80000>;
-                       read-only;
-               };
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
 
-               partition@80000 {
-                       label = "u-boot-env";
-                       reg = <0x80000 0x60000>;
-                       read-only;
-               };
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x80000>;
+                               read-only;
+                       };
 
-               factory: partition@e0000 {
-                       label = "factory";
-                       reg = <0xe0000 0x60000>;
-               };
+                       partition@80000 {
+                               label = "u-boot-env";
+                               reg = <0x80000 0x60000>;
+                               read-only;
+                       };
 
-               partition@140000 {
-                       label = "kernel1";
-                       reg = <0x140000 0x300000>;
-               };
+                       factory: partition@e0000 {
+                               label = "factory";
+                               reg = <0xe0000 0x60000>;
+                       };
 
-               partition@440000 {
-                       label = "kernel2";
-                       reg = <0x440000 0x300000>;
-               };
+                       partition@140000 {
+                               label = "kernel1";
+                               reg = <0x140000 0x300000>;
+                       };
+
+                       partition@440000 {
+                               label = "kernel2";
+                               reg = <0x440000 0x300000>;
+                       };
 
-               partition@740000 {
-                       label = "ubi";
-                       reg = <0x740000 0xf7c0000>;
+                       partition@740000 {
+                               label = "ubi";
+                               reg = <0x740000 0xf7c0000>;
+                       };
                };
        };
 };
index b9eb01112204423ddba1532e21a1473a1bdc3f5d..a567ac2bc0c02658a34908ffa0ea9d96dfb11623 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "Bootloader";
-                       reg = <0x0 0x80000>;
-                       read-only;
-               };
-
-               partition@80000 {
-                       label = "Config";
-                       reg = <0x80000 0x40000>;
-               };
-
-               partition@c0000 {
-                       label = "Bdata";
-                       reg = <0xc0000 0x40000>;
-                       read-only;
-               };
-
-               factory: partition@100000 {
-                       label = "factory";
-                       reg = <0x100000 0x40000>;
-                       read-only;
-               };
-
-               partition@140000 {
-                       label = "crash";
-                       reg = <0x140000 0x40000>;
-               };
-
-               partition@180000 {
-                       label = "crash_syslog";
-                       reg = <0x180000 0x40000>;
-               };
-
-               partition@1c0000 {
-                       label = "reserved0";
-                       reg = <0x1c0000 0x40000>;
-                       read-only;
-               };
-
-               /* uboot expects to find kernels at 0x200000 & 0x600000
-                * referred to as system 1 & system 2 respectively.
-                * a kernel is considered suitable for handing control over
-                * if its linux magic number exists & uImage CRC are correct.
-                * If either of those conditions fail, a matching sys'n'_fail flag
-                * is set in uboot env & a restart performed in the hope that the
-                * alternate kernel is okay.
-                * if neither kernel checksums ok and both are marked failed, system 2
-                * is booted anyway.
-                *
-                * Note uboot's tftp flash install writes the transferred
-                * image to both kernel partitions.
-                */
-
-               partition@200000 {
-                       label = "kernel_stock";
-                       reg = <0x200000 0x400000>;
-               };
-
-               partition@600000 {
-                       label = "kernel";
-                       reg = <0x600000 0x400000>;
-               };
-
-               /* ubi partition is the result of squashing
-                * next consecutive stock partitions:
-                * - rootfs0 (rootfs partition for stock kernel0),
-                * - rootfs1 (rootfs partition for stock failsafe kernel1),
-                * - overlay (used as ubi overlay in stock fw)
-                * resulting 117,5MiB space for packages.
-                */
-
-               partition@a00000 {
-                       label = "ubi";
-                       reg = <0xa00000 0x7580000>;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "Bootloader";
+                               reg = <0x0 0x80000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "Config";
+                               reg = <0x80000 0x40000>;
+                       };
+
+                       partition@c0000 {
+                               label = "Bdata";
+                               reg = <0xc0000 0x40000>;
+                               read-only;
+                       };
+
+                       factory: partition@100000 {
+                               label = "factory";
+                               reg = <0x100000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@140000 {
+                               label = "crash";
+                               reg = <0x140000 0x40000>;
+                       };
+
+                       partition@180000 {
+                               label = "crash_syslog";
+                               reg = <0x180000 0x40000>;
+                       };
+
+                       partition@1c0000 {
+                               label = "reserved0";
+                               reg = <0x1c0000 0x40000>;
+                               read-only;
+                       };
+
+                       /* uboot expects to find kernels at 0x200000 & 0x600000
+                        * referred to as system 1 & system 2 respectively.
+                        * a kernel is considered suitable for handing control over
+                        * if its linux magic number exists & uImage CRC are correct.
+                        * If either of those conditions fail, a matching sys'n'_fail flag
+                        * is set in uboot env & a restart performed in the hope that the
+                        * alternate kernel is okay.
+                        * if neither kernel checksums ok and both are marked failed, system 2
+                        * is booted anyway.
+                        *
+                        * Note uboot's tftp flash install writes the transferred
+                        * image to both kernel partitions.
+                        */
+
+                       partition@200000 {
+                               label = "kernel_stock";
+                               reg = <0x200000 0x400000>;
+                       };
+
+                       partition@600000 {
+                               label = "kernel";
+                               reg = <0x600000 0x400000>;
+                       };
+
+                       /* ubi partition is the result of squashing
+                        * next consecutive stock partitions:
+                        * - rootfs0 (rootfs partition for stock kernel0),
+                        * - rootfs1 (rootfs partition for stock failsafe kernel1),
+                        * - overlay (used as ubi overlay in stock fw)
+                        * resulting 117,5MiB space for packages.
+                        */
+
+                       partition@a00000 {
+                               label = "ubi";
+                               reg = <0xa00000 0x7580000>;
+                       };
                };
        };
 };
index b456e43a9e3a0093cf429a9311a1953b19ed9705..c556200e45721491e1c80e08ce162ab1da9d4f17 100644 (file)
 &nand {
        status = "okay";
 
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "Bootloader";
-                       reg = <0x0 0x40000>;
-                       read-only;
-               };
-
-               partition@40000 {
-                       label = "Config";
-                       reg = <0x40000 0x40000>;
-               };
-
-               partition@80000 {
-                       label = "Bdata";
-                       reg = <0x80000 0x40000>;
-                       read-only;
-               };
-
-               factory: partition@c0000 {
-                       label = "factory";
-                       reg = <0x0c0000 0x40000>;
-                       read-only;
-               };
-
-               partition@100000 {
-                       label = "crash";
-                       reg = <0x100000 0x40000>;
-               };
-
-               partition@140000 {
-                       label = "crash_syslog";
-                       reg = <0x140000 0x80000>;
-               };
-
-               partition@1c0000 {
-                       label = "reserved0";
-                       reg = <0x1c0000 0x40000>;
-                       read-only;
-               };
-
-               /* We keep stock xiaomi firmware (kernel0) here */
-               partition@200000 {
-                       label = "kernel_stock";
-                       reg = <0x200000 0x400000>;
-               };
-
-               partition@600000 {
-                       label = "kernel";
-                       reg = <0x600000 0x400000>;
-               };
-
-               partition@a00000 {
-                       label = "ubi";
-                       reg = <0xa00000 0xf580000>;
+       nand@0 {
+               reg = <0>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "Bootloader";
+                               reg = <0x0 0x40000>;
+                               read-only;
+                       };
+
+                       partition@40000 {
+                               label = "Config";
+                               reg = <0x40000 0x40000>;
+                       };
+
+                       partition@80000 {
+                               label = "Bdata";
+                               reg = <0x80000 0x40000>;
+                               read-only;
+                       };
+
+                       factory: partition@c0000 {
+                               label = "factory";
+                               reg = <0x0c0000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@100000 {
+                               label = "crash";
+                               reg = <0x100000 0x40000>;
+                       };
+
+                       partition@140000 {
+                               label = "crash_syslog";
+                               reg = <0x140000 0x80000>;
+                       };
+
+                       partition@1c0000 {
+                               label = "reserved0";
+                               reg = <0x1c0000 0x40000>;
+                               read-only;
+                       };
+
+                       /* We keep stock xiaomi firmware (kernel0) here */
+                       partition@200000 {
+                               label = "kernel_stock";
+                               reg = <0x200000 0x400000>;
+                       };
+
+                       partition@600000 {
+                               label = "kernel";
+                               reg = <0x600000 0x400000>;
+                       };
+
+                       partition@a00000 {
+                               label = "ubi";
+                               reg = <0xa00000 0xf580000>;
+                       };
                };
        };
 };
index 0d69d2cb34e4f4b04851c9ea36977258628db890..492c59cbbfe7f44e67111bc5a7d527b9a662a4b3 100644 (file)
@@ -3572,7 +3572,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      }
 +#endif
 +
-+      nand_set_flash_node(nand_chip, pdev->dev.of_node);
++      nand_set_flash_node(nand_chip, of_get_next_available_child(pdev->dev.of_node, NULL));
 +      err = mtd_device_parse_register(mtd, probe_types, &ppdata,
 +                                      NULL, 0);
 +      if (!err) {