TX2NX has not subdev device and video device when insmod driver correctlly

Hi, everyone:
Now I want to port TX2NX from NX, but when I modified the device tree and insmod camera ov9281 driver, TX2NX can not show any device node relevant video device in /dev folder, such as /dev/v4l2_subdev, /dev/video*. The driver and device tree’s configuration is working correctly in TX2 and Xavier NX.

Probe driver log

832-[   29.966666] ov9281 31-0010: tegracam sensor driver:ov9281_v2.0.6
833-[   29.966669] ov9281 31-0010: fsync mode: 2
834:[   30.030541] tegra-vi4 15700000.vi: subdev ov9281 31-0010 bound
835-[   30.030557] ov9281 31-0010: Detected OV9281 sensor
836-[   30.030604] ov9281 32-0010: probing v4l2 sensor
--
844-[   30.056942] ov9281 33-0010: tegracam sensor driver:ov9281_v2.0.6
845-[   30.056944] ov9281 33-0010: fsync mode: 2
846:[   30.120754] tegra-vi4 15700000.vi: subdev ov9281 33-0010 bound
847-[   30.120770] ov9281 33-0010: Detected OV9281 sensor
848-[   30.120830] ov9281 34-0010: probing v4l2 sensor

$ ls /dev/v*

/dev/vcs /dev/vcs2 /dev/vcs4 /dev/vcs6 /dev/vcsa1 /dev/vcsa3 /dev/vcsa5 /dev/vhci
/dev/vcs1 /dev/vcs3 /dev/vcs5 /dev/vcsa /dev/vcsa2 /dev/vcsa4 /dev/vcsa6 /dev/vndbinder

$ media-ctl -pv

Opening media device /dev/media0
Enumerating entities
Found 2 entities
Enumerating pads and links
Media controller API version 0.1.0

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

Device topology
- entity 1: ov9281 31-0010 (1 pad, 0 link)
            type V4L2 subdev subtype Sensor flags 0
        pad0: Source
v4l2_subdev_open: Failed to open subdev device node 
v4l2_subdev_open: Failed to open subdev device node 
v4l2_subdev_open: Failed to open subdev device node 

- entity 3: ov9281 33-0010 (1 pad, 0 link)
            type V4L2 subdev subtype Sensor flags 0
        pad0: Source
v4l2_subdev_open: Failed to open subdev device node 
v4l2_subdev_open: Failed to open subdev device node 
v4l2_subdev_open: Failed to open subdev device node 

Never met this problem. What should I do to solve it?

Thanks you.

BTW, tegra_release: R32.7.4 Jetpack: 4.6.4

Best regards,
Ultwcz1997

hello ultwcz1997,

please check you’re updating device tree correctly as they’re using different dtb binary file.
for instance,
TX2 NX using device tree sources of… $public_sources/kernel_src/hardware/nvidia/platform/t18x/lanai/

Yes, I use it.

kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t18x/lanai/kernel-dts/tegra186-p3636-0001-p3509-0000-a01.dts

hello ultwcz1997,

let’s disassembler TX2 NX dtb file into text file for checking all those DT property were configured correctly.
for instance, $ dtc -I dtb -O dts -o temp.txt tegra186-p3636-xxx.dtb

OK, thank you.
temp.txt (261.4 KB)

hello ultwcz1997,

do you have six 2-lane cameras?
as you can see in Jetson TX2 NX Product Design Guide for [Table 8-3. CSI Configuration],
TX2 NX support up-to five 2-lane camera sensors, you cannot use CSI-F as that’s not supported.

Yes, I know about it, so i set num_channle = <5>, and disabled one of camera

vi@15700000 {
                        compatible = "nvidia,tegra186-vi";
                        power-domains = <0x1e 0xb>;
                        reg = <0x0 0x15700000 0x0 0x100000>;
                        interrupts = <0x0 0xc9 0x4 0x0 0xca 0x4 0x0 0xcb 0x4>;
                        resets = <0x10 0x33 0x10 0x8f>;
                        reset-names = "vi", "tsctnvi";
                        clocks = <0x10 0x33 0x10 0xb4 0x10 0xb5>;
                        clock-names = "vi", "nvcsi", "nvcsilp";
                        iommus = <0x11 0x4>;
                        iommu-group-id = <0x1>;
                        status = "okay";
                        avdd_dsi_csi-supply = <0x2e>;
                        num-channels = <0x5>;
......
 nvcsi@15c00000 {                                                                            
                        num-channels = <0x5>;
                        #address-cells = <0x1>;
                        #size-cells = <0x0>;
......

i2c@0 {
                                reg = <0x0>;
                                i2c-mux,deselect-on-exit;
                                #address-cells = <0x1>;
                                #size-cells = <0x0>;

                                ov9281_a@10 {                                                               
                                        status = "disabled";
                                        compatible = "nvidia,ov9281";
                                        reg = <0x10>;
                                        devnode = "video0";

I think it seems ok.

hello ultwcz1997,

you may also removing one of module within tegra-camera-platform {}, to have five cameras available.

Hi, @JerryChang

I will test it, thank you very much.
I will add status = "disabled"in node module0, are this right?

Change dts

modules {

			module0 {
				badge = "ov9281_centerleft_RBPCV2";
				position = "centerleft";
				orientation = [30 00];

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "ov9281_v1 31-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@1/ov9281_b@10";
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
				};
			};

			module1 {
				badge = "ov9281_centerright_RBPCV2";
				position = "centerright";
				orientation = [30 00];

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "ov9281_v1 32-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@2/ov9281_c@10";
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
				};
			};

			module2 {
				badge = "ov9281_topleft_RBPCV2";
				position = "topleft";
				orientation = [30 00];

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "ov9281_v1 33-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@3/ov9281_d@10";
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
				};
			};

			module3 {
				badge = "ov9281_bottomright_RBPCV2";
				position = "bottomright";
				orientation = [30 00];

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "ov9281_v1 34-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@4/ov9281_e@10";
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
				};
			};

			module4 {
				badge = "ov9281_topright_RBPCV2";
				position = "topright";
				orientation = [30 00];

				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "ov9281_v1 35-0010";
					proc-device-tree = "/proc/device-tree/i2c@3180000/tca9548@70/i2c@5/ov9281_f@10";
				};

				drivernode1 {
					pcl_id = "v4l2_lens";
				};
			};
		};

But it has the same problem.

The whole dts
temp.txt (260.9 KB)

Hello JerryChang,
I found an error in my device tree, it’s my mistake, sorry for it.

Changed following

nvcsi@150c0000 {
.....
}

all right, so the issue has resolved?

Yes, thank you reply always.

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