Difference between revisions of "Tests:SD-SDHI-SDR104"

From eLinux.org
Jump to: navigation, search
(Cards)
 
(44 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
SDR-104 support for the SDHI driver is currently available in a topic branch:
 
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-v2
+
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/sdr104-v7
  
For the tests described here the kernel was compiled with the shmobile_defconfig.
+
It is critical that MMC_SDHI is enabled for this testing.
DEBUG_FS was also enabled.
 
  
It is critical that MMC_SDHI is enabled for this testing.
 
 
== Hardware Environment ==
 
== Hardware Environment ==
  
* Board/Soc: Lager/r8a7795 (Gen 2 R-Car H1 SoC)
+
===Board/Socs ===
* MMC Cards:
+
 
** SanDisk Card 1: SanDisk Ultra 64Gb microSDXC UHS-1. Identifier on Packaging: SDSQUNC-064G-GN6MA
+
* Lager/r8a7790 (Gen 2 R-Car H2 SoC)
** SanDisk Card 2: SanDisk Extreme Pro 8Gb microSDHC UHS-1. Appears to be: SDSDQXP-008G-J35
+
* Koelsch/r8a7791 (Gen 2 R-Car M2-W SoC)
** Samsung Card 1: Samsung 32Gb microSDHC Card Class 10 UHS-1 U3. ModelCode: MB-MG32EA/FFP
+
* Alt/r8a7794 (Gen 2 R-Car E2 SoC)
** Samsung Card 2: Samsung 32Gb microSDHC Card Class 10 UHS-1 U3. ModelCode: MB-MG32DA/FFP
+
* Salvator-X/r8a7795 (Gen 3 R-Car H3 SoC)
 +
* Salvator-X/r8a7796 (Gen 3 R-Car M3-W SoC)
 +
 
 +
===Cards===
 +
{| class="wikitable"
 +
|-
 +
! !! CID !! Product Code || Description
 +
|-
 +
| SanDisk Card 1 || 035054534c36344730da9456d000fa00 || SDSQUNC-064G-GN6MA || SanDisk Ultra
 +
|-
 +
| SanDisk Card 2 || 035344535530384780401eb2e000c700 ||SDSDQXP-008G-J35 || SanDisk Extreme Pro
 +
|-
 +
| SanDisk Card 3|| 1b534d303030303010f0c957f500fc00 || SDSQUNC-032G || SanDisk Exterme
 +
|-
 +
| SanDisk Card 4|| 1b534d30303030301098a3573c00fb00 || SDSDQXP-032G-G46A || SanDisk Ultra
 +
|-
 +
| Samsung Card 1|| 03534453503332478038280c40010500 || MB-MG32EA/FFP || Samsung Pro
 +
|-
 +
| Samsung Card 2|| 035344534c33324780aa9c34fa010600 || MB-MG32DA/FFP || Samsung Pro+
 +
|}
  
 
== Verify SDR-104 Support ==
 
== Verify SDR-104 Support ==
  
The patches above enable SDR-104 for the SDHI0 slot of the Lager/r8a7790 board.
+
The patches above enable SDR-104 for
 +
* SDHI0 slot of the Lager/r8a7790 board
 +
* SDHI0 and 3 slots of the Salvator-X/r8a7795 board
  
 
After inserting a card which supports SDR-104, for example one of the cards listed above, it should be possible to verify
 
After inserting a card which supports SDR-104, for example one of the cards listed above, it should be possible to verify
Line 45: Line 64:
 
</pre>
 
</pre>
  
=== Indicative Speed ===
 
  
Sandisk Card 1:
+
= Indicative Speed =
 +
 
 +
Tests run using the following "basic test procedure" unless noted otherwise:
 +
* Kernel source: git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/sdr104-v7
 +
* Cards inserted into SDHI0 slot
 +
* SDR50 was tested by removing sd-sdr104 property from sdhi0 DT node
 +
* High Speed was tested by removing sd-uhs-sdr104 and sd-uhs-sdr50 properties from sdhi0 DT node.
 +
* Tests run using dd to transfer 512Mb as per the following example:
 +
 
 
<pre>
 
<pre>
# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
+
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
536870912 bytes (537 MB) copied, 11.901 s, 45.1 MB/s
+
536870912 bytes (537 MB) copied, 24.6166 s, 21.8 MB/s
 
</pre>
 
</pre>
  
Sandisk Card 2:
+
== r8a7790/Lager ==
<pre>
+
 
# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
+
{| class="wikitable"
536870912 bytes (537 MB) copied, 11.1349 s, 48.2 MB/s
+
|-
</pre>
+
! !! High Speed !! SDR50 !! SDR104
 +
|-
 +
| Sandisk Card 1 || 21.3 || 32.8 || 44.1
 +
|-
 +
| Sandisk Card 2 || 21.8 || 34.3 || 48.3
 +
|-
 +
| Samsung Card 1 || 18.0 || 27.6 || 35.5
 +
|-
 +
| Samsung Card 2 || 18.0 || 27.6 || 35.6
 +
|}
 +
 
 +
== r8a7791/Koelsch ==
  
Samsung Card 1:
+
{| class="wikitable"
<pre>
+
|-
# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
+
! !! High Speed !! SDR50 !! SDR104
536870912 bytes (537 MB) copied, 14.697 s, 36.5 MB/s
+
|-
</pre>
+
| Sandisk Card 1 || 21.2 || 35.8 || 40.7
 +
|-
 +
| Sandisk Card 2 || 21.7 || 31.3 || 44.1
 +
|-
 +
| Samsung Card 1 || 18.0 || 25.9 || 33.4
 +
|-
 +
| Samsung Card 2 || 18.0 || 25.9 || 33.4
 +
|}
  
Samsung Card 2:
+
== r8a7794/Alt ==
<pre>
 
# 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
 
</pre>
 
  
== Control ==
+
{| class="wikitable"
 +
|-
 +
! !! High Speed !! SDR50 !! SDR104
 +
|-
 +
| Sandisk Card 1 || 21.1 || 25.8 || 40.5
 +
|-
 +
| Sandisk Card 2 || 21.7 || 31.3 || 43.8
 +
|-
 +
| Samsung Card 1 || 18.0 || 25.7 || 33.2
 +
|-
 +
| Samsung Card 2 || 18.0 || 25.7 || 33.3
 +
|}
  
The above run without the SDR-104 patches applied.
+
== r8a7795/Salvator-X ==
  
Here the test has been run using a kernel compiled using the base of the topic branch described above.
+
Tests were run both with and without DMA enabled.
The head commit is d11882edea06 ("Merge tag 'renesas-next-20160427v2-v4.6-rc1' into HEAD").
+
This is because without DMA transfer speeds are quite low,
 +
however, DMA support for R-Car Gen-3 SDHI is not present in mainline.
  
In this test SDR50 is enabled but SDR104 is not.
+
The "without DMA" tests were run as per the "basic test procedure" described earlier.
  
<pre>
+
The "with DMA" tests were run with the following modification to that procedure:
$ dmesg | grep SDR
+
* git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/sdr104-v7+sdhi-dma-v3
mmc1: new ultra high speed SDR50 SDHC card at address 0001
 
</pre>
 
  
<pre>
+
The topic/sdr104-v7+sdhi-dma-v3 is a merge of the topic/sdr104-v7 branch with [[Tests:r-car-gen3-sdhi-dma|prototype R-Car Gen-3 SDHI DMA support|]] (rebased).
# 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)
 
  
</pre>
+
{| class="wikitable"
 +
|-
 +
! !! ! colspan=3 | without DMA !! colspan=3 | with DMA
 +
|-
 +
! !! High Speed !! SDR50 !! SDR104 !! High Speed !! SDR50 !! SDR104
 +
|-
 +
| Sandisk Card 1 || 4.0 || 5.3 || 6.0 || 11.4 || 21.5 || 36.7
 +
|-
 +
| Sandisk Card 2 || 4.0 || 5.3 || 6.0 || 11.6 || 22.5 || 42.1
 +
|-
 +
| Samsung Card 1 || 4.0 || 5.3 || 6.0 || 10.6 || 19.4 || 31.4
 +
|-
 +
| Samsung Card 2 || 4.0 || 5.3 || 6.0 || 10.6 || 19.4 || 31.1
 +
|}
  
=== Indicative Speed ===
+
== r8a7796/Salvator-X ==
  
Sandisk Card 1:
+
Tests were run both with and without DMA enabled.
<pre>
+
The motivation for this and branches used are described in the tests for the r8a7795/Salvator-X.
# 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
 
</pre>
 
  
Sandisk Card 2:
+
The for all tests both with and without DMA enabled the following test procedure was used:
 +
* SanDisk Card 3 was used in SDHI0 and SanDisk Card 4 was used in SDHI1.
 +
* Tests run using dd to transfer 512Mb as per the following example.
 +
  The transfer speed was then calculated as 512*1024*1024/1000000/real e.g. 512Mb*1024*1024/1000000/71.25s = 7.5Mb/s.
 
<pre>
 
<pre>
# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
+
# time dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512
SanDisk Card 2: 536870912 bytes (537 MB) copied, 15.6158 s, 34.4 MB/s
+
512+0 records in
 +
512+0 records out
 +
real    1m 11.25s
 +
user    0m 0.01s
 +
sys    1m 10.14s
 
</pre>
 
</pre>
  
Samsung Card 1:
+
The motivation for the above modifications were to the test procedure was the environment available for testing.
<pre>
+
A comparison of the results of trasnfer speed methodology was made on the r8a7790/Lager board where
# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
+
results between the method in the "basic test procedure" and the one described immediately above appeared to
Samsung Card 1: 536870912 bytes (537 MB) copied, 20.7866 s, 25.8 MB/s
+
give results that only differed by a small value that appeared to be noise in the results.
</pre>
 
  
Samsung Card 2:
+
{| class="wikitable"
<pre>
+
|-
# dd bs=1M count=512 iflag=direct if=/dev/mmcblk1 of=/dev/null
+
! !! ! colspan=3 | without DMA !! colspan=3 | with DMA
Samsung Card 2: 536870912 bytes (537 MB) copied, 19.3648 s, 27.7 MB/s
+
|-
</pre>
+
! !! High Speed !! SDR50 !! SDR104 !! High Speed !! SDR50 !! SDR104
 +
|-
 +
| SanDisk Card 3 || 7.5 || 9.6 || 11.2 || 22.1 || 39.9 || 55.7
 +
|-
 +
| SanDisk Card 4 || 7.5 || 9.6 || 11.4 || 22.3 || 41.6 || 70.8
 +
|}

Latest revision as of 02:38, 4 August 2017

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-v7

It is critical that MMC_SDHI is enabled for this testing.

Hardware Environment

Board/Socs

  • Lager/r8a7790 (Gen 2 R-Car H2 SoC)
  • Koelsch/r8a7791 (Gen 2 R-Car M2-W SoC)
  • Alt/r8a7794 (Gen 2 R-Car E2 SoC)
  • Salvator-X/r8a7795 (Gen 3 R-Car H3 SoC)
  • Salvator-X/r8a7796 (Gen 3 R-Car M3-W SoC)

Cards

CID Product Code Description
SanDisk Card 1 035054534c36344730da9456d000fa00 SDSQUNC-064G-GN6MA SanDisk Ultra
SanDisk Card 2 035344535530384780401eb2e000c700 SDSDQXP-008G-J35 SanDisk Extreme Pro
SanDisk Card 3 1b534d303030303010f0c957f500fc00 SDSQUNC-032G SanDisk Exterme
SanDisk Card 4 1b534d30303030301098a3573c00fb00 SDSDQXP-032G-G46A SanDisk Ultra
Samsung Card 1 03534453503332478038280c40010500 MB-MG32EA/FFP Samsung Pro
Samsung Card 2 035344534c33324780aa9c34fa010600 MB-MG32DA/FFP Samsung Pro+

Verify SDR-104 Support

The patches above enable SDR-104 for

  • SDHI0 slot of the Lager/r8a7790 board
  • SDHI0 and 3 slots of the Salvator-X/r8a7795 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

Tests run using the following "basic test procedure" unless noted otherwise:

  • Kernel source: git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/sdr104-v7
  • Cards inserted into SDHI0 slot
  • SDR50 was tested by removing sd-sdr104 property from sdhi0 DT node
  • High Speed was tested by removing sd-uhs-sdr104 and sd-uhs-sdr50 properties from sdhi0 DT node.
  • Tests run using dd to transfer 512Mb as per the following example:
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
536870912 bytes (537 MB) copied, 24.6166 s, 21.8 MB/s

r8a7790/Lager

High Speed SDR50 SDR104
Sandisk Card 1 21.3 32.8 44.1
Sandisk Card 2 21.8 34.3 48.3
Samsung Card 1 18.0 27.6 35.5
Samsung Card 2 18.0 27.6 35.6

r8a7791/Koelsch

High Speed SDR50 SDR104
Sandisk Card 1 21.2 35.8 40.7
Sandisk Card 2 21.7 31.3 44.1
Samsung Card 1 18.0 25.9 33.4
Samsung Card 2 18.0 25.9 33.4

r8a7794/Alt

High Speed SDR50 SDR104
Sandisk Card 1 21.1 25.8 40.5
Sandisk Card 2 21.7 31.3 43.8
Samsung Card 1 18.0 25.7 33.2
Samsung Card 2 18.0 25.7 33.3

r8a7795/Salvator-X

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 "without DMA" tests were run as per the "basic test procedure" described earlier.

The "with DMA" tests were run with the following modification to that procedure:

The topic/sdr104-v7+sdhi-dma-v3 is a merge of the topic/sdr104-v7 branch with prototype R-Car Gen-3 SDHI DMA support| (rebased).

without DMA with DMA
High Speed SDR50 SDR104 High Speed SDR50 SDR104
Sandisk Card 1 4.0 5.3 6.0 11.4 21.5 36.7
Sandisk Card 2 4.0 5.3 6.0 11.6 22.5 42.1
Samsung Card 1 4.0 5.3 6.0 10.6 19.4 31.4
Samsung Card 2 4.0 5.3 6.0 10.6 19.4 31.1

r8a7796/Salvator-X

Tests were run both with and without DMA enabled. The motivation for this and branches used are described in the tests for the r8a7795/Salvator-X.

The for all tests both with and without DMA enabled the following test procedure was used:

  • SanDisk Card 3 was used in SDHI0 and SanDisk Card 4 was used in SDHI1.
  • Tests run using dd to transfer 512Mb as per the following example.
 The transfer speed was then calculated as 512*1024*1024/1000000/real e.g. 512Mb*1024*1024/1000000/71.25s = 7.5Mb/s.
# time dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512
512+0 records in
512+0 records out
real    1m 11.25s
user    0m 0.01s
sys     1m 10.14s

The motivation for the above modifications were to the test procedure was the environment available for testing. A comparison of the results of trasnfer speed methodology was made on the r8a7790/Lager board where results between the method in the "basic test procedure" and the one described immediately above appeared to give results that only differed by a small value that appeared to be noise in the results.

without DMA with DMA
High Speed SDR50 SDR104 High Speed SDR50 SDR104
SanDisk Card 3 7.5 9.6 11.2 22.1 39.9 55.7
SanDisk Card 4 7.5 9.6 11.4 22.3 41.6 70.8