我使用的是i.MX6 SABRE Lite主板的定制版本,我连接到OV5642。 Driver Probe成功了。它成功地正确读取了芯片ID。
但是当它尝试应用初始寄存器设置时,I2C会因超时错误而失败。如何调试这种情况?
我使用以下驱动程序:
我的设备树设置:
ov564x: ov564x@3c {
compatible = "ovti,ov564x";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_2>;
clocks = <&clks 201>;
clock-names = "csi_mclk";
DOVDD-supply = <&vgen4_reg>;/* 1.8v */
AVDD-supply = <&vgen3_reg>; /* 2.8v, on rev C board is VGEN3,*/
DVDD-supply = <&vgen2_reg>; /* 1.5v*/
pwn-gpios = <&gpio1 19 1>; /* active low: SD1_DAT2 */
rst-gpios = <&gpio1 20 0>; /* active high: SD1_CLK */
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
ipu_id = <0>;
};
MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0 /* ov5642 mclk */
MX6QDL_PAD_SD1_DAT2__GPIO1_IO19 0x80000000 /* ov5642 Power Down */
MX6QDL_PAD_SD1_CLK__GPIO1_IO20 0x80000000 /* ov5642 Reset */
以下是内核日志:
mxc_v4l2_master_attach: ipu0:/csi0 parallel attached ov5642:mxc_v4l2_cap0
ov5642 0-003c: created sysfs entry for reading regs
camera ov5642 is found
ov5642_write_reg:write reg error:reg=3615,val=f0 ret=-110
ov5642_apply_settings, write reg 0x3615 failed
ov5642_write_reg:write reg error:reg=3103,val=93 ret=-5
ov5642_apply_settings, write reg 0x3103 failed