Platform: LS1043a target board
LSDK: flexbuild_lsdk2004_update_290520.tgz
QSPI FLASH: S25FS512SDSMFI011
I tried to program the data into QSPI by using CodeWarrior and then dump the data to verify that it successfully programmed. Then SD boot the system to read the correspond data in QSPI over command “sf read” to compare the read value between these two ways, I found they are different.
I tried to program the image to QSPI on SD boot. Then dump the image to verify by using CodeWarrior. I found the dump data is wrong which is not the same as the image I sent.
The SD boot is established with the commands below:
“flex-builder -m ls1043atgb -b sd”
and
“flex-installer -f firmware_sdboot.img -d /dev/sdc”
For now, the ERASE, READ and PROGRAM commands can be successfully executed to QSPI over CodeWarrior and verified all data is correct, but not for operation on SD boot. The QSPI clock frequency measured in the CodeWarrior environment is about 33MHz. The QPSI clock frequency on SD boot is 50MHz. Could this error be caused by the difference QSPI clock speed?
I tried to use the following two ways to slow down the QSPI clock, but the clock speed is still the same as the original 50MHz.
1. According to the instruction of sf probe in U-BOOT, the speed of QSPI flash can be set in the third argument.

Command is sf probe 0:0 20000000
2. Form the DTS file in U-BOOT, adding spi-max-frequency=20000000.
DTS file
&qspi {
bus-num = <0>;
status = "okay";
qflash0: s25fs512s@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
spi-max-frequency = <20000000>;
reg = <0>;
};
};
I have two questions below need to clarify.
- How to modified the QPSI clock?
- How to successfully read/write QSPI FLASH in SD boot?