GC0308摄像头驱动程序使用的是linux v4l2协议,通过i2c信号进行控制。GC0308摄像头。对上电时序要求非常严格,一定要依据datasheet初始化摄像头。
本驱动使用的3.10内核,所以首先要配置dts,在内核启动阶段支持摄像头,结合硬件原理图。首先配置硬件接口属性:
pinctrl_ipu1_4: ipu1grp-4 { /*++++ GC0308 camera */
fsl,pins = <
MX6QDL_PAD_GPIO_3__CCM_CLKO2 0x130b0 /*时钟*/
MX6QDL_PAD_CSI0_DAT10__GPIO5_IO28 0x80000000 <span style="font-family: Arial, Helvetica, sans-serif;">/*CAM_nRST_CSI0_DAT10*/</span>
MX6QDL_PAD_CSI0_DAT11__GPIO5_IO29 0x80000000 /* DAT11 */ <span style="font-family: Arial, Helvetica, sans-serif;">/*CAM_SHDN_CSI0_DAT11*/</span>
MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 0x80000000 /*12-19八条数据线*/
MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 0x80000000
MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 0x80000000
MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 0x80000000
MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 0x80000000
MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 0x80000000
MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 0x80000000
MX6QDL_PAD_CSI0_DAT1