This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi team,
The customer are using the am6234 custom board, debugging the CSI imx219 camera with SDK 8.6 and using the imx219 driver that comes with the SDK kernel.
The /dev/video* device node already appears after the drive is loaded, but data cannot be collected. The program gets stuck at wait_event_interruptible of the __vb2_wait_for_done_vb function in drivers/media/common/videobuf2/videobuf2-core.c file.
The debug information is printed as shown in the following figure:
It is found through printing that the DMA callback function ti_csi2rx_DMA_callback in the drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c driver has never been called, resulting in the stuck when acquiring data.
It was also found that DMA initialization in the drivers/media/platform/ti/j721e-csi2Rx/j721e-csi2Rx.c driver only sets the width of DMA and does not set the source address of DMA:
The device tree is configured as follows:
&main_i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
imx219_0: imx219_0@10 {
compatible = "sony,imx219";
reg = <0x10>;
clocks = <&clk_mipi_csi_fixed>;
clock-names = "xclk";
pinctrl-names = "default";
pinctrl-0 = <&imx219_reset_gpio>;
reset-gpios = <&mcu_gpio0 11 GPIO_ACTIVE_HIGH>;
port {
csi2_cam0: endpoint {
remote-endpoint = <&csi2rx0_in_sensor>;
link-frequencies = /bits/ 64 <456000000>;
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
};
};
&csi0_port0 {
status = "okay";
csi2rx0_in_sensor: endpoint {
remote-endpoint = <&csi2_cam0>;
bus-type = <4>; /* CSI2 DPHY. */
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
Could you help check this case? Thanks.
Best Regards,
Cherry
Hello Cherry,
Can you provide the log of "media-ctl -p" and "v4l2-ctl --list-devices"?
Thanks,
Jianzhong
Hi Jianzhong,
Thank you for the support.
Please see the logs here:
root@am62xx-evm:~# media-ctl -p
Media controller API version 5.10.168
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 5.10.168
Device topology
- entity 1: 30102000.ticsi2rx (5 pads, 5 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
pad2: Source
-> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
pad3: Source
-> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
pad4: Source
-> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
- entity 7: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 0 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "imx219 0-0010":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
pad2: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
pad3: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
pad4: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
- entity 13: imx219 0-0010 (1 pad, 1 link, 0 route)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[stream:0 fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
crop.bounds:(8,8)/3280x2464
crop:(8,8)/3280x2464]
-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
- entity 19: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
- entity 25: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
- entity 31: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
- entity 37: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
root@am62xx-evm:~#
root@am62xx-evm:~# v4l2-ctl --list-devices
j721e-csi2rx (platform:30102000.ticsi2rx):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/media0
root@am62xx-evm:~#
Thanks and regards,
Cherry
Hi Cherry,
Thanks for providing the logs. I noticed that the sensor format and the cnds csi-bridge format are different:
- entity 7: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 0 route) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Sink [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range] <- "imx219 0-0010":0 [ENABLED,IMMUTABLE] pad1: Source [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range] -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE] pad2: Source [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range] pad3: Source [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range] pad4: Source [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range] - entity 13: imx219 0-0010 (1 pad, 1 link, 0 route) type V4L2 subdev subtype Sensor flags 0 device node name /dev/v4l-subdev2 pad0: Source [stream:0 fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range crop.bounds:(8,8)/3280x2464 crop:(8,8)/3280x2464] -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
You'll need to set the format to be the same for the sensor and bridge. The following command should set both sensor format and bridge format:
media-ctl -V '"imx219 0-0010":0 [fmt:SRGGB10_1X10/1920x1080 field:none]'
Regards,
Jianzhong
Hi Jianzhong,
You'll need to set the format to be the same for the sensor and bridge. The following command should set both sensor format and bridge format:
media-ctl -V '"imx219 0-0010":0 [fmt:SRGGB10_1X10/1920x1080 field:none]'
They've tried to execute the command above but the issue persists.
Thanks and regards,
Cherry
Hello Cherry,
I'll be out for a few weeks. My colleague Yogesh will be supporting you from here.
Regards,
Jianzhong
Hello Cherry,
Is it possible to get the differences b'n custom board and TI EVM.
Thanks
Yogesh
Hi Yogesh,
Thank you and yes the customer give some differences:
The self-made board power supply is not the same as the TI EVM board, the CSI0_RXRCALIB pull-down resistor is actually soldered at 1%, not at 0.1%, in the CSI interface section, and the other configurations are the same:
Thanks and regards,
Cherry
Cherry,
Is there any H/w testing done on this to make sure this changes are working.
Yogesh
Hi Yogesh,
This issue is caused by incorrect testing methods and has been resolved, thanks for your help again!
Best Regards,
Cherry