Add Support for new CSI camera

Hi,
I am trying to add support for a 3rd CSI camera(imx 219) on Xavier nx (custom board).

I did add the dts part taking the other imx219 cameras as reference. And am using the imx219.c driver which is provided in the nvidia sources.

For the media-ctl command I am getting expected output:

entity 1: 15a00000.nvcsi--3 (2 pads, 0 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
pad1: Source

entity 4: 15a00000.nvcsi--2 (2 pads, 0 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
pad1: Source

entity 7: imx219 0-0010 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:SRGGB10_1X10/3264x2464 field:none colorspace:srgb]
-> "15a00000.nvcsi--1":0 [ENABLED]

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

entity 12: vi-output, imx219 0-0010 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "15a00000.nvcsi--1":1 [ENABLED]

When I stream using the command:

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=616' ! nvvidconv ! nvegltransform ! nveglglessink -e

Error output :
Setting pipeline to PAUSED …

Using winsys: x11
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.506835747
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

What is that am missing?

Thanks
Ashik P.

https://elinux.org/Jetson_TX2_Camera_BringUp
Output of the trace log :

tracer: nop

entries-in-buffer/entries-written: 309/309 #P:4

_-----=> irqs-off

/ _----=> need-resched

| / _—=> hardirq/softirq

|| / _–=> preempt-depth

||| / delay

TASK-PID CPU# |||| TIMESTAMP FUNCTION

| | | |||| | |

 kworker/1:3-1613  [001] ....    43.325393: rtos_queue_peek_from_isr_failed: tstamp:1732952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    43.493375: rtos_queue_peek_from_isr_failed: tstamp:1737952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    43.661379: rtos_queue_peek_from_isr_failed: tstamp:1742952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    43.829362: rtos_queue_peek_from_isr_failed: tstamp:1747952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    43.997357: rtos_queue_peek_from_isr_failed: tstamp:1752952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    44.165368: rtos_queue_peek_from_isr_failed: tstamp:1757952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    44.277365: rtos_queue_peek_from_isr_failed: tstamp:1762952231 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    44.445374: rtos_queue_peek_from_isr_failed: tstamp:1767952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    44.613377: rtos_queue_peek_from_isr_failed: tstamp:1772952226 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    44.781397: rtos_queue_peek_from_isr_failed: tstamp:1777952231 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    44.949372: rtos_queue_peek_from_isr_failed: tstamp:1782952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    45.117403: rtos_queue_peek_from_isr_failed: tstamp:1787952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    45.285369: rtos_queue_peek_from_isr_failed: tstamp:1792952231 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    45.397385: rtos_queue_peek_from_isr_failed: tstamp:1797952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    45.565367: rtos_queue_peek_from_isr_failed: tstamp:1802952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    45.733368: rtos_queue_peek_from_isr_failed: tstamp:1807952229 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    45.901374: rtos_queue_peek_from_isr_failed: tstamp:1812952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    46.069381: rtos_queue_peek_from_isr_failed: tstamp:1817952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    46.237419: rtos_queue_peek_from_isr_failed: tstamp:1822952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    46.405405: rtos_queue_peek_from_isr_failed: tstamp:1827952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    46.517410: rtos_queue_peek_from_isr_failed: tstamp:1832952233 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    46.685400: rtos_queue_peek_from_isr_failed: tstamp:1837952229 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    46.853367: rtos_queue_peek_from_isr_failed: tstamp:1842952230 queue:0x0bcbcf78
 kworker/1:3-1613  [001] ....    47.021369: rtos_queue_peek_from_isr_failed: tstamp:1847952230 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    47.189395: rtos_queue_peek_from_isr_failed: tstamp:1852952229 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    47.357448: rtos_queue_peek_from_isr_failed: tstamp:1857952231 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    47.525385: rtos_queue_peek_from_isr_failed: tstamp:1862952230 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    47.637395: rtos_queue_peek_from_isr_failed: tstamp:1867952230 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    47.805419: rtos_queue_peek_from_isr_failed: tstamp:1872952230 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    47.973403: rtos_queue_peek_from_isr_failed: tstamp:1877952230 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    48.141450: rtos_queue_peek_from_isr_failed: tstamp:1882952230 queue:0x0bcbcf78
     kworker/1:3-1613  [001] ....    48.253376: rtos_queue_peek_from_isr_failed: tstamp:1886028528 queue:0x0bcbcf78
        v4l2-ctl-7782  [000] ....    77.343467: tegra_channel_open: vi-output, imx219 0-0010
        v4l2-ctl-7782  [000] ....    77.344844: tegra_channel_set_power: imx219 0-0010 : 0x1
        v4l2-ctl-7782  [000] ....    77.344864: camera_common_s_power: status : 0x1
        v4l2-ctl-7782  [000] ....    77.368049: tegra_channel_set_power: 15a00000.nvcsi--1 : 0x1
        v4l2-ctl-7782  [000] ....    77.368054: csi_s_power: enable : 0x1
        v4l2-ctl-7782  [000] ....    77.387778: tegra_channel_capture_setup: vnc_id 0 W 3264 H 2464 fmt c4
        v4l2-ctl-7782  [002] ....    77.391764: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-7782  [000] ....    77.393932: tegra_channel_set_stream: 15a00000.nvcsi--1 : 0x1
        v4l2-ctl-7782  [000] ....    77.393938: csi_s_stream: enable : 0x1
        v4l2-ctl-7782  [000] ....    77.393948: tegra_channel_set_stream: imx219 0-0010 : 0x1
     kworker/1:0-18    [001] ....    77.437072: rtos_queue_peek_from_isr_failed: tstamp:2797807380 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    77.437079: rtcpu_start: tstamp:2797809743
     kworker/1:0-18    [001] ....    77.437081: rtos_queue_send_from_isr_failed: tstamp:2797822721 queue:0x0bcb41f8
     kworker/1:0-18    [001] ....    77.437083: rtos_queue_send_from_isr_failed: tstamp:2797822873 queue:0x0bcb8a60
     kworker/1:0-18    [001] ....    77.437084: rtos_queue_send_from_isr_failed: tstamp:2797823022 queue:0x0bcba5e0
     kworker/1:0-18    [001] ....    77.437086: rtos_queue_send_from_isr_failed: tstamp:2797823167 queue:0x0bcbb3a0
     kworker/1:0-18    [001] ....    77.437087: rtos_queue_send_from_isr_failed: tstamp:2797823314 queue:0x0bcbc160
     kworker/1:0-18    [001] ....    77.437089: rtcpu_string: tstamp:2797823785 id:0x04010000 str:"Configuring VI GoS.^M
"
     kworker/1:0-18    [001] ....    77.437152: rtcpu_string: tstamp:2797823964 id:0x04010000 str:"VM GOS[#0] addr=0xc2100000^M
"
     kworker/1:0-18    [001] ....    77.437166: rtcpu_string: tstamp:2797824224 id:0x04010000 str:"VM GOS[#1] addr=0xc2101000^M
"
     kworker/1:0-18    [001] ....    77.437179: rtcpu_string: tstamp:2797824495 id:0x04010000 str:"VM GOS[#2] addr=0xc2102000^M
"
     kworker/1:0-18    [001] ....    77.437191: rtcpu_string: tstamp:2797824727 id:0x04010000 str:"VM GOS[#3] addr=0xc2103000^M
"
     kworker/1:0-18    [001] ....    77.437203: rtcpu_string: tstamp:2797824959 id:0x04010000 str:"VM GOS[#4] addr=0xc2104000^M
"
     kworker/1:0-18    [001] ....    77.437215: rtcpu_string: tstamp:2797825192 id:0x04010000 str:"VM GOS[#5] addr=0xc2105000^M
"
     kworker/1:0-18    [001] ....    77.437254: rtcpu_string: tstamp:2797833908 id:0x04010000 str:"vi5_hwinit: firmware CL2018101701 protocol versi"
     kworker/1:0-18    [001] ....    77.437256: rtcpu_string: tstamp:2797834026 id:0x04010000 str:"on 2.2^M
"
     kworker/1:0-18    [001] ....    77.437268: rtos_queue_send_from_isr_failed: tstamp:2797849128 queue:0x0bcb41f8
     kworker/1:0-18    [001] ....    77.437270: rtos_queue_send_from_isr_failed: tstamp:2797849297 queue:0x0bcb8a60
     kworker/1:0-18    [001] ....    77.437271: rtos_queue_send_from_isr_failed: tstamp:2797849451 queue:0x0bcba5e0
     kworker/1:0-18    [001] ....    77.437273: rtos_queue_send_from_isr_failed: tstamp:2797849596 queue:0x0bcbb3a0
     kworker/1:0-18    [001] ....    77.437274: rtos_queue_send_from_isr_failed: tstamp:2797849742 queue:0x0bcbc160
     kworker/1:0-18    [001] ....    77.437275: rtcpu_string: tstamp:2797850618 id:0x04010000 str:"VI GOS[#0] set to VM GOS[4] base 0xc2104000
"
     kworker/1:0-18    [001] ....    77.437287: rtos_queue_send_from_isr_failed: tstamp:2797921385 queue:0x0bcb41f8
     kworker/1:0-18    [001] ....    77.437289: rtos_queue_send_from_isr_failed: tstamp:2797921535 queue:0x0bcb8a60
     kworker/1:0-18    [001] ....    77.437290: rtos_queue_send_from_isr_failed: tstamp:2797921687 queue:0x0bcba5e0
     kworker/1:0-18    [001] ....    77.437291: rtos_queue_send_from_isr_failed: tstamp:2797921836 queue:0x0bcbb3a0
     kworker/1:0-18    [001] ....    77.437293: rtos_queue_send_from_isr_failed: tstamp:2797921981 queue:0x0bcbc160
     kworker/1:0-18    [001] ....    77.437295: rtcpu_vinotify_event: tstamp:2798172895 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:3631916096 data:0x10000000
     kworker/1:0-18    [001] ....    77.437297: rtcpu_vinotify_event: tstamp:2798173057 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:3631924448 data:0x31000001
     kworker/1:0-18    [001] ....    77.437298: rtcpu_vinotify_event: tstamp:2798173219 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:3631926656 data:0x07020001
     kworker/1:0-18    [001] ....    77.437299: rtcpu_vinotify_event: tstamp:2798173354 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:3631960544 data:0x10000000
     kworker/1:0-18    [001] ....    77.437301: rtcpu_vinotify_event: tstamp:2798173511 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:3631969056 data:0x31000002
     kworker/1:0-18    [001] ....    77.605051: rtos_queue_peek_from_isr_failed: tstamp:2802807729 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    77.717037: rtos_queue_peek_from_isr_failed: tstamp:2807807733 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    77.885064: rtos_queue_peek_from_isr_failed: tstamp:2812807732 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    78.053035: rtos_queue_peek_from_isr_failed: tstamp:2817807730 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    78.221041: rtos_queue_peek_from_isr_failed: tstamp:2822807732 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    78.389044: rtos_queue_peek_from_isr_failed: tstamp:2827807732 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    78.557029: rtos_queue_peek_from_isr_failed: tstamp:2832807733 queue:0x0bcbcf78
     kworker/1:0-18    [001] ....    78.725020: rtos_queue_peek_from_isr_failed: tstamp:2837807729 queue:0x0bcbcf78

That tell’s the context of tegra-camera-platform{} have problem. Maybe the devname incorrect.

@ShaneCCC

TYSM, it worked.

Hi,
Does the name of camera which i give for “devname” matters? / What is the exact parameter that I should give for “devname”?
Thanks
Ashik P.

The devname is the sensor driver name, it combined with the kernel driver name and i2c bus.
When you print any information by the dbg_xxx() that will print it out like “ov5693 30-0036” below.

[ 5.045481] ov5693 30-0036: probing v4l2 sensor.

1 Like