Tests:SDHI-HS400

From eLinux.org
Revision as of 04:14, 14 February 2018 by Horms (talk | contribs) (H3 ES1.0: Upstream HS400 Patchset, HS400 disabled)
Jump to: navigation, search

Kernel Version Configuration

A prototype of HS400 support for the SDHI driver is currently available in a topic branch:

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

The ARM64 renesas_defconfig, included in the topic branch above, was used for testing.

For reference testing was also performed using the v3.5.9 available from:

https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git v4.9/rcar-3.5.9

When testing the BSP the ARM64 defconfig was used.

Hardware Environment

  • Salvator-XS/r8a7795 (Gen 3 R-Car H3 SoC) ES2.0
  • Salvator-X/r8a7795 (Gen 3 R-Car H3 SoC) ES1.0
  • Salvator-X/r8a7796 (Gen 3 R-Car M3-W SoC) ES1.0

Test Description

Examine dmseg for correct initi# dmesg | grep mmcalisation of mmc0

# dmesg | grep mmc

Check transfer speed

dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

Test Results

H3 ES1.0 / Salvator-X

BSP v3.5.9

HS200 is enabled for H3 ES1.0 / Salvator-X in the BSP and works, as expected.

# dmesg | grep mmc
[    2.594980] sh_mobile_sdhi ee140000.sd: mmc0 base at 0xee140000 max
clock rate 200 MHz
[    2.721370] mmc0: new HS200 MMC card at address 0001           
[    2.723478] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    2.723627] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.723757] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.723880] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=1024 iflag=direct
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 13.2866 s, 80.8 MB/s

BSP v3.5.9, HS400 enabled

When enabled in DTS HS400 also works.

# dmesg | grep mmc
[    2.601743] sh_mobile_sdhi ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.721647] mmc0: new HS400 MMC card at address 0001
[    2.726294] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    2.730460] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.734598] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.738731] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB
...
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=2048 iflag=direct
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 15.7728 s, 136 MB/s

H3 ES1.0: Upstream HS400 Patchset, HS400 disabled

Upstream with HS400 patchset (353260c39b23 topic/hs400-v3) without hs400 enabled in DTS initialises the eMMC as HS200, as expected.

# dmesg | grep mmc
[    2.478029] renesas_sdhi_internal_dmac ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.598375] mmc0: new HS200 MMC card at address 0001
[    2.604899] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    2.610025] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.635806] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.636337] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB, chardev (243:0)
[    2.996394] renesas_sdhi_internal_dmac ee100000.sd: mmc1 base at 0xee100000 max clock rate 200 MHz
...
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 11.5207 s, 46.6 MB/s

H3 ES1.0: Upstream HS400 Patchset

Upstream with HS400 patchset (353260c39b23 topic/hs400-v3) initialises the eMMC as HS400, however, there is no perfomance improvement over the HS200 baseline result presented above. This is not expected.

# dmesg | grep mmc
[    2.625273] mmc0: new HS400 MMC card at address 0001
[    2.631714] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    2.636853] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.662598] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.663024] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB, chardev (243:0)
[    3.020891] renesas_sdhi_internal_dmac ee100000.sd: mmc1 base at 0xee100000 max clock rate 200 MHz
...
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 11.5851 s, 46.3 MB/s

M3-W ES1.0 / Salvator-X

M3-W ES1.0: BSP v3.5.9

HS400 is enabled for M3-W ES1.0 / Salvator-X in the BSP and works as expected.

# dmesg | grep mmc
[    2.335990] sh_mobile_sdhi ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.533513] mmc0: new HS400 MMC card at address 0001
[    2.547956] mmcblk0: mmc0:0001 eMMC   28.8 GiB 
[    2.559903] mmcblk0boot0: mmc0:0001 eMMC   partition 1 4.00 MiB
[    2.575909] mmcblk0boot1: mmc0:0001 eMMC   partition 2 4.00 MiB
[    2.599020] mmcblk0rpmb: mmc0:0001 eMMC   partition 3 4.00 MiB
[    2.619400]  mmcblk0: p1
...
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 10.1324 s, 53.0 MB/s

3-W ES1.0: BSP v3.5.9, HS400 Disabled

When HS400 is disabled HS200 works as expected.

# dmesg | grep mmc
[    2.354686] sh_mobile_sdhi ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    3.064544] mmc0: new HS200 MMC card at address 0001
[    3.070070] mmcblk0: mmc0:0001 eMMC   28.8 GiB 
[    3.074814] mmcblk0boot0: mmc0:0001 eMMC   partition 1 4.00 MiB
[    3.100849] mmcblk0boot1: mmc0:0001 eMMC   partition 2 4.00 MiB
[    3.107005] mmcblk0rpmb: mmc0:0001 eMMC   partition 3 4.00 MiB
[    3.122783]  mmcblk0: p1
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 10.2417 s, 52.4 MB/s

M3-W ES1.0: Upstream HS400 Patchset, HS400 disabled

Upstream with HS400 patchset (353260c39b23 topic/hs400-v3) without hs400 enabled in DTS initialises the eMMC as HS200, as expected.

# dmesg | grep mmc
[    1.884006] renesas_sdhi_internal_dmac ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.081013] mmc0: new HS200 MMC card at address 0001
[    2.082362] mmcblk0: mmc0:0001 eMMC   28.8 GiB 
[    2.082813] mmcblk0boot0: mmc0:0001 eMMC   partition 1 4.00 MiB
[    2.083262] mmcblk0boot1: mmc0:0001 eMMC   partition 2 4.00 MiB
[    2.083634] mmcblk0rpmb: mmc0:0001 eMMC   partition 3 4.00 MiB, chardev (243:0)
[    2.086965]  mmcblk0: p1
[    2.417782] renesas_sdhi_internal_dmac ee100000.sd: mmc1 base at 0xee100000 max clock rate 200 MHz
...
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 15.2627 s, 35.2 MB/s

M3-W ES1.0: Upstream HS400 Patchset

Upstream with HS400 patchset (353260c39b23 topic/hs400-v3) initialises the eMMC as HS400. There is a marginal perfomance improvement over the HS200 baseline result presented above, however, this may be due to noise in the results.

# dmesg | grep mmc
[    1.884470] renesas_sdhi_internal_dmac ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.032379] mmc0: new HS400 MMC card at address 0001
[    2.033691] mmcblk0: mmc0:0001 eMMC   28.8 GiB 
[    2.034122] mmcblk0boot0: mmc0:0001 eMMC   partition 1 4.00 MiB
[    2.034558] mmcblk0boot1: mmc0:0001 eMMC   partition 2 4.00 MiB
[    2.034904] mmcblk0rpmb: mmc0:0001 eMMC   partition 3 4.00 MiB, chardev (243:0)
[    2.038117]  mmcblk0: p1
[    2.444671] renesas_sdhi_internal_dmac ee100000.sd: mmc1 base at 0xee100000 max clock rate 200 MHz
[    2.525891] renesas_sdhi_internal_dmac ee160000.sd: mmc2 base at 0xee160000 max clock rate 200 MHz
...
                                             
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 13.5268 s, 39.7 MB/s

H3 ES2.0 / Salvator-XS

H3 ES2.0: BSP v3.5.9

HS400 is enabled for the H3 ES2.0 / Salvator-XS in the BSP and works, as expected.

                                              
# dmesg | grep mmc
[    2.731653] sh_mobile_sdhi ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    3.417988] mmc0: new HS400 MMC card at address 0001
[    3.418291] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    3.418397] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    3.418499] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    3.418595] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB
...                                                        
 
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=2048 iflag=direct                 2048+0 records in    
2048+0 records out                                     
2147483648 bytes (2.1 GB) copied, 9.09945 s, 236 MB/s

H3 ES2.0: BSP v3.5.9

Upstream baseline, 345fad481b8 topic/sdhi-hs400.base, works as expected - HS200 is supported.

                                                               
# dmesg | grep mmc                                     
[    2.744042] sh_mobile_sdhi ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.861917] mmc0: new HS200 MMC card at address 0001
[    2.868087] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB     
[    2.868202] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.872312] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.876423] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB
...                                                             
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=2048 iflag=direct
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 14.1931 s, 151 MB/s

H3 ES2.0: Upstream HS400 Patchset, HS400 disabled

Upstream with HS400 patchset (353260c39b23 topic/hs400-v3) without hs400 enabled in DTS initialises the eMMC as HS200 as expected.

# dmesg | grep mmc
[    2.478650] renesas_sdhi_internal_dmac ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.584499] mmc0: new HS200 MMC card at address 0001
[    2.585281] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    2.585590] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.585904] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.586167] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB, chardev (243:0)
[    3.034229] renesas_sdhi_internal_dmac ee100000.sd: mmc1 base at 0xee100000 max clock rate 200 MHz
...
# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 10.1128 s, 53.1 MB/s

H3 ES2.0: Upstream + HS400 Patchset

Errors when accessing eMMC, this is not the desired result.

root@Debian:~# dmesg | grep mmc
[    2.518244] renesas_sdhi_internal_dmac ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz
[    2.700219] mmc0: new HS400 MMC card at address 0001
[    2.701193] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB 
[    2.701548] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB
[    2.701880] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB
[    2.702274] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB, chardev (243:0)
[    2.726711] mmc0: mmc_select_hs400 failed, error -84
[    2.901629] mmc0: mmc_select_hs400 failed, error -84
[    2.930620] mmc0: mmc_select_hs400 failed, error -84
[    2.937035] mmcblk0: error -84 requesting status
...
[    3.111482] mmc0: tuning execution failed: -5
[    3.116838] mmc0: tried to reset card, got error -5
[    3.122749] mmcblk0: recovery failed!
[    3.127499] print_req_error: I/O error, dev mmcblk0, sector 0
[    3.134288] Buffer I/O error on dev mmcblk0, logical block 0, async page read
[    3.143073]  mmcblk0: unable to read partition table
[    3.178781] renesas_sdhi_internal_dmac ee160000.sd: mmc2 base at 0xee160000 max clock rate 200 MHz
...
root@Debian:~# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=64 iflag=direct
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 1.66178 s, 40.4 MB/s