eMMC not working on iMX6SL based board.

cancel
Showing results for 
Search instead for 
Did you mean: 

eMMC not working on iMX6SL based board.

2,091 Views
namratanalawade
Contributor I

Hello there,

We have custom board based on iMX6SL. We have micron eMMC interfaced over SD2 interface.we are able to get the manufacture ID read correctly in u-boot. but when we boot the kernel we are getting below error -

mmc1: Timeout waiting for hardware interrupt.
mmcblk1: error -110 sending stop command, original cmd response 0x2000900, card status 0x2400900
mmcblk1: error -110 transferring data, sector 0, nr 8, cmd response 0x2000900, card status 0x0
mmcblk1: retrying using single block read
mmc1: Timeout waiting for hardware interrupt.
mmcblk1: error -110 transferring data, sector 0, nr 8, cmd response 0x2000900, card status 0x0
blk_update_request: I/O error, dev mmcblk1, sector 0
mmc1: Timeout waiting for hardware interrupt.
mmcblk1: error -110 transferring data, sector 1, nr 7, cmd response 0x2000900, card status 0x0
blk_update_request: I/O error, dev mmcblk1, sector 1
mmc1: Timeout waiting for hardware interrupt.
mmcblk1: error -110 transferring data, sector 2, nr 6, cmd response 0x2000900, card status 0x0
blk_update_request: I/O error, dev mmcblk1, sector 2

What does this error mean ? I'm missing any configuration for SD2 ?

any help to resolve this issue would be highly appreciated.

Thanks in advance.

Labels (1)
0 Kudos
20 Replies

563 Views
namratanalawade
Contributor I

Thanks you for the reply Igor.

I'm using 4.1.15-1.0.0_ga fsl BSP, and our custom board design is based on imx6sl-evk board.

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

there are two versions 4.1.15-1.0.0_ga  BSP: community and nxp

which one is used, could you provide link.

Best regards
igor

0 Kudos

563 Views
namratanalawade
Contributor I

Below is the link used for setting up the yocto build environment - 

repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1.15-1.0.0_ga

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport
0 Kudos

563 Views
namratanalawade
Contributor I

Hi Igor,

we are using the mono framework. The link that we have shared contains the demo images for X11, wayland and fb framework support.

Also, by using these demo files, eMMC working on custom board would not get verified,as SD interface and the setting would be different in the demo images. 

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

one can try custom dts with rootfs from these Demo Images

Best regards
igor

0 Kudos

562 Views
namratanalawade
Contributor I

Thanks Igor.

Can I get the demo images for mono framework ?  Is that issue related to rootfs changes?

0 Kudos

563 Views
namratanalawade
Contributor I

Any help would really be appreciated !!!

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Mamrata

what bsp used in the case (full name) and what reference design

is based custom board.

~igor

0 Kudos

563 Views
namratanalawade
Contributor I

Hi Igor,

I'm able to get the eMMC recognised in kernel. But i'm getting the read error. I even tried to play with the drive strength and the clock frequency of sd2 pads. My dts file has below settings -

/* SD2 - eMMC */
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
no-1-8-v;
bus-width = <8>;
non-removable;
keep-power-in-suspend;
enable-sdio-wakeup;
status = "okay";

};

pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
MX6SL_PAD_SD2_CMD__SD2_CMD 0x17009
MX6SL_PAD_SD2_CLK__SD2_CLK 0x10009
MX6SL_PAD_SD2_DAT0__SD2_DATA0 0x17009
MX6SL_PAD_SD2_DAT1__SD2_DATA1 0x17009
MX6SL_PAD_SD2_DAT2__SD2_DATA2 0x17009
MX6SL_PAD_SD2_DAT3__SD2_DATA3 0x17009
MX6SL_PAD_SD2_DAT4__SD2_DATA4 0x17009
MX6SL_PAD_SD2_DAT5__SD2_DATA5 0x17009
MX6SL_PAD_SD2_DAT6__SD2_DATA6 0x17009
MX6SL_PAD_SD2_DAT7__SD2_DATA7 0x17009
>;
};

below is the log of the same - 

mmc1: switch to bus width 1 failed
mmc1: new high speed MMC card at address 0001
mmcblk1: mmc1:0001 MMC08G 7.25 GiB
mmcblk1boot0: mmc1:0001 MMC08G partition 1 8.00 MiB
mmcblk1boot1: mmc1:0001 MMC08G partition 2 8.00 MiB
mmcblk1rpmb: mmc1:0001 MMC08G partition 3 128 KiB
###### mmc0 : desired SD clock: 50000000, actual: 49500000
esdhc_set_uhs_signaling :: 7
###### mmc0 : desired SD clock: 50000000, actual: 49500000
mmc1: Timeout waiting for hardware interrupt.
sdhci: =========== REGISTER DUMP (mmc1)===========
sdhci: Sys addr: 0xa8ba0000 | Version: 0x00000002
sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000008
sdhci: Argument: 0x00000000 | Trn mode: 0x00000033
sdhci: Present: 0x01f8820e | Host ctl: 0x00000023
sdhci: Power: 0x00000000 | Blk gap: 0x00000080
sdhci: Wake-up: 0x00000008 | Clock: 0x0000003f
sdhci: Timeout: 0x0000000f | Int stat: 0x00000000
sdhci: Int enab: 0x107f100b | Sig enab: 0x107f100b
sdhci: AC12 err: 0x00000000 | Slot int: 0x00000202
sdhci: Caps: 0x07eb0000 | Caps_1: 0x0000b407
sdhci: Cmd: 0x0000123a | Max curr: 0x00ffffff
sdhci: Host ctl2: 0x00000000
sdhci: ===========================================

*** mmc1 got interrupt: 0x00000001
mmcblk1: error -110 sending stop command, original cmd response 0x900, card status 0x400900
mmcblk1: error -110 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
mmcblk1: retrying using single block read
mmc1: Timeout waiting for hardware interrupt.
sdhci: =========== REGISTER DUMP (mmc1)===========
sdhci: Sys addr: 0xa8ba0000 | Version: 0x00000002
sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001
sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
sdhci: Present: 0x01f8820e | Host ctl: 0x00000023
sdhci: Power: 0x00000000 | Blk gap: 0x00000080
sdhci: Wake-up: 0x00000008 | Clock: 0x0000003f
sdhci: Timeout: 0x0000000f | Int stat: 0x00000000
sdhci: Int enab: 0x107f100b | Sig enab: 0x107f100b
sdhci: AC12 err: 0x00000000 | Slot int: 0x00000202
sdhci: Caps: 0x07eb0000 | Caps_1: 0x0000b407
sdhci: Cmd: 0x0000113a | Max curr: 0x00ffffff
sdhci: Host ctl2: 0x00000000
sdhci: ===========================================

*** mmc1 got interrupt: 0x00000001


mmcblk1: error -110 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
blk_update_request: I/O error, dev mmcblk1, sector 0
random: nonblocking pool is initialized
mmc1: Timeout waiting for hardware interrupt.
sdhci: =========== REGISTER DUMP (mmc1)===========
sdhci: Sys addr: 0xa8ba0000 | Version: 0x00000002
sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001
sdhci: Argument: 0x00000001 | Trn mode: 0x00000013
sdhci: Present: 0x01f8820e | Host ctl: 0x00000023
sdhci: Power: 0x00000000 | Blk gap: 0x00000080
sdhci: Wake-up: 0x00000008 | Clock: 0x0000003f
sdhci: Timeout: 0x0000000f | Int stat: 0x00000000
sdhci: Int enab: 0x107f100b | Sig enab: 0x107f100b
sdhci: AC12 err: 0x00000000 | Slot int: 0x00000202
sdhci: Caps: 0x07eb0000 | Caps_1: 0x0000b407
sdhci: Cmd: 0x0000113a | Max curr: 0x00ffffff
sdhci: Host ctl2: 0x00000000
sdhci: ===========================================

*** mmc1 got interrupt: 0x00000001

It shows that, timeout for hardware interrupt. but interrupt of mmc1 occurs immediately after we get the timeout.

Please help to through some highlight on the exact problem that I'm getting. I'm struggling for getting this done for more than 1 week. Any immediate help would be highly appreciated.

Thank you in advance.

0 Kudos

563 Views
yakovshaulov
Contributor II

Hello Namrata and Igor,

We have almost the same problem that you described. The different is that in our case the eMMC isn't recognized by U-Boot.

pastedImage_2.png

Our board is a custom board based IMX6SL with an eMMC of Micron that connected to SD2 port (same as in your board).

Please advice us to solve this issue. 

also, please find attached schematic connectivity between the eMMC and CPU.

Thanks

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

one can check emmc functionality with attached baremetal test from sdk

(for example run it with jtag).

Best regards
igor

0 Kudos

563 Views
yakovshaulov
Contributor II

Hi Igor,

Thanks for the attachment, but I think that some files are missing.

For example SDK.h that included in usdhc_test.c.

Also missing files such as common.mk and targets.mk that appears in Makefile.

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Yakov

please create service request for obtaining full sdk.

Best regards
igor

0 Kudos

563 Views
namratanalawade
Contributor I

Please help on this issue.

0 Kudos

563 Views
namratanalawade
Contributor I

Thanks Igore,

Basically I'm not able to get eMMC recognised in kernel. I am using micron eMMC 8GB and when kernel boots it shows -

mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0 timing 0
mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
####### __mmc_set_clock : max[198000000] min[48339] HZ[20000000]
mmc1: clock 20000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc1: new MMC card at address 0001
mmcblk1: mmc1:0001 16ÿÿÿÿ 1.00 GiB

mmc1: Timeout waiting for hardware interrupt.
mmcblk1: error -110 sending stop command, original cmd response 0x2000900, card status 0x2 400900
mmcblk1: error -110 transferring data, sector 0, nr 8, cmd response 0x2000900, card status 0x0
mmcblk1: retrying using single block read
mmc1: Timeout waiting for hardware interrupt.
mmcblk1: error -110 transferring data, sector 0, nr 8, cmd response 0x2000900, card status 0x0

I not getting what is wrong in my kernel configuration.

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Namrata

is emmc fully working in uboot, performing commands

mmc write, mmc read, mmcinfo. If not one can check signals

with oscilloscope and use attached sdk tests with jtag.

One can obtain full copy of sdk creating service request.

What bsp/uboot used in the case, please try nxp uboot from

uboot-imx.git - Freescale i.MX u-boot Tree 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

563 Views
namratanalawade
Contributor I

Thank you for the reply igor.

Yes, emmc is fully working in uboot. mmc read, mmc write runs without any error.

But, when I try to boot the kernel it shows the I/O error. Below is my dts file configuration 

&usdhc2 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>;
pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
bus-width = <4>;
cd-type = "none" ;
wp-type = "none";
keep-power-in-suspend;
enable-sdio-wakeup;
status = "okay";
};

pinctrl_usdhc2: usdhc2grp {

fsl,pins = <
MX6SL_PAD_SD2_CMD__SD2_CMD 0x17059
MX6SL_PAD_SD2_CLK__SD2_CLK 0x10059
MX6SL_PAD_SD2_DAT0__SD2_DATA0 0x17059
MX6SL_PAD_SD2_DAT1__SD2_DATA1 0x17059
MX6SL_PAD_SD2_DAT2__SD2_DATA2 0x17059
MX6SL_PAD_SD2_DAT3__SD2_DATA3 0x17059
/*MX6SL_PAD_SD2_DAT4__SD2_DATA4 0x17059
MX6SL_PAD_SD2_DAT5__SD2_DATA5 0x17059
MX6SL_PAD_SD2_DAT6__SD2_DATA6 0x17059
MX6SL_PAD_SD2_DAT7__SD2_DATA7 0x17059*/
>;

};

Please let me know if I'm doing something wrong / missing out anything in above config. I'm using kernel version  4.1.15.

0 Kudos

563 Views
fabio_estevam
NXP Employee
NXP Employee

bus-width should be 8 in your dts.

Also:

cd-type = "none" ;
wp-type = "none";

are not correct.

You should add: non-removable; property to indicate that there is no card detect pin.

0 Kudos

563 Views
igorpadykov
NXP TechSupport
NXP TechSupport

as emmc uses partitions which should be programmed before flashing images,

recommended way is to use mfg tools for programming emmc. It can be found on

i.MX 6 Series Software and Development Tool|NXP 

alternatively one can try dd command from Linux host :

echo 0 > /sys/block/mmcblk2boot0/force_ro
dd if=u-boot.imx of=/dev/mmcblk2boot0 bs=512 seek=2 conv=fsync ( flashing u-boot to sector 0 )
echo 1 > /sys/block/mmcblk2boot0/force_ro

echo 0 > /sys/block/mmcblk2boot1/force_ro
dd if=u-boot.imx of=/dev/mmcblk2boot1 bs=512 seek=2 conv=fsync ( flashing u-boot to sector 1 )
echo 1 > /sys/block/mmcblk2boot1/force_ro

mmc bootpart enable 1 0 /dev/mmcblk2boot0     ---> Boot from eMMC – sector 0
mmc bootpart enable 2 0 /dev/mmcblk2boot1     ---> Boot from eMMC – sector 1

Default u-boot start from sector 0.

Best regards
igor

0 Kudos