Hi,
I am using IMX6DL and linux kernel 4.1.15 , uboot 2015.04.
I understand that imx6 support eMMC 4.x with HS200 and default speed of mmc is 52Mhz.
I have 2 questions :
- How can I know that eMMC is working with SDR or DDR?
- How can we change speed of mmc for eMMC? which speeds will it support?
Can we set clock of mmc < 26Mhz ? I want to reduce it for EMC product testing.
In Uboot, I tried to change speed to difference value as below :
drivers/mmc/mmc.c
.........
mmc-> tran_speed = 2000000 ;
but after boot, I alway got 52Mhz from command :
cat /sys/kernel/debug/mmc3/clock
52000000
Thanks & Best Regards,
Dong
Hi,
did anybody got this working, I'm doing something similar already tried editing .dtsi adding:
clock-frequency = <20000000>;
max-frequency = <20000000>;
also editing fsl_esdhc.c on the line
cfg->cfg.f_max = MIN(gd->arch.sdhc_clk, 20000000);
also drivers/mmc/core/mmc.c
// if (mmc_card_highspeed(card) && (max_dtr > 52000000))
if (mmc_card_highspeed(card) && (max_dtr > 20000000))
// max_dtr = 52000000;
max_dtr = 20000000;
but still get the 50Mhz....
Hi Dong
one can look at kernel mmc:
http://comments.gmane.org/gmane.linux.kernel.mmc/16311
in uboot one can try fsl_esdhc.c, fsl_esdhc_initialize() change cfg->cfg.f_max = min(cfg->sdhc_clk, (u32)52000000);
http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/drivers/mmc/fsl_esdhc.c?h=imx_v2016.03_...
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
Thanks so much for your reply.
I don't know why I still got 52Mhz after change like your suggestion to many difference values < 52000000 in uboot : min(cfg->sdhc_clk, (u32)52000000);
Don't have any changing after change that code.
Below is image that I captured clock from OSC when I run test eMMC, It alway is 49.x Mhz.
Best regards,
Dong
Hi everybody,
Do you have any suggestion for me in this case?
I am looking forward you respond!
Thanks & Best Regards,
Dong
Hi Dong
had you changed 52000000 to some other value ?
Best regards
igor
Hi igor,
Yes, I already changed with many other value ( < 52000000).
Some value I tried to change like : 26000000, 40000000, 46000000,....But nothing change, I still got same clock at above picture , about 49.6Mhz when measuring by OSC or by command like below :
cat /sys/kernel/debug/mmc3/clock
52000000
Best Regards,
Dong