Knowledge Base Article

Why does Linux fail to access QSPI flash components across all supported devices in the QPDS26.1.1_REL_GSRD_PR release?

Description

Due to the change in the default value (from ‘n' to 'y’) of the CONFIG_MTD_SPI_NOR_USE_4K_SECTORS config in Linux from QPDS26.1.1_REL_GSRD_PR release and onwards, Linux may fail to access components from the QSPI flash device if the component was built with a configuration using an erase sector size of 64KB. This may be the case for loading the Linux file system (with jffs or ubi format), which is normally built for a QSPI erase sector size of 64 KB in Altera binary build recipes. This problem may be observed in any of the Altera SoC devices.

Resolution

To work around this problem, you need to change the value of the CONFIG_MTD_SPI_NOR_USE_4K_SECTORS config to 'n'.

You can do this by adding this line to the arch/arm64/configs/defconfig file:
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=n

You can also override the value of this config as shown next:

git clone -b QPDS26.1.1_REL_GSRD_PR GitHub - altera-fpga/linux-socfpga: Linux development repository for socfpga 
cd linux-socfpga
cat << EOF > config-fragment-agilex5

CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=n

EOF
make defconfig

./scripts/kconfig/merge_config.sh -O ./ ./.config ./config-fragment-agilex5

<continue here the regular Linux build>

It is not expected that this problem will be fixed in a future release, as the community rejected changing the CONFIG_MTD_SPI_NOR_USE_4K_SECTORS config to 'n'.

Updated 3 days ago
Version 6.0
No CommentsBe the first to comment