I have the MCIMX6SLEVK eval board and I am having problems with the on-board SPI NOR. I have tried to probe for the device using the latest U-BOOT built for the EVK and also with the Freescale SDK imx6_platform_sdk_v1.1.0. Both of these fail to read from the device. I just wanted to ask if anyone has gotten the SPI NOR FLASH to work on the MCIMX6SLEVK. The board is REV B, although I don't think that matters from looking at the change log.
Also, is there a public repo to get updates for the Freescale i.MX6 SDK?
Solved! Go to Solution.
Your CONFIG_SF_DEFAULT_CS configuration does not look correct.
For reference, take a look at:
Author: Fabio Estevam <email@example.com>
Date: Fri Nov 8 16:20:54 2013 -0200
mx6sabresd: Add SPI NOR support
mx6sabre board has a m25p32 SPI NOR connected to ECSPI1 port.
Add support for it.
This patch allows the SPI NOR flash to be succesfully detected:
=> sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
Signed-off-by: Fabio Estevam <firstname.lastname@example.org>
Ah, I see that the CS is not JUST the chip select, it is an encoded GPIO value to enable long holds for the CS pin. I have made the change:
#define CONFIG_SF_DEFAULT_CS (0 | (IMX_GPIO_NR(4, 11) << 8))
However, it still does not work. I wonder if there is some initialization I missed? Also, is it strange that the SDK doesn't work either?
I have tried the following patch:
and it fails to probe the SPI NOR:
|=> sf probe|
|SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000|
Failed to initialize SPI flash at 0:27392
I would recommend to start a thread at the U-boot list and post the patch as reference for the discussion.
If I launch the kernel, then the SPI NOR flash is correctly probed.
That did the trick, Thanks! I got u-boot booting from SPI FLASH. The only other gotcha I had was having to offset the image to 0x400 in the SPI FLASH, is that in the documentation somewhere? I just saw that I had to do that on some random forum.