Unable to boot from QSPI flash on iMX8QXP based board

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

Unable to boot from QSPI flash on iMX8QXP based board

1,680件の閲覧回数
priyank_bhatt
Contributor III

Hello,

 

We are using a custom board based on iMX8QXPMEK with L5.4.24-2.1.0. In our custom board, we are using the FlexSPI interface to communicate to an Octal flash and Quad flash when they are connected to flexSPI chip select 0. We are able to probe, read, and write to both the flash chips without any issue.

 

One of the task is to boot from both Octal and Quad flash. So we have created a common flash.bin for Octal and Quad flash using mkimage tool. When we flash Octal flash using UUU flashing utility with the command

 

./uuu -V -b qspi flash.bin

 

we are able to flash Octal flash successfully and are able to boot Octal flash without any issue. Whereas when we try to do the same steps for flashing Quad flash, though we are able to flash Quad SPI chip successfully we are not able to boot from QSPI flash.

 

I have noticed some differences when flashing the binary into OSPI flash and QSPI flash in terms of sf erase time.

 

OSPI flash:

 

3:1>Start Cmd:FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;
3:1>Okay (17.94s)
3:1>Start Cmd:FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;
3:1>Okay (1.105s)

 

 

QSPI flash:

 

3:1>Start Cmd:FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;
3:1>Okay (0.01s)
3:1>Start Cmd:FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;
3:1>Okay (1s)

 

 

What I have done so far
1. test octal flash with flash.bin we generated

2. tried flashing QSPI flash with the same flash.bin and try to boot(not successful)

3. After flashing QSPI flash, read QSPI contents using hexdump which shows data is not flashed properly

4. Added working flash.bin to rootfs and copied its contents to QSPI flash using dd command – After this, we are able to boot from QSPI flash successfully

 

So is there any issue with the UUU flashing utility, since we are not able to boot from QSPI flash but we are able to boot from OSPI flash after flashing using the UUU tool?

 

Thanks & Regards.

Priyank

0 件の賞賛
返信
5 返答(返信)

1,670件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Priyank

 

> tried flashing QSPI flash with the same flash.bin and try to boot(not successful)

 

reason may be that flash.bin should be generated with specific for each flash fspi header, fspi_header

https://source.codeaurora.org/external/imx/imx-mkimage/tree/scripts/fspi_header?h=imx_5.4.24_2.1.0

It is described in Table 5-19. FlexSPI Configuration block

i.MX 8DualXPlus/8QuadXPlus Applications Processor Reference Manual

 

Best regards
igor

0 件の賞賛
返信

1,665件の閲覧回数
priyank_bhatt
Contributor III

Hi @igorpadykov 

We have followed the steps to generate flash.bin.

And as I said we are able to flash Octal SPI flash with the generated flash.bin using UUU tool and boot from it without any problem.

The flash.bin for Octal SPI flash and Quad SPI flash is same. I have verified the flash.bin on Quad SPI flash by copying the binary from rootfs to Quad SPI flash using dd if=/usr/share/flash.bin of=/dev/mtd0 bs=4k command and we are able to boot from Quad SPI flash.

The issue we are facing is that we are not able to flash Quad SPI flash using UUU tool.

Any help regarding flashing Quad SPI flash using UUU tool will be helpful.

 

Thanks & Regards

Priyank

 

0 件の賞賛
返信

1,655件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Priyank

 

just for test one can remove octal flash from image and generate flash.bin

only for QSPI flash, try it with uuu tool.

 

Best regards
igor

0 件の賞賛
返信

1,639件の閲覧回数
priyank_bhatt
Contributor III

Hi @igorpadykov,

There is no problem with flash.bin. We are able to boot from Quad SPI flash but we are not able to flash Quad SPI flash using UUU tool.
Is there any issue with UUU tool?

 

Best regards

Priyank

0 件の賞賛
返信

1,628件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Priyank

 

uuu switches to the fastboot protocol (FB), runs uboot commands to begin
downloading and writing the image to spi flash. So are you able to write to qspi in uboot (sf write).

 

Best regards
igor

0 件の賞賛
返信