imx6ul CSI can't disable csi_mclk

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

imx6ul CSI can't disable csi_mclk

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

lm98714_data.sensor_clk = devm_clk_get(dev, "csi_mclk");

retval = of_property_read_u32(dev->of_node, "mclk",&lm98714_data.mclk);

retval = clk_set_rate(lm98714_data.sensor_clk, lm98714_data.mclk);

clk_prepare_enable(lm98714_data.sensor_clk);

clk_disable(lm98714_data.sensor_clk);

See the code show above, I find that after I disable the csi_mclk clk, the imx6ul port(CSI_MCLK) still create wave, I don't know how to disable this clk.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,306件の閲覧回数
tony-tony
Contributor III

The root cause: imx6ul CSI clk enable/disable reg is CG0 bit of CCM_CCGR3 not CCGR2, the SPEC
has some issue to describe this reg.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,307件の閲覧回数
tony-tony
Contributor III

The root cause: imx6ul CSI clk enable/disable reg is CG0 bit of CCM_CCGR3 not CCGR2, the SPEC
has some issue to describe this reg.

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

Hi Tony,

are there some APIs that can set CCM_CGCR3 register?

0 件の賞賛
返信
1,306件の閲覧回数
tony-tony
Contributor III

You can refer to clk-mx6ul.c file, and use memtool to check reg .

0 件の賞賛
返信
1,306件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

please try this:

clk_disable_unprepare(lm98714_data.sensor_clk);
0 件の賞賛
返信
1,306件の閲覧回数
tony-tony
Contributor III

Hi jimmychan:

 In fact, I have tried to use clk_disable(lm98714_data.sensor_clk); and clk_disable_unprepare(lm98714_data.sensor_clk); and use memtool to check the reg, after call "clk_disable" or "clk_disable_unprepare" ,the CCGR2 "csi_clk_enable" bit will become disable,but the wave still create.

0 件の賞賛
返信