CSI Camera not working on Orin Nano

I fail to receive an image from a csi camera. I attached dmesg output and the trace file.

Can you post a link to the documentation of what
tegra-capture-vi err_data, VIFALC_TDSTATE|CHANSEL_FAULT|VIFALC_ACTIONLST … data means?

dmesg says:

[  286.666751] adsd3500 10-0038: camera_common_try_fmt: size 2560 x 512
[  286.673326] adsd3500 10-0038: camera_common_s_fmt(12308) size 2560 x 512
[  286.680259] adsd3500 10-0038: camera_common_try_fmt: size 2560 x 512
[  286.686812] video4linux video0: tegra_channel_update_format: Resolution= 2560x512 bytesperline=2560
[  286.696288] video4linux video0: tegra_channel_queue_setup: Original Code: Size is 1313280
[  286.704717] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_queue_setup:Image Size is 1313280 bytes
[  286.728002] bwmgr API not supported
[  286.842440] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 20000h
[  286.856284] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 200h
[  287.042244] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 200h
[  287.142116] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 200h

trace.txt (51.3 KB)

hello manthey,

let’s narrow down the issue, you may see-also Applications Using V4L2 IOCTL Directly for using V4L2 IOCTL to verify basic camera functionality.

please also note that, CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N on Orin Nano.
please use device tree property, lane_polarity to configure a polarity swap on any lane.

Does this swizzle affect both CAM0 (J20) and CAM1 (J21)?
We actually have 2 hardware setups.
One connects the camera via CSI directly. That works.
Second setup connects the camera via GMSL. That does not work.
As the first setup is working there is no general problem with the hardware setup.
Reading the trace log is also seems that the Orin Nano does actually receive data, but I have no access to the documentation of the log messages.

Can you post a link to the documentation of what
tegra-capture-vi err_data , VIFALC_TDSTATE|CHANSEL_FAULT|VIFALC_ACTIONLST … data means or help me with the interpretation of the the attached trace log?

hello manthey,

only J20 needs polarity swap.
as you can see in [Jetson Orin NX Series and Orin Nano Series Design Guide], it’s only CSI0 D1 and CSI1 D0 have polarity swap.
according to [Jetson Orin Nano Developer Kit Carrier Board Specification], J20 it uses CSI-0/1, J21 it uses CSI-2/3.

there’s no public documentation for those tracing logs.
please examine the sensor configuration, it should shows camera related signaling, such as SOF,EOF…etc if there’s MIPI data on the CSI channel.

I found traces of those data properties of e.g. CHANSEL_FAULT in Linux_for_Tegra/source/public/kernel/nvidia/include/soc/camrtc-capture.h

e.g. #define CAPTURE_CHANNEL_ERROR_PIXEL_SHORT_LINE MK_BIT(9)

But while potentially being valuable this whole camera interface trace has little use without documentation. Who can help here?

as mentioned, there’s no public documentation for those tracing logs.

Can you give me an dts example in which node I apply the lane_polarity with which value?

hello manthey,

you may visit Jetson Linux 35.4.1 | NVIDIA Developer page to download [Driver Package (BSP) Sources].
please refer to IMX219 device tree as an example, $public_sources/r35.4.1/Linux_for_Tegra/source/public/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-camera-rbpcv2-imx219.dtsi
re-cap as following.

                                * lane_polarity
                                * Based on the camera connector pin.
                                * CSIx_D0 | CSIx_D1 | CSI(X+1)_D0 | CSI(X+1)CSIx_D1
                                *    LSB  |   BIT1  |     BIT2    |      MSB
                                * if there is a polarity swap on any lane, the bit corrsponding
                                * to the lane should be set
                                * e.g. polarity swap on CSIx_D0 only -> lane_polarity = "1"; 0001
                                * e.g. polarity swap on CSIx_D1 and CSI(X+1)_D0 -> lane_polarity = "6"; 0110

I tried the lane_polarity but it did not help. I still need help with the interpretation of the trace log.

hello manthey,

please also share the tracing logs for reference, thanks

Hi Jerry, thanks. Please find attached the trace log.

trace.txt (51.3 KB)

hello manthey,

please check your sensor is actually sending frame with 2560x512.
it’s reporting CHANSEL_SHORT_FRAME failure, which means the coming frame height is less than active_h settings.

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