sorry for my delay, I need to build the source code and modify the driver to test for you, now, I can boot up the camera on the second port, so I think mipi csi can read the second port, you can find my result, the dts I modify as below, I only have os08a0 camera, so I attach this camera with port@1
1)dts file:
&mipi_csi_0 {
status = "okay";
port@0 {
reg = <0>;
mipi_ep: endpoint {
remote-endpoint = <&ov5640_mipi1_ep>;
data-lanes = <2>;
csis-hs-settle = <10>;
};
};
port@1 {
reg = <1>;
endpoint {
remote-endpoint = <&os08a20_mipi_0_ep>;
data-lanes = <4>;
csis-hs-settle = <16>;
};
};
2) then I add the mipi csi driver to search the second port
node1 = of_graph_get_next_endpoint(node, NULL);
node = of_graph_get_next_endpoint(node, node1);
3) you also need to change the imx8-media-dev.c
/* csi2 node have only port */
// port = of_get_next_child(node, NULL); //joan
port1 = of_get_next_child(node, NULL);//joan
port = of_get_next_child(node, port1);//joan
v4l2_info(&mxc_md->v4l2_dev,
"port name is %s\n", port->full_name);
I add print information, can find the name from logfile as below

4) don't forget change the "else if (mxc_md->mipi_csi2[sensor->id].sd) " to
"else if (mxc_md->mipi_csi2[0].sd) " and change "mipi_csi2 = &mxc_md->mipi_csi2[sensor->id];“ to
"mipi_csi2 = &mxc_md->mipi_csi2[0];"
and don't forget you need reload imx8-media-dev.ko again after you build this driver
the result you can find
[ 8.642136] mx8-img-md: created link [os08a20 1-0036] => [mxc-mipi-csi2.0]
[ 8.642148] mxc-md 32c00000.bus:camera: mxc_md_create_links
koot@imx8mp-lpddr4-evk:~# gst-launch-1.0 v4l2src device=/dev/video ! video/x-raw,width=640,height=480 ! waylandsinkot@imx8mp-lpddr4-evk:~# gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw,width=640,height=480 ! waylandsinkt@imx8mp-lpddr4-evk:~# gst-launch-1.0 v4l2src device=/dev/video2
[ 34.424103] enter isp_mi_stop
[ 34.580144] enter isp_mi_stop
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 34.962138] enter isp_mi_stop
[ 35.152477] enter isp_s_comp
[ 35.155396] enter isp_s_comp
[ 35.158280] enter isp_s_comp
[ 35.175593] enter wdr3_hw_init
[ 35.178660] wdr3 res: 1920 1080
[ 35.201481] enter isp_set_stream 1
[ 35.216139] enter isp_mi_start
Redistribute latency...
0:00:00.5 / 99:99:99.
0:00:00.6 / 99:99:99.
0:00:00.7 / 99:99:99.
0:00:00.8 / 99:99:99.
hope these are helpful for your customer