I'm implementing a custom sensor driver using the imx8mp and the OV5640 driver as a base. I dont need i2c for now, so I just have a reset GPIO and a single resolution/framerate combination.
The driver works, but only on CSI-0. If I connect it to CSI-1 it goes through the motions to start and set the reset gpio as expected, but the gstreamer window hangs waiting for mipi data while none arrives.
Initially I suspected it was associated with the MIPI virtual-channel number, as our FPGA hardcodes it to 0, and I've seen some of the NXP drivers use the "csi_id" entry in the devicetree to define it. But changing it to 1 made no difference. Also, the ov5640.c driver, which appears to be the one in use, also sets the virtual channel to a fixed number.
Is there some other parameter of the V4L2-media-entity that determines this?
Below are some media-ctl graphs. The dual one is for the custom camera setup, and the last 2 are ov5640 configs, each plugged into a different port.