iMX6DQ TP2854 MIPI CSI2 720P HD-TVI camera surround view solution for Linux BSP.
For iMX6DQ, there are two IPUs, so they can support up to 4 cameras at the same time. But the default BSP can only support up to two cameras at the same time.
The attached patch can make the BSP support up to 4 cameras based on 3.14.52 GA 1.1.0 BSP and 4.1.15 GA1.2.0 BSP.
The 4 cameras can be:
- 1xCSI, 3xMIPI
- 2xCSI, 2xMIPI
For 4xMIPI case, the four cameras should be combined on the single MIPI CSI2 interface, and each camera data should be transfered on a mipi virtual channel.
In this patch, we given the example driver for Techpoint TP2854, it was verified working on iMX6DQ SabreAuto board. The input to TP2854 is four 720P30 HD-TVI cameras.
The MIPI CSI2 720P digital camera surround view solution can be found at: iMX6DQ MAX9286 MIPI CSI2 720P camera surround view solution for Linux BSP
The kernel patches:
Updated IPU common code to support up to four cameras.
With this patch, the mxc_v4l2_tvin test application can use overlay framebuffer as V4l2 capture buffer directly.
How to builld the kernel with TP2854 support:
make menuconfig (In this command, you should select the TP2854 driver:
Device Drivers --->
<*> Multimedia support --->
[*] V4L platform devices --->
<*> MXC Video For Linux Video Capture
MXC Camera/V4L2 PRP Features support --->
<*>Techpoint tp2854 HD CVBS Input support
<*>mxc VADC support
<*>Select Overlay Rounting (Queue ipu device for overlay library)
<*>Pre-processor Encoder library
<*>IPU CSI Encoder library)
The built out image file:
"mxc_v4l2_tvin_3.14.52.zip" is the test application, test command to capture the four cameras and render on 1080P HDMI display:
/mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 960 -oh 540 -d 1 -x 0 -g2d &
/mxc_v4l2_tvin.out -ol 960 -ot 0 -ow 960 -oh 540 -d 1 -x 1 -g2d &
/mxc_v4l2_tvin.out -ol 0 -ot 540 -ow 960 -oh 540 -d 1 -x 2 -g2d &
/mxc_v4l2_tvin.out -ol 960 -ot 540 -ow 960 -oh 540 -d 1 -x 3 -g2d &
Details for TP2854, please contact with Techpoint.
Add application to preview + encode at the same time:
/mxc_vpu_test.out -E "-x 0 -o /enc.h264 -w 1280 -h 720 -L 0 -T 0 -W 512 -H 384 -c 5000 -f 2"
The camera input data go through CSI->MEM path, and IDMAC 0/1 will convert data from YUV422 ro NV12 for VPU encoder, no resize. Another modification in the mxc_vpu_test, it use different thread to encode and preview.