I was able to progress from no frames/green images to displaying real IMX390 frames.
The changes that made frames appear were:
- The complete CAM0 device-tree path was changed to two lanes:
{
num_lanes = "2"
bus-width = <2>
tegra_sinterface = "serial_b"
port-index = <1>
vc-id = <0>
}
- The Waveshare proprietary driver overwrote the MAX9296 output after boot and configured DPHY1 for four lanes and approximately 1.5 Gbps/lane:
MAX9296 0x044A = 0xC0
I corrected it after driver initialization:
MAX9296 0x044A = 0x40 # two lanes
- Changing only the lane count was insufficient. The MAX9296 DPHY1 DPLL had to be reset while changing its rate:
MAX9296 0x1D00 = 0xF4 # DPLL reset
MAX9296 0x044A = 0x40 # two lanes
MAX9296 0x0320 = 0x28 # 800 Mbps/lane
MAX9296 0x1D00 = 0xF5 # release DPLL reset
example
sudo i2ctransfer -y -f 9 w3@0x48 0x04 0x4a 0x40 - two lanes mode
Without the 0x1D00 reset sequence, writing 0x0320 was unreliable and frames did not consistently reach VI.
- Capture was corrected to the actual sensor mode:
1920x1080
UYVY/YUV422
30 FPS
/dev/video0
Earlier 1920x1536 capture attempts produced invalid or empty output.
- The IMX390 was connected to GMSL Link A and detected through serializer
0x41, using MAX9296 pipe Y.
After these changes the input status remained:
MAX9296 link status = 0xDA
MAX9296 VIDEO_LOCK Y = 0x01
MAX9295 PCLK detect = 0x8A
Real frames then appeared, and VI tracing confirmed complete frames:
CHANSEL_PXL_SOF
CHANSEL_PXL_EOF
ATOMP_FRAME_DONE
The remaining issue is intermittent corruption:
CHANSEL_NOMATCH channel:0x02 data:0x3c9
CSIMUX_FRAME channel:0x00 data:0x400061
Therefore, the two-lane/DPLL correction solved the original “no frames” condition, but an intermittent VC/data-type or packet-format mismatch still remains.
But somtimes on normal videostream i get colorful line at random place of picture and gst crashes
tegra-camrtc-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 4194401
tegra-camrtc-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 4194401
rtcpu_vinotify_error: … tag:CHANSEL_NOMATCH channel:0x02 … data:0x00000000000003c9
rtcpu_nvcsi_intr: … class:CORRECTABLE_ERR … status:0x00000004
rtcpu_vinotify_error: … tag:CSIMUX_FRAME channel:0x00 … data:0x0000000000400061
rtcpu_vinotify_event: … tag:ATOMP_FS
rtcpu_vinotify_event: … tag:CHANSEL_PXL_SOF channel:0x23
rtcpu_vinotify_event: … tag:CHANSEL_PXL_EOF channel:0x23
rtcpu_vinotify_event: … tag:ATOMP_FRAME_DONE channel:0x23
cam0-vi-trace-latest.txt (426.4 KB)
safe-probe-ser-latest.txt (10.5 KB)
The color bar corresponds to CHANSEL_NOMATCH + CSIMUX_FRAME 0x400061
I also need to operate both cameras simultaneously:
Link A: IMX390, serializer 0x41, sensor 0x1A, VC0
Link B: AR0233, serializer 0x42, sensor 0x1B, VC1
The current situation is:
IMX390 produces PCLK and valid frames.
AR0233 GMSL link is detected, but serializer 0x42 reports no sensor PCLK.
MAX9296 pipe X has no VIDEO_LOCK.
An I2C trace during /dev/video1 STREAMON showed no AR0233 initialization transactions.
The running kernel contains IMX390 driver symbols, but no AR0233 sensor symbols.
Therefore, it appears that the current Waveshare fzcam driver initializes only IMX390, despite the package being advertised for IMX390 and AR0233.
IMX390 → pipe Y → VC0
AR0233 → pipe X → VC1
Perhaps the deserializer needs to be configured in a specific way, change to cam1 slot ?