Re: [PATCH] Revert "ARM: dts: imx: move nand related property under nand@0"

Frank Li
2026-02-19T16:01:41Z

On Thu, Feb 19, 2026 at 04:11:49PM +0100, max.oss.09@gmail.com wrote:
> From: Max Krummenacher <max.krummenacher@toradex.com>
>
> 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)

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

Frank
>
> Fixes: 8124b4a4a96b ("ARM: dts: imx: move nand related property under nand@0")
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
>
> ---
>
> 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(-)
>
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi b/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi
> index f452764fae00..547fb141ec0c 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6-logicpd-som.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi
> index 58ecdb87c6d4..9975b6ee433d 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-icore.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi
> index 6f3becd33a5b..aa9a442852f4 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-pfla02.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi
> index f2140dd8525f..85e278eb2016 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-phytec-phycore-som.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi
> index 131a3428ddb8..c93dbc595ef6 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi
> index d29adfef5fdb..57297d6521cf 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts b/arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts
> index 40d530c1dc29..2a6bb5ff808a 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ul-geam.dts
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi
> index 776f6f78ee46..e34c8cbe36ae 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ul-isiot.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi
> index 27e4d2aec137..a3ea1b208462 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ul-phytec-phycore-som.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi
> index dc53f9286ffe..1992dfb53b45 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ul-tx6ul.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi
> index eaed2cbf0c82..ec3c1e7301f4 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi
> @@ -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) */
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi
> index 3dfd43b32055..43518bf07602 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi
> index fc298f57bfff..83b9de17cee2 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ull-myir-mys-6ulx.dtsi
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts b/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts
> index 8ec18eae98a4..2d9f495660c9 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts
> +++ b/arch/arm/boot/dts/nxp/imx/imx6ulz-bsh-smm-m2.dts
> @@ -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 {
> diff --git a/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi b/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi
> index a41dc4edfc0d..8666dcd7fe97 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi
> @@ -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
>