I am working on developing a driver for the SONY IMX586 sensor (4-lane DPHY). The driver is based on the IMX185 and is being developed using the manual “Sensor Software Driver Programming.” I am using the DSBOARD-ORNXS carrier board with Jetson Orin 8GB.
Since the IMX586 supports a maximum resolution of 8000x6000, I prefer not to use the ISP (due to the limitation of maximum resolution). Currently, I am testing with a 4000x3000 mode.
However, I am unable to capture data. The dmesg
log shows “request timed out after 2500 ms” and “NULL VI channel received” errors, and the system occasionally crashes. Running v4l2
with --verbose
parameter results the “(error, ts-monotonic, ts-src-eof).”
Correct: I have tested both CAM0 and CAM1 interfaces. I suppose that setting tegra_sinterface was set correctly (serial_a for CAM0 and serial_c for CAM1) and also adjusted the lane_polarity (CAM0 “6” and CAM1 “0”). The camera is responding correctly to I2C communication, and the registers are being set properly. For my carrier board the CAM0 is CSI0/1 and CAM1 is CSI1/2.
How should the port binding look when bypassing ISP processing? Currently me binding is like in the IMX185 example.
Has anyone experienced similar issues or know how to resolve this?
root@nvidia:/home/nvidia# v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
Size: Discrete 4000x3000
Interval: Discrete 0.042s (24.000 fps)
root@nvidia:/home/nvidia# sudo media-ctl -p -d /dev/media0
Media controller API version 5.10.192
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.10.192
Device topology
- entity 1: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "imx586 9-001a":0 [ENABLED]
pad1: Source
-> "vi-output, imx586 9-001a":0 [ENABLED]
- entity 4: 13e40000.host1x:nvcsi@15a00000- (2 pads, 0 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
pad1: Source
- entity 7: imx586 9-001a (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:SRGGB10_1X10/4000x3000 field:none colorspace:srgb]
-> "13e40000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 9: vi-output, imx586 9-001a (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e40000.host1x:nvcsi@15a00000-":1 [ENABLED]
root@nvidia:/home/nvidia# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 23/23 #P:6
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
cat-4202 [000] .... 3632.782467: tegra_channel_open: vi-output, imx586 9-001a
cat-4202 [000] .... 3632.786743: tegra_channel_set_power: imx586 9-001a : 0x1
cat-4202 [000] .... 3632.786755: camera_common_s_power: status : 0x1
cat-4202 [000] .... 3632.787086: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
cat-4202 [000] .... 3632.787088: csi_s_power: enable : 0x1
cat-4202 [000] .... 3632.787632: tegra_channel_capture_setup: vnc_id 0 W 4000 H 3000 fmt c4
cat-4202 [001] .... 3632.793712: tegra_channel_set_stream: enable : 0x1
kworker/5:3-106 [005] .... 3632.793919: rtcpu_string: tstamp:114177518443 id:0x04010000 str:"VM0 activating."
cat-4202 [001] .... 3632.794948: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
cat-4202 [001] .... 3632.794950: csi_s_stream: enable : 0x1
cat-4202 [001] .... 3632.795261: tegra_channel_set_stream: imx586 9-001a : 0x1
kworker/5:3-106 [005] .... 3632.850080: rtcpu_vinotify_event: tstamp:114177970995 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3653684569888 data:0x759d580010000000
kworker/5:3-106 [005] .... 3632.850081: rtcpu_vinotify_event: tstamp:114177971131 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3653684576320 data:0x0000000031000001
vi-output, imx5-4204 [003] .... 3635.413885: tegra_channel_capture_setup: vnc_id 0 W 4000 H 3000 fmt c4
cat-4202 [005] .... 3638.401768: tegra_channel_close: vi-output, imx586 9-001a
cat-4202 [005] .... 3638.402169: tegra_channel_set_stream: enable : 0x0
cat-4202 [005] .... 3638.402172: tegra_channel_set_stream: imx586 9-001a : 0x0
cat-4202 [005] .... 3639.715599: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
cat-4202 [005] .... 3639.715604: csi_s_stream: enable : 0x0
cat-4202 [005] .... 3639.717119: tegra_channel_set_power: imx586 9-001a : 0x0
cat-4202 [005] .... 3639.717130: camera_common_s_power: status : 0x0
cat-4202 [005] .... 3639.720824: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
cat-4202 [005] .... 3639.720826: csi_s_power: enable : 0x0
root@nvidia:/home/nvidia# v4l2-ctl --set-fmt-video=width=4000,height=3000,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=imx586.raw --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 4000/3000
Pixel Format : 'RG10' (10-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 8000
Size Image : 24000000
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 24000000 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
[ 3635.357913] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3635.367056] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3635.377140] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 3635.384880] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 3635.395551] (NULL device *): vi_capture_control_message: NULL VI channel receiveda
[ 3635.403261] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 3635.413967] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel