Hi,
We are using Sandisk eMMC device version 5.1
We are developing application for switching different bus modes and bus width supported by the device.
- SDR bus mode with 1-bit, 4-bit and 8-bit bus width.
- DDR bus mode with 4-bit and 8-bit bus width.
- HS200 bus mode with 4-bit and 8-bit bus width.
- HS400 bus mode with 8-bit bus width.
For the same, Embedded Multi-Media Card Electrical Standard v5.1(JDEC) document is used for our reference.
Procedure followed to do the same is as below,
1. After booting the device, we are reading ext_csd[185] register. Value is 0x02. This indicates device operates in HS200 mode.
Example:
root@root# mmc extcsd read /dev/mmcblk1 | grep HS_TIMING
** High-speed interface timing [HS_TIMING: 0x02]**
2. Next I am writing below values to ext_csd[183] to select bus width
* 0x01 for 1-bit bus width
* 0x02 for 4-bit bus width
* 0x03 for 8-bit bus width
3. Next I am writing 0x01 value to ext_csd[185] to select SDR bus mode.
Example:
**root@root# mmc bus_mode_selection SDR x8 /dev/mmcblk1**
** SDR bus mode with 0x02 bus width is selected**
After completing above steps when I perform read/write operation, I am facing below issue.
mmc1: Tuning timeout, falling back to fixed sampling clock
usdhci-iw 43c00000.sd_host_controller: __mmc_blk_ioctl_cmd: data error -84
ioctl SEND_EXT_CSD: Invalid or incomplete multibyte or wide character
Could not read EXT_CSD from /dev/mmcblk1
I want to select Bus modes and validate read/write operation with supported bus width individually. How can I implement this?
Could you please provide your valuable input for the same.