diff options
-rw-r--r-- | README.dra_qspi_flash | 36 | ||||
-rw-r--r-- | README.dra_qspi_test | 40 |
2 files changed, 76 insertions, 0 deletions
diff --git a/README.dra_qspi_flash b/README.dra_qspi_flash new file mode 100644 index 0000000000..0bd35e705e --- /dev/null +++ b/README.dra_qspi_flash | |||
@@ -0,0 +1,36 @@ | |||
1 | QSPI U-boot support | ||
2 | ------------------ | ||
3 | |||
4 | Host processor is connected to serial flash device via qpsi | ||
5 | interface. QSPI is a kind of spi module that allows single, | ||
6 | dual and quad read access to external spi devices. The module | ||
7 | has a memory mapped interface which provide direct interface | ||
8 | for accessing data form external spi devices. | ||
9 | |||
10 | The one QSPI in the device is primarily intended for fast booting | ||
11 | from Quad SPI flash devices. | ||
12 | |||
13 | Usecase1 | ||
14 | ------- | ||
15 | |||
16 | MLO/u-boot.img will be flashed from SD/MMC to the flash device | ||
17 | using serial flash erase and write commands. Then, switch settings | ||
18 | will be changed to qspi boot. Then, the ROM code will read MLO | ||
19 | from the predefined location in the flash, where it was flashed and | ||
20 | execute it after storing it in SDRAM. Then, the MLO will read | ||
21 | u-boot.img from flash and execute it from SDRAM. | ||
22 | |||
23 | |||
24 | Driver | ||
25 | ------ | ||
26 | drivers/qspi/ti_qspi.c | ||
27 | - Newly created file which is responsible for configuring the | ||
28 | qspi controller and also for providing the low level api which | ||
29 | is responsible for transferring the datas from host controller | ||
30 | to flash device and vice versa. | ||
31 | |||
32 | Testing | ||
33 | ------- | ||
34 | A seperated file named README.dra_qspi_test has been created which gives all the | ||
35 | details about the commands required to test qspi at u-boot level. | ||
36 | |||
diff --git a/README.dra_qspi_test b/README.dra_qspi_test new file mode 100644 index 0000000000..71f4de5e94 --- /dev/null +++ b/README.dra_qspi_test | |||
@@ -0,0 +1,40 @@ | |||
1 | ------------------------------------------------- | ||
2 | Simple steps used to test the QSPI at U-Boot | ||
3 | ------------------------------------------------- | ||
4 | |||
5 | For #1, build the patched U-Boot and load MLO/u-boot.img | ||
6 | |||
7 | ---------------------------------- | ||
8 | Boot from another medium like MMC | ||
9 | ---------------------------------- | ||
10 | |||
11 | DRA752 EVM # mmc dev 0 | ||
12 | DRA752 EVM # fatload mmc 0 0x82000000 MLO | ||
13 | DRA752 EVM # fatload mmc 0 0x82000000 u-boot.img | ||
14 | |||
15 | -------------------------------------------------- | ||
16 | Commands to erase/write u-boot/mlo to flash device | ||
17 | -------------------------------------------------- | ||
18 | |||
19 | DRA752 EVM # sf probe 0 | ||
20 | [should detect the S25FL256S serial flash device] | ||
21 | |||
22 | DRA752 EVM # sf erase 0 10000 | ||
23 | DRA752 EVM # sf erase 10000 10000 | ||
24 | DRA752 EVM # sf erase 20000 10000 | ||
25 | DRA752 EVM # sf erase 30000 10000 | ||
26 | DRA752 EVM # sf erase 40000 10000 | ||
27 | DRA752 EVM # sf erase 50000 10000 | ||
28 | DRA752 EVM # sf erase 60000 10000 | ||
29 | |||
30 | DRA752 EVM # sf write 82000000 0 10000 | ||
31 | DRA752 EVM # sf write 83000000 80000 80000 | ||
32 | |||
33 | |||
34 | For #2, set sysboot to QSPI-1 boot mode and power on. ROM should find | ||
35 | the GP header at offset 0 and load/execute SPL. SPL then detects that | ||
36 | ROM was in QSPI-1 mode (boot code 10) and attempts to find a U-Boot | ||
37 | image header at offset 0x80000 (set in the config file) and proceeds to | ||
38 | load that image using the U-Boot image payload offset/size from the | ||
39 | header. It will then start U-Boot. | ||
40 | ~ | ||