Tests:SDHI-HS400

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


 * 1) dmesg | grep mmc

Check transfer speed

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

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

[   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
 * 1) dmesg | grep mmc

1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 13.2866 s, 80.8 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=1024 iflag=direct

BSP v3.5.9, HS400 Enabled
When enabled in DTS HS400 also works.

[   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 ...
 * 1) dmesg | grep mmc

2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 15.7728 s, 136 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=2048 iflag=direct

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.

[   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 ...
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 11.5207 s, 46.6 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

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.

[   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 ...
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 11.5851 s, 46.3 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

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.

[   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 ...
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 10.1324 s, 53.0 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

M3-W ES1.0: BSP v3.5.9, HS400 Disabled
When HS400 is disabled HS200 works as expected.

[   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
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 10.2417 s, 52.4 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

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.

[   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 ...
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 15.2627 s, 35.2 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

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.

[   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 ... 512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 13.5268 s, 39.7 MB/s
 * 1) dmesg | grep mmc
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

H3 ES2.0: BSP v3.5.9
HS400 is enabled for the H3 ES2.0 / Salvator-XS in the BSP and works, as expected. [   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 ...                                                       2048+0 records out 2147483648 bytes (2.1 GB) copied, 9.09945 s, 236 MB/s
 * 1) dmesg | grep mmc
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=2048 iflag=direct                 2048+0 records in

H3 ES2.0: BSP v3.5.9
Upstream baseline, 345fad481b8 topic/sdhi-hs400.base, works as expected - HS200 is supported. [   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 ...                                                            2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 14.1931 s, 151 MB/s
 * 1) dmesg | grep mmc
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=2048 iflag=direct

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.

[   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 ...
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 10.1128 s, 53.1 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct

H3 ES2.0: Upstream HS400 Patchset
Upstream with HS400 patchset (353260c39b23 topic/hs400-v3) initialises the eMMC as HS400. There is a perfomance degredation over the HS200 baseline result presented above. That may be due to noise in the results.

[   2.497784] renesas_sdhi_internal_dmac ee140000.sd: mmc0 base at 0xee140000 max clock rate 200 MHz [   2.611256] mmc0: new HS400 MMC card at address 0001 [   2.612486] mmcblk0: mmc0:0001 BGSD3R 29.1 GiB [   2.612927] mmcblk0boot0: mmc0:0001 BGSD3R partition 1 16.0 MiB [   2.613359] mmcblk0boot1: mmc0:0001 BGSD3R partition 2 16.0 MiB [   2.613685] mmcblk0rpmb: mmc0:0001 BGSD3R partition 3 4.00 MiB, chardev (243:0) [   3.053845] renesas_sdhi_internal_dmac ee100000.sd: mmc1 base at 0xee100000 max clock rate 200 MHz ...
 * 1) dmesg | grep mmc

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 12.6029 s, 42.6 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=512 iflag=direct