Limit SD clock speed IMX6 - YOCTO - Linux - uboot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Limit SD clock speed IMX6 - YOCTO - Linux - uboot

3,568 次查看
juanalbertogonz
Contributor II

Hi,

 

we have custom board based on the  imx6q-sabre  board, on our tests at high temperature we got the board running, but the libraries for graphic display are not loaded correctly and we can't ssh the board. (the xserver and some other libraries are located on the sd), we want to try limit the speed of the SD card to 25MHz instead the high speed that is auto detected (50Mhz)...   Our BSP is build using yocto

I already tried to edit the  dtsi file editing max-frequency and was not successful:

&usdhc4 {

pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc4>;
bus-width = <8>;
non-removable;
clock-frequency = <25000000>;
max-frequency = <25000000>;
status = "disabled";

};

Editing the /drivers/mmc/fsl_esdhc.c/drivers/mmc/fsl_esdhc.c to force the cfg.f_max to be 25000000. Also no success.

 

The only way I had set the speed to 25Mhz is setting the  clock on linux like this:

 echo 25000000 > /sys/kernel/debug/mmc3/clock

 

but we need to set the max speed before xserver and other libraries are loaded from the sd card.

 

 

How could I ensure to limit the speed of the sd card to test is this is our problem at high temperatures...

 

 

Regards!

 

 

 

0 项奖励
回复
2 回复数

3,559 次查看
igorpadykov
NXP Employee
NXP Employee

Hi juanalbertogonz

 

issue may be related to signal integrity (it may depend on SD clock speed) and one

can try solutions provided on

https://community.nxp.com/t5/i-MX-Processors/eMMC-8GB-to-4GB-crash-on-linux-yocto-boot/m-p/373231

Regarding limit SD clock speed, I am afraid there is no simple way except already mentioned

with " echo 25000000 > /sys/kernel/debug/mmc3/clock", so one will have to modify driver.

For that one can use sect.3.3 MMC/SD/SDIO Host   i.MX Linux Reference Manual​

and AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf

 

Best regards
igor

0 项奖励
回复

3,552 次查看
juanalbertogonz
Contributor II

Hi Igor,

 

will look into the solution from the referenced post, at first sight we have a slightly different definition...  since we don't have PAD_CTL_PKE | PAD_CTL_PUE, following the advice I will build a version changing this:

#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \
PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
PAD_CTL_SRE_FAST | PAD_CTL_HYS)

to this:
#define USDHC_PAD_CTRL (PAD_CTL_PUS_22K_UP | \
PAD_CTL_SPEED_LOW | PAD_CTL_DSE_120ohm | \
PAD_CTL_SRE_FAST | PAD_CTL_HYS)

 

 

will test if it work a regular temperatures and then try to look to high temperatures.

 

Thanks for your answer..

0 项奖励
回复