xref: /OK3568_Linux_fs/u-boot/doc/SPI/README.ti_qspi_flash (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQSPI U-Boot support
2*4882a593Smuzhiyun------------------
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunHost processor is connected to serial flash device via qpsi
5*4882a593Smuzhiyuninterface. QSPI is a kind of spi module that allows single,
6*4882a593Smuzhiyundual and quad read access to external spi devices. The module
7*4882a593Smuzhiyunhas a memory mapped interface which provide direct interface
8*4882a593Smuzhiyunfor accessing data form external spi devices.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunThe one QSPI in the device is primarily intended for fast booting
11*4882a593Smuzhiyunfrom Quad SPI flash devices.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunUsecase
14*4882a593Smuzhiyun-------
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunMLO/u-boot.img will be flashed from SD/MMC to the flash device
17*4882a593Smuzhiyunusing serial flash erase and write commands. Then, switch settings
18*4882a593Smuzhiyunwill be changed to qspi boot. Then, the ROM code will read MLO
19*4882a593Smuzhiyunfrom the predefined location in the flash, where it was flashed and
20*4882a593Smuzhiyunexecute it after storing it in SDRAM. Then, the MLO will read
21*4882a593Smuzhiyunu-boot.img from flash and execute it from SDRAM.
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunSPI mode
24*4882a593Smuzhiyun-------
25*4882a593SmuzhiyunSPI mode uses mtd spi framework for transfer and reception of data.
26*4882a593SmuzhiyunCan be used in:
27*4882a593Smuzhiyun1. Normal mode: use single pin for transfers
28*4882a593Smuzhiyun2. Dual Mode: use two pins for transfers.
29*4882a593Smuzhiyun3. Quad mode: use four pin for transfer
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunMemory mapped read mode
32*4882a593Smuzhiyun-----------------------
33*4882a593SmuzhiyunIn this, SPI controller is configured using configuration port and then
34*4882a593Smuzhiyuncontroller is switched to memory mapped port for data read.
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunDriver
37*4882a593Smuzhiyun------
38*4882a593Smuzhiyundrivers/qspi/ti_qspi.c
39*4882a593Smuzhiyun    - Newly created file which is responsible for configuring the
40*4882a593Smuzhiyun	qspi controller and also for providing the low level api which
41*4882a593Smuzhiyun	is responsible for transferring the datas from host controller
42*4882a593Smuzhiyun	to flash device and vice versa.
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunTesting
45*4882a593Smuzhiyun-------
46*4882a593SmuzhiyunA seperated file named README.dra_qspi_test has been created which gives all the
47*4882a593Smuzhiyundetails about the commands required to test qspi at U-Boot level.
48