Skip to contentSkip to conversation

/dev/mmcblk0 (or /dev/mmcblk0p1) does not exist on Freescale iMX6SL board

DISCUSSION Xuebing Wang 2 participants 9 messages Apr 30, 2015 – May 1, 2015 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi linux-mmc community,

I am working on a board which is very similar to Freescale iMX6SL EVK (evaluation board), but /dev/mmcblk0 does not exist for kernel v4.0.1

A bit of background information. I was working on kernel 3.10.17, all eMMC works fine, except that USB Mass Storage performance is low when connecting USB to Windows 7 host. Its peformance is ok when connecting to MacOS or Linux host. linux-usb community suggests me to give a try of the latest kernel.

Here is how I build uImage and device tree blob:
make ARCH=arm imx_v6_v7_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- LOADADDR=0x80008000 uImage -j8 make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- LOADADDR=0x80008000 imx6sl-evk.dtb

My u-boot resides on eMMC, and I am using tftp (to load uImage and dtb) and nfs-rootfs.

---------------------------------

# uname -r
4.0.1
# dmesg | grep mmc
[    1.282872] Driver 'mmcblk' needs updating - please use bus_type methods
[    1.309598] sdhci-esdhc-imx 2190000.usdhc: No vmmc regulator found
[    1.315809] sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
[    1.367511] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[    1.378980] sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
[    1.385191] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[    1.437440] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    1.449272] sdhci-esdhc-imx 2198000.usdhc: No vmmc regulator found
[    1.455479] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[    1.507338] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
$ arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2013.05-24) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
---------------------------------

Any suggestions?

Signature · 1 line
Xuebing
#1 lore raw
Quoted 4 lines · Xuebing Wang

Hi linux-mmc community,

I am working on a board which is very similar to Freescale iMX6SL EVK (evaluation board), but /dev/mmcblk0 does not exist for kernel v4.0.1

On my imx6sl-warp the eMMC is correctly detected when running kernel 4.0.

Does it help if you apply this patch from 4.1-rc1?

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/mmc/host/sdhci.c?id=04e079cf6b24c794bbc52b04b370f84cb728540e

Regards,

Fabio Estevam

#2 lore raw
Quoted 10 lines · Fabio Estevam
Quoted 4 lines · Xuebing Wang

Hi linux-mmc community,

I am working on a board which is very similar to Freescale iMX6SL EVK (evaluation board), but /dev/mmcblk0 does not exist for kernel v4.0.1

On my imx6sl-warp the eMMC is correctly detected when running kernel 4.0.

Does it help if you apply this patch from 4.1-rc1?

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/mmc/host/sdhci.c?id=04e079cf6b24c794bbc52b04b370f84cb728540e

Fabio,

Thanks for your help.

Unfortunately, no, cherry-pick this patch from 4.1-rc1 into v4.0.1 has the same result.
-------------------

[    1.274968] Driver 'mmcblk' needs updating - please use bus_type methods
[    1.301492] sdhci-esdhc-imx 2190000.usdhc: No vmmc regulator found
[    1.307783] sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
[    1.353890] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[    1.365351] sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
[    1.371563] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[    1.423823] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    1.435612] sdhci-esdhc-imx 2198000.usdhc: No vmmc regulator found
[    1.441817] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[    1.493731] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA

-------------------

It is worse if I use v4.1-rc1, it always keeps outputing below: (without stop)
-------------------

[   16.825778] mmc1: error -110 whilst initialising MMC card
[   16.997726] mmc1: MAN_BKOPS_EN bit is not set

-------------------

Quoted 4 lines

Regards,

Fabio Estevam

Signature · 1 line
Xuebing
#3 lore raw
Quoted 2 lines · Xuebing Wang

Unfortunately, no, cherry-pick this patch from 4.1-rc1 into v4.0.1 has the same result.

Do you have access to a mx6sl-evk? This board also can also detect the SD card on both 4.0 and 4.1-rc1?

Regards,

Fabio Estevam

#4 lore raw
Quoted 4 lines · Fabio Estevam
Quoted 2 lines

Unfortunately, no, cherry-pick this patch from 4.1-rc1 into v4.0.1 has the

Quoted 1 line

same result.

Do you have access to a mx6sl-evk? This board also can also detect the SD card on both 4.0 and 4.1-rc1?

Fabio,

Thanks. No, I do not have access to a mx6sl-evk. But I can try to get one.

There is no eMMC (only sd-card) on mx6sl-evk, right?

Signature · 1 line
Xuebing
#5 lore raw
Quoted 5 lines · Xuebing Wang

Fabio,

Thanks. No, I do not have access to a mx6sl-evk. But I can try to get one.

There is no eMMC (only sd-card) on mx6sl-evk, right?

That's correct. If you need eMMC with mx6sl, then you can try imx6sl-warp.

I have tested both boards here recently and mmc operation is working fine.

Regards,

Fabio Estevam

#6 lore raw
Quoted 6 lines · Fabio Estevam
Quoted 3 lines

Thanks. No, I do not have access to a mx6sl-evk. But I can try to get one.

Quoted 2 lines

There is no eMMC (only sd-card) on mx6sl-evk, right?

That's correct. If you need eMMC with mx6sl, then you can try imx6sl-warp.

I have tested both boards here recently and mmc operation is working fine.

Is there an easy way for me to low-down sdhc/eMMC clock (e.g. to modify arch/arm/mach-imx/clk-imx6sl.c)? Just in case this is not hardware related, e.g. impedance matching of emmc-sdio lines.

Signature · 1 line
Xuebing
#7 lore raw
In reply to Fabio Estevam
Quoted 8 lines · Fabio Estevam
Quoted 5 lines

Fabio,

Quoted 4 lines

Thanks. No, I do not have access to a mx6sl-evk. But I can try to get one.

There is no eMMC (only sd-card) on mx6sl-evk, right?

That's correct. If you need eMMC with mx6sl, then you can try imx6sl-warp.

I have tested both boards here recently and mmc operation is working fine.

Fabio, thanks.

I got my eMMC working on kernel v4.0.1 by:
1) In device tree, use 8 data lines (rather than 4 lines for sdhc)
2) Force ext_csd.rev to be 4
-------------------------

drivers/mmc/core/mmc.c +1 -0
index 1d41e85..aa1ca6c 100644
@@ -355,6 +355,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
         * are authorized, see JEDEC JESD84-B50 section B.8.
         */
        card->ext_csd.rev = ext_csd[EXT_CSD_REV];
+       card->ext_csd.rev = 4;
 
        card->ext_csd.raw_sectors[0] = ext_csd[EXT_CSD_SEC_CNT + 0];
        card->ext_csd.raw_sectors[1] = ext_csd[EXT_CSD_SEC_CNT + 1];

-------------------------

eMMC on my board is Micron "MTFC4GLDDQ-4M IT", according to its datasheet, it is "JEDEC/MMC standard version 4.41-compliant (JEDEC Standard No. 84-A441)", and its "Extended CSD revision" (EXT_CSD_REV) = 5

This seems either because kernel does not handle (ext_csd == 5) correctly, or there is an firmware issue in Micron "MTFC4GLDDQ-4M IT" (in terms of JEDEC standard compliance), what do you think?

Signature · 1 line
Xuebing
#8 lore raw
Quoted 2 lines · Xuebing Wang

I got my eMMC working on kernel v4.0.1 by:
1) In device tree, use 8 data lines (rather than 4 lines for sdhc)

Ok, great. This makes sense.

Quoted 17 lines

2) Force ext_csd.rev to be 4
-------------------------

drivers/mmc/core/mmc.c +1 -0
index 1d41e85..aa1ca6c 100644
@@ -355,6 +355,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8
 *ext_csd)
         * are authorized, see JEDEC JESD84-B50 section B.8.
         */
        card->ext_csd.rev = ext_csd[EXT_CSD_REV];
+       card->ext_csd.rev = 4;
 
        card->ext_csd.raw_sectors[0] = ext_csd[EXT_CSD_SEC_CNT + 0];
        card->ext_csd.raw_sectors[1] = ext_csd[EXT_CSD_SEC_CNT + 1];

-------------------------

Quoted 8 lines

eMMC on my board is Micron "MTFC4GLDDQ-4M IT", according to its datasheet, it is "JEDEC/MMC standard version 4.41-compliant
(JEDEC Standard No. 84-A441)", and its "Extended CSD revision" (EXT_CSD_REV) = 5

This seems either because kernel does not handle (ext_csd == 5) correctly, or there is an firmware issue in Micron "MTFC4GLDDQ-4M IT" (in terms of JEDEC standard compliance), what do you think?

I will let the mmc experts comment on this one.

Regards,

Fabio Estevam