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?
解決済! 解決策の投稿を見る。
Nathan,
I have just submitted this patch which fixed the spi nor probe:
http://lists.denx.de/pipermail/u-boot/2014-April/177351.html
Regards,
Fabio Estevam
Can you post the changes you did in patch format to add support for the SPI NOR in U-boot?
Regards,
Fabio Estevam
Your CONFIG_SF_DEFAULT_CS configuration does not look correct.
For reference, take a look at:
commit 8bfa9c692e024bcf2b0b95be33adfa710301f83f
Author: Fabio Estevam <fabio.estevam@freescale.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 <fabio.estevam@freescale.com>
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.
Thanks for the help. I submitted an email to the u-boot mailing list. let me know if you think of anything else to try.
Nathan,
I have just submitted this patch which fixed the spi nor probe:
http://lists.denx.de/pipermail/u-boot/2014-April/177351.html
Regards,
Fabio Estevam
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.
Yes, the required offset is described in the reference manual.
Ok, great. I will monitor your thread in the U-boot list then.
Nathan,
Are you able to check the SPI signals via an oscilloscope? Do you see activity in the MISO/MOSI/CLK and CS lines?