Increase Micro SD card performance on Zero3

The Zero3 MicroSD card slot supports SDR104 but the maximum frequency is set to 150 MHz
I have created an overlay to enable the 208Mhz max-frequency. Be aware that the actual frequency might differ because it depends on the CPU frequency (don’t know the exact ratio)
For future reference I have documented the steps:

Using the Radxa Debian XFCE B4 image

in home folder create following dts file

radxa@radxa-zero3:~$ cat radxa-zero3-sdslot-208mhz.dts

/dts-v1/;
/plugin/;

/ {

        metdata {
               title = "Set SD card slot freq to 208MHz";
               compatible = "radxa,zero3";
               category = "misc";
               description = "Set SD card slot freq to 208MHz";
        };

        fragment@0 {
                target = <&sdmmc0>;
                __overlay__ {
                        max-frequency = <208000000>;
                };
        };

};

compile

dtc -@ -H epapr -O dtb -o radxa-zero3-sdslot-208mhz.dtbo -Wno-unit_address_vs_reg radxa-zero3-sdslot-208mhz.dts 

move to correct folder and disable (by renaming the file -> this will allow the rsetup utility to correctly identify the file)

sudo mv radxa-zero3-sdslot-208mhz.dtbo /boot/dtbo/radxa-zero3-sdslot-208mhz.dtbo.disabled

give correct permissions

sudo chmod 755 /boot/dtbo/radxa-zero3-sdslot-208mhz.dtbo.disabled

enable using sudo rsetup and reboot

BEFORE

radxa@radxa-zero3:~$ sudo dmesg | grep -i mmc1
[   12.244192] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[   12.862919] mmc1: delay init for 600 ms to enable UHS mode
[   12.932561] mmc_host mmc1: Bus speed (slot 0) = **148500000Hz** (slot req 150000000Hz, actual 148500000HZ div = 0)
[   13.072716] mmc1: new ultra high speed SDR104 SDXC card at address 0001
[   13.074651] mmcblk1: mmc1:0001 FD4Q9 119 GiB 

AFTER

radxa@radxa-zero3:~$ sudo dmesg | grep -i mmc1
[   12.282628] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[   12.901357] mmc1: delay init for 600 ms to enable UHS mode
[   12.972786] mmc_host mmc1: Bus speed (slot 0) = **198000000Hz** (slot req 208000000Hz, actual 198000000HZ div = 0)
[   13.090046] mmc1: new ultra high speed SDR104 SDXC card at address 0001
[   13.091765] mmcblk1: mmc1:0001 FD4Q9 119 GiB 

Maybe not the correct os supported way but it works in my case :slight_smile:

Great! Do you know the actual speed difference of copying files?

@dewitte77 do you perhaps know what the theoretical and practical difference in speed will be :)?