Tests:eMMC-8bit-width

This document describes how to test the on-board eMMC using 8 bit bus width on a R-Car H3 with a Salvator-X board.

Kernel branch
The patches are included in renesas-drivers starting with renesas-drivers-2016-09-20-v4.8-rc7. They landed upstream in v4.9-rc1. The topic branch is at.

Preparations
,,  ,  ,   from busybox are needed for these tests. If the eMMC does not have a partition yet, also  and   are needed. debugfs and ext2 filesystems should be activated in the kernel config.

Check eMMC is detected in the bootlog
You should find messages like this in your bootlog:

mmc0: new high speed MMC card at address 0001 ... mmcblk0: p1

If the last line (with p1) is missing, you need to create the partition first using fdisk:


 * 1) fdisk /dev/mmcblk0

then press "n", "p", "1", "enter", "enter", "w" to create a partition. Finally, to create the filesystem use:


 * 1) mkfs.ext2 /dev/mmcblk0p1

Check MMC settings
Read out the current setting for the eMMC:

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

Check that  is 8 bits and   is 1.8V.

Mount the partition and copy data onto it

 * 1) mount /dev/mmcblk0p1 /mnt
 * 2) cp /bin/busybox /mnt/
 * 3) md5sum /mnt/busybox > /mnt/md5

We store the hashsum of the currently used busybox for later verification.

Remount the partition and verify the copied data
This ensures data was correctly written and can reliably be read again:

/mnt/busybox: OK
 * 1) umount /mnt/
 * 2) mount /dev/mmcblk0p1 /mnt
 * 3) md5sum -c /mnt/md5

You can optionally reboot the machine after the umount command.