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>;
};
};
};
i referred several topics similar but it likes to put GPIO1_IO_15 to generate 24MHz clk output not an input.
Did you ever find a solution to this? I'm looking to use a 24MHz clock source for mipi csi2.