Tests:SD-SDHI-SDR104

This document describes how to test the SDR104 functionality of the SDHI MMC driver.

Kernel Version and Configuration
SDR-104 support for the SDHI driver is currently available in a topic branch:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/sdr104-v3

For the tests described here the kernel was compiled with the shmobile_defconfig. DEBUG_FS was also enabled.

It is critical that MMC_SDHI is enabled for this testing.

Hardware Environment

 * Board/Soc: Lager/r8a7790 (Gen 2 R-Car H2 SoC)
 * MMC Cards:
 * SanDisk Card 1: SanDisk Ultra 64Gb microSDXC UHS-1. Identifier on Packaging: SDSQUNC-064G-GN6MA
 * SanDisk Card 2: SanDisk Extreme Pro 8Gb microSDHC UHS-1. Appears to be: SDSDQXP-008G-J35
 * Samsung Card 1: Samsung 32Gb microSDHC Card Class 10 UHS-1 U3. ModelCode: MB-MG32EA/FFP
 * Samsung Card 2: Samsung 32Gb microSDHC Card Class 10 UHS-1 U3. ModelCode: MB-MG32DA/FFP

Verify SDR-104 Support
The patches above enable SDR-104 for the SDHI0 slot of the Lager/r8a7790 board.

After inserting a card which supports SDR-104, for example one of the cards listed above, it should be possible to verify that SDR-104 support is enabled.

$ dmesg | grep SDR mmc1: new ultra high speed SDR104 SDHC card at address 0001

clock:         195000000 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:   6 (sd uhs SDR104) signal voltage: 1 (1.80 V) driver type:   0 (driver type B)
 * 1) mount -t debugfs none /sys/kernel/debug
 * 2) cat /sys/kernel/debug/mmc1/ios

Indicative Speed
Sandisk Card 1: 536870912 bytes (537 MB) copied, 11.901 s, 45.1 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Sandisk Card 2: 536870912 bytes (537 MB) copied, 11.1349 s, 48.2 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Samsung Card 1: 536870912 bytes (537 MB) copied, 14.697 s, 36.5 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Samsung Card 2: 536870912 bytes (537 MB) copied, 14.7366 s, 36.4 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Control
The above run without the SDR-104 patches applied.

Here the test has been run using a kernel compiled using the base of the topic branch described above. The head commit is d11882edea06 ("Merge tag 'renesas-next-20160427v2-v4.6-rc1' into HEAD").

In this test SDR50 is enabled but SDR104 is not.

$ dmesg | grep SDR mmc1: new ultra high speed SDR50 SDHC card at address 0001

clock:         100000000 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:   5 (sd uhs SDR50) signal voltage: 1 (1.80 V) driver type:   0 (driver type B)
 * 1) mount -t debugfs none /sys/kernel/debug
 * 2) cat /sys/kernel/debug/mmc1/ios

Indicative Speed
Sandisk Card 1: SanDisk Card 1: 536870912 bytes (537 MB) copied, 17.7253 s, 30.3 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Sandisk Card 2: SanDisk Card 2: 536870912 bytes (537 MB) copied, 15.6158 s, 34.4 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Samsung Card 1: Samsung Card 1: 536870912 bytes (537 MB) copied, 20.7866 s, 25.8 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null

Samsung Card 2: Samsung Card 2: 536870912 bytes (537 MB) copied, 19.3648 s, 27.7 MB/s
 * 1) dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null