I post this message in order to share our experience about issues with LS1020A QSPI Boot (also valid for LS1021).
There is a coherence issue between latest LSDK (21.08) and Latest Codewarrior (CW_ARMv7_v2019.10 or v10.0.9).
- On LSDK, the RCW files for QSPI boot execute the command below command at the end of the file which switch the BE/LE behavior of the QSPI peripheral:
#include <../ls1021aqds/qspi_endianness.rcw>
- On Code Warrior, the TCL scripts for LS1021ATWR (LS1021A_TWR_Init.tcl or LS1021A_TWR_OCRAM_Init.tcl) manipulate the same register with the opposite configuration in function QSPI_Init():
proc QSPI_Init {} {
# QuadSPI_MCR - disable device clocks
mem [CCSR_ADDR 0x1550000] = 0x000f4000 # SMPR
mem [CCSR_ADDR 0x1550108] = 0x00000000
# QuadSPI_MCR - enable device clocks
mem [CCSR_ADDR 0x1550000] = 0x000f0000
...
If the RCW is used like this, any JTAG connection from CW for Flash Programming will use the opposite convention (because of TCL scripts). If this method is used to program initial U-boot image on the QSPI flash, this image won't boot.
Solution: update the TCL scripts as follows:
proc QSPI_Init {} {
# QuadSPI_MCR - disable device clocks
mem [CCSR_ADDR 0x1550000] = 0x000f400c # SMPR
mem [CCSR_ADDR 0x1550108] = 0x00000000
# QuadSPI_MCR - enable device clocks
mem [CCSR_ADDR 0x1550000] = 0x000f000c
...
Hoping it will avoid hours of researcxh to other ones ...