[U-Boot] [UBOOT][PATCHv4 6/6] README: qspi usecase and testing documentation.

Sourav Poddar sourav.poddar at ti.com
Sat Oct 5 08:08:57 CEST 2013


On Saturday 05 October 2013 01:44 AM, Jagan Teki wrote:
> May be your are missing my comments in previous post.
> - Please place these these readme files in doc/SPI/*
> - Please use the doc/SPI/status.txt as an example format for writing
> new readme files.
ok.
> On Sat, Oct 5, 2013 at 1:15 AM, Sourav Poddar<sourav.poddar at ti.com>  wrote:
>> On Saturday 05 October 2013 12:08 AM, Jagan Teki wrote:
>>> Hi Sourav,
>>>
>>> Please place these these readme files in doc/SPI/*
>>> All these patches tested on top of u-boot-spi.git master-probe?
>> Yes, this are tested on the above branch.
>>
>>> On Fri, Oct 4, 2013 at 8:21 PM, Sourav Poddar<sourav.poddar at ti.com>
>>> wrote:
>>>> Contains documentation and testing details for qspi flash
>>>> interface.
>>>>
>>>> Signed-off-by: Sourav Poddar<sourav.poddar at ti.com>
>>>> ---
>>>>    doc/README.ti_qspi_dra_test |   38 ++++++++++++++++++++++++++++++++++
>>>>    doc/README.ti_qspi_flash    |   47
>>>> +++++++++++++++++++++++++++++++++++++++++++
>>>>    2 files changed, 85 insertions(+), 0 deletions(-)
>>>>    create mode 100644 doc/README.ti_qspi_dra_test
>>>>    create mode 100644 doc/README.ti_qspi_flash
>>>>
>>>> diff --git a/doc/README.ti_qspi_dra_test b/doc/README.ti_qspi_dra_test
>>>> new file mode 100644
>>>> index 0000000..c4540ea
>>>> --- /dev/null
>>>> +++ b/doc/README.ti_qspi_dra_test
>>>> @@ -0,0 +1,38 @@
>>>> +-------------------------------------------------
>>>> +   Simple steps used to test the QSPI at U-Boot
>>>> +-------------------------------------------------
>>>> +
>>>> +For #1, build the patched U-Boot and load MLO/u-boot.img
>>>> +
>>>> +----------------------------------
>>>> +Boot from another medium like MMC
>>>> +----------------------------------
>>>> +
>>>> +DRA752 EVM # mmc dev 0
>>>> +DRA752 EVM # fatload mmc 0 0x82000000 MLO
>>>> +DRA752 EVM # fatload mmc 0 0x83000000 u-boot.img
>>>> +
>>>> +--------------------------------------------------
>>>> +Commands to erase/write u-boot/mlo to flash device
>>>> +--------------------------------------------------
>>>> +
>>>> +DRA752 EVM # sf probe 0
>>>> +[should detect the S25FL256S serial flash device]
>>>> +
>>>> +DRA752 EVM # sf erase 0 10000
>>>> +DRA752 EVM # sf erase 10000 10000
>>>> +DRA752 EVM # sf erase 20000 10000
>>>> +DRA752 EVM # sf erase 30000 10000
>>>> +DRA752 EVM # sf erase 40000 10000
>>>> +DRA752 EVM # sf erase 50000 10000
>>>> +DRA752 EVM # sf erase 60000 10000
>>>> +
>>>> +DRA752 EVM # sf write 82000000 0 10000
>>>> +DRA752 EVM # sf write 83000000 20000 70000
>>>> +
>>> These test procedure steps were done in real hw.
>>> Seems like written once, could be generic if you test these steps on
>>> real hw  and palce the same
>>> log here...
>>>
>>>> +For #2, set sysboot to QSPI-1 boot mode(SYSBOOT[5:0] = 100110) and power
>>>> +on. ROM should find the GP header at offset 0 and load/execute SPL. SPL
>>>> +then detects that ROM was in QSPI-1 mode (boot code 10) and attempts to
>>>> +find a U-Boot image header at offset 0x20000 (set in the config file)
>>>> +and proceeds to load that image using the U-Boot image payload
>>>> offset/size
>>>> +from the header. It will then start U-Boot.
>>>> diff --git a/doc/README.ti_qspi_flash b/doc/README.ti_qspi_flash
>>>> new file mode 100644
>>>> index 0000000..1b86d01
>>>> --- /dev/null
>>>> +++ b/doc/README.ti_qspi_flash
>>>> @@ -0,0 +1,47 @@
>>>> +QSPI U-boot support
>>>> +------------------
>>>> +
>>>> +Host processor is connected to serial flash device via qpsi
>>>> +interface. QSPI is a kind of spi module that allows single,
>>>> +dual and quad read access to external spi devices. The module
>>>> +has a memory mapped interface which provide direct interface
>>>> +for accessing data form external spi devices.
>>>> +
>>>> +The one QSPI in the device is primarily intended for fast booting
>>>> +from Quad SPI flash devices.
>>>> +
>>>> +Usecase
>>>> +-------
>>>> +
>>>> +MLO/u-boot.img will be flashed from SD/MMC to the flash device
>>>> +using serial flash erase and write commands. Then, switch settings
>>>> +will be changed to qspi boot. Then, the ROM code will read MLO
>>>> +from the predefined location in the flash, where it was flashed and
>>>> +execute it after storing it in SDRAM. Then, the MLO will read
>>>> +u-boot.img from flash and execute it from SDRAM.
>>>> +
>>>> +SPI mode
>>>> +-------
>>>> +SPI mode uses mtd spi framework for transfer and reception of data.
>>>> +Can be used in:
>>>> +1. Normal mode: use single pin for transfers
>>>> +2. Dual Mode: use two pins for transfers.
>>>> +3. Quad mode: use four pin for transfer
>>>> +
>>>> +Memory mapped read mode
>>>> +-----------------------
>>>> +In this, SPI controller is configured using configuration port and then
>>>> +controler is switched to memory mapped port for data read.
>>>> +
>>>> +Driver
>>>> +------
>>>> +drivers/qspi/ti_qspi.c
>>>> +    - Newly created file which is responsible for configuring the
>>>> +       qspi controller and also for providing the low level api which
>>>> +       is responsible for transferring the datas from host controller
>>>> +       to flash device and vice versa.
>>>> +
>>>> +Testing
>>>> +-------
>>>> +A seperated file named README.dra_qspi_test has been created which gives
>>>> all the
>>>> +details about the commands required to test qspi at u-boot level.
>>>> --
>>>> 1.7.1
>>>>
>>> Please use the doc/SPI/status.txt as an example format for writing new
>>> readme files.
>>>
>
>



More information about the U-Boot mailing list