2.9.8. OSPI¶
This section documents how to access OSPI MTD partitions from SD card boot.
2.9.8.1. OSPI MTD partition access from u-boot¶
The OSPI MTD partitions are configured in the default AM62x Processor SDK Linux as shown in the u-boot prompt below:
=> sf probe
SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB
=> mtd list
List of MTD devices:
* nor0
- type: NOR flash
- block size: 0x40000 bytes
- min I/O: 0x1 bytes
- 0x000000000000-0x000004000000 : "nor0"
- 0x000000000000-0x000000080000 : "ospi.tiboot3"
- 0x000000080000-0x000000280000 : "ospi.tispl"
- 0x000000280000-0x000000680000 : "ospi.u-boot"
- 0x000000680000-0x0000006c0000 : "ospi.env"
- 0x0000006c0000-0x000000700000 : "ospi.env.backup"
- 0x000000800000-0x000003fc0000 : "ospi.rootfs"
- 0x000003ec0000-0x000003f00000 : "ospi.phypattern"
2.9.8.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