IMX7D MTD SPI_NOR doesn't work with kernel 5.10.72

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX7D MTD SPI_NOR doesn't work with kernel 5.10.72

Jump to solution
514 Views
thepnimit
Contributor III

Dear NXP

I have IMX7D custom model and use with linux kernel version 5.4.47.

When I try to upgrade to version 5.10.72, I found MTD SPI flask memory doesn't.work

In linux version 5.4.47

root@IMX7D:~$ ls -l /dev/mtd*
crw------- 1 root root 90, 0 Apr 22 11:03 /dev/mtd0
crw------- 1 root root 90, 1 Apr 22 11:03 /dev/mtd0ro
crw------- 1 root root 90, 2 Apr 22 11:03 /dev/mtd1
crw------- 1 root root 90, 3 Apr 22 11:03 /dev/mtd1ro
crw------- 1 root root 90, 4 Apr 22 11:03 /dev/mtd2
crw------- 1 root root 90, 5 Apr 22 11:03 /dev/mtd2ro
brw-rw---- 1 root disk 31, 0 Apr 22 11:03 /dev/mtdblock0
brw-rw---- 1 root disk 31, 1 Apr 22 11:03 /dev/mtdblock1
brw-rw---- 1 root disk 31, 2 Apr 22 11:03 /dev/mtdblock2

dmesg

root@IMX7D:~$ dmesg | grep spi
[ 1.091264] spi-nor spi0.1: m25p16-nonjedec (2048 Kbytes)
[ 1.095464] 3 fixed-partitions partitions found on MTD device spi0.1
[ 1.100524] Creating 3 MTD partitions on "spi0.1":
[ 1.136498] spi_imx 30820000.spi: probed

 DTS

&ecspi1 {
fsl,spi-num-chipselects = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
cs-gpios = <&gpio4 2 0>, <&gpio4 19 0>;
status = "okay";

m25px16@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "m25p16-nonjedec";
spi-max-frequency = <20000000>;
reg = <1>;

partition@0 {
label = "uboot";
reg = <0x0 0xc0000>;
};

partition@c0000 {
label = "uboot environment";
reg = <0xc0000 0x40000>;
};

partition@100000 {
label = "splash";
reg = <0x100000 0x100000>;
};
};
};

pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX7D_PAD_ECSPI1_MOSI__ECSPI1_MOSI 0xf
MX7D_PAD_ECSPI1_MISO__ECSPI1_MISO 0xf
MX7D_PAD_ECSPI1_SCLK__ECSPI1_SCLK 0xf
>;
};

pinctrl_ecspi1_cs: ecspi1_cs_grp {
fsl,pins = <
MX7D_PAD_UART2_RX_DATA__GPIO4_IO2 0x34
MX7D_PAD_ECSPI1_SS0__GPIO4_IO19 0x34
>;
};

 This work on 5.4.47 but in 5.10.72 it not found any SPI device and dmesg | grep spi is return empty message

When I compile the kernel 5.10.72 I found warning mesage

 Kernel: arch/arm/boot/zImage is ready
DTC arch/arm/boot/dts/imx7d-custom-som-imx7.dtb
arch/arm/boot/dts/imx7d-custom-som-imx7.dts:258.28-281.11: Warning (spi_bus_reg): /soc/bus@30800000/spba-bus@30800000/spi@30820000/m25px16@0: SPI bus unit address format error, expected "1"

 

Do you have some suggest for me?

 

Regards

Thepnimit

0 Kudos
1 Solution
504 Views
thepnimit
Contributor III

OK

I found the CONFIG_GPIO_MXC and CONFIG_GPIO_GENERIC doesn't enable

After I enable the MTD SPI can work

Thanks

Thepnimit

View solution in original post

0 Kudos
1 Reply
505 Views
thepnimit
Contributor III

OK

I found the CONFIG_GPIO_MXC and CONFIG_GPIO_GENERIC doesn't enable

After I enable the MTD SPI can work

Thanks

Thepnimit

0 Kudos