Platform:xavier nx Issue:not able to receive from one of the four 2-lane sensors connected to CSI pads AB CD & EF.
I have four sensors connected over two CSI Lanes each.
Sensor-1 is connected to CSI-A
Sensor-2 is connected to CSI-C
Sensor-3 is connected to CSI-D
Sensor-4 is connected to CSI-E
I have configured the dtsi file accordingly. “port-index” values for sensor-1 is “0” , for sensor-2 is “2”, for sensor-3 is “3” and for sensor-4 is “4”
I used sensor developer programming guide page to finalise the port index values.
For each sensor I have enabled two CSI lanes (bus-width) and 4 video devices i-e i am expecting data from each sensor from 4 video devices. I checked the video device from Xavier by listing them using ls /dev/vid* and using this command I am able to see 16 video devices (4 from each sensor)
The current status is I am able to receive data from sensors 1,2&4 but tried to read from sensor 3 results in select timeouts.
Can anyone please help me identify the issue which is preventing data reception from sensor-3 ? The hardware connections and sensors are all fine. I have pretty much looked into all relevant topics on Nvidia Forums but not able to solve the issue.
It would be great if someone could give some expert advice on this issue
Till then I have one more doubt related to this issue.
For a while I have been trying making changes to the port-index parameter in the dtsi in order to specify the correct CSI connections.
Is there some way to check if the correct port-index and other parameters are actually getting applied after copying the dtb files to /boot/ & /boot/dtb ?
I performed an experiment,
I configured dtsi to initialize only the 12 sensor modules, i-e three groups of four sensors.
First I assigned the port-index value as 0, 2, & 4 for the three groups in the dtsi file. I guess this way I configured the setup for using sensors connected to CSI-A, CSI-C & CSI-E. This configuration worked fine and I was able to receive data from all the three group of sensors.
Now,
I changed the “port-index = <4>“ to “port-index = <3>“ and if my understanding is correct then this way I configured the setup to use CSI-A, CSI-C & CSI-D. But this time I was not able to receive any data from any of the sensor connected to CSI-E.
Now I moved on to look into the kernel source and I came around a function, *static int tegra_csi_channel_init_one(struct tegra_csi_channel chan) in kernel/nvidia/platform/tegra/camera/csi/csi.c and here in this function I added a printk() for chan->ports[i].csi_port after line 950.
Now after compiling the kernel src and copying the Image to /boot and the dtb file to /boot & /boot/dtb/, I ran my application but to my surprise I saw that the port numbers logged were 0,0,0,0,2,2,2,2,4,4,4,4 as if changing port-index to <3> did not have any effect.
I don’t know if I am banging my head in the right direction and files but if my explanation is clear then could you please share any comments or suggestions on this :)
Until now, after building the kernel with dtsi changes, I had been simply coping the Image to /boot/ and dtb to /boot & /boot/dtb/ along with a new FDT entry in the /boot/extlinux/extlinux.conf file but the changes corresponding to the CSI parameters like “port-index” was not getting reflected on the jetson side. I was able to figure it out by adding some logs in the csi.c file. The logs showed that port numbers being used by the OS were not same as that specified in dtsi hence I tried to perform complete flash of the jetson instead of just copying the files to /boot etc. and this solved the issue.
This issue is very surprising as by simple copying of the files, other changes like video devices (/dev/video*) were getting reflected on the jetson but port-index was not !