Hi,
We have a custom board which has imx8qxp. We are able to flash OSPI flash and able to load the u-boot from that but when we try to flash the QSPI flash placing it in the same location, uuu utility is showing success message but doesn't boot from QSPI. I have verified that processor doesn't generate any SPI clock while flashing in QSPI case.
From the uuu logs looks like operations are performed much faster than it usually time it takes in OSPI
Can you please help us what can be the issue?
uuu flashing logs
===============
tejas@tejas-OptiPlex-3070:~/mfgtools/uuu$ sudo ./uuu -V -b qspi ~/imx-mkimage/iMX8QX/flash.bin
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.191-0-g4fe24b9
Build in config:
Pctl Chip Vid Pid BcdVersion
==================================================
SDPS: MX8QXP 0x1fc9 0x012f [0x0002..0xffff]
SDPS: MX8QM 0x1fc9 0x0129 [0x0002..0xffff]
SDPS: MX8DXL 0x1fc9 0x0147
SDPS: MX28 0x15a2 0x004f
SDPS: MX815 0x1fc9 0x013e
SDPS: MX865 0x1fc9 0x0146
SDP: MX7D 0x15a2 0x0076
SDP: MX6Q 0x15a2 0x0054
SDP: MX6D 0x15a2 0x0061
SDP: MX6SL 0x15a2 0x0063
SDP: MX6SX 0x15a2 0x0071
SDP: MX6UL 0x15a2 0x007d
SDP: MX6ULL 0x15a2 0x0080
SDP: MX6SLL 0x1fc9 0x0128
SDP: MX7ULP 0x1fc9 0x0126
SDP: MXRT106X 0x1fc9 0x0135
SDP: MX8MM 0x1fc9 0x0134
SDP: MX8MQ 0x1fc9 0x012b
SDPU: SPL 0x0525 0xb4a4 [0x0000..0x04ff]
SDPV: SPL1 0x0525 0xb4a4 [0x0500..0x9998]
SDPU: SPL 0x0525 0xb4a4 [0x9999..0x9999]
SDPU: SPL 0x3016 0x1001 [0x0000..0x04ff]
SDPV: SPL1 0x3016 0x1001 [0x0500..0x9998]
FBK: 0x066f 0x9afe
FBK: 0x066f 0x9bff
FB: 0x0525 0xa4a5
FB: 0x18d1 0x0d02
FB: 0x3016 0x0001
Run built-in script:
uuu_version 1.2.39
# @/home/tejas/imx-mkimage/iMX8QX/flash.bin | bootloader
# @/home/tejas/imx-mkimage/iMX8QX/flash.bin [/home/tejas/imx-mkimage/iMX8QX/flash.bin] | image burn to flexspi, default is the same as bootloader
# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f /home/tejas/imx-mkimage/iMX8QX/flash.bin
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM, skip QSPI header
SDPS: boot -f /home/tejas/imx-mkimage/iMX8QX/flash.bin -skipfhdr
# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f /home/tejas/imx-mkimage/iMX8QX/flash.bin -offset 0x10000 -skipfhdr
SDPU: jump
# }
# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f /home/tejas/imx-mkimage/iMX8QX/flash.bin -skipspl -skipfhdr
SDPV: jump
# }
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f /home/tejas/imx-mkimage/iMX8QX/flash.bin
# Check Image if include flexspi header
FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;
FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;
#if uboot can't support qspihdr command, use uboot image to write qspi image, which require image include qspi flash header
FB: ucmd if test ${qspihdr_exist} = no; then sf probe; else true; fi;
FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;
FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;
FB: done
Wait for Known USB Device Appear...
New USB Device Attached at 1:3
1:3>Start Cmd:SDPS: boot -f /home/tejas/imx-mkimage/iMX8QX/flash.bin -skipfhdr
100%1:3>Okay (0.505s)
New USB Device Attached at 1:3
1:3>Start Cmd:FB: ucmd setenv fastboot_buffer ${loadaddr}
1:3>Okay (0.004s)
1:3>Start Cmd:FB: download -f /home/tejas/ISSI/imx-mkimage/iMX8QX/flash.bin
1:3>Okay (0.044s)
1:3>Start Cmd:FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;
1:3>Okay (0.007s)
1:3>Start Cmd:FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;
1:3>Okay (0.004s)
1:3>Start Cmd:FB: ucmd if test ${qspihdr_exist} = no; then sf probe; else true; fi;
1:3>Okay (0.016s)
1:3>Start Cmd:FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;
1:3>Okay (0.011s)
1:3>Start Cmd:FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;
1:3>Okay (0.528s)
1:3>Start Cmd:FB: done
1:3>Okay (0s)
I am using imx8qxp and QSPI flash supports upto 200 MHz. I am able to probe the flash while booting image from emmc but not able to flash image on QSPI flash
Hi tejas-volansys
what bsp used in the case, from log "uuu_version 1.2.39" seems this is old
version. Recommended to try latest
https://github.com/NXPmicro/mfgtools/releases/tag/uuu_1.4.43
with latest NXP linux release
Note, for successful boot from new qspi nor specific for that part fspi header in needed, fspi_header:
https://source.codeaurora.org/external/imx/imx-mkimage/tree/scripts?h=imx_5.4.24_2.1.0
Description can be found in sect.5.8.3.3 FlexSPI configuration parameters
i.MX 8DualXPlus/8QuadXPlus Applications Processor Reference Manual
Best regards
igor