This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM67A: csi2rx stuck in "idle" state with max96716 (tunnel mode), max96717f, and imx219

Part Number: AM67A

Tool/software:

Hi, We are testing GMSL and gstreamer is hung waiting on data.
I can see data clocking on DCLK, D0, D1, D2, and D3, but I checked register 0x30122010 and it says all streams are idle.

I have it set up nearly identical to the v3link demo, so I think there is some other driver-level problem.
The parent ticket had a similar problem at first, but I'm using the maxim,max96716a driver, which already enables the stream only in max96716_enable_streams, so I don't think I can apply the same fix.

Are there known issues that might prevent the data from getting clocked inside the csi2rx driver?
What other registers should I be checking?

I noticed there is a "lane-polarity" option that I have not used. (All positive and negative pins are connected straight through, so I don't think I need to invert them)
I also noticed there are test pattern options I could enable which might reduce the complexity of the issue, but those do not clock data either.

gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-bayer,width=640,height=480,format=rggb,framerate=5/1 ! bayer2rgb ! autovideosink
Setting pipeline to PAUSED ...
warning: queue 0xffff74000be0 destroyed while proxies still attached:
wl_seat@7 still attached
xdg_wm_base@6 still attached
wl_subcompositor@5 still attached
wl_compositor@4 still attached
wl_registry@2 still attached
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Here's the mediactl pipeline:

media-ctl -d /dev/media1 -p
Media controller API version 6.6.44

Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30122000.ticsi2rx
hw revision 0x1
driver version 6.6.44

Device topology
- entity 1: 30122000.ticsi2rx (6 pads, 6 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
<- "cdns_csi2rx.30121000.csi-bridge":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
-> "30122000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
pad2: Source
-> "30122000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
pad3: Source
-> "30122000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
pad4: Source
-> "30122000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
pad5: Source
-> "30122000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]

- entity 8: cdns_csi2rx.30121000.csi-bridge (5 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
<- "max96716 3-004c":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
-> "30122000.ticsi2rx":0 [ENABLED,IMMUTABLE]
pad2: Source
pad3: Source
pad4: Source

- entity 14: max96716 3-004c (2 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
<- "max96717 4-0040":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
-> "cdns_csi2rx.30121000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 19: max96717 4-0040 (2 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev3
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
<- "imx219 5-0010":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range]
-> "max96716 3-004c":0 [ENABLED,IMMUTABLE]

- entity 24: imx219 5-0010 (1 pad, 1 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev4
pad0: Source
[stream:0 fmt:SRGGB8_1X8/640x480 field:none colorspace:raw xfer:none quantization:full-range
crop.bounds:(8,8)/3280x2464
crop:(1008,760)/1280x960]
-> "max96717 4-0040":0 [ENABLED,IMMUTABLE]

- entity 30: 30122000.ticsi2rx context 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
<- "30122000.ticsi2rx":1 [ENABLED,IMMUTABLE]

- entity 36: 30122000.ticsi2rx context 1 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
<- "30122000.ticsi2rx":2 [ENABLED,IMMUTABLE]

- entity 42: 30122000.ticsi2rx context 2 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video4
pad0: Sink
<- "30122000.ticsi2rx":3 [ENABLED,IMMUTABLE]

- entity 48: 30122000.ticsi2rx context 3 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video5
pad0: Sink
<- "30122000.ticsi2rx":4 [ENABLED,IMMUTABLE]

- entity 54: 30122000.ticsi2rx context 4 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video6
pad0: Sink
<- "30122000.ticsi2rx":5 [ENABLED,IMMUTABLE]

I got it to connect once by changing the clock polarity, but it doesn't consistently connect.