imx7 Sim Card Clock Speed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx7 Sim Card Clock Speed

1,869件の閲覧回数
eoin_oconnell
Contributor I

I would like to know how to change the clock speed that the imx7 sim card interface generates. Currently the default clock rate is 4MHz.

 

I see 2 possible places where I can change that, in the device tree sim1 node or in the sim driver imx_sim.c

 

I have tried changing this value in the imx_sim.c file in the kernel 

#define FCLK_FREQ (4000000)

 

I also tried changing this in the device tree

&sim1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sim1>;
clocks = <&clks IMX7D_SIM1_ROOT_CLK>;
assigned-clock-rates = <240000000>; // this
pinctrl-assert-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
port = <1>;
sven_high_active;
status = "okay";
};

 

Nothing seems to have worked so far, I would like the clock rate to be 3.84MHz, any tips?

 

I would also like to change the baud rate to the max supported by my sim card.

 

It seems I cannot put in fast uart clock rate, I know the command how to change the SIM baud rate, but for some reason the unit test mxc_simtest.c does not allow me to set di fi and the baudrate to what I want

ラベル(3)
0 件の賞賛
返信
1 返信

1,694件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

If this is still helpful for you, yes you're correct, you should modify any of the two, you may refer to the following part of the code on how it is calculated the prescaller

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mxc/sim/imx_sim.c?h=lf-5.10.y#n885

CLK_PRESCALER = (SIMn_CLK_ROOT + FCLK_FREQ - 1)/FCLK_FREQ

Best regards,
Aldo.

0 件の賞賛
返信