Skip to contentSkip to conversation

Revert "ARM: dts: imx: move nand related property under nand@0"

PATCH Applied [email protected] 5 participants 18 messages Feb 19 – Mar 9

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "ARM: dts: imx: move nand related property under nand@0"

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -6
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
Signature · 1 line
2.42.0
maintainer
#1 lore raw
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

#2 lore raw
Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 2 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

I already raised the issue when you sent this patch series, we need to consider the other users of this DT blob, for example U-Boot.

Please see my comments and Krzysztof one here [1]

I agree on investigating this, but I see no other option than reverting for now.

[1] https://lore.kernel.org/all/20251105115538.GA17091@francesco-nb/

Francesco

#3 lore raw
In reply to Frank Li

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer
#4 lore raw
Quoted 43 lines · Max Krummenacher

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

Quoted 4 lines

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

#5 lore raw
Quoted 44 lines · Frank Li
Quoted 43 lines · Max Krummenacher

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

Quoted 7 lines
Quoted 4 lines

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.
Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer
#6 lore raw
Quoted 50 lines · Max Krummenacher
Quoted 49 lines · Frank Li
Quoted 47 lines · Max Krummenacher

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

#7 lore raw
Quoted 89 lines · Frank Li
Quoted 50 lines · Max Krummenacher
Quoted 49 lines · Frank Li
Quoted 47 lines · Max Krummenacher

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Quoted 4 lines

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

I tested the following on Colibri iMX7.

kernel 7.0-rc1 and DTB are built from an untouched kernel at commit 7dff99b35460 ("Remove WARN_ALL_UNSEEDED_RANDOM kernel config option").

kernel 7.0-rc1 patched has the sources as above plus the changes you propose to the gpmi-nand driver.

DTB-reverted has the sources as above plus commit 8124b4a4a96b ("ARM:
dts: imx: move nand related property under nand@0") reverted.

DTB DTB-reverted

kernel 7.0-rc1 fail boots

kernel 7.0-rc1 patched boots boots

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer
#8 lore raw
Quoted 103 lines · Max Krummenacher
Quoted 89 lines · Frank Li
Quoted 50 lines · Max Krummenacher
Quoted 49 lines · Frank Li
Quoted 47 lines · Max Krummenacher

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Quoted 4 lines

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

I tested the following on Colibri iMX7.

kernel 7.0-rc1 and DTB are built from an untouched kernel at commit 7dff99b35460 ("Remove WARN_ALL_UNSEEDED_RANDOM kernel config option").

kernel 7.0-rc1 patched has the sources as above plus the changes you propose to the gpmi-nand driver.

Quoted 8 lines

DTB-reverted has the sources as above plus commit 8124b4a4a96b ("ARM:
dts: imx: move nand related property under nand@0") reverted.

DTB DTB-reverted

kernel 7.0-rc1 fail boots

kernel 7.0-rc1 patched boots boots

Thanks you for testing. I will work a formal patch for it. Can you help rework you patch, which keep both properties, just revert deleted part and keep everything nand@0, so it help transistion. you also start work uboot part.

I plan give additional 1 year to do transistion. This type layout actually exist for long time.

Frank

Quoted 360 lines

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

#9 lore raw

Am Donnerstag, dem 26.02.2026 um 10:12 -0500 schrieb Frank Li:

Quoted 109 lines · Max Krummenacher
Quoted 108 lines · Frank Li
Quoted 89 lines · Max Krummenacher
Quoted 50 lines · Frank Li
Quoted 49 lines · Max Krummenacher
Quoted 47 lines

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Quoted 4 lines

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

I tested the following on Colibri iMX7.

kernel 7.0-rc1 and DTB are built from an untouched kernel at commit 7dff99b35460 ("Remove WARN_ALL_UNSEEDED_RANDOM kernel config option").

kernel 7.0-rc1 patched has the sources as above plus the changes you propose to the gpmi-nand driver.

DTB-reverted has the sources as above plus commit 8124b4a4a96b ("ARM:
dts: imx: move nand related property under nand@0") reverted.

DTB DTB-reverted

Quoted 8 lines
Quoted 3 lines

kernel 7.0-rc1 fail boots

kernel 7.0-rc1 patched boots boots

Thanks you for testing. I will work a formal patch for it. Can you help rework you patch, which keep both properties, just revert deleted part and keep everything nand@0, so it help transistion. you also start work uboot part.

We are happy to test any patch proposals on our hardware for U-Boot and Linux, with and without the nand@0 subnode.

Please note that the current state as of Linux v7.0-rc2 is broken for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

Regards
Max

Quoted 366 lines

I plan give additional 1 year to do transistion. This type layout actually exist for long time.

Frank

Quoted 360 lines

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer
#10 lore raw
Quoted 122 lines · Max Krummenacher

Am Donnerstag, dem 26.02.2026 um 10:12 -0500 schrieb Frank Li:

Quoted 109 lines · Max Krummenacher
Quoted 108 lines · Frank Li
Quoted 89 lines · Max Krummenacher
Quoted 50 lines · Frank Li
Quoted 49 lines · Max Krummenacher
Quoted 47 lines

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Quoted 4 lines

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

I tested the following on Colibri iMX7.

kernel 7.0-rc1 and DTB are built from an untouched kernel at commit 7dff99b35460 ("Remove WARN_ALL_UNSEEDED_RANDOM kernel config option").

kernel 7.0-rc1 patched has the sources as above plus the changes you propose to the gpmi-nand driver.

DTB-reverted has the sources as above plus commit 8124b4a4a96b ("ARM:
dts: imx: move nand related property under nand@0") reverted.

DTB DTB-reverted

Quoted 8 lines
Quoted 3 lines

kernel 7.0-rc1 fail boots

kernel 7.0-rc1 patched boots boots

Thanks you for testing. I will work a formal patch for it. Can you help rework you patch, which keep both properties, just revert deleted part and keep everything nand@0, so it help transistion. you also start work uboot part.

We are happy to test any patch proposals on our hardware for U-Boot and Linux, with and without the nand@0 subnode.

Quoted 7 lines

Please note that the current state as of Linux v7.0-rc2 is broken for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +0 -0
@@ -260,14 +260,10 @@ fixed-link {

&gpmi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpmi_nand>;
+ nand-on-flash-bbt;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

Remove "- nand@0" part. You can use "git add -p" to do that.

Frank

Quoted 370 lines

Regards
Max

Quoted 366 lines

I plan give additional 1 year to do transistion. This type layout actually exist for long time.

Frank

Quoted 360 lines

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer
#11 lore raw
Quoted 24 lines · Frank Li
Quoted 6 lines · Max Krummenacher

for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -0
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
  	pinctrl-names = "default";
  	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
  	#address-cells = <1>;
 	#size-cells = <0>;
  	status = "okay";
 
Quoted 1 line

Remove "- nand@0" part. You can use "git add -p" to do that.

Do you plan rework this patch as what I said?

Frank

Quoted 374 lines

Frank

Quoted 370 lines

Regards
Max

Quoted 366 lines

I plan give additional 1 year to do transistion. This type layout actually exist for long time.

Frank

Quoted 360 lines

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

#12 lore raw
Quoted 25 lines · Frank Li
Quoted 24 lines · Frank Li
Quoted 6 lines · Max Krummenacher

for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -0
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
  	pinctrl-names = "default";
  	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
  	#address-cells = <1>;
 	#size-cells = <0>;
  	status = "okay";
 
Quoted 3 lines
Quoted 1 line

Remove "- nand@0" part. You can use "git add -p" to do that.

Do you plan rework this patch as what I said?

Issue and revert were posted two weeks ago. That's maximum time to handle regression.

Please apply the patch to fix the regression.

#regzbot introduced: 8124b4a4a96b

Quoted 7 lines

Frank

Quoted 4 lines

Frank

Please kindly trim the replies from unnecessary context. It makes it much easier to find new content.

There is huge chunk of quotes below which no one should scroll through to look for your replies.

Best regards,
Krzysztof

maintainer
#13 lore raw
Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Frank Li
Quoted 24 lines · Frank Li
Quoted 6 lines · Max Krummenacher

for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -0
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
  	pinctrl-names = "default";
  	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
  	#address-cells = <1>;
 	#size-cells = <0>;
  	status = "okay";
 
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Remove "- nand@0" part. You can use "git add -p" to do that.

Do you plan rework this patch as what I said?

Issue and revert were posted two weeks ago. That's maximum time to handle regression.

Any docuement said these maxium times, I also want to know other maximum time, such as
what's max time maintainer need reply? Many patch is not any
reponse for long time.

Frank

#14 lore raw
Quoted 27 lines · Frank Li
Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Frank Li
Quoted 24 lines · Frank Li
Quoted 6 lines · Max Krummenacher

for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -0
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
  	pinctrl-names = "default";
  	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
  	#address-cells = <1>;
 	#size-cells = <0>;
  	status = "okay";
 
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Remove "- nand@0" part. You can use "git add -p" to do that.

Do you plan rework this patch as what I said?

Issue and revert were posted two weeks ago. That's maximum time to handle regression.

Any docuement said these maxium times, I also want to know other maximum

Just read the regression and bug handling docs in the kernel.

Quoted 3 lines

time, such as
what's max time maintainer need reply? Many patch is not any
reponse for long time.

Best regards,
Krzysztof

#15 lore raw
In reply to Frank Li
Quoted 149 lines · Frank Li
Quoted 122 lines · Max Krummenacher

Am Donnerstag, dem 26.02.2026 um 10:12 -0500 schrieb Frank Li:

Quoted 109 lines · Max Krummenacher
Quoted 108 lines · Frank Li
Quoted 89 lines · Max Krummenacher
Quoted 50 lines · Frank Li
Quoted 49 lines · Max Krummenacher
Quoted 47 lines

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Quoted 4 lines

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

I tested the following on Colibri iMX7.

kernel 7.0-rc1 and DTB are built from an untouched kernel at commit 7dff99b35460 ("Remove WARN_ALL_UNSEEDED_RANDOM kernel config option").

kernel 7.0-rc1 patched has the sources as above plus the changes you propose to the gpmi-nand driver.

DTB-reverted has the sources as above plus commit 8124b4a4a96b ("ARM:
dts: imx: move nand related property under nand@0") reverted.

DTB DTB-reverted

Quoted 8 lines
Quoted 3 lines

kernel 7.0-rc1 fail boots

kernel 7.0-rc1 patched boots boots

Thanks you for testing. I will work a formal patch for it. Can you help rework you patch, which keep both properties, just revert deleted part and keep everything nand@0, so it help transistion. you also start work uboot part.

We are happy to test any patch proposals on our hardware for U-Boot and Linux, with and without the nand@0 subnode.

Quoted 7 lines

Please note that the current state as of Linux v7.0-rc2 is broken for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -0
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
  	pinctrl-names = "default";
  	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
  	#address-cells = <1>;
 	#size-cells = <0>;
  	status = "okay";
 

Remove "- nand@0" part. You can use "git add -p" to do that.

Quoted 1 line

Frank

Sorry for the delay, was AFK last week.

I tried the partial revert of having the properties configuring the nand chip both at the nand controller node level directly and additionally in the subnode nand@0.
I.e. revert what your patch removes but keep what it adds.

This works with the existing gpmi driver and the patched gpmi driver:

                              DTB        DTB-reverted DTB-partially-reverted
kernel 7.0-rc1                fail       boots        boots
kernel 7.0-rc1 patched        boots      boots        boots

Regards
Max[A

Quoted 372 lines
Quoted 372 lines

Regards
Max

Quoted 366 lines

I plan give additional 1 year to do transistion. This type layout actually exist for long time.

Frank

Quoted 360 lines

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer
#16 lore raw
Quoted 159 lines · Max Krummenacher
Quoted 149 lines · Frank Li
Quoted 122 lines · Max Krummenacher

Am Donnerstag, dem 26.02.2026 um 10:12 -0500 schrieb Frank Li:

Quoted 109 lines · Max Krummenacher
Quoted 108 lines · Frank Li
Quoted 89 lines · Max Krummenacher
Quoted 50 lines · Frank Li
Quoted 49 lines · Max Krummenacher
Quoted 47 lines

Hi Frank

Quoted 30 lines · Frank Li
Quoted 20 lines · On Thu, Feb 19, 2026 at 04:11:49PM +0100, [email protected] wrote:

From: Max Krummenacher <[email protected]>

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[    0.876938] Creating 5 MTD partitions on "gpmi-nand":
[    0.876974] 0x000000000000-0x000000080000 : "mx7-bcb"
[    0.879860] 0x000000080000-0x000000200000 : "u-boot1"
[    0.884761] 0x000000200000-0x000000380000 : "u-boot2"
[    0.886993] 0x000000380000-0x000000400000 : "u-boot-env"
[    0.894686] 0x000000400000-0x000020000000 : "ubi"
[    0.899054] gpmi-nand 33002000.nand-controller: driver registered.
...
[    0.960443] ubi0: default fastmap pool size: 200
Quoted 8 lines
[    0.960476] ubi0: default fastmap WL pool size: 100
[    0.960500] ubi0: attaching mtd4
[    1.636355] ubi0 error: scan_peb: bad image sequence number 1588722158 in PEB 4060, expected 1574791632
...
[    1.649889] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[    1.650029] UBI error: cannot attach mtd4
...
[    1.670262] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,253)
Quoted 4 lines

Can you help found the real reason why not boot?
nand@0 is preferred format for MTD raw nand.

Frank

I guess the root cause is that the driver for gpmi-nand predates the update of the binding rules which want the nand device described in a child node 'nand@0' also for nand controllers which only can control one nand chip.

While it is possible to update the driver in the same patch set as changing the device tree to understand the new dtb rules, maybe even falling back to the old definitions this likely breaks other users, most notable U-Boot.

Quoted 7 lines
Quoted 2 lines

GPMI is widely used, include i.MX8 still use GPMI. Does below patch fix boot problem?

My concern is that the new device tree (with the nand@0 subnode) is not yet understood by other consumers of the DT sources, e.g. U‑Boot, older Linux kernels (before the driver change), possibly barebox, and any other consumer that relies on the kernel DT files.

I understand, but we need move forward. we can keep both for transition.

Quoted 11 lines

Updating only the Linux driver to support both the new and old bindings therefore solves only part of the problem. As long as these other consumers do not understand both bindings as well, we cannot safely update the shared DT sources. So I think the commit needs to be reverted.

In addition, the proposed fix in the driver is likely incomplete:
with the old binding there may be child nodes (i.e for partitions). 'np = of_get_next_child(this->pdev->dev.of_node, NULL);' does then find a node whcih is not the node that actually describes the single NAND chip.

I know it is incomplete, just want to check if it is the reason cause boot failure.

Quoted 4 lines

An alternative approach could be to update the binding documentation so that, specifically for the GPMI driver, the older binding is also considered valid.

Not easy to do that, I try many method to update yaml file. common nand flash detect node node "nand-controller".

Quoted 4 lines

Once the driver supports both the old and the new binding, the old form could be marked as deprecated, but still allowed for compatibility. This would avoid breaking existing consumers while giving us a path to migrate DTs over time.

Quoted 4 lines

Needn't revert all, just revert delete part, keep both to help migrate.

anyways, I need know if of_get_next_child(this->pdev->dev.of_node, NULL); fix your problem.

I tested the following on Colibri iMX7.

kernel 7.0-rc1 and DTB are built from an untouched kernel at commit 7dff99b35460 ("Remove WARN_ALL_UNSEEDED_RANDOM kernel config option").

kernel 7.0-rc1 patched has the sources as above plus the changes you propose to the gpmi-nand driver.

DTB-reverted has the sources as above plus commit 8124b4a4a96b ("ARM:
dts: imx: move nand related property under nand@0") reverted.

DTB DTB-reverted

Quoted 8 lines
Quoted 3 lines

kernel 7.0-rc1 fail boots

kernel 7.0-rc1 patched boots boots

Thanks you for testing. I will work a formal patch for it. Can you help rework you patch, which keep both properties, just revert deleted part and keep everything nand@0, so it help transistion. you also start work uboot part.

We are happy to test any patch proposals on our hardware for U-Boot and Linux, with and without the nand@0 subnode.

Quoted 7 lines

Please note that the current state as of Linux v7.0-rc2 is broken for our NAND-based modules, and our CI no longer produces any useful results as a consequence.

I strongly believe that, as an immediate first step, the commit that moved the DT NAND chip configuration into its subnode should be reverted.

As my previous said, can do partial revert? Just add back property under gpmi and keep nand@0 node.

For example

arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -0
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
  	pinctrl-names = "default";
  	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
  	#address-cells = <1>;
 	#size-cells = <0>;
  	status = "okay";
 

Remove "- nand@0" part. You can use "git add -p" to do that.

Quoted 1 line

Frank

Sorry for the delay, was AFK last week.

I tried the partial revert of having the properties configuring the nand chip both at the nand controller node level directly and additionally in the subnode nand@0.
I.e. revert what your patch removes but keep what it adds.

Quoted 5 lines

This works with the existing gpmi driver and the patched gpmi driver:

                              DTB        DTB-reverted DTB-partially-reverted
kernel 7.0-rc1                fail       boots        boots
kernel 7.0-rc1 patched        boots      boots        boots

Thanks! I already appled revert patch. If you sent out partially revert patch, I can replace my fixes branch before I send out pull-reqeust (plan in this Friday)

Frank

Quoted 376 lines

Regards
Max[A

Quoted 372 lines
Quoted 372 lines

Regards
Max

Quoted 366 lines

I plan give additional 1 year to do transistion. This type layout actually exist for long time.

Frank

Quoted 360 lines

Regards
Max

Quoted 356 lines

Frank

Quoted 354 lines

Regards,
Max

Quoted 350 lines
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -1
index 51f595fbc834e..fb126a7c4a61e 100644
@@ -2680,6 +2680,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 {
        struct nand_chip *chip = &this->nand;
        struct mtd_info  *mtd = nand_to_mtd(chip);
+       struct device_node *np;
        int ret;
 
        /* init the MTD data structures */
@@ -2688,7 +2689,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
 
        /* init the nand_chip{}, we don't support a 16-bit NAND Flash bus. */
        nand_set_controller_data(chip, this);
-       nand_set_flash_node(chip, this->pdev->dev.of_node);
+       np = of_get_next_child(this->pdev->dev.of_node, NULL);
+       if (!np)
+               np = this->pdev->dev.of_node;
+       nand_set_flash_node(chip, np);
        chip->legacy.block_markbad = gpmi_block_markbad;
        chip->badblock_pattern  = &gpmi_bbt_descr;
        chip->options           |= NAND_NO_SUBPAGE_WRITE;

Frank

Quoted 323 lines

So I don't see a quick fix other than reverting and living with the dtb_check warning.

Regards,
Max

Quoted 315 lines
Quoted 315 lines
Fixes 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")

---

 arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi         |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi |  6 +-----
 .../boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi      |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi           |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts            |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi          |  6 +-----
 .../boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi  |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi          |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi       | 12 ++++--------
 .../boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi   | 12 ++++--------
 arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts     |  6 +-----
 arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi          |  8 ++------
 15 files changed, 22 insertions(+), 82 deletions(-)
arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi +1 -5
index f452764fae00..547fb141ec0c 100644
@@ -36,12 +36,8 @@ &clks {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi +1 -5
index 58ecdb87c6d4..9975b6ee433d 100644
@@ -172,12 +172,8 @@ eth_phy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi +1 -5
index 6f3becd33a5b..aa9a442852f4 100644
@@ -102,12 +102,8 @@ ethphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi +1 -5
index f2140dd8525f..85e278eb2016 100644
@@ -73,12 +73,8 @@ ethphy: ethernet-phy@3 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi +1 -5
index 131a3428ddb8..c93dbc595ef6 100644
@@ -260,14 +260,10 @@ fixed-link {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	#address-cells = <1>;
 	#size-cells = <0>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c3 {
arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +1 -5
index d29adfef5fdb..57297d6521cf 100644
@@ -252,13 +252,9 @@ etnphy: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts +1 -5
index 40d530c1dc29..2a6bb5ff808a 100644
@@ -133,12 +133,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi +1 -5
index 776f6f78ee46..e34c8cbe36ae 100644
@@ -101,12 +101,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi +1 -5
index 27e4d2aec137..a3ea1b208462 100644
@@ -63,12 +63,8 @@ ethphy1: ethernet-phy@1 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c1 {
arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi +1 -5
index dc53f9286ffe..1992dfb53b45 100644
@@ -296,13 +296,9 @@ &fec2 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	fsl,no-blockmark-swap;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &i2c2 {
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi +4 -8
index eaed2cbf0c82..ec3c1e7301f4 100644
@@ -160,15 +160,11 @@ &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
 	fsl,use-minimum-ecc;
+	nand-on-flash-bbt;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <8>;
+	nand-ecc-step-size = <512>;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <8>;
-		nand-ecc-step-size = <512>;
-	};
 };
 
 /* I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) */
arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi +4 -8
index 3dfd43b32055..43518bf07602 100644
@@ -43,15 +43,11 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-ecc-mode = "hw";
+	nand-ecc-strength = <0>;
+	nand-ecc-step-size = <0>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-ecc-strength = <0>;
-		nand-ecc-step-size = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &iomuxc {
arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi +1 -5
index fc298f57bfff..83b9de17cee2 100644
@@ -60,12 +60,8 @@ ethphy0: ethernet-phy@0 {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "disabled";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &uart1 {
arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts +1 -5
index 8ec18eae98a4..2d9f495660c9 100644
@@ -25,12 +25,8 @@ usdhc2_pwrseq: usdhc2-pwrseq {
 &gpmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
+	nand-on-flash-bbt;
 	status = "okay";
-
-	nand@0 {
-		reg = <0>;
-		nand-on-flash-bbt;
-	};
 };
 
 &snvs_poweroff {
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi +2 -7
index a41dc4edfc0d..8666dcd7fe97 100644
@@ -375,14 +375,10 @@ &gpio7 {
 /* NAND on such SKUs */
 &gpmi {
 	fsl,use-minimum-ecc;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpmi_nand>;
-
-	nand@0 {
-		reg = <0>;
-		nand-ecc-mode = "hw";
-		nand-on-flash-bbt;
-	};
 };
 
 /* On-module Power I2C */
--

2.42.0

maintainer Applied
#17 lore raw
In reply to [email protected]
Quoted 10 lines · On Thu, 19 Feb 2026 16:11:49 +0100, [email protected] wrote:

This reverts commit 8124b4a4a96b57d6cc3705a9df9623c52baa047b.

The change introduced a regression: at least Colibri iMX6ULL and Colibri iMX7 no longer boot with that commit applied, while they boot again after reverting it.

Although this has only been verified on these two modules, the issue is expected to affect all device trees using the gpmi-nand driver.

[...]

Applied, thanks!

[1/1] Revert "ARM: dts: imx: move nand related property under nand@0"

      commit: 33f0dbd4b895e49add0c2543e5dd2ff5b872121c

Best regards,

Signature · 1 line
Frank Li <[email protected]>