05-15-2017, 09:32 PM
Hello.
TB (rk3288) supports faster microSD card (on SDmmc) - SDIO-3/UHS-I - sdr12, sdr25, sdr50, sd-uhs-sdr104 (208MHz/SDR/4bit == 104MB/s).
TB SDmmc speed is limited in range 400kHz - 150MHz that results up to 150MHz/SDR/4bit == 75MB/s.
I did some iozone tests on rockchip-4.4 kernel (all transfer speeds enabled in dts) with microSDHC card 16GB ADATA Premier Pro/UHS-I/UHS speed class 3 (U3)/declared up to 95MB/s and ext4 filesystem (stripped irrelevant outputs):
TL;DR: Performance UHS-1/U3 microSD card with ext4 filesystem depends cpu speed (in interactive mode). I recommend increase minimum speed or set other governor (scaling_available_governors:conservative ondemand userspace powersave interactive performance). TB SDmmc bus theoretical bandwidth is 75MB/s.
- default minimum 126Mhz - 34 MB/s read, 12-15MB/s write
- set minimum to 600MHz - 54 MB/s read, 13-23MB/w write
- set minimum to 1008MHz - 58 MB/s read, 15-24MB/w write
PS: Does anyone have access to "TRM RK3288 Chapter 15 Mobile Storage Host" (older) or "Chapter 1 of Part 3 Mobile Storage Host Controller" (newer) to verify chip capability (dts may be wrong) (missing rk3288-chapter-15-*) ?
UPDATE: response from opensource rock-chips.com: According to Rockchip document policy, you need to sign NDA for part2 TRM...
TB (rk3288) supports faster microSD card (on SDmmc) - SDIO-3/UHS-I - sdr12, sdr25, sdr50, sd-uhs-sdr104 (208MHz/SDR/4bit == 104MB/s).
TB SDmmc speed is limited in range 400kHz - 150MHz that results up to 150MHz/SDR/4bit == 75MB/s.
I did some iozone tests on rockchip-4.4 kernel (all transfer speeds enabled in dts) with microSDHC card 16GB ADATA Premier Pro/UHS-I/UHS speed class 3 (U3)/declared up to 95MB/s and ext4 filesystem (stripped irrelevant outputs):
Code:
# dmesg | grep mmc0
[ 4.084535] mmc_host mmc0: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[ 4.536343] mmc0: new ultra high speed SDR104 SDHC card at address 59b4
[ 4.546588] mmcblk0: mmc0:59b4 SD 14.7 GiB
##### first test with "standard" interactive governor and default minimum frequency 126000, 2x iozone output, measuring cpuinfo_cur_freq shows variable speed between 126-1008MHz, thermal_zone1/temp ~49 C (open case, standard heatsink)
# grep '' /sys/devices/system/cpu/cpufreq/policy0/scaling_[gm]*
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:interactive
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:126000
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
random random
kB reclen write rewrite read reread read write
102400 4 1042 1282 6917 7156 5109 864
102400 4 1117 1244 5862 7254 6236 845
102400 1024 11913 21835 34522 34879 31550 18664
102400 1024 12126 20257 34766 37053 32538 15894
##### second test with minimum frequency 600000, 2x iozone output, measuring cpuinfo_cur_freq shows that speed is not changing from 600MHz, thermal_zone1/temp ~50 C
# echo 600000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
# grep '' /sys/devices/system/cpu/cpufreq/policy0/scaling_[gm]*
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:interactive
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:600000
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
random random
kB reclen write rewrite read reread read write
102400 4 1321 1459 7752 8072 7457 1005
102400 4 1288 1391 8060 7873 7485 1007
102400 1024 13976 27038 53387 54065 53818 23876
102400 1024 12816 10466 53776 53746 53323 10667
##### third test with minimum frequency 1008000, 2x iozone output, measuring cpuinfo_cur_freq shows that speed is not changing from 1008MHz, thermal_zone1/temp ~52 C
# echo 1008000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
# grep '' /sys/devices/system/cpu/cpufreq/policy0/scaling_[gm]*
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:interactive
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:1008000
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
random random
kB reclen write rewrite read reread read write
102400 4 1147 1391 8699 8699 7975 998
102400 4 1382 1474 8925 8915 8279 1001
102400 1024 12038 27139 58261 58484 58190 24044
102400 1024 18905 27519 58339 58480 58199 24411 TL;DR: Performance UHS-1/U3 microSD card with ext4 filesystem depends cpu speed (in interactive mode). I recommend increase minimum speed or set other governor (scaling_available_governors:conservative ondemand userspace powersave interactive performance). TB SDmmc bus theoretical bandwidth is 75MB/s.
- default minimum 126Mhz - 34 MB/s read, 12-15MB/s write
- set minimum to 600MHz - 54 MB/s read, 13-23MB/w write
- set minimum to 1008MHz - 58 MB/s read, 15-24MB/w write
PS: Does anyone have access to "TRM RK3288 Chapter 15 Mobile Storage Host" (older) or "Chapter 1 of Part 3 Mobile Storage Host Controller" (newer) to verify chip capability (dts may be wrong) (missing rk3288-chapter-15-*) ?
UPDATE: response from opensource rock-chips.com: According to Rockchip document policy, you need to sign NDA for part2 TRM...