Part Number: AM5728
Hi Experts,
I am using am5728 IDK and Linux rt 4.19.38, I am trying to capture images from the ov7670 camera module, I have successfully added related device driver and device tree. from dmesg I can see that the camera module is being recognized and a new node is added in /dev/video1. bellow is the device tree I am using for this purpose:
ov7670: ov7670@21 {
compatible = "ovti,ov7670";
reg = <0x21>;
clocks = <&src_clk_x1>;
clock-names = "xclk";
powerdown-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>;
port {
ov7670_0: endpoint {
hsync-active = <1>;
vsync-active = <1>;
pclk-sample = <1>;
};
};
};
&ov7670_0 {
remote-endpoint = <&vin4b_ep>;
};
&vin4b {
vin4b_ep: endpoint@3 {
slave-mode;
remote-endpoint = <&ov7670_0>;
};
};
&vip2 {
status = "okay";
};
this is the dmesg:
root@am57xx-evm:~# dmesg | grep ov7 [ 11.636659] ov7670 0-0021: GPIO lookup for consumer powerdown [ 11.636671] ov7670 0-0021: using device tree for GPIO lookup [ 11.636710] of_get_named_gpiod_flags: parsed 'powerdown-gpios' property of node '/ocp/i2c@48070000/ov7670@21[0]' - status (0) [ 11.636749] ov7670 0-0021: GPIO lookup for consumer reset [ 11.636758] ov7670 0-0021: using device tree for GPIO lookup [ 11.636780] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@48070000/ov7670@21[0]' [ 11.636798] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@48070000/ov7670@21[0]' [ 11.636808] ov7670 0-0021: using lookup tables for GPIO lookup [ 11.636817] ov7670 0-0021: No GPIO consumer reset found [ 11.685916] ov7670 0-0021: chip found @ 0x42 (OMAP I2C adapter) [ 14.272079] vin4b: Port B: Using subdev ov7670 0-0021 for capture root@am57xx-evm:~#
I also double-checked the driver code to make sure registers are written correctly. it seems like the camera is configured correctly and it is sending data, bellow is a screenshot I provided using logic analyzer when the IDK starts up:
due to sampling rate limitations, I can not capture and analyze some of the above signals, but it seems like everything is working correctly on the camera side. But on the IDK side, I am not able to capture images, I have tried different solutions including GStreamer and some user-space applications, none of them were successful. when I read parser size register for vin4b, it's 0:
root@am57xx-evm:~# devmem2 0x48995A70 /dev/mem opened. Memory mapped at address 0xb6fd9000. Read at address 0x48995A70 (0xb6fd9a70): 0x00000000 root@am57xx-evm:~# devmem2 0x48995A0C /dev/mem opened. Memory mapped at address 0xb6faf000. Read at address 0x48995A0C (0xb6fafa0c): 0x000000C0 root@am57xx-evm:~#
I know that ov7670 supports raw Bayer 8 bit (SRGGB8_1X8) which is supported in VIP. I also have another camera module (ov2640) and that's not functioning too.
I have been trying to fix this issue for a couple of weeks. I was wondering if someone could propose a solution or a debugging method.
Best Regards,
Alex.


