iMX7D boot from QSPI NOR flash

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX7D boot from QSPI NOR flash

644 Views
sfe
Contributor II

Hello !

I've been trying to get my iMX7 to boot from NOR flash.

I set the boot mode to internal and QSPI.

I created the QSPI config using the qspi-header.sh script and xxd.

Then I placed the header at 0x400 in the flash (as is documented in the IMX7DRM). And I tried it on 0x0 (as done by another company).

In both cases I see activity on the QSPI interface. A read command (0x3) is send for the addresses 0x00 to 0x1C0 for 64bytes each. So 8 times 64bytes is 512 bytes which is the length of the config.

But in the data 1 line there is always only 0xff read back.  (see attached image)

I can confirm the data in the NOR flash using sf read in the uboot at the right positions.

There are several entries for imx6 systems, but none for the imx7 so far (as far as I could find).

So my questions are:

* which is the right position for the qspi config? 0x0 or 0x400. The read commands seem to indicate 0x0, but the config says 0x400

* do you have any idea why no data is read back?

Thanks and best regards

Sebastian

0 Kudos
2 Replies

214 Views
sfe
Contributor II

i Igor,

thank you for confirming my speculation.

After I got around a hardware issue with our SOM I managed to boot from NOR flash.

I did not end up using the mfg tool. And I had to modify the config so the NOR does not operate in QuadSPI mode.

For anyone who is interested (i work under linux btw):

spansion-flash-single-config - used with cypress s25fl128s, but should work with all nor flashes. it only uses the default 0x03 read command. writing is not modified and untested.

using the qspi-header.sh from the mfg tool and the xxd command that config is turned into a binary.

That can be concatenated with 0x200 of zeroes and a normal uboot binary to get a working image.

dd if=/dev/zero of=./padding_0x200 bs=512 count=1  (to make a file with zeroes)

My make file for the boot image:

./qspi-header.sh spansion-flash-single-config
xxd -r qspi-tmp spansion-header
cat spansion-header padding_0x200 u-boot.imx > u-boot-spansion.img

that .img file I write to NOR using a serially loaded uboot

tftp $loadaddr /srv/tftp/u-boot-spansion.img;sf probe;sf update $loadaddr 0 $filesize

Now set your config pins correctly and it works just fine. 
0 Kudos

214 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Sebastian

QSPI configuration parameter is starting from offset 0 and IVT header is starting from offset 0x400.

Recommaneded to program qspi with mfg tools from

i.MX Software|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos