How to set up SPI-NOR S25FL256L on imx6ull?

Hello Everyone,

I’m developing a custom kernel version for our products that uses iMX6ULL. For this task, I’m using Colibri iMX6ULL 256 MB (V1.1A) with a Toradex Kernel (git://git.toradex.com/linux-toradex.git | Branch: toradex_5.4-2.1.x-imx) and Toradex U-boot (git://git.toradex.com/u-boot-toradex.git | Branch: Colibri-iMX6ULL_LXDE-Image_2.8b7.-20200610). My build tool is the buildroot-2020.08.

I’m trying to set up the DTS (as you can see below) to use the SPI-NOR memory S25FL256L based on jedec,spi-nor.txt kernel reference documentation. The “FM25V10-GT” memory was not tested yet, however, in our product will assemble either S25FL256L or FM25V10, never both in the same board.
[upload|11pcxMl9d4X0ML92BwRuHufaSz0=]

With the conclusion of the kernel compilation and its starts, it is possible to check that apparently the driver was successfully initialized.
[upload|f0OkFLJ/oGVRbYAESz8jPxA5k/8=]

When I try sending some file to this memory, the below error is returned:
[upload|ErpOIEqwpzxKtNA669KxbE2wR/g=]

Looking for “smda” in dmesg command, it is returned:
[upload|mVD/ldd3m5Ckr9gC31bJv1g2MHQ=]

With the situation showed up, I’d like some help for better set up the S25FL256L device.

PS.:

rootfs_defconfig

  1. BR2_PACKAGE_LINUX_FIRMWARE=y
  2. BR2_PACKAGE_LINUX_FIRMWARE_IMX_SDMA=y

linux_defconfig

  1. CONFIG_SPI=y
  2. CONFIG_SPI_DEBUG=y
  3. CONFIG_SPI_GPIO=y
  4. CONFIG_SPI_IMX=y
  5. CONFIG_SPI_SPIDEV=y
  6. CONFIG_MTD_SPI_NAND=y
  7. CONFIG_MTD_SPI_NOR=y
  8. CONFIG_IMX_SDMA=y

The best regards,

Leandro Candido

I’m not familiar with this issue but I’d start with disabling DMA for spi driver either by direct source code modification ( drivers/spispi-imx.c static bool use_dma ) or by using module parameter.