imx6ul CSI can't disable csi_mclk

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

imx6ul CSI can't disable csi_mclk

跳至解决方案
1,791 次查看
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,372 次查看
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,373 次查看
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,372 次查看
tomfang
Contributor III

Hi Tony,

are there some APIs that can set CCM_CGCR3 register?

0 项奖励
回复
1,372 次查看
tony-tony
Contributor III

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

0 项奖励
回复
1,372 次查看
jimmychan
NXP TechSupport
NXP TechSupport

please try this:

clk_disable_unprepare(lm98714_data.sensor_clk);
0 项奖励
回复
1,372 次查看
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 项奖励
回复