1*4882a593Smuzhiyun------------------------------------------------- 2*4882a593Smuzhiyun Simple steps used to test the QSPI at U-Boot 3*4882a593Smuzhiyun------------------------------------------------- 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunFor #1, build the patched U-Boot and load MLO/u-boot.img 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun---------------------------------- 8*4882a593SmuzhiyunBoot from another medium like MMC 9*4882a593Smuzhiyun---------------------------------- 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunU-Boot# mmc dev 0 12*4882a593Smuzhiyunmmc0 is current device 13*4882a593SmuzhiyunU-Boot# fatload mmc 0 0x82000000 MLO 14*4882a593Smuzhiyunreading MLO 15*4882a593Smuzhiyun55872 bytes read in 8 ms (6.7 MiB/s) 16*4882a593SmuzhiyunU-Boot# fatload mmc 0 0x83000000 u-boot.img 17*4882a593Smuzhiyunreading u-boot.img 18*4882a593Smuzhiyun248600 bytes read in 19 ms (12.5 MiB/s) 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun-------------------------------------------------- 21*4882a593SmuzhiyunCommands to erase/write u-boot/mlo to flash device 22*4882a593Smuzhiyun-------------------------------------------------- 23*4882a593SmuzhiyunU-Boot# sf probe 0 24*4882a593SmuzhiyunSF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB, mapped at 5c000000 25*4882a593SmuzhiyunSF: Warning - Only lower 16MiB accessible, Full access #define CONFIG_SPI_FLASH_BAR 26*4882a593SmuzhiyunU-Boot# sf erase 0 0x10000 27*4882a593SmuzhiyunSF: 65536 bytes @ 0x0 Erased: OK 28*4882a593SmuzhiyunU-Boot# sf erase 0x20000 0x10000 29*4882a593SmuzhiyunSF: 65536 bytes @ 0x20000 Erased: OK 30*4882a593SmuzhiyunU-Boot# sf erase 0x30000 0x10000 31*4882a593SmuzhiyunSF: 65536 bytes @ 0x30000 Erased: OK 32*4882a593SmuzhiyunU-Boot# sf erase 0x40000 0x10000 33*4882a593SmuzhiyunSF: 65536 bytes @ 0x40000 Erased: OK 34*4882a593SmuzhiyunU-Boot# sf erase 0x50000 0x10000 35*4882a593SmuzhiyunSF: 65536 bytes @ 0x50000 Erased: OK 36*4882a593SmuzhiyunU-Boot# sf erase 0x60000 0x10000 37*4882a593SmuzhiyunSF: 65536 bytes @ 0x60000 Erased: OK 38*4882a593SmuzhiyunU-Boot# sf write 82000000 0 0x10000 39*4882a593SmuzhiyunSF: 65536 bytes @ 0x0 Written: OK 40*4882a593SmuzhiyunU-Boot# sf write 83000000 0x20000 0x60000 41*4882a593SmuzhiyunSF: 393216 bytes @ 0x20000 Written: OK 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunFor #2, set sysboot to QSPI-1 boot mode(SYSBOOT[5:0] = 100110) and power 44*4882a593Smuzhiyunon. ROM should find the GP header at offset 0 and load/execute SPL. SPL 45*4882a593Smuzhiyunthen detects that ROM was in QSPI-1 mode (boot code 10) and attempts to 46*4882a593Smuzhiyunfind a U-Boot image header at offset 0x20000 (set in the config file) 47*4882a593Smuzhiyunand proceeds to load that image using the U-Boot image payload offset/size 48*4882a593Smuzhiyunfrom the header. It will then start U-Boot. 49