MX28evk U-boot on SPI NOR

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MX28evk U-boot on SPI NOR

2,488件の閲覧回数
rajtantajtan
Contributor I

Hello, I'm using imx28EVK and I want to load u-boot from SPI NOR and I have a Micron N25Q128. I'm using mainline u-boot and I have added this to boards.cfg:

mx28evk_spi                  arm         arm926ejs   mx28evk             freescale      mxs mx28evk:ENV_IS_IN_SPI_FLASH

And compiled it with

make CROSS_COMPILE=xxx mx28evk_spi

make u-boot.sb CROSS_COMPILE=xxx

I have tried to flash u-boot.sb to adress 0x0 on my SPI NOR memory in linux with:

mtd_debug write /dev/mtd1 0 459840 u-boot.sb

All I get when I changed bootswitches is this:

H0x80501003

I can write to mtdblock1 in linux so SPI communication seems to be fine but in u-boot sf probe 2:0 fails with this error message:

SF: Unsupported manufacturer 20

Failed to initialize SPI flash at 2:0

How do I solve this?

ラベル(2)
0 件の賞賛
返信
5 返答(返信)

1,426件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

1,426件の閲覧回数
MarekVasut
Senior Contributor I

1) Use U-Boot 2013.07

2) Find CONFIG_SPI_FLASH_SST in your include/configs/mx28evk.h and replace it with CONFIG_SPI_FLASH_STMICRO (as your flash is STMicro one)

3) Write u-boot.sb bootstream into SPI flash

=> sf probe 2:0

=> <load u-boot.sb to (for example) 0x42000000>

=> sf erase 0 0x80000

=> sf write 0x42000000 0 0x80000

1,426件の閲覧回数
rajtantajtan
Contributor I

I got u-boot to communicate with my SPI NOR, all I got to do was to define CONFIG_SPI_FLASH however I haven't been able to get u-boot to boot from SPI NOR yet.

0 件の賞賛
返信

1,426件の閲覧回数
jordifarres
Contributor III

Hi

Build ltib and run u-boot from SD card.

I can test the device:

MX28 U-Boot > sf probe 2:0

16384 KiB S25FL129P_S25FL128S_64K at 2:0 is now current device

MX28 U-Boot > sf write ....

MX28 U-Boot > sf read .....

from linux I see that nodes /dev/mtd are not created. I don't know why.

So using 'mtd_debug' does fail

regards

jordi

0 件の賞賛
返信

1,426件の閲覧回数
MarekVasut
Senior Contributor I

Try with mainline U-Boot ... see my hint below. You will need CONFIG_SPI_FLASH_SPANSION instead of STMICRO though. btw. you can find all the possible IDs in drivers/mtd/spi/spi_flash.c in the flashes[] array.

0 件の賞賛
返信