Unable to detect multiple cameras on custom carrier board with Jetson orin NX

Unable to detect cameras on Jetson Orin NX

I want to add 4 camera (CSI) support to custom carrier board. I have defined device tree as attached for 4 cameras IMX219. Th device tree in /proc appears as defined. However /dev/video0 , /dev/video1 nodes are not created. Also I do not see any messages in kern.log about IMX219.

It appears that IMX219 module not probing / detecting. custom carrier board is based on p3509-a02+p3767-0000.conf.

Please help.

nvidia@nvidia-desktop:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.007743840
Setting pipeline to NULL ...
Freeing pipeline ...
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ ls /dev/v*
/dev/vcs   /dev/vcs4  /dev/vcsa1  /dev/vcsa5  /dev/vcsu2  /dev/vcsu6
/dev/vcs1  /dev/vcs5  /dev/vcsa2  /dev/vcsa6  /dev/vcsu3  /dev/vhci
/dev/vcs2  /dev/vcs6  /dev/vcsa3  /dev/vcsu   /dev/vcsu4
/dev/vcs3  /dev/vcsa  /dev/vcsa4  /dev/vcsu1  /dev/vcsu5

/dev/vfio:
vfio

nvidia@nvidia-desktop:~$ sudo modprobe -v imx219
insmod /lib/modules/5.10.104-tegra/kernel/drivers/media/i2c/imx219.ko
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo lsmod | grep imx
imx219                 24576  0
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo dmesg | grep -i imx219
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo i2cdetect -l
i2c-3   i2c             3190000.i2c                             I2C adapter
i2c-30  i2c             i2c-2-mux (chan_id 0)                   I2C adapter
i2c-1   i2c             c240000.i2c                             I2C adapter
i2c-37  i2c             i2c-2-mux (chan_id 7)                   I2C adapter
i2c-8   i2c             31e0000.i2c                             I2C adapter
i2c-35  i2c             i2c-2-mux (chan_id 5)                   I2C adapter
i2c-6   i2c             31c0000.i2c                             I2C adapter
i2c-33  i2c             i2c-2-mux (chan_id 3)                   I2C adapter
i2c-4   i2c             Tegra BPMP I2C adapter                  I2C adapter
i2c-31  i2c             i2c-2-mux (chan_id 1)                   I2C adapter
i2c-2   i2c             3180000.i2c                             I2C adapter
i2c-0   i2c             3160000.i2c                             I2C adapter
i2c-36  i2c             i2c-2-mux (chan_id 6)                   I2C adapter
i2c-7   i2c             c250000.i2c                             I2C adapter
i2c-34  i2c             i2c-2-mux (chan_id 4)                   I2C adapter
i2c-5   i2c             31b0000.i2c                             I2C adapter
i2c-32  i2c             i2c-2-mux (chan_id 2)                   I2C adapter
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo i2cdetect -y -r 30
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ cat /var/log/kern.log | grep -i imx219
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ ls -l /var/log/kern.log
-rw-r----- 1 syslog adm 99010 Sep  8 10:10 /var/log/kern.log
nvidia@nvidia-desktop:~$

Device Tree
tegra234-p3768-camera-rbpcv2-imx219-quad.dtsi.txt (3.2 KB)
tegra234-p3767-camera-p3768-imx219-quad.dts.txt (4.7 KB)
tegra234-camera-rbpcv2-imx219-quad.dtsi.txt (56.1 KB)

Screenshots


hello b3204sunil,

are you working with rel-35 or rel-36?
for instance, may I double confirm which Jetpack release version you’re working with?
please examine release tag, such as $ cat /etc/nv_tegra_release for confirmation.

you may refer to Jetson Compatibility,
please aware that Orin Nano module is not pin-compatible with Xavier NX carrier board.

anyways,
during kernel initialization stage, it’s step for camera device registration to setup a video device node to linux kernel. sensor probing only run once during kernel initialization stage of system boot-up.
for a typical camera application running cycle, the driver will Power On the sensor, Start Sensor Streaming, sending relevant v4l2 controls, and finally power off the sensor.
so… if there’s a error returns, it’ll not register a video node, (i.e. /dev/video0).
please see-also Topic 293662 and Topic 290610 to examine camera device registration process.

Thank you @JerryChang,
It is helpful. I will read / investigate more about sensor power on and get back here.

I am using Jetson Linux 35.3.1 is part of JetPack 5.1.1

nvidia@nvidia-desktop:~$ cat /etc/nv_tegra_release
# R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ ls /lib/modules/5.10.104-tegra/
build              modules.builtin.alias.bin  modules.order
extra              modules.builtin.bin        modules.softdep
kernel             modules.builtin.modinfo    modules.symbols
modules.alias      modules.dep                modules.symbols.bin
modules.alias.bin  modules.dep.bin            source
modules.builtin    modules.devname
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ uname -a
Linux nvidia-desktop 5.10.104-tegra #2 SMP PREEMPT Tue Sep 10 08:43:09 IST 2024 aarch64 aarch64 aarch64 GNU/Linux
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ ls /dev/v*
/dev/vcs   /dev/vcs4  /dev/vcsa1  /dev/vcsa5  /dev/vcsu2  /dev/vcsu6
/dev/vcs1  /dev/vcs5  /dev/vcsa2  /dev/vcsa6  /dev/vcsu3  /dev/vhci
/dev/vcs2  /dev/vcs6  /dev/vcsa3  /dev/vcsu   /dev/vcsu4
/dev/vcs3  /dev/vcsa  /dev/vcsa4  /dev/vcsu1  /dev/vcsu5

/dev/vfio:
vfio
nvidia@nvidia-desktop:~$

BTW,
we’ve JetPack 5.1.4/ L4T 35.6.0 public release recently,
if that’s possible, please moving to the latest release version for verification.
you may see-also Jetson Linux 35.6.0 Release Notes for reference.

Hi @JerryChang ,

I have used release 35.6. However I am not able to see /dev/video0 device node.

nvidia@nvidia-desktop:~$ cat /etc/nv_tegra_release
# R35 (release), REVISION: 6.0, GCID: 37391689, BOARD: t186ref, EABI: aarch64, DATE: Wed Aug 28 09:12:27 UTC 2024
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ uname -a
Linux nvidia-desktop 5.10.216-tegra #1 SMP PREEMPT Wed Sep 11 16:27:19 IST 2024 aarch64 aarch64 aarch64 GNU/Linux
nvidia@nvidia-desktop:~$ ls /dev/v*
/dev/vcs   /dev/vcs4  /dev/vcsa1  /dev/vcsa5  /dev/vcsu2  /dev/vcsu6
/dev/vcs1  /dev/vcs5  /dev/vcsa2  /dev/vcsa6  /dev/vcsu3  /dev/vhci
/dev/vcs2  /dev/vcs6  /dev/vcsa3  /dev/vcsu   /dev/vcsu4
/dev/vcs3  /dev/vcsa  /dev/vcsa4  /dev/vcsu1  /dev/vcsu5

/dev/vfio:
vfio
nvidia@nvidia-desktop:~$ sudo dmesg | grep -i imx
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo modprobe -v nv_imx219
insmod /lib/modules/5.10.216-tegra/kernel/drivers/media/i2c/nv_imx219.ko
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ lsmod | grep -i imx
nv_imx219              20480  0
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo dmesg | grep -i imx
nvidia@nvidia-desktop:~$
nvidia@nvidia-desktop:~$ sudo cat /var/log/kern.log | grep -i imx
nvidia@nvidia-desktop:~$

hello b3204sunil,

you may double check camera device registration process.
please also gather the complete kernel logs for reference, i.e. $ dmesg > klogs.txt.

Hello @JerryChang ,

Here is the dmesg and kern.log for reference.
Status is: imx219_probe() is called, but /dev/video0 node is not created.

nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$ sudo dmesg | grep imx
[    7.823806] imx219 30-0010: probing v4l2 sensor at addr 0x10
[    7.834343] imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
[    7.856572] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 30-0010 bound
[    7.864276] nv_imx219 module probe done
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$ sudo i2cdetect -l
i2c-3   i2c             3190000.i2c                             I2C adapter
i2c-30  i2c             i2c-2-mux (chan_id 0)                   I2C adapter
i2c-1   i2c             c240000.i2c                             I2C adapter
i2c-37  i2c             i2c-2-mux (chan_id 7)                   I2C adapter
i2c-8   i2c             31e0000.i2c                             I2C adapter
i2c-35  i2c             i2c-2-mux (chan_id 5)                   I2C adapter
i2c-6   i2c             31c0000.i2c                             I2C adapter
i2c-33  i2c             i2c-2-mux (chan_id 3)                   I2C adapter
i2c-4   i2c             Tegra BPMP I2C adapter                  I2C adapter
i2c-31  i2c             i2c-2-mux (chan_id 1)                   I2C adapter
i2c-2   i2c             3180000.i2c                             I2C adapter
i2c-0   i2c             3160000.i2c                             I2C adapter
i2c-36  i2c             i2c-2-mux (chan_id 6)                   I2C adapter
i2c-7   i2c             c250000.i2c                             I2C adapter
i2c-34  i2c             i2c-2-mux (chan_id 4)                   I2C adapter
i2c-5   i2c             31b0000.i2c                             I2C adapter
i2c-32  i2c             i2c-2-mux (chan_id 2)                   I2C adapter
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$ sudo dmesg | grep pca954
[    7.807851] pca954x 2-0070: supply vcc-pullup not found, using dummy regulator
[    7.815433] pca954x 2-0070: pca954x_probe: forcing device bus number, start 30.
[    7.911396] pca954x 2-0070: registered 8 multiplexed busses for I2C switch pca9548
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$ ls /dev/v*
/dev/vcs   /dev/vcs4  /dev/vcsa1  /dev/vcsa5  /dev/vcsu2  /dev/vcsu6
/dev/vcs1  /dev/vcs5  /dev/vcsa2  /dev/vcsa6  /dev/vcsu3  /dev/vhci
/dev/vcs2  /dev/vcs6  /dev/vcsa3  /dev/vcsu   /dev/vcsu4
/dev/vcs3  /dev/vcsa  /dev/vcsa4  /dev/vcsu1  /dev/vcsu5

/dev/vfio:
vfio
nvidia@nvidia-desktop:/proc/device-tree/i2c@3180000$

kern.log (201.5 KB)
dmesg_1.txt (73.4 KB)
dmesg.txt (77.1 KB)

hello b3204sunil,

what’s the difference with those 3 logs?
I don’t see any log files with nv_imx219 module probe done is reported.
instead, I’ve only seen this from dmesg_1.txt, [ 4.513942] kernel: Error: Driver 'imx219' is already registered, aborting...

Hello @JerryChang

Here are the latest logs of dmesg and kern.log .

Sep  8 09:58:19 nvidia-desktop kernel: [    7.523541] pca954x 2-0070: supply vcc-pullup not found, using dummy regulator
Sep  8 09:58:19 nvidia-desktop kernel: [    7.531106] pca954x 2-0070: pca954x_probe: forcing device bus number, start 30.
Sep  8 09:58:19 nvidia-desktop kernel: [    7.539029] imx219 30-0010: probing v4l2 sensor at addr 0x10
Sep  8 09:58:19 nvidia-desktop kernel: [    7.544843] probing v4l2 sensor at addr 0x10
Sep  8 09:58:19 nvidia-desktop kernel: [    7.549518] imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
Sep  8 09:58:19 nvidia-desktop kernel: [    7.566776] imx219 30-0010: imx219_board_setup: error during i2c read probe (-121)
Sep  8 09:58:19 nvidia-desktop kernel: [    7.579728] imx219 30-0010: board setup failed
Sep  8 09:58:19 nvidia-desktop kernel: [    7.584300] tegra camera board setup failed
Sep  8 09:58:19 nvidia-desktop kernel: [    7.588635] imx219: probe of 30-0010 failed with error -121

dmesg_2.txt (75.1 KB)
kern.log (298.6 KB)

hello b3204sunil,

it’s camera device registration failed apparently.
it usually i2c or regulator issues, please dig into sensor driver to check and debug.

Thank you @JerryChang ,

It seems now imx219_probe is done / passing. However V4L2 device node creation did not work.
Here are the latest dmesg and kern logs. Kindly suggest.
dmesg_3.txt (75.6 KB)
kern_3.log (102.9 KB)

hello b3204sunil,

according to the logs, video node should be generated.
[ 14.524539] kernel: imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
[ 14.586112] kernel: tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 30-0010 bound

one thing need to confirm…
did you porting tca9548 from AGX Orin to Orin NX? because Orin NX it uses GPIO-based i2c bus multiplexer to route the i2c signals.
please see-also… $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-camera-rbpcv2-imx219.dtsi

HI @JerryChang ,

Yes we have ported device tree structure from AGX, as we have tca9548a on our custom carrier board to support 4 camera behind I2C mux.

	i2c@3180000{
		status = "okay";
		
		tca9548a@70 {
			status = "okay";
			/*compatible = "i2c-mux-gpio";*/
			compatible = "nxp,pca9548";
			reg = <0x70>; 
			#address-cells = <1>;
			#size-cells = <0>;
			vcc-supply = <0x4c>; 
			force_bus_start = <0x1E>;			
			i2c@0 {
				reg = <0>;
				i2c-mux,deselect-on-exit;

tegra234-p3768-camera-rbpcv2-imx219-quad.dtsi._19_sep_working.txt (23.6 KB)

hello b3204sunil,

did you have camera sensor connected physically?
besides, since you’ve comment-out rbpcv2_imx219_b/c/d nodes, please remove them from tegra-camera-platform{} as well.

Hello @JerryChang ,
Yes I have one camera (camera0) connected to the board. It is IMX219 (arducam).
I have commented - out rbpcv2_imx219_b/c/d nodes in DT. Here are the dmesg and kern logs.

nvidia@nvidia-desktop:/var/log$ sudo dmesg | grep -i imx
[   14.792285] imx219 30-0010: probing v4l2 sensor at addr 0x10
[   14.814314] NV IMX219 inside parse device tree reset-gpios property 397
[   14.830291] imx219 30-0010: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[   14.862545] NV IMX219 camera common property has-eeprom = 0
[   14.881629] NV IMX219 inside power get extperiph1
[   14.907289] NV IMX219 inside power get: avdd (null),  iovdd (null), dvdd (null)
[   14.929567] imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
[   14.974815] imx219 30-0010: imx219_power_on: power on
[   14.980784] NV IMX219 inside power on
[   15.015385] NV IMX219 skip power seqn due to unavailable avdd or iovdd or dvdd
[   15.041493] NV IMX219 return power on
[   15.056872] NV IMX219 returning from power_off no code
[   15.088652] v4l2 i2c subdev set name imx219
[   15.286713] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 30-0010 bound
[   15.314143] nv_imx219 module probe done
nvidia@nvidia-desktop:/var/log$
nvidia@nvidia-desktop:/var/log$ ls /dev/v*
/dev/vcs   /dev/vcs4  /dev/vcsa1  /dev/vcsa5  /dev/vcsu2  /dev/vcsu6
/dev/vcs1  /dev/vcs5  /dev/vcsa2  /dev/vcsa6  /dev/vcsu3  /dev/vhci
/dev/vcs2  /dev/vcs6  /dev/vcsa3  /dev/vcsu   /dev/vcsu4
/dev/vcs3  /dev/vcsa  /dev/vcsa4  /dev/vcsu1  /dev/vcsu5

/dev/vfio:
vfio
nvidia@nvidia-desktop:/var/log$

dmesg_5.txt (76.1 KB)
tegra234-p3768-camera-rbpcv2-imx219-quad.dtsi_1.txt (23.4 KB)
kern_5.log (108.9 KB)

hello b3204sunil,

video node should be generated after this message,
could you please check with sensor vendor (arducam) to confirm it’s the latest sensor kernel driver?
besides, do they had another polarity swap on the camera carrier board?

Hello @JerryChang ,

Now we can see /dev/video0 node being created. We can also verify using v4l2-ctl.
The issue was related to definition of mclk, clock and num-channels property in device tree.
Thank you all the support and help.

nvidia@nvidia-desktop:~$ v4l2-ctl --list-devices
[  137.557473] nv_imx219 open called ...
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
        /dev/media0

vi-output, imx219 30-0010 (platform:tegra-capture-vi:0):
        /dev/video0

nvidia@nvidia-desktop:~$ ls /dev/v*
/dev/v4l-subdev0  /dev/vcs3  /dev/vcsa1  /dev/vcsa6  /dev/vcsu4
/dev/v4l-subdev1  /dev/vcs4  /dev/vcsa2  /dev/vcsu   /dev/vcsu5
/dev/vcs          /dev/vcs5  /dev/vcsa3  /dev/vcsu1  /dev/vcsu6
/dev/vcs1         /dev/vcs6  /dev/vcsa4  /dev/vcsu2  /dev/vhci
/dev/vcs2         /dev/vcsa  /dev/vcsa5  /dev/vcsu3  /dev/video0

/dev/v4l:
by-path

/dev/vfio:
vfio
nvidia@nvidia-desktop:~$ sudo dmesg | grep -i imx
[   13.415688] imx219 30-0010: probing v4l2 sensor at addr 0x10
[   13.449760] NV IMX219 inside parse device tree reset-gpios property 397
[   13.449764] imx219 30-0010: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[   13.449766] NV IMX219 camera common property has-eeprom = 0
[   13.449768] NV IMX219 inside power get extperiph1
[   13.449779] NV IMX219 inside power get: avdd (null),  iovdd (null), dvdd (null)
[   13.450778] imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
[   13.452796] imx219 30-0010: imx219_power_on: power on
[   13.487536] NV IMX219 inside power on
[   13.497496] NV IMX219 skip power seqn due to unavailable avdd or iovdd or dvdd
[   13.537706] NV IMX219 return power on
[   13.612051] imx219 30-0010: imx219_power_off: power off
[   13.617668] NV IMX219 inside power off
[   13.621869] NV IMX219 inside power off failed-else
[   13.633121] NV IMX219 returning from power_off no code
[   13.667456] v4l2 i2c subdev set name imx219
[   13.741472] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 30-0010 bound

Device tree changes

	host1x@13e00000 {
		csi_base: nvcsi@15a00000 {
		/*	num-channels = <4>; */
			num-channels = <1>;
			#address-cells = <1>;

And

	i2c@3180000{
		status = "okay";
		
		tca9548a@70 {
			status = "okay";
			/*compatible = "i2c-mux-gpio";*/
			compatible = "nxp,pca9548";
			reg = <0x70>; 
			#address-cells = <1>;
			#size-cells = <0>;
			vcc-supply = <0x4c>; 
			force_bus_start = <0x1E>;			
			i2c@0 {
				reg = <0>;
				i2c-mux,deselect-on-exit;

				rbpcv2_imx219_a@10 {
					status = "okay";
					reg = <0x10>;
					clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>;
					clock-names = "extperiph1";
					mclk = "extperiph1";
					reset-gpios = <&tegra_main_gpio EM3H_CAM0_PWDN GPIO_ACTIVE_LOW>;

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