change imx6ul mclk rate to 48Mhz

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

change imx6ul mclk rate to 48Mhz

ソリューションへジャンプ
1,346件の閲覧回数
ed_nash
Contributor III

I need to change the CSI mclk output to 48MHz (reference clock required by imager).

I have tried changing the device tree and driver code:

 mclk = <48000000>; mclk_source = <0>; // must be 0 for imx6ul

ret = of_property_read_u32(dev->of_node, "mclk", &xxx_data.mclk);

if (ret) {

   dev_err(dev, "mclk frequency is invalid\n");

   return ret;

}

ret = of_property_read_u32(dev->of_node, "mclk_source", (u32 *) &(xxx_data.mclk_source));

if (ret) {

   dev_err(dev, "mclk_source invalid\n");

   return ret;

}

ret = clk_set_rate(xxx_data.sensor_clk, xxx_data.mclk);

if (ret < 0) {

   dev_err(dev, "set rate failed, rate=%d\n", xxx_data.mclk);

   return ret;

}

dev_info(dev, "mclk: %lu\n", clk_get_rate(xxx.sensor_clk));  <<<<<<< always prints 24000000

I have tried changing this in clk-imx6ul.c

   clk_set_rate(clks[IMX6UL_CLK_CSI], 24000000); to  clk_set_rate(clks[IMX6UL_CLK_CSI], 48000000);

But I still get 24000000.

If I comment out the line above, I get 12000000.

How do I get an output of 48000000 on MX6UL_PAD_CSI_MCLK__CSI_MCLK ?

Thanks in advance.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,028件の閲覧回数
ed_nash
Contributor III

I resolved it by reparenting.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,029件の閲覧回数
ed_nash
Contributor III

I resolved it by reparenting.

0 件の賞賛
返信
1,028件の閲覧回数
tomfang
Contributor III

Hi Ed and Carlos,

I have the same issue, can you tell me what your solution is? i don't understand the "reparenting".

0 件の賞賛
返信
1,028件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Thank you for sharing your solution Ed.

Regards,

Carlos

0 件の賞賛
返信