Hello,
I am working on a customized IMX6 Solo X Board with a Spansion FL128S Serial NOR Flash attached on the QSPI2 Interface.
U-Boot works well when booting with imx-usb-loader over USB and I am able to read and write the NOR Flash within u-Boot.
Then I setup Flash and Boot options to boot from QSPI, but the device is not booting.
Flash Content is:
-> sf probe; sf read 80800000 0 60000
SPI Conf. Parametr at 0x400:
80800400: 00000000 00000000 00000000 00000000 ................
80800410: 00000000 00000000 01000000 02000000 ................
80800420: 00000000 00000000 00000000 04000000 ................
80800430: 00000000 00000000 00000001 00000000 ................
80800440: 00000001 00000000 00000000 00000000 ................
80800450: 00000000 00000000 00000000 00000000 ................
80800460: 00000000 00000000 0818040b 1c080c08 ................
80800470: 00002400 00000000 00000000 00000000 .$..............
80800480: 00000000 00000000 00000000 00000000 ................
80800490: 00000000 00000000 00000000 00000000 ................
808004a0: 00000000 00000000 00000000 00000000 ................
808004b0: 00000000 00000000 00000000 00000000 ................
808004c0: 00000000 00000000 00000000 00000000 ................
808004d0: 00000000 00000000 00000000 00000000 ................
808004e0: 00000000 00000000 00000000 00000000 ................
808004f0: 00000000 00000000 00000000 00000000 ................
80800500: 00000000 00000000 00000000 00000000 ................
80800510: 00000000 00000000 00000000 00000000 ................
80800520: 00000000 00000000 00000000 00000000 ................
80800530: 00000000 00000000 00000000 00000000 ................
80800540: 00000000 00000000 00000000 00000000 ................
80800550: 00000000 00000000 00000000 00000000 ................
80800560: 00000000 00000000 03000000 00000000 ................
80800570: 00000000 00000000 00000000 00000000 ................
80800580: 00000000 00000000 00000000 00000000 ................
IVT Table at 0x1000:
80801000: 402000d1 87800000 00000000 877ff42c .. @........,...
80801010: 877ff420 877ff400 00000000 00000000 ...............
DCD at 0x102c:
8080102c: 400802d2 ...@
80801030: 040402cc 68400c02 ffffffff 6c400c02 ......@h......@l
80801040: ffffffff 70400c02 ffffffff 74400c02 ......@p......@t
80801050: ffffffff 78400c02 ffffffff 7c400c02 ......@x......@|
80801060: ffffffff 80400c02 ffffffff 84400c02 ......@.......@.
80801070: ffffffff 18060e02 00000c00 fc050e02 ................
80801080: 00000000 2c030e02 30000000 00030e02 .......,...0....
80801090: 20000000 fc020e02 20000000 f4050e02 ... ....... ....
808010a0: 20000000 40030e02 20000000 20030e02 ... ...@... ...
808010b0: 00000000 10030e02 20000000 14030e02 ........... ....
808010c0: 20000000 14060e02 20000000 f8050e02 ... ....... ....
808010d0: 00000200 30030e02 28000000 34030e02 .......0...(...4
808010e0: 28000000 38030e02 00000000 3c030e02 ...(...8.......<
808010f0: 00000000 08060e02 00000200 0c060e02 ................
80801100: 28000000 10060e02 28000000 1c060e02 ...(.......(....
80801110: 00000000 20060e02 00000000 ec020e02 ....... ........
80801120: 28000000 f0020e02 28000000 f4020e02 ...(.......(....
BDS at 0x1020:
80801020: 87800000 00200000 00000000 ...... .....
u-Boot at 0x01c00:
80801c00: ea0000be e59ff014 e59ff014 e59ff014 ................
80801c10: e59ff014 e59ff014 e59ff014 e59ff014 ................
80801c20: 87800060 878000c0 87800120 87800180 `....... .......
80801c30: 878001e0 87800240 878002a0 deadbeef ....@...........
SPI Port Mux is
MX6_PAD_NAND_WP_B__QSPI2_A_DATA_0
MX6_PAD_NAND_READY_B__QSPI2_A_DATA_1
MX6_PAD_NAND_CE0_B__QSPI2_A_DATA_2
MX6_PAD_NAND_CE1_B__QSPI2_A_DATA_3
MX6_PAD_NAND_ALE__QSPI2_A_SS0_B
MX6_PAD_NAND_CLE__QSPI2_A_SCLK
MX6_PAD_NAND_DATA07__QSPI2_A_DQS
Boot Pins: (Boot from QSPI2)
LCD1_DATA03 High
LCD1_DATA04 High
LCD1_DATA05 Low
LCD1_DATA06 Low
LCD1_DATA07 Low
I measured a activity on SPI Pins for 240us for reading 8 Blocks of 64 Bytes bofor switching to usb activating.
Can someone take a lock on the Flash Content. Also a working Flash Image of a similar IMX6SX Board would be helpful.
Best Regards
Johannes
Hello,
finally got it booting.
Booting U-Boot from QSPI-NOR Flash requires an other offset in Flash as booting from NAND Flash.
NAND-Flash: Uboot image at 0x400
SPI-NOR: QSPI-Configuration Parameter at 0x0400
Uboot image at 0x400
Due to the other offset I have to adjust the Boot Table:
My U-Boot-Image begins with:
The Boot Table Structure is at 0x20
U-Boot Relocation Address at 0x20: 877FF000
relocation length at 0x24: 00050000
I add 0xc00 to the 4-byte value at 0x20 -> 0x877FE400:
and correct the length with the size of uboot image + 0xc00
following script did it for me:
mw.b 80800000 00 60000
sf probe
sf erase 0 60000
dhcp 80800400 qspic.imx
dhcp 80801000 uboot.imx
mw 80801020 877FE400
mw 80801024 00050C00
sf write 80800000 0 60000
qspic.imx is the image of the QSPI Configuration Table (512Bytes)
I use a board specific paches for Uboot Version 2015.01.
Regards
Johannes
Hi,
Can you share the QuadSPI Configuration Parameters? I assume that you generated from an existing structure in C code or it was appended to the binary file in certain way.
That would help to understand the possible wrong QuadSPI configuration.
Regards,
Alejandro
Hi Alejandro,
with help from Freescale, I am able now to read successful the SPI Configuration Parameter from Flash in 240us, then I notice now reading from flash for the 358us. No Message at the console.
I assume either Device Configuration or U-Boot are not correct configured.
I use U-Boot Version 2015.01 with a board specific patch.
For Flashing i use following script within U-boot:
setenv uimg 'boot/uboot.imx'
# clear memory,flash
setenv uclr 'mw.b ${loadaddr} 00 0x180000; sf probe; sf erase 0 180000'
# SPI Parameter 0x400..0x800
setenv uspi 'mw 8080041C 02000000; mw 80800420 3; mw 80800424 3; mw 80800428 08000000; mw 80800430 08000000; mw 80800440 1; mw 80800568 01000001; mw 808005fc C0FFEE01'
# Look up table
setenv ulps 'echo "lutps"; mw 80800468 0818040B; mw 8080046C 1C040C08; mw 80800470 00002400'
# Correct Decice Configuration 0x102c
setenv udcd 'mw 8080102C 410401d2; mw 808010e8 28000000; mw 808010F0 28000000; mw 80801108 28000000; mw 80801110 28000000; mw 80801130 28000000; mw 80801138 28000000; mw 80801168 42404040; mw 80801170 383C4040; mw 808011F0 00001882'
setenv uflash 'run uclr; dhcp 80801000 ${uimg}; run uspi; run ulps; run udcd; sf probe; sf write ${loadaddr} 0000 180000'
save
run uflash
Best Regards
Johannes