Camera driver loaded but no /dev/videoX

Hello,

I have a working setup with a floyd board (Xavier NX) and 2 IMX492-based camera+driver with Jetpack 4.6.x.
I am now moving to Jetpack 5.x and defined a DTS file and overlay for this dual IMX492 configuration.
After flashing and booting, driver gets loaded and communication to cameras is established as shown with dmesg:

[ 1736.198854] imx492 30-001a: probing v4l2 sensor: pleno/alain/8
[ 1736.199620] imx492 30-001a: tegracam sensor driver:imx492_v2.0.6
[ 1736.401137] imx492 30-001a: imx492_set_gain: val:1000000, gain:1, again:(1, 0), dgain:(1, 0)
[ 1736.401801] imx492 30-001a: imx492_set_exposure: val: 0
...
[ 1736.406985] imx492 30-001a: imx492_set_frame_rate: PCLK:576000000, LL:9622, fps:2.00, HMAX:0, VMAX:5728, SVR=0
[ 1736.407046] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx492 30-001a bound
[ 1736.407741] imx492 31-001a: probing v4l2 sensor: pleno/alain/8
...
[ 1736.614171] imx492 31-001a: imx492_set_frame_rate: val: 2000000, svr:0, vmax:5728
[ 1736.614945] imx492 31-001a: imx492_set_frame_rate: PCLK:576000000, LL:9622, fps:2.00, HMAX:0, VMAX:5728, SVR=0
[ 1736.614973] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx492 31-001a bound
[ 1736.614979] imx492 31-001a: Probed IMX492 sensor

but I don’t see the /dev/video* entries.
I have a /dev/media0 entry which I can dump:

Media controller API version 5.10.104

Media device information
------------------------
driver          tegra-camrtc-ca
model           NVIDIA Tegra Video Input Device
serial
bus info
hw revision     0x3
driver version  5.10.104

Device topology
- entity 5: 13e10000.host1x:nvcsi@15a00000- (2 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
        pad0: Sink
        pad1: Source

- entity 8: 13e10000.host1x:nvcsi@15a00000- (2 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
        pad0: Sink
        pad1: Source

- entity 11: imx492 30-001a (1 pad, 0 link)
             type V4L2 subdev subtype Sensor flags 0
        pad0: Source

- entity 13: imx492 31-001a (1 pad, 0 link)
             type V4L2 subdev subtype Sensor flags 0
        pad0: Source

But that doesn’t look like the working case (jetpack 4.x):

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--3 (2 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
        pad1: Source

- entity 4: imx492 31-001a (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev1
        pad0: Source
                [fmt:SRGGB12_1X12/8432x5648 field:none colorspace:srgb]
                -> "15a00000.nvcsi--2":0 [ENABLED]

- entity 6: 15a00000.nvcsi--2 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev2
        pad0: Sink
                <- "imx492 31-001a":0 [ENABLED]
        pad1: Source
                -> "vi-output, imx492 31-001a":0 [ENABLED]

- entity 9: vi-output, imx492 31-001a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "15a00000.nvcsi--2":1 [ENABLED]

- entity 23: 15a00000.nvcsi--1 (2 pads, 0 link)
             type V4L2 subdev subtype Unknown flags 0
        pad0: Sink
        pad1: Source

I’m pretty sure it’s related to the overlay or DTS, maybe an incorrect connection between VI, NVCSI?
Came across this thread: JP5.0 .. custom camera can't show /dev/video0 device - #8 by channinglan but it doesn’t help.
I dumped the DTB and /proc/device-tree using “dtc” and see that some paths are generated with the same name:

[    6.296461] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e10000.host1x:nvcsi@15a00000- bound
[    6.305003] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e10000.host1x:nvcsi@15a00000- bound

with jetpack4, I see unique names at least, but I don’t know if that could be a problem:

[    3.671599] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--3 bound
[    3.671665] tegra194-vi5 15c10000.vi: subdev imx492 31-001a bound
[    3.671672] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--2 bound
[    3.673234] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--1 bound

Anyway, I would appreciate any hint or pointer as to what could be wrong.

Thanks in advance!
Alain

DTSI files:
tegra194-p3668-p3509-camera-imx492.dtsi (2.5 KB)
tegra194-camera-imx492.dtsi (8.4 KB)

dual IMX492 overlay:
tegra194-p3668-all-p3509-0000-camera-imx492-dual.dts (2.4 KB)

dtc output for /proc/device-tree and DTB:
dtc_fs_floyd12.txt (657.3 KB)
dtc_dtb_floyd12.txt (478.1 KB)

dmesg file:
dmesg_floyd12.txt (66.5 KB)

let me double confirm below…
(1) had you confirm the sensor driver and also the stream functionality works well on JP-4.6.x?
(2) which JP-5.x release version you’re now working on?
(3) you may see-also Camera Driver Porting since you’re moving to JP-5.x, the kernel version is replaced by kernel version 5.10.


according to test results.
the device topology of your k-5.10 looks incorrect. please examine the port bindings in your sensor device tree.

(1) had you confirm the sensor driver and also the stream functionality works well on JP-4.6.x?

yes, everything works fine with jetpack 4.6.1.

(2) which JP-5.x release version you’re now working on?

I’m using the latest and greatest 5.1.1 (jetlinux 35.3.1)

(3) you may see-also Camera Driver Porting since you’re moving to JP-5.x, the kernel version is replaced by kernel version 5.10.

thanks, I read through that already. Also checked the device tree docs.
and the porting instructions.
Tried to follow what was done with some of the other sensors like IMX390 or IMX477 for instance.

according to test results. The device topology of your k-5.10 looks incorrect. please examine the port bindings in your sensor device tree.

Did you see anything specific that was wrong or you’re just talking from experience?
This has been my suspicion but can’t seem to find what’s wrong with my DTS or overlay.

I came across this HW connectivity page that may help, I’ll give it a try and report back with questions if any.

hello alain.gautherot,

are you using a SerDes chip? you should add virtual channel supports.
and… here’s reference driver for your reference.
$public_sources/kernel_src/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-imx390-a00.dtsi

BTW,
you may disassembler the dtb file into text file, and sharing that for examination.
for example, $ dtc -I dtb -O dts -o temp.txt tegra194-xxx.dtb

Hi Jerry,

your intuition about virtual channels was correct.
I updated the DTS with the following:

	tegra-capture-vi {
		num-channels = <2>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				rbpcv2_imx492_vi_in0: endpoint {
					vc-id = <0>;                    <== added
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&rbpcv2_imx492_csi_out0>;
				};
			};
			port@1 {
				reg = <1>;
				rbpcv2_imx492_vi_in1: endpoint {
					vc-id = <1>;                    <== added
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&rbpcv2_imx492_csi_out1>;
				};
			};
		};
	};

then in modes definitions:

	num_lanes = "4";
	tegra_sinterface = "serial_a";
	vc_id = "0";                       <== added
	phy_mode = "DPHY";

or

	num_lanes = "4";
	tegra_sinterface = "serial_c";
	vc_id = "1";                       <== added
	phy_mode = "DPHY";

Thanks for the hint!

follow-up issue…

I can capture from the first camera module:

$ v4l2-ctl --set-fmt-video=width=8432,height=5648,pixelformat=RG10 --set-ctrl sensor_mode=1,bypass_mode=0 --stream-mmap -d0
<<<<<<<<<<<<<<< 13.66 fps
<<<<<<<<<<<<<< 13.66 fps
<<<<<<<<<<<<^C
$ v4l2-ctl --set-fmt-video=width=8432,height=5648,pixelformat=RG12 --set-ctrl sensor_mode=0,bypass_mode=0 --stream-mmap -d0
<<<<<<<<<<<< 10.46 fps
<<<<<<<<<<< 10.46 fps
<<<<<<<<^C

dmesg shows API calls for set_mode and it looks OK:

[  184.510713] imx492 30-001a: imx492_set_mode 723: HMAX=2193 => 1202
[  184.511076] imx492 30-001a: imx492_set_mode: wrote HMAX=1202 (0x4b2) for mode 0, 8432x5648
[  222.102122] imx492 30-001a: imx492_set_mode 714: HMAX=1839 => 920
[  222.102493] imx492 30-001a: imx492_set_mode: wrote HMAX=920 (0x398) for mode 1, 8432x5648
[  335.567220] imx492 31-001a: imx492_set_mode 723: HMAX=2193 => 1202

but when I try on the second camera (changed “-d0” with “-d1” on the same command lines), it hangs and I see some error messages showing in dmesg:

[  335.569167] imx492 31-001a: imx492_set_mode: wrote HMAX=1202 (0x4b2) for mode 0, 8432x5648
[  338.143576] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  338.143888] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  338.146037] (NULL device *): vi_capture_control_message: NULL VI channel received
[  338.146961] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[  338.147886] (NULL device *): vi_capture_control_message: NULL VI channel received
[  338.148816] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 1
[  338.150636] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  340.703552] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  340.703859] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  340.704734] (NULL device *): vi_capture_control_message: NULL VI channel received
[  340.704917] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[  340.705169] (NULL device *): vi_capture_control_message: NULL VI channel received
[  340.705343] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 1
[  340.705914] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  343.263538] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  343.263831] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  343.264747] (NULL device *): vi_capture_control_message: NULL VI channel received
[  343.264958] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[  343.265184] (NULL device *): vi_capture_control_message: NULL VI channel received
[  343.265355] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 1
[  343.265938] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  345.823585] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  345.823860] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  345.824766] (NULL device *): vi_capture_control_message: NULL VI channel received
[  345.824978] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[  345.825215] (NULL device *): vi_capture_control_message: NULL VI channel received
[  345.825385] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 1
[  345.825947] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
$ v4l2-ctl  --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
	/dev/media0

vi-output, imx492 30-001a (platform:tegra-capture-vi:0):
	/dev/video0

vi-output, imx492 31-001a (platform:tegra-capture-vi:2):
	/dev/video1
$ media-ctl -p
Media controller API version 5.10.104

Media device information
------------------------
driver          tegra-camrtc-ca
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  5.10.104

Device topology
- entity 1: 13e10000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	pad0: Sink
		<- "imx492 30-001a":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx492 30-001a":0 [ENABLED]

- entity 4: 13e10000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
	pad0: Sink
		<- "imx492 31-001a":0 [ENABLED]
	pad1: Source
		-> "vi-output, imx492 31-001a":0 [ENABLED]

- entity 7: imx492 30-001a (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev2
	pad0: Source
		[fmt:SRGGB10_1X10/8432x5648 field:none colorspace:srgb]
		-> "13e10000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 9: vi-output, imx492 30-001a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
	pad0: Sink
		<- "13e10000.host1x:nvcsi@15a00000-":1 [ENABLED]

- entity 23: imx492 31-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev3
	pad0: Source
		[fmt:SRGGB12_1X12/8432x5648 field:none colorspace:srgb]
		-> "13e10000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 25: vi-output, imx492 31-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
	pad0: Sink
		<- "13e10000.host1x:nvcsi@15a00000-":1 [ENABLED]

Any further hint as to how to debug this?
wondering if it’s still an issue with the DTS. In case, I dumped it using “dtc -I dtb /boot/kernel_tegra194-p3668-0001-p3509-0000.dtb -O dts -o dtc_dtb_floyd12_log.txt”:
dtc_dtb_floyd12_log.txt (407.6 KB)

hello alain.gautherot,

please double check the power-on/off sequence,
since it’s based-on tca9548@70 to register these two cameras at… i2c@0 and i2c@1. you may examine it’s also given correct power-supply to imx492 31-001a.

BTW,
would you please submit a new discussion thread, let’s using another new topic to follow-up your issue there.
you may also leave the topic-id for better tracking.
thanks

per request, created Capture not working on second camera for follow-up discussion.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.