Tests:SD-SDHI-SDR104

From eLinux.org
Revision as of 19:33, 23 May 2016 by Horms (talk | contribs) (Kernel Version and Configuration)
Jump to: navigation, search

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/sdr-104-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/r8a7795 (Gen 2 R-Car H1 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
# mount -t debugfs none /sys/kernel/debug
# cat /sys/kernel/debug/mmc1/ios
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)

Indicative Speed

Sandisk Card 1:

# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
536870912 bytes (537 MB) copied, 11.901 s, 45.1 MB/s

Sandisk Card 2:

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

Samsung Card 1:

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

Samsung Card 2:

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

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
# mount -t debugfs none /sys/kernel/debug
# cat /sys/kernel/debug/mmc1/ios
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)

Indicative Speed

Sandisk Card 1:

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

Sandisk Card 2:

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

Samsung Card 1:

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

Samsung Card 2:

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