Project

General

Profile

Booting from OSPI / QSPI

See Boot_options for more details about the boot select pins

*NOTE: The XSPI boot mode can auto detect and boot the OSPI/QSPI NOR

XSPI Boot Mode for OSPI/QSPI

To boot the Dev Kit from OSPI/QSPI using a CL supplied image, set the boot pins as follows:

B3 B4 B5 B6 B7 B8 B9
0 1 1 1 Mode (0) ReadCmd (0) SFDP (1)

xspi_boot_sw.jpg

Steps

  • boot to linux (i.e. from SD card).
  • Check that the spi nor was detected
    Make note of the mtd# for tiboot3/tispl/u-boot as newer kernels are changing up the order...
    root@mitysom-am62x:~# cat /proc/mtd 
    dev:    size   erasesize  name
    mtd0: 00080000 00020000 "ospi.tiboot3" 
    mtd1: 00200000 00020000 "ospi.tispl" 
    mtd2: 00400000 00020000 "ospi.u-boot" 
    mtd3: 00040000 00020000 "ospi.env" 
    mtd4: 00040000 00020000 "ospi.env.backup" 
    mtd5: 0f7c0000 00020000 "ospi.rootfs" 
    mtd6: 00040000 00020000 "ospi.phypattern" 
    
  • cd to boot partition (the directory containing tibot3.bin, etc.../run/media/mmcblk1p1 in my case.)
  • Erase the NOR partitions
    root@mitysom-am62x:~# flash_erase /dev/mtd0 0 0
    root@mitysom-am62x:~# flash_erase /dev/mtd1 0 0
    root@mitysom-am62x:~# flash_erase /dev/mtd2 0 0
    
  • copy the boot files to their respective locations in SPI NOR
    root@mitysom-am62x:~# cp tiboot3.bin /dev/mtd0
    root@mitysom-am62x:~# cp tispl.bin /dev/mtd1
    root@mitysom-am62x:~# cp u-boot.img /dev/mtd2
    

      0x0 +----------------------------+
          |     ospi.tiboot3(512k)     |
          |                            |
  0x80000 +----------------------------+
          |     ospi.tispl(2m)         |
          |                            |
 0x280000 +----------------------------+
          |     ospi.u-boot(4m)        |
          |                            |
 0x680000 +----------------------------+
          |     ospi.env(128k)         |
          |                            |
 0x6c0000 +----------------------------+
          |   ospi.env.backup(128k)    |
          |                            |
 0x740000 +----------------------------+
          |      padding (768k)        |
 0x800000 +----------------------------+
          |     ospi.rootfs(ubifs)     |
          |                            |
0xffc0000 +----------------------------+
          |   ospi.phypattern (256k)   |
          |                            |
          +----------------------------+

Flashing in u-boot from sdcard

sf update command erases before writing data

=> mmc rescan
=> sf probe
SF: Detected mt35xu02g with page size 256 Bytes, erase size 128 KiB, total 256 MiB
=> sf update $loadaddr 0x0 $filesize         
device 0 offset 0x0, size 0x4e172
319858 bytes written, 0 bytes skipped in 0.880s, speed 370933 B/s
=> fatload mmc 1 $loadaddr tispl.bin         
1554491 bytes read in 68 ms (21.8 MiB/s)
=> sf update $loadaddr 0x80000 $filesize
device 0 offset 0x80000, size 0x17b83b
1554491 bytes written, 0 bytes skipped in 3.735s, speed 425842 B/s
=> fatload mmc 1 $loadaddr u-boot.img   
1159387 bytes read in 51 ms (21.7 MiB/s)
=> sf update $loadaddr 0x280000 $filesize
device 0 offset 0x280000, size 0x11b0db
1159387 bytes written, 0 bytes skipped in 2.803s, speed 423097 B/s

Go to top
Add picture from clipboard (Maximum size: 1 GB)