Tests:eMMC-HS

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

=Setup=

Kernel Version and Configuration
HS200 support for the SDHI driver is expected to land upstream in v4.11. It is currently available in a topic branch:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/topic/sdhi-emmc-hs

It is critical that MMC_SDHI is enabled for this testing. debugfs should be mounted for verification of parameters.

Hardware Environment

 * Salvator-X/r8a7795 (R-Car H3 SoC)
 * Salvator-X/r8a7796 (R-Car M3-W SoC)

Verify HS200 Support
In the bootlog, the on-board eMMC should show up with HS200 enabled:

mmc0: new HS200 MMC card at address 0001

Also, in debugfs, the following information should be available. Note the timing spec line saying HS200:

clock:		200000000 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:	9 (mmc HS200) signal voltage:	1 (1.80 V) driver type:	0 (driver type B)
 * 1) cat /sys/kernel/debug/mmc0/ios

= Test runs =

The following command was used for measuring the transfer speed:

512+0 records in 512+0 records out 536870912 bytes (512.0MB) copied, 8.789871 seconds, 58.2MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512

Tests were run both with and without DMA enabled. This is because without DMA transfer speeds are quite low, however, DMA support for R-Car Gen-3 SDHI is not present in mainline.

The "with DMA" tests were run with the following branch which only merged the DMA support on top of the branch mentioned above:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi-emmc-hs-dma

=Test results=

All values given are in MB/s.

r8a7795/Salvator-X
The eMMC device was a Samsung KLMBG4GESD (CID: 15010042475344335207b5b459a86200)

r8a7796/Salvator-X
The eMMC device was a Silicon Motion SM662PXB (CID: 89010a654d4d43202001261400a0b200)

Conclusion
For both eMMC chips, a significant speed up could be achieved using the HS200 mode.