Over the last couple of weeks I been working on supporting capture on the TX2 as of L4T 27.1 using sensors and carrier boards that we were able to use on the TX1. I wanted to share the experience gattered from this process as well as some issues and tips that might be useful to know along the way of adding support for a sensor. First, the next couple of posts provide a good insight on the process of adding support for a driver and the device tree:
After adding the driver and support on the device tree, there are two main issues that you can experience testing capture with Yatva or V4l2-ctrl (you can check them running dmesg on the cmdline after trying to capture with either of the tools I just mentioned):
a - tegra_mipi_cal 3990000.mipical: Mipi cal timeout,val:108861, lanes:300000 : I’ve seen this message tipically when the CSI port assigned in the device tree for the sensor was not the one where the sensor is actually connected to (It’s also given for example, when you try to capture from a port which doesn’t have a sensor attached).In this case, check you device tree settings specifically the CSI configuration.
b- tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11 : SOF is an acronym for Start of Frame, I was able to partially fix this issue by applying the patches for embedded data available in my reference post .
At this moment I’m still experiencing the issue b in certain resolutions, for example in a configuration of 6 cameras with the imx219 I can capture using Yavta or v4l2-ctrl of eacht of the 6 CSI ports to the resolution 1640x1232 or 3280x2464, but I can not capture at 1920x1080.
Regarding nvcamerasrc I have only been able to capture when the camera is capturing the port CSI-C using a width of 2 lanes, so specifically when the CSI configuration on the device tree is:
csi-port = <2>; bus-width = <2>;
for that particular sensor, it’s to notice that CSI-C using 2 lanes is the same configuration that the ov5693 has in the Jetson TX2 EVM. Using the other CSI ports at 2 lanes translated at nvcamerasrc being unable to provide buffers and I get only a green output when running a gstreamer pipeline, also nvcamera-daemon is stucked when trying to close that pipeline which forces me to kill the process and restart it. On the other hand here are the remaining considerations that I had to have:
1- I enconter issues when the driver for the sensor was being loaded by the kernel at boot time and it tried to start comunication with the sensor via I2C. For example, if in the probe function o the driver tried to set some registers on the sensor on i2c bus 7 at boot time, the i2c communication will fail and prevent the driver from being loaded. This was an issue for example in my configuration for 6 cameras since nvcamerasrc segfaulted when there was a definition for a camera on the device tree and there was not driver loaded (even when I was not capturing from that particular sensor that didn’t have the driver loaded properly). As a recomendation for a workaround, avoid setting sensor registers at the probe function.
2- As I mentioned, I’ve only been successful capturing from a CSI-C port using 2 lanes (the same one that uses the ov5693 sensor on the Jetson TX2 EVM) I would like to know if anyone has been able to get frames using nvcamerasrc using other ports and more lanes.
Please let me know if you found more information on the issues I described.