4lan 4 cameras cannot produce pictures

Hi All:
I use max96712, each lan is configured with 2.5G, serdes_pix_clk_hz = “625000000” in dts; why can’t I produce pictures with this configuration?
The bandwidth of each camera (isx031) is 1.8G.

cmd:

v4l2-ctl -d /dev/video6 --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-count=1 --stream-poll --stream-to=-|ffmpeg -loglevel quiet -f rawvideo -s 1920x1536 -pix_fmt yuyv422 -i - video_output.jpeg

softversion:
JP5.1.2

CPU:
Orin NX

Block Diagram:
image

dmesg:
dmesg.txt (127.2 KB)
dts:

dtc -I dtb -O dts -o /home/robot/dts.txt /boot/dtb/kernel_tegra234-p3767-0000-p3768-0000-a0.dtb

dts.txt (447.5 KB)
trace:

sudo su
cd /sys/kernel/debug/dynamic_debug/
echo file csi5_fops.c +p > control

echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace
cat /sys/kernel/debug/tracing/trace

trace.log (47.6 MB)

Below tell the SOT error could be cause by the MIPI timing.

     kworker/4:2-104     [004] ....   207.276814: rtcpu_nvcsi_intr: tstamp:7932569436 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000044

Below tell the CRC error.

     kworker/4:2-104     [004] ....   207.276815: rtcpu_nvcsi_intr: tstamp:7932572417 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:2 vc:0 status:0x00000004

How should we investigate and solve this situation?

Try loser CPHY speed and check the HW signal.

Thanks

I tried to reduce the speed to 2.0G. I could still produce pictures at first, but then I held on. Probabilistic plotting.
Is the reason for this phenomenon also the same as the reason for configuring 2.5G on each LAN above?

Deserializer per LAN rate: 2.0G
Sensor configuration in dts:
serdes_pix_clk_hz = “500000000”;

root@tegra:/home/robot# v4l2-ctl -d /dev/video7  --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536 --stream-mmap  ------------>Unable to publish pictures
^C^C^C^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# v4l2-ctl -d /dev/video6  --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536 --stream-mmap
^C^C^C^C^C^C^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# v4l2-ctl -d /dev/video5  --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536 --stream-mmap
^C^C^C^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# v4l2-ctl -d /dev/video4  --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536 --stream-mmap
^C^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# ^C
root@tegra:/home/robot# v4l2-ctl -d /dev/video7  --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536 --stream-mmap
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps, dropped buffers: 1   -------->Can produce pictures
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<^C
root@tegra:/home/robot# v4l2-ctl -d /dev/video6  --set-ctrl sensor_mode=1 --set-fmt-video=width=1920,height=1536 --stream-mmap
<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps, dropped buffers: 3
<                                                    ---------->The drawing process is stuck


^C
root@tegra:/home/robot#

dmesg:
dmesg.txt (136.7 KB)
dts:
dts.txt (447.5 KB)
trace:
trace.txt (1.6 MB)

The clock should be below calculation for CPHY.

mipi_clock = serdes_pix_clk_hz * 7 / 16

We use D-PHY, not C-PHY.

D-PHY, is it also required above?

note:
serdes_pix_clk_hz = “500000000”;
500000000 = 2000000000(2G) x 4 /16

OK for DPHY should be

mipi_clock = serdes_pix_clk_hz /2

Do we need to configure mipi_clock ourselves? Or do I need to test it with an oscilloscope?

It’s better to confirm by scope.

Thanks

Can mipi_clock be configured by writing registers or dts?

It should able configurate by sensor REG but not any Orin REG.
And the the dts should report the pix_clk_hz.

OK, I’ll find a hardware tester to help verify it, thank you!

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