FLIR TAU2 integration (video node issue) with jetson xavier NX

Hi Team,

We are integrating one flir tau2 camera with Xavier NX, and our setup is (flir camera<=cmos 14 bit=>lattice crosslink <=mipi csi 2 lane=> xavier nx). lattice crosslink are programmed and we are able to check data on csi lane with help of oscilloscope.
But no video node are creating on xavier nx. only able to see vi subnode.

Logs:
dmesg | grep tegra194-vi
[ 3.023284] tegra194-vi5 15c10000.vi: using default number of vi channels, 36
[ 3.027160] tegra194-vi5 15c10000.vi: initialized
[ 3.031702] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi–3 bound <-our node
[ 3.031782] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi–2 bound
[ 3.031838] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi–1 bound

dts changes are attached in patch.

we have done only dts changes and no driver change till now(as we have just added mipi csi lines and no other control line (ex i2c))

Thanks
Alks
cam_patch.txt (7.0 KB)
cam_dmesg.txt (61.3 KB)

You still need implement a kernel sensor driver to register the video node.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fcamera_sensor_prog.html%23

Hi Shane,

Thank You for reply.

So it means,after just adding DTS entry and HW connection it should work.
As i already mention that we have connected only CSI lane not i2c control lines of camera. It is ok to check ?
And can you check/verify weather attached DTS patch is ok or not ?

Thanks
Alks

Not only the DTS still need kernel driver.

Thanks for information.

So one more thing, As i mentioned that we have not connected i2c line only CSI lines are connected.
So in driver, can i bypass that i2c part and directly call tegracam_device_register ?

Thanks
Alks

Yes, can bypass the i2c part.

thanks, i will try and update.

Hi Shane,

After doing some change in driver i am able to create /dev/vedio0 node.
But when starting stream getting following logs :

[ 2110.341824] tau 9-0010: couldn’t create debugfs
[ 2110.341981] tau 9-0010: tegracam sensor driver:imx219_v2.0.6
[ 2110.365487] tegra194-vi5 15c10000.vi: subdev tau 9-0010 bound
[ 2123.852486] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
[ 2123.852762] regmap_util_write_table_8:regmap_util_write_table:-121
[ 2123.852874] tau 9-0010: Error writing mode
[ 2123.857311] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 2126.421243] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 2126.421424] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 2126.421564] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 2126.424480] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x39
[ 2126.424654] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x41
[ 2126.424817] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x37
[ 2126.424981] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

sudo media-ctl -p
Media controller API version 0.1.0

Media device information

driver tegra194-vi5
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0

Device topology

  • entity 1: 15a00000.nvcsi–1 (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    pad0: Sink
    <- “tau 9-0010”:0 [ENABLED]
    pad1: Source
    -> “vi-output, tau 9-0010”:0 [ENABLED]

  • entity 18: tau 9-0010 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev1
    pad0: Source
    [fmt:SRGGB10_1X10/3264x2464 field:none colorspace:srgb]
    -> “15a00000.nvcsi–1”:0 [ENABLED]

  • entity 20: vi-output, tau 9-0010 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    <- “15a00000.nvcsi–1”:1 [ENABLED]

Check the trace log, suppose the nvcsi/vi didn’t receive any validate data from MIPI bus.

Jetson TX2/28.1 Camera BringUp - eLinux.org

I have enable the logs as per above link.
Please find attached.
csi-log.txt (4.3 KB)

You should remove the i2c access from the driver if your device don’t need any REG via i2c.
Also what’s tau?

[ 1564.130268] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
[ 1564.130467] regmap_util_write_table_8:regmap_util_write_table:-121
[ 1564.130593] tau 9-0010: Error writing mode

Tau : It is our camera name Tau2.

I have removed the i2c settings, now getting below logs :

$ dmesg
[ 3776.043208] tau 9-0010: couldn’t create debugfs
[ 3776.043341] tau 9-0010: tegracam sensor driver:imx219_v2.0.6
[ 3776.066565] tegra194-vi5 15c10000.vi: subdev tau 9-0010 bound
[ 3795.619032] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 3798.371036] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 3798.371195] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 3798.371364] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 3798.373589] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 3800.931035] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 3800.931188] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 3800.931360] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 3800.933607] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 3803.491025] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 3803.491213] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 3803.491351] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 3803.493623] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 3806.051034] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 3806.051187] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 3806.051322] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 3806.053603] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 3808.611150] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 3808.611306] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 3808.611440] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 3808.613406] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 3811.171029] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 3811.171186] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 3811.171345] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 3811.173948] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

Get the trace log to check.

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

Have v4l2-ctl to capture

cat /sys/kernel/debug/tracing/trace

Hi Shane,

Please find the full attached logs after enabling tracing.

and one more thing for :
$ v4l2-compliance | grep fail
fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals

and some of them are :

#######################################################################################

root@ubuntu:/home/anycon# cat /sys/kernel/debug/tracing/trace | grep tegra
v4l_id-6852 [001] … 143.153265: tegra_channel_open: vi-output, tau 9-0010
v4l_id-6852 [000] … 143.154685: tegra_channel_set_power: tau 9-0010 : 0x1
v4l_id-6852 [000] … 143.177937: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x1
v4l_id-6852 [000] … 143.181192: tegra_channel_close: vi-output, tau 9-0010
v4l_id-6852 [000] … 143.181216: tegra_channel_set_power: tau 9-0010 : 0x0
v4l_id-6852 [000] … 143.181373: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x0
v4l2-ctl-6862 [001] … 152.482754: tegra_channel_open: vi-output, tau 9-0010
v4l2-ctl-6862 [000] … 152.484649: tegra_channel_set_power: tau 9-0010 : 0x1
v4l2-ctl-6862 [000] … 152.507839: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x1
v4l2-ctl-6862 [001] … 152.519919: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
v4l2-ctl-6862 [000] … 152.530487: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-6862 [001] … 152.538080: tegra_channel_set_stream: 15a00000.nvcsi–1 : 0x1
v4l2-ctl-6862 [001] … 152.538095: tegra_channel_set_stream: tau 9-0010 : 0x1
vi-output, tau -6864 [001] … 155.237738: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
vi-output, tau -6864 [001] … 157.798232: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
vi-output, tau -6864 [001] … 160.357948: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
vi-output, tau -6864 [001] … 162.917492: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
v4l2-ctl-6862 [001] … 164.449187: tegra_channel_close: vi-output, tau 9-0010
vi-output, tau -6864 [000] … 165.439296: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
v4l2-ctl-6862 [000] … 165.439765: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-6862 [000] … 165.439767: tegra_channel_set_stream: tau 9-0010 : 0x0
v4l2-ctl-6862 [000] … 165.490815: tegra_channel_set_stream: 15a00000.nvcsi–1 : 0x0
v4l2-ctl-6862 [000] … 165.501658: tegra_channel_set_power: tau 9-0010 : 0x0
v4l2-ctl-6862 [000] … 165.501810: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x0
root@ubuntu:/home/anycon#

################################################################################################

root@ubuntu:/home/anycon# cat /sys/kernel/debug/tracing/trace | grep csi
v4l_id-6852 [000] … 143.177937: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x1
v4l_id-6852 [000] … 143.177964: csi_s_power: enable : 0x1
v4l_id-6852 [000] … 143.181373: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x0
v4l_id-6852 [000] … 143.181376: csi_s_power: enable : 0x0
v4l2-ctl-6862 [000] … 152.507839: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x1
v4l2-ctl-6862 [000] … 152.507853: csi_s_power: enable : 0x1
v4l2-ctl-6862 [001] … 152.538080: tegra_channel_set_stream: 15a00000.nvcsi–1 : 0x1
v4l2-ctl-6862 [001] … 152.538083: csi_s_stream: enable : 0x1
kworker/0:0-4 [000] … 152.561057: rtcpu_nvcsi_intr: tstamp:5138882150 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x
00000009
kworker/0:0-4 [000] … 152.561059: rtcpu_nvcsi_intr: tstamp:5138882150 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:1 st:0 vc:0 s
tatus:0x00000009
kworker/0:0-4 [000] … 152.561060: rtcpu_nvcsi_intr: tstamp:5138882734 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x
00000009
kworker/0:0-4 [000] … 152.561061: rtcpu_nvcsi_intr: tstamp:5138882734 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:1 st:0 vc:0 s
tatus:0x00000009

csi-logs-with-cam.txt (74.6 KB)
csi-logs-with-cam-2.txt (42.4 KB)

Any similar message like SOF/EOF/CHANSEL message for the trace log?
Also can you try to change discontinuous_clk mode in device tree.

  kworker/5:2-275 [005] ...1 122.290528: rtcpu_vinotify_handle_msg: tstamp:4155862787 tag:CHANSEL_PXL_SOF channel:0x00 frame:0 vi_tstamp:4155862337 data:0x00000001
    kworker/5:2-275 [005] ...1 122.290531: rtcpu_vinotify_handle_msg: tstamp:4155867990 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:4155867544 data:0x08000000
    kworker/5:2-275 [005] ...1 122.342572: rtcpu_vinotify_handle_msg: tstamp:4156521216 tag:CHANSEL_PXL_EOF channel:0x00 frame:0 vi_tstamp:4156520630 data:0x0ad90002
    kworker/5:2-275 [005] ...1 122.342579: rtcpu_vinotify_handle_msg: tstamp:4156521395 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:4156520667 data:0x0ada0040
    kworker/5:2-275 [005] ...1 122.342582: rtcpu_vinotify_handle_msg: tstamp:4156522342 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:4156521558 data:0x08000000
    kworker/5:2-275 [005] ...1 122.342585: rtcpu_vinotify_handle_msg: tstamp:4156522509 tag:CHANSEL_FAULT_FE channel:0x01 frame:0 vi_tstamp:4156521559 data:0x00000001
    kworker/5:2-275 [005] ...1 122.342588: rtcpu_vinotify_handle_msg: tstamp:4156522706 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:4156521562 data:0x00000000

No message like SOF/EOF/CHANSEL, i checked using grep command.
tried with discontinuous_clk= “yes” and also discontinuous_clk=“no”

Please find attached logs.

Thanks

Alks
csi-logs3-with-cam.txt (32.6 KB)

What’s your sensor clock output mode? continuous or discontinuous clock?
Have you try to configure the sensor output clock mode to opposite mode to try.

I tried with both continuous and discontinuous clock, getting same logs.

But when we checked MIPI CSI lane output (checked on oscilloscope) it was discontinuous.(checked csi lane which are coming to Nvidia)

$ v4l2-ctl -d /dev/video0 --set-fmtvideo=width=640,height=480,pixelformat=RG10 --stream-mmap -stream-count=10 --stream-to=test.raw --verbose

VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 640/480
Pixel Format : ‘RG10’
Field : None
Bytes per Line : 1280
Size Image : 614400
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: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
[ 1151.832494] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 1151.832645] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 1151.832813] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 614400
Bytesused: 614400
Timestamp: 0.000000s (Monotonic, End-of-Frame)

    Index    : 0
    Type     : Video Capture
    Flags    : mapped, error
    Field    : None
    Sequence : 0
    Length   : 614400
    Bytesused: 614400
    Timestamp: 0.000000s (Monotonic, End-of-Frame)