Camera integration on Jetson Nano

Hi Team,

I am trying to integrate Ov10640 camera sensor on Jetson Nano. The driver is probing and the sensor is up. But I am not able get the /dev/v4l-subdev device. I am using the following dts entries.

host1x {
vi_base: vi {
status = “okay”;
num-channels = <1>;
ports {
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;
vi_port_0: port@0 {
status = “okay”;
reg = <0>;
ov10640_vi_in0: endpoint {
status = “okay”;
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&ov10640_csi_out0>;
};
};
};
};
csi_base: nvcsi {
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;
csi_chan0: channel@0 {
status = “okay”;
reg = <0>;
ports {
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;
csi_chan0_port0: port@0 {
status = “okay”;
reg = <0>;
ov10640_csi_in0: endpoint@0 {
status = “okay”;
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&sen_out_ov10640_0>;
};
};
csi_chan0_port1: port@1 {
status = “okay”;
reg = <1>;
ov10640_csi_out0: endpoint@1 {
status = “okay”;
remote-endpoint = <&ov10640_vi_in0>;
};
};
};
};

                cam_module0: module0 {
                        status = "okay";
                        badge = "porg_front_OV10640";
                        position = "front";
                        orientation = "1";
                        cam_module0_drivernode0: drivernode0 {
                                status = "okay";
                                pcl_id = "v4l2_sensor";
                                devname = "ov10640 0-0040";
                                proc-device-tree = "/proc/device-tree/i2c@7000c000/ov10640@40";
                        };
                        cam_module0_drivernode1: drivernode1 {
                                pcl_id = "v4l2_lens";
                                proc-device-tree = "/proc/device-tree/lens_ov10640@sensor/";
                        };
                };

Could you please help me to solve this issue.

Thanks,
Ajith.

Does your driver call the tegracam_v4l2subdev_register() in the probe() function?

Hi ShaneCCC

Thanks for your reply.

My sensor driver doesn’t call tegracam_v4l2subdev_register() call in probe() funtion.
Is there any other way to register camera sensor without using this function.

Regards,
Ajith.

I would suggest to have ov5693 as template to implement your driver for Jetson platform.

Hi ShaneCCC

Thanks for your support,

I will try to implement this call in my driver using ov5693 as a reference.

Regards,
Ajtih.

Hi ShaneCCC
I am Using FPD Link iii interface (DS90UB954-DS90UB953 De/Serializer) to connect OV10640 sensor.
Can I use the above dts entries for FPD Link iii also or I have to change the nvcsi and vi port bindings(sensor -> nvcsi -> vi) ?

Regards,
Ajith.

Yes, I think you can reference to ov5693 dts to modify the port-index, bus-width for your HW design.
Also please rename the driver name string would be good.

Hi,

I got the following prints.
[ 1.550690] vi 54080000.vi: vi_probe: ++
[ 1.553306] vi 54080000.vi: initialized
[ 1.555320] vi 54080000.vi: subdev nvcsi–1 bound
[ 3.746683] vi 54080000.vi: subdev ov10640 0-0040 bound

media-ctl -p -r /dev/media0
Media controller API version 0.1.0

Media device information

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

Device topology

  • entity 1: nvcsi–1 (2 pads, 0 link)
    type V4L2 subdev subtype Unknown flags 0
    pad0: Sink
    pad1: Source

  • entity 4: ov10640 0-0040 (1 pad, 0 link)
    type V4L2 subdev subtype Sensor flags 0
    pad0: Source

Does it mean The VI port is getting registered and If I add correct dts entries for CSI port then I will get the /dev/video0 node. Can you please help me to confirm this.

Thanks,
Ajith.

Yes, should the video node generated after the sensor probe() successful.

Hi,

Is there any sample dts entries available for FPD Link iii interface (De/Serializer) in jetson Nano or Xavier NX platforms.

Regards,
Ajith.

The imx390 for xavier use the gmsl with virtual channel.