STM32MP1-OLinuXino-LIME: supported microSD/SDMMC modes and expected throughput?

Started by dry, July 03, 2026, 04:18:02 PM

Previous topic - Next topic

dry

I noticed that microSD R,W performance seems very slow. I don't belive its the card's issue - C10, V30, U3, A2.

The card under test is a SanDisk Extreme 64GB, marked V30 / U3 / A2. It is detected as mmcblk1:

    mmc1: new high speed SDXC card at address aaaa
    mmcblk1: mmc1:aaaa SN64G 59.5 GiB
    EXT4-fs (mmcblk1p4): mounted filesystem

The debugfs MMC status shows:

    clock:          50000000 Hz
    actual clock:   49500000 Hz
    vdd:            21 (3.3 ~ 3.4 V)
    bus mode:       2 (push-pull)
    bus width:      2 (4 bits)
    timing spec:    2 (sd high-speed)
    signal voltage: 0 (3.30 V)
    driver type:    0 (driver type B)

In dmesg I also see the controller reported with "pio":

    mmci-pl18x 58005000.sdmmc: mmc1: PL180 manf 53 rev1 at 0x58005000 irq 56,0 (pio)

My measured performance on /test, using diskspd-for-linux with O_DIRECT/O_SYNC, is approximately:

    Sequential read:       ~10.6 MiB/s
    Sequential write:      ~2.1 MiB/s
    Random 4K read:        ~898 IOPS
    Random 4K write:       ~81 IOPS

Could you please clarify:

1. The STM32MP157 SoC can support better SDMMC modes than plain 50 MHz SD High-Speed,
so do I undersand it correctly, the Olimex board microSD slot wired for fixed 3.3V SD High-Speed operation, it cannot do 1.8V / UHS-I?

2. Is DMA expected to be available for this SDMMC controller, or is PIO mode normal on this board/kernel configuration?

3. Are there any recommended device-tree or kernel settings required to enable the best supported SDMMC performance?


My kernel:
Linux stm32mp1-olinuxino-lime 5.10.180-olimex #075247 SMP Tue Jun 30 07:54:18 UTC 2026 armv7l GNU/Linux
And my enabled overlays are:
stm32mp1-hdmi.dtbo          STM32MP1-OLinuXino Enable HDMI
stm32mp1-mmc3.dtbo          Enable MMC3 extension

(So i tested both slots: on board, and through slot on the shield extension board, almost same results)

LubOlimex

On the fly my thoughts on this:

1. There are both hardware and software limitations to use such a fast card optimally with this board. For sure A2 and faster cards require special software treatment. As I wrote in the manual some years ago: "For best experience use a micro SD card with speed rating between class 10 and A1. Using slower than class 10 card might severely degrade the user experience. Beware that A2 or faster cards might lack software support in Linux."

2. Yes, microSD wiring the card is powered from fixed 3.3 V and the SDMMC I/O is not switched to 1.8 V. The practical maximum is 4-bit SD High-Speed at about 50 MHz. The reported timing spec: sd high-speed, bus width: 4 bits, and signal voltage: 3.30 V are correct.

3. The card expects UHS-capable host, but the speeds are not reachable on a fixed 3.3 V 50 MHz host. O_DIRECT/O_SYNC on ext4 is a very strict test, especially for writes, so it can show much lower numbers than the card's marketing rating. For bus/card comparison it is better to also test large-block direct I/O without per-write sync, or read from the raw block device.
Technical support and documentation manager at Olimex

dry

Hello LubOlimex,

Thank you for replying,

Quote from: LubOlimex on July 06, 2026, 01:26:32 PM1. There are both hardware and software limitations to use such a fast card optimally with this board.

Yea, I have looked since at the board and the shield schematics, and saw that there isn't but 3.3V available with micro SD cards.

Also I have one card I've tested on this LIME2 board which is probably 'too fast' for it: it starts failing from clean brand new fs formated on it and from first mount: just start getting corruption immediately on mount. With 2 different fs tried.

This is Patriot brand, C10 A2 U3 etc.. Probably, not liking slower speeds, no idea but, SanDisk of similar grade works Ok, at least in the main onboard micro sd slot.

LubOlimex

Try testing the SD cards. Good free software for testing the SD cards is either f3
(fight flash fraud) or H2testW. There are a lot of counterfeit SD cards out
there and also cards tend to get damaged easily.
Technical support and documentation manager at Olimex