QSPI erasesize differs between v5.10 and v5.15 SDK kernel on RDB3

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

QSPI erasesize differs between v5.10 and v5.15 SDK kernel on RDB3

691 Views
hittzt
Senior Contributor I

Hi,

 

I know that, now the v5.15 kernel is about to be the primary kernel for S32G platform.

But when I compare the v5.15 and v5.10 kernels, there are different erasesize of qspi flash on RDB3,

With v5.10 kernel, the "cat /proc/mtd" command will show the following info:

root@nxp-s32g:~# cat /proc/mtd
dev: size erasesize name
mtd0: 04000000 00010000 "Flash-Image"
mtd1: 001e0000 00010000 "FIP"
mtd2: 00010000 00010000 "U-Boot-Env"
mtd3: 00e00000 00010000 "Kernel"
mtd4: 00100000 00010000 "DTB"
mtd5: 01f10000 00010000 "Rootfs"
mtd6: 01000000 00010000 "PFE-Firmware"

While, whit v5.15 kernel, there will be:

root@nxp-s32g:~# cat /proc/mtd
dev: size erasesize name
mtd0: 04000000 00001000 "Flash-Image"
mtd1: 001e0000 00001000 "FIP"
mtd2: 00010000 00001000 "U-Boot-Env"
mtd3: 00e00000 00001000 "Kernel"
mtd4: 00100000 00001000 "DTB"
mtd5: 01f10000 00001000 "Rootfs"
mtd6: 01000000 00001000 "PFE-Firmware"

 

This difference will cause the UBI file system mount failure with:

UBIFS error (ubi0:0 pid 2277): init_constants_early: too small LEBs (3968 bytes), min. is 15360 bytes

 

So would you please help to check the issue and give a workaround to fix it?

 

Thanks,

Zhantao

0 Kudos
4 Replies

676 Views
nxf35132
NXP Employee
NXP Employee

Hello,

 

If the following config (which is enabled by default in upstream linux kernel 5.15) is set, then the erase sector size for QSPI Flash will try to be set to 4KB size.

In order to use 64KB QSPI Flash erase sectors size (which would bypass the UBIFS 15 KiB erase sector size limitation), then just disable the 'CONFIG_MTD_SPI_NOR_USE_4K_SECTORS' config.

 

Regards,

Ciprian

Tags (1)
0 Kudos

667 Views
hittzt
Senior Contributor I

Hi Ciprian,

 

Thanks for your reply.

Yes, currently the 'CONFIG_MTD_SPI_NOR_USE_4K_SECTORS' is set to 'y' for both RDB3 and EVB platforms. But only RDB3 has the issue of 4K(0x1000) erasesize, on EVB, the erasesize is 64K(0x10000).

So there seems other factors in the qspi driver causing this issue.

 

Thanks,

Zhantao

0 Kudos

662 Views
nxf35132
NXP Employee
NXP Employee

Hello,

 

On EVB boards, the QSPI Flash memory type is "MX25UW51245GXDQ00". On RDB3/RDB2/EVB3 platforms the QSPI Flash memory type is "MX25UW51245GXDR00".

Please take into consideration that within the upstream spi-nor core framework the erase sector size is determined dynamically, the CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is just an indication (preference setting). This difference in QSPI Flash memory type may lead to erase sectors of size 4KB to be determined as supported in the spi-nor core framework, in case of RDB3 platforms, and not EVB.

 

Regards,

Ciprian

0 Kudos

657 Views
hittzt
Senior Contributor I

Thanks a lot for the reply.

That is helpful. I know the reason now.

 

Regards,

Zhantao

0 Kudos