Trouble enabling high speeds on Emmc Rk3308 Rock S0
eMMC stuck at DDR52 on Rock S0
Can't seem to enable anything higher than DDR52 on this board. eMMC is 5.1 rated and anything I try just falls back down to DDR52, which I had to enable in DTS.
Current MMC state
root@rock-s0:~# cat /sys/kernel/debug/mmc0/ios
clock: 52000000 Hz
actual clock: 49152000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 3 (8 bits)
timing spec: 8 (mmc DDR52)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
DTS node (from compiled DTB)
root@rock-s0:~# dtc -I dtb -O dts /boot/dtb/rockchip/rk3308-rock-s0.dtb 2>/dev/null | awk '/mmc@ff490000/,/^[[:space:]]*\};/' | head -40
mmc0 = "/mmc@ff490000";
mmc1 = "/mmc@ff480000";
mmc2 = "/mmc@ff4a0000";
};
mmc@ff490000 {
compatible = "rockchip,rk3308-dw-mshc", "rockchip,rk3288-dw-mshc";
reg = <0x00 0xff490000 0x00 0x4000>;
interrupts = <0x00 0x4d 0x04>;
bus-width = <0x08>;
clocks = <0x02 0x9c 0x02 0x3a 0x02 0x3b 0x02 0x3c>;
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
fifo-depth = <0x100>;
max-frequency = <0x8f0d180>;
status = "okay";
cap-mmc-highspeed;
no-sd;
no-sdio;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <0x58 0x59 0x5a 0x5b>;
vmmc-supply = <0x0c>;
phandle = <0xb8>;
mmc-hs200-1_8v;
mmc-ddr-1_8v;
};
dmesg
root@rock-s0:~# dmesg | grep -i mmc0
[ 2.709092] mmc_host mmc0: card is non-removable.
[ 2.720955] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 3.263949] mmc_host mmc0: Bus speed (slot 0) = 50176000Hz (slot req 52000000Hz, actual 50176000HZ div = 0)
[ 3.264103] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 3.264175] mmc0: mmc_select_hs200 failed, error -74
[ 3.266520] mmc_host mmc0: Bus speed (slot 0) = 50176000Hz (slot req 52000000Hz, actual 50176000HZ div = 0)
[ 3.268886] mmc0: new high speed DDR MMC card at address 0001
[ 3.272106] mmcblk0: mmc0:0001 DF4016 14.7 GiB
[ 3.282958] mmcblk0boot0: mmc0:0001 DF4016 4.00 MiB
[ 3.290759] mmcblk0boot1: mmc0:0001 DF4016 4.00 MiB
[ 3.304881] mmcblk0rpmb: mmc0:0001 DF4016 4.00 MiB, chardev (242:0)
Details
- Board: Rock S0
- OS: Armbian 26.2.1
- Kernel: 6.18.10
- eMMC: 5.1 rated (DF4016, 14.7 GiB)
Problem
mmc_select_hs200 failed, error -74 — the driver attempts HS200 but tuning fails and falls back to DDR52. The DTS has both mmc-hs200-1_8v and mmc-ddr-1_8v set. Is there something else needed to get HS200 or HS400 working? Seems similar to issues others have had on other Rock boards but I can't find a clear fix.
Worked for a while on this;
I can't solve the problem, but I have a work around for now, since we know the SOC and emmc I've used are capable of more speed I've rebuilt the kernel 6.19.14-edge-rockchip64 with a patch to overclock ddr52.
Simple patch to include/linux/mmc/card.h
/* change / #define MMC_HIGH_DDR_MAX_DTR 52000000 / to */ #define MMC_HIGH_DDR_MAX_DTR 75000000
This allows ddr52 to negotiate a higher speed = 73.7MHz @ 1.8v
70.2 MB/s → 94.5 MB/s (+35%) - stable as far as I've tested, probably capable of more but as we increase clock CPU utilization increases as we have no que control (sys=13.37%@70.2MB/s) vs (sys=15.89%@94.5MB/s) = 2.5% increase.
Bare in mind; The kernel has had the ability to test and downgrade straps with storage for quite a while now, building stock had no fancy speeds baked in at all and I have to manually add mmc-hs200-1_8v; & mmc-ddr-1_8v; by hand to DTC. Surely the best solution is to add all available straps and let the SOC test at boot, just a thought....
For me this is fine and a decent increase, but for other workloads people may favor increased CPU for throughput, if I get time I may work on a patch to allow pre-defined - configurable straps to ddr52 in these edge cases (cba to rebuild a kernel rn)
Also noticed after pulling and building the kernel, there are errors in AV1 modules, since I'm working on a headless board I simply RM'd them but tbh they are a problem upstream and should be looked into (unless I pulled wrong idk)
FIO results after patch;
root@rock-s0:~# fio --name=seq_read --filename=/dev/mmcblk0 --rw=read --bs=128k --size=256m --direct=1 --ioengine=libaio --iodepth=32 --numjobs=1 --runtime=60 --time_based --group_reporting seq_read: (g=0): rw=read, bs=(R) 128KiB-128KiB, (W) 128KiB-128KiB, (T) 128KiB-128KiB, ioengine=libaio, iodepth=32 fio-3.39 Starting 1 process Jobs: 1 (f=1): [R(1)][100.0%][r=96.5MiB/s][r=771 IOPS][eta 00m:00s] seq_read: (groupid=0, jobs=1): err= 0: pid=1241: Sat May 30 23:19:42 2026 read: IOPS=756, BW=94.5MiB/s (99.1MB/s)(5671MiB/60002msec) slat (usec): min=655, max=5382, avg=1279.74, stdev=159.83 clat (usec): min=1117, max=54524, avg=41006.42, stdev=2710.22 lat (usec): min=2211, max=56390, avg=42286.16, stdev=2780.62 clat percentiles (usec): | 1.00th=[36963], 5.00th=[36963], 10.00th=[37487], 20.00th=[39060], | 30.00th=[40109], 40.00th=[40633], 50.00th=[40633], 60.00th=[41157], | 70.00th=[41681], 80.00th=[42730], 90.00th=[44303], 95.00th=[45876], | 99.00th=[50070], 99.50th=[50594], 99.90th=[52167], 99.95th=[52691], | 99.99th=[53740] bw ( KiB/s): min=88064, max=105216, per=100.00%, avg=96778.18, stdev=3947.68, samples=120 iops : min= 688, max= 822, avg=756.08, stdev=30.82, samples=120 lat (msec) : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.02%, 50=99.10% lat (msec) : 100=0.87% cpu : usr=2.50%, sys=15.89%, ctx=45434, majf=0, minf=1035 IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=99.9%, >=64=0.0% submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0% issued rwts: total=45368,0,0,0 short=0,0,0,0 dropped=0,0,0,0 latency : target=0, window=0, percentile=100.00%, depth=32
Run status group 0 (all jobs): READ: bw=94.5MiB/s (99.1MB/s), 94.5MiB/s-94.5MiB/s (99.1MB/s-99.1MB/s), io=5671MiB (5946MB), run=60002-60002msec
Disk stats (read/write): mmcblk0: ios=45269/0, sectors=11588864/0, merge=0/0, ticks=113424/0, in_queue=113424, util=100.00%
All in all, decent work for an evening, but it is a shame I could not figure out how to enable hs200, it always fails to tune with (mmc0: mmc_select_hs200 failed, error -74 (EILSEQ — tuning failure) The emmc I used is capable (hs400), and the soc has hs200 in its specs, I just don't know enough to figure out whats going on. I thought about increasing DVR STG but that's another rebuild I think.
If anyone has any ideas it would be helpful :)
The kernel you are using (mainline) has nothing to do with this repo which holds our patched version of the rockchip bsp code. In any case issues running Armbian shall be reported in forums: https://forum.armbian.com/
The kernel you are using (mainline) has nothing to do with this repo which holds our patched version of the rockchip bsp code. In any case issues running Armbian shall be reported in forums: https://forum.armbian.com/
My apologies, I've been testing various things with this board. I'm fairly certain the issue described is across many kernels, including 6.18.8 from here https://armbian.com/boards/rock-s0 as that was what I was using before.
Should I re-open?
Not on Github as, again, this is an issue running Armbian and those are not accepted on any gh repo.
Not on Github as, again, this is an issue running Armbian and those are not accepted on any gh repo.
Thanks for taking the time to reply buddy, Im noob when it comes to github. I think what you're getting at this is an upstream problem which this repo uses.
I'll post at the source, thanks again.