blob: e89f53587fa7991f46b8f50674e9aaa786a73386 [file] [log] [blame]
Poddar, Sourav78a00ce2013-10-07 15:53:04 +05301-------------------------------------------------
2 Simple steps used to test the QSPI at U-Boot
3-------------------------------------------------
4
5For #1, build the patched U-Boot and load MLO/u-boot.img
6
7----------------------------------
8Boot from another medium like MMC
9----------------------------------
10
11U-Boot# mmc dev 0
12mmc0 is current device
13U-Boot# fatload mmc 0 0x82000000 MLO
14reading MLO
1555872 bytes read in 8 ms (6.7 MiB/s)
16U-Boot# fatload mmc 0 0x83000000 u-boot.img
17reading u-boot.img
18248600 bytes read in 19 ms (12.5 MiB/s)
19
20--------------------------------------------------
21Commands to erase/write u-boot/mlo to flash device
22--------------------------------------------------
23U-Boot# sf probe 0
24SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB, mapped at 5c000000
Poddar, Sourav78a00ce2013-10-07 15:53:04 +053025U-Boot# sf erase 0 0x10000
26SF: 65536 bytes @ 0x0 Erased: OK
27U-Boot# sf erase 0x20000 0x10000
28SF: 65536 bytes @ 0x20000 Erased: OK
29U-Boot# sf erase 0x30000 0x10000
30SF: 65536 bytes @ 0x30000 Erased: OK
31U-Boot# sf erase 0x40000 0x10000
32SF: 65536 bytes @ 0x40000 Erased: OK
33U-Boot# sf erase 0x50000 0x10000
34SF: 65536 bytes @ 0x50000 Erased: OK
35U-Boot# sf erase 0x60000 0x10000
36SF: 65536 bytes @ 0x60000 Erased: OK
37U-Boot# sf write 82000000 0 0x10000
38SF: 65536 bytes @ 0x0 Written: OK
39U-Boot# sf write 83000000 0x20000 0x60000
40SF: 393216 bytes @ 0x20000 Written: OK
41
42For #2, set sysboot to QSPI-1 boot mode(SYSBOOT[5:0] = 100110) and power
43on. ROM should find the GP header at offset 0 and load/execute SPL. SPL
44then detects that ROM was in QSPI-1 mode (boot code 10) and attempts to
45find a U-Boot image header at offset 0x20000 (set in the config file)
46and proceeds to load that image using the U-Boot image payload offset/size
47from the header. It will then start U-Boot.