2.7.6. OSPI

This section documents how to access OSPI MTD partitions from SD card boot.

2.7.6.1. OSPI MTD partition access from u-boot

The OSPI MTD partitions are configured in the default AM62Ax Processor SDK Linux as shown in the u-boot prompt below:

=> mtd list
List of MTD devices:
* spi-nand0
  - device: flash@0
  - parent: spi@fc40000
  - driver: spi_nand
  - type: NAND flash
  - block size: 0x40000 bytes
  - min I/O: 0x1000 bytes
  - OOB size: 128 bytes
  - OOB available: 80 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "ospi.tiboot3"
          - 0x000000080000-0x000000280000 : "ospi.tispl"
          - 0x000000280000-0x000000680000 : "ospi.u-boot"
          - 0x000000680000-0x0000006c0000 : "ospi.env"
          - 0x0000006c0000-0x000000700000 : "ospi.env.backup"
          - 0x000002000000-0x000007fc0000 : "ospi.rootfs"
          - 0x000007fc0000-0x000008000000 : "ospi.phypattern"

2.7.6.2. OSPI MTD partition access from Linux

The following Linux command shows the available OSPI MTD partitions:

# mtdinfo -a
Count of MTD devices:           7
Present MTD devices:            mtd0, mtd1, mtd2, mtd3, mtd4, mtd5, mtd6
Sysfs interface supported:      yes

mtd0
Name:                           ospi.tiboot3
Type:                           nor
Eraseblock size:                262144 bytes, 256.0 KiB
Amount of eraseblocks:          2 (524288 bytes, 512.0 KiB)
Minimum input/output unit size: 16 bytes
Sub-page size:                  16 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         false
Device is writable:             true

mtd1
Name:                           ospi.tispl
Type:                           nor
Eraseblock size:                262144 bytes, 256.0 KiB
Amount of eraseblocks:          8 (2097152 bytes, 2.0 MiB)
Minimum input/output unit size: 16 bytes
Sub-page size:                  16 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         false
Device is writable:             true

mtd2
Name:                           ospi.u-boot
Type:                           nor
Eraseblock size:                262144 bytes, 256.0 KiB
Amount of eraseblocks:          16 (4194304 bytes, 4.0 MiB)
Minimum input/output unit size: 16 bytes
Sub-page size:                  16 bytes
Character device major/minor:   90:4
Bad blocks are allowed:         false
Device is writable:             true

...

mtd6
Name:                           ospi.phypattern
Type:                           nor
Eraseblock size:                262144 bytes, 256.0 KiB
Amount of eraseblocks:          1 (262144 bytes, 256.0 KiB)
Minimum input/output unit size: 16 bytes
Sub-page size:                  16 bytes
Character device major/minor:   90:12
Bad blocks are allowed:         false
Device is writable:             true