I want to add a image sensor device with a mipi interface similar to the Sabre SD board's ov5640_mipi. However our hardware the main clock (CCM_CLKO1) that runs the image sensor on the CSI0_MCLK rather than the GPIO_0 pin. I lifted most of the code in the devicetree in imx6qdl-sabre.dtsi where the ov5640_mipi device is defined. In the iomuxc section of the Sabre device tree enables the GPIO_0 pin using MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0.
On our design, I am doing something very similar except that since our pin that supplies the main clock (CCM_CLKO1) to our image sensor is on the CSI0_MCLK pin I set the following line in iomuxc section of our devicetree: MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1 0x130b0. As for the driver definition in the device tree, the only difference between the Sabre SD code (below) and mine is the name of the driver, ov5640_mipi.
Thus far I have not seen a clock on the CSI0_MCLK pin.
Any suggestions?
ov5640_mipi: ov5640_mipi@3c { /* i2c2 driver */ | |||||
compatible = "ovti,ov5640_mipi"; | |||||
reg = <0x3c>; | |||||
clocks = <&clks 201>; | |||||
clock-names = "csi_mclk"; | |||||
DOVDD-supply = <&vgen4_reg>; /* 1.8v */ | |||||
AVDD-supply = <&vgen3_reg>; /* 2.8v, rev C board is VGEN3 | |||||
rev B board is VGEN5 */ | |||||
DVDD-supply = <&vgen2_reg>; /* 1.5v*/ | |||||
pwn-gpios = <&gpio1 19 1>; /* active low: SD1_CLK */ | |||||
rst-gpios = <&gpio1 20 0>; /* active high: SD1_DAT2 */ | |||||
csi_id = <1>; | |||||
mclk = <24000000>; | |||||
mclk_source = <0>; | |||||
}; |
Yes, Thank you.
Apparently I set everything up correctly. I didn't see a clock on CSI0_MCLK pin until I loaded the driver. It's my image sensor driver that starts the MCLK and runs it thereafter.
Hi Jeff,
I'm having trouble getting a clock out of MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1. Could you share the code in your driver that turned on the MCLK? I just want to see if there is anything special that needs to be done. FYI, the thread that contains my issue is https://community.nxp.com/thread/474438 .
Thank you,
Greg
Hi Jeff,
Just to double check, did you solve the problem?
Best Regards,
Alejandro