3.1.1.6. OSPI/QSPI

OSPI/QSPI is a serial peripheral interface like SPI the major difference being the support for Octal/Quad read, uses 8/4 data lines for read compared to 2 lines used by the traditional SPI. This section documents how to write files to the QSPI device and use it to load and then boot the Linux Kernel using a root filesystem also found on QSPI. At this time, no special builds of U-Boot are required to perform these operations on the supported hardware. For simplicity we assume the files are being loaded from an SD card. Using the network interface (if applicable) is documented above.

Note

Not all OSPI flashes can be supported. Users are recommended to check whether or not the OSPI flash part chosen for custom board designs meets all the criteria listed at https://e2e.ti.com/support/processors/f/791/t/946418

AM62x Starter Kit (SK) has a Cypress S28HS512T flash and sysfw is bundled with tiboot3.bin.

Flashing images to OSPI

The instructions below can be used to download tiboot3.bin, tispl.bin and u-boot.img over TFTP and then flash each to OSPI at the respective addresses.

=> sf probe
=> tftp ${loadaddr} tiboot3.bin
=> sf update $loadaddr 0x0 $filesize
=> tftp ${loadaddr} tispl.bin
=> sf update $loadaddr 0x100000 $filesize
=> tftp ${loadaddr} u-boot.img
=> sf update $loadaddr 0x300000 $filesize

Phy calibration

Phy calibration allows for higher read performance. To enable phy, the phy calibration pattern must be flashed to OSPI at the start of the last erase sector. For the Cypress S28HS512T flash, this lies at the address 0x3fc0000.

Download the binary file containing the phy pattern from here. The commands below can be used to flash the phy pattern, with the location of the pattern depending on which flash is being used:

=> sf probe
=> tftp ${loadaddr} ospi_phy_pattern
=> sf update $loadaddr 0x3fc0000 $filesize

Flash layout for OSPI

      0x0 +----------------------------+
          |     ospi.tiboot3(1m)       |
          |                            |
 0x100000 +----------------------------+
          |     ospi.tispl(2m)         |
          |                            |
 0x300000 +----------------------------+
          |     ospi.u-boot(4m)        |
          |                            |
 0x700000 +----------------------------+
          |     ospi.env(128k)         |
          |                            |
 0x720000 +----------------------------+
          |   ospi.env.backup(128k)    |
          |                            |
 0x740000 +----------------------------+
          |      padding (768k)        |
 0x800000 +----------------------------+
          |     ospi.rootfs(ubifs)     |
          |                            |
0x3fc0000 +----------------------------+
          |   ospi.phypattern (256k)   |
          |                            |
          +----------------------------+