how to modify the dts or clk code for imx8mq clk 24mhz source

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to modify the dts or clk code for imx8mq clk 24mhz source

1,380 Views
octmejun123
Contributor I

     The OV5640 MINISASTOCSI board  proivded a 24MHz source. 

     i manually replaceed the minisastocsi imx219 sensor with the original ov5640 sensor.( schematic is same). 

    however, after i compiled the dts ,the log shows an error about the imx219 clk frequency rate is not 24MHz. no matter how i changed the clock-parents, the kernel couldn't get the 24MHz for the imx8mqevk board use 25Mhz and 27MHz as the osc source. no value in clk-imx8mq.c could be evenly divided by 24. 

	imx219->xclk_freq = clk_get_rate(imx219->xclk);
	if (imx219->xclk_freq != IMX219_XCLK_FREQ) { //IMX219_XCLK_FREQ is 24MHz.
		dev_err(dev, "xclk frequency not supported: %d Hz\n",
			imx219->xclk_freq);
		return -EINVAL;

my DTS:

imx219_mipi: imx219_mipi@34 {
compatible = "sony,imx219";
reg = <0x34>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1_pwn>;
clocks = <&clk IMX8MQ_CLK_CLKO2>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MQ_CLK_CLKO2>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_200M>;
assigned-clock-rates = <24000000>;
csi_id = <0>;
pwn-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
mclk = <24000000>;
mclk_source = <0>;
port {
imx219_mipi1_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <456000000>;
};
};
};

octmejun123_0-1641887352843.png

octmejun123_1-1641887403049.pngoctmejun123_2-1641887422648.png

 

 

i referred several topics similar but it likes to put GPIO1_IO_15  to generate  24MHz clk output not an input. 

https://community.nxp.com/t5/i-MX-Processors/enable-CLKO2-for-24MHz-output-clock-on-iMX8MN/m-p/12776...

0 Kudos
Reply
4 Replies

1,253 Views
erik-schumacher
Contributor I

Did you ever find a solution to this?  I'm looking to use a 24MHz clock source for mipi csi2.

0 Kudos
Reply

1,364 Views
joanxie
NXP TechSupport
NXP TechSupport

I have already mailed to you, pls refer to that

0 Kudos
Reply

1,251 Views
erik-schumacher
Contributor I

@joanxie could you provide me the information as well?  I'm looking to use 24MHz clock source for mipi csi2.

0 Kudos
Reply

1,243 Views
joanxie
NXP TechSupport
NXP TechSupport
0 Kudos
Reply