laurent
Posts: 344
Joined: Thu Jul 26, 2012 11:24 am

Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 11:53 am

Hi,

I read that: https://www.phoronix.com/scan.php?page= ... inux-Patch
Does someone tested out that prevously ?

fik
Posts: 41
Joined: Thu Jan 17, 2013 1:34 pm

Re: Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 12:49 pm

testing now ...

Kendek
Posts: 265
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 1:32 pm

This is the patch, right?

Code: Select all

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index 222d7825e1ab..8b61e258e906 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -191,6 +191,8 @@ &emmc2 {
 	vqmmc-supply = <&sd_io_1v8_reg>;
 	vmmc-supply = <&sd_vcc_reg>;
 	broken-cd;
+	mmc-ddr-3_3v;
+	sd-uhs-ddr50;
 	status = "okay";
 };
Then it doesn't do anything, because sd-uhs-ddr50 is already applied, even without this modification:

Code: Select all

> cat /sys/kernel/debug/mmc0/ios
clock:		50000000 Hz
actual clock:	50000000 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:	2 (4 bits)
timing spec:	7 (sd uhs DDR50)
signal voltage:	1 (1.80 V)
driver type:	0 (driver type B)
So the speed will not increase.

Code: Select all

> hdparm -t /dev/mmcblk0

/dev/mmcblk0:
 Timing buffered disk reads: 134 MB in  3.02 seconds =  44.37 MB/sec

fik
Posts: 41
Joined: Thu Jan 17, 2013 1:34 pm

Re: Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 2:09 pm

Yes, that's the patch. Does not seem to have any effect on random reads or writes either :roll:

trejan
Posts: 2949
Joined: Tue Jul 02, 2019 2:28 pm

Re: Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 2:22 pm

The patch is for the mainline kernel so not the same one that comes with Raspberry Pi OS.

laurent
Posts: 344
Joined: Thu Jul 26, 2012 11:24 am

Re: Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 2:41 pm

Many thanks for reporting back here!
Does it means that the Rpi OS team already enabled this?

trejan
Posts: 2949
Joined: Tue Jul 02, 2019 2:28 pm

Re: Possible SD transfert speed up on Pi 4 ?

Mon Aug 31, 2020 3:39 pm

Part of this was already implemented in the Pi kernel but it only helps with 3.3V DDR50 eMMC. See https://github.com/raspberrypi/linux/issues/3802

lb
Posts: 276
Joined: Sat Jan 28, 2012 8:07 pm

Re: Possible SD transfert speed up on Pi 4 ?

Wed Sep 02, 2020 6:36 am

It's slightly off-topic, but I still wonder why (apparently) the common SDR104 transfer mode is not supported by the Pi 4. Pretty much all SD controllers that support UHS transfer modes also support SDR104. Why was this omitted? Or maybe it wasn't, but it doesn't work reliably on the Pi 4? Does anyone have more info?

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2463
Joined: Thu Jul 11, 2013 2:37 pm

Re: Possible SD transfert speed up on Pi 4 ?

Wed Sep 02, 2020 8:57 am

lb wrote:
Wed Sep 02, 2020 6:36 am
It's slightly off-topic, but I still wonder why (apparently) the common SDR104 transfer mode is not supported by the Pi 4. Pretty much all SD controllers that support UHS transfer modes also support SDR104. Why was this omitted? Or maybe it wasn't, but it doesn't work reliably on the Pi 4? Does anyone have more info?
SDR104 isn't particularly common. The vast majority of regular microSD UHS-capable cards (without fancy artwork or adjectives like EXTREME on them) only support DDR50 as their highest transfer rate mode.

SDR104 requires a 208MHz clock line with quite tight rise/fall times, which is at the limits of what you can do with run-of-the-mill CMOS IO pads. To maintain decent signal integrity at these speeds you need controlled impedance bidirectional pads which are larger/more expensive etc.
Rockets are loud.
https://astro-pi.org

lb
Posts: 276
Joined: Sat Jan 28, 2012 8:07 pm

Re: Possible SD transfert speed up on Pi 4 ?

Wed Sep 02, 2020 1:00 pm

jdb wrote:
Wed Sep 02, 2020 8:57 am
lb wrote:
Wed Sep 02, 2020 6:36 am
It's slightly off-topic, but I still wonder why (apparently) the common SDR104 transfer mode is not supported by the Pi 4. Pretty much all SD controllers that support UHS transfer modes also support SDR104. Why was this omitted? Or maybe it wasn't, but it doesn't work reliably on the Pi 4? Does anyone have more info?
SDR104 isn't particularly common. The vast majority of regular microSD UHS-capable cards (without fancy artwork or adjectives like EXTREME on them) only support DDR50 as their highest transfer rate mode.
Huh, run of the mill cheapo Sandisk Ultra cards support it just fine and I get something like 80-90 MiB/s for sequential reads. It's similar with the cheap and common Samsung EVO cards, too.
SDR104 requires a 208MHz clock line with quite tight rise/fall times, which is at the limits of what you can do with run-of-the-mill CMOS IO pads. To maintain decent signal integrity at these speeds you need controlled impedance bidirectional pads which are larger/more expensive etc.
OK, that makes sense. However, if you're at the limits, you can always back off a bit with the clock, and as far as I can tell this is pretty common with typical clocks anywhere from 150 to 200 Mhz, instead of the rated 208 Mhz. I hope we'll see support for SDR104 on a newer iteration of the Raspberry Pi. :)

Return to “Advanced users”