Hi @Charled ,
From my experience, together with lower-level (i.e. vvcam kernel module + dts) adaptation, you will also need to adapt one of existing example (such as OV2775) in isp-imx-<VERSION>.bin to OV5640. VERSION = 4.2.2.6.0 in your case, so the isp-imx-4.2.2.6.0.bin can be downloaded from following link : https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/isp-imx-4.2.2.6.0.bin
And the OV2775 resources are as below :
units/isi/drv/OV2775/include_priv/OV2775_priv.h
units/isi/drv/OV2775/source/OV2775.c
units/isi/drv/OV2775/source/OV2775_mipi4lane_1080p_3dol_init.txt
units/isi/drv/OV2775/source/OV2775_mipi4lane_1080p_init.txt
units/isi/drv/OV2775/source/OV2775_mipi4lane_1080p_2dol_init.txt
units/isi/drv/OV2775/calib/OV2775/OV2775_pentaxcombined_01.xml
units/isi/drv/OV2775/calib/OV2775/OV2775_8M_02_720p.xml
units/isi/drv/OV2775/calib/OV2775/OV2775.xml
units/isi/drv/OV2775/calib/OV2775/OV2775_8M_02_1080p.xml
units/isi/drv/OV2775/calib/OV2775/OV2775_fisheye.xml
units/isi/drv/OV2775/calib/OV2775/OV2775_pentax_04.xml
You can rename above files to OV5640 or duplicate and rename them to OV5640.
Above resources will allow to generate .drv file which is in turn used by the isp_media_server as an intermediate layer to interface with vvcam kernel module via ioctl() calls.
Also in above self-extracted binary isp-imx-4.2.2.6.0.bin, there will be a need to adapt the scripts imx/start_isp.sh and imx/run.sh to configure the input files of isp_media_server (such as Sensor0_Entry.cfg, Sensor1_Entry.cfg, etc. ) so that it can recognize and load your ISP based (or vvcam) ov5640 driver.
And in imx/run.sh of isp-imx-4.2.2.6.0, only single camera is handled. But you could inspire the following snippet to handle mix of basler camera and ov2775 (or ov5640 in your case ) :
basler_1080p60_ov2775_1080p30 )
MODULES=("basler-camera-driver-vvcam" "${MODULES[@]}")
JSON_FILE="case/config/daA3840_30mc_1080P.json"
CAM_NAME="basler-vvcam"
DRV_FILE="DAA3840_30MC_1080P.drv"
#XML_FILE="DAA3840_30MC_1080P.xml"
MODE_FILE="DAA3840_MODES.txt"
MODE="1"
write_sensor_cfg_file "Sensor0_Entry.cfg" $CAM_NAME $DRV_FILE $MODE_FILE $MODE
MODULES=("ov2775" "${MODULES[@]}")
JSON_FILE="case/config/2006_sensor_dwe.json"
CAM_NAME="ov2775"
DRV_FILE="ov2775.drv"
#XML_FILE="OV2775.xml"
MODE_FILE="OV2775_MODES.txt"
MODE="0"
write_sensor_cfg_file "Sensor1_Entry.cfg" $CAM_NAME $DRV_FILE $MODE_FILE $MODE
Note that Sensor0_Entry.cfg or Sensor1_Entry.cfg will be re-generated in runtime by the above imx/run.sh.
Beside, you could migrate to more recent BSPs (which include newer isp-imx of course) that provide better examples of dual ISP sensors of same type (not sure if different/mix types are also supported).
Regards,
K.