Sample code for iMX6 SabreSD to use MIPI CSI camera with virtual channel 3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sample code for iMX6 SabreSD to use MIPI CSI camera with virtual channel 3

Sample code for iMX6 SabreSD to use MIPI CSI camera with virtual channel 3

It is based on 3.0.35 GA 4.1.0 BSP.

 

0001-Correct-mipi-camera-virtual-channel-setting-in-ipu_c.patch

It is the updated IPU code for MIPI ID and SMFC setting in ipu_capture.c. These setting should not be combined with MIPI virtual channel value, they shoule be fixed with ID 0.

 

0002-Use-virtual-channel-3-for-ov5640-mipi-camera-on-iMX6.patch

The sample code to modify ov5640_mipi camera to use virtual channel 3 on SabreSD board.

 

The followed command can be used to verify the mipi camera function after booted into Linux:

$ gst-launch mfw_v4lsrc capture-mode=1 device=/dev/video1 ! mfw_v4lsink

 

 

2014-09-30 update:

Added the patch for 3.10.17_GA1.0.0 BSP. "L3.10.17_1.0.0_mipi_camera_virtual_channel_3.zip"

 

Attachments
Comments

Hi Qiang_FSL

Do you know which virtual channel number using in OV5640_mipi.c base on 3.14.28 BSP ?

Apollo Chang.

It is vc=1 in default BSP for ov5640_mipi.

Hi Qiang Li

Thanks....

But why our device tree is define (i.MX6Q)

&mipi_csi {

    status = "okay";

    ipu_id = <0>;

    csi_id = <1>;

    v_channel = <0>;

    lanes = <2>;

};

In default BSP, the v_channel from mipi_csi of the device tree is not used as real virtual channel setting, it must be 0.

And the csi_id from ov5640_mipi of the device tree is used as the real virtual channel setting in driver.

They will make user confused, that's why I created these patches to make everything more reasonable.

Hi Qiang_FSL

Thanks...

It is very help us to know more detail.

Hi, Qiang Li:

     DI include vc and datatype. why the ipu driver ignore vc. like follow:

pastedImage_0.png

VC is not used in IPU side, it must be filled with 0.

I knew that, DI create by camera in the packet. But ipu-csi CSI_DI register is a match value, route the packet where to go?

No, the DI tells the IPU to capture which kind of data, for example YUV422 or RGB888.

%3CLINGO-SUB%20id%3D%22lingo-sub-1113316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt%20is%20based%20on%203.0.35%20GA%204.1.0%20BSP.%3C%2FP%3E%3CP%20style%3D%22padding%3A%200px%3B%20min-height%3A%208pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E0001-Correct-mipi-camera-virtual-channel-setting-in-ipu_c.patch%3C%2FP%3E%3CP%3EIt%20is%20the%20updated%20IPU%20code%20for%20MIPI%20ID%20and%20SMFC%20setting%20in%20ipu_capture.c.%20These%20setting%20should%20not%20be%20combined%20with%20MIPI%20virtual%20channel%20value%2C%20they%20shoule%20be%20fixed%20with%20ID%200.%3C%2FP%3E%3CP%20style%3D%22padding%3A%200px%3B%20min-height%3A%208pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E0002-Use-virtual-channel-3-for-ov5640-mipi-camera-on-iMX6.patch%3C%2FP%3E%3CP%3EThe%20sample%20code%20to%20modify%20ov5640_mipi%20camera%20to%20use%20virtual%20channel%203%20on%20SabreSD%20board.%3C%2FP%3E%3CP%20style%3D%22padding%3A%200px%3B%20min-height%3A%208pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20followed%20command%20can%20be%20used%20to%20verify%20the%20mipi%20camera%20function%20after%20booted%20into%20Linux%3A%3C%2FP%3E%3CP%3E%24%20gst-launch%20mfw_v4lsrc%20capture-mode%3D1%20device%3D%2Fdev%2Fvideo1%20!%20mfw_v4lsink%3C%2FP%3E%3CP%20style%3D%22padding%3A%200px%3B%20min-height%3A%208pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22padding%3A%200px%3B%20min-height%3A%208pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E2014-09-30%20update%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EAdded%20the%20patch%20for%203.10.17_GA1.0.0%20BSP.%20%22L3.10.17_1.0.0_mipi_camera_virtual_channel_3.zip%22%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1113316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGraphics%20%26amp%3B%20Display%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6DL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6Dual%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6Quad%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6S%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113325%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113325%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ENo%2C%20the%20DI%20tells%20the%20IPU%20to%20capture%20which%20kind%20of%20data%2C%20for%20example%20YUV422%20or%20RGB888.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113324%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113324%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20knew%20that%2C%20DI%20create%20by%20camera%20in%20the%20packet.%20But%20ipu-csi%20CSI_DI%20register%20is%20a%20match%20value%2C%20route%20the%20packet%20where%20to%20go%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113323%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113323%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EVC%20is%20not%20used%20in%20IPU%20side%2C%20it%20must%20be%20filled%20with%200.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%20Qiang%20Li%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20DI%20include%20vc%20and%20datatype.%20why%20the%20ipu%20driver%20ignore%20vc.%20like%20follow%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_0.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_0.png%22%20style%3D%22width%3A%20382px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F26389iBB9CB09FA5BE757A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_0.png%22%20alt%3D%22pastedImage_0.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113321%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113321%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2FQiang_FSL%22%20target%3D%22_blank%22%3EQiang_FSL%3C%2FA%3E%E2%80%8B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EThanks...%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EIt%20is%20very%20help%20us%20to%20know%20more%20detail.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113320%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113320%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIn%20default%20BSP%2C%20the%20v_channel%20from%20mipi_csi%20of%20the%20device%20tree%20is%20not%20used%20as%20real%20virtual%20channel%20setting%2C%20it%20must%20be%200.%3C%2FP%3E%3CP%3EAnd%20the%20csi_id%20from%20ov5640_mipi%20of%20the%20device%20tree%20is%20used%20as%20the%20real%20virtual%20channel%20setting%20in%20driver.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThey%20will%20make%20user%20confused%2C%20that's%20why%20I%20created%20these%20patches%20to%20make%20everything%20more%20reasonable.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113319%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113319%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20_jive_internal%3D%22true%22%20data-containerid%3D%22-1%22%20data-containertype%3D%22-1%22%20data-objectid%3D%2236648%22%20data-objecttype%3D%223%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2FQiang_FSL%22%20target%3D%22_blank%22%3EQiang%20Li%3C%2FA%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks....%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBut%20why%20our%20device%20tree%20is%20define%20(i.MX6Q)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26amp%3Bmipi_csi%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20status%20%3D%20%22okay%22%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ipu_id%20%3D%20%26lt%3B0%26gt%3B%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20csi_id%20%3D%20%26lt%3B1%26gt%3B%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20v_channel%20%3D%20%26lt%3B0%26gt%3B%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lanes%20%3D%20%26lt%3B2%26gt%3B%3B%3C%2FP%3E%3CP%3E%7D%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113318%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113318%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt%20is%20vc%3D1%20in%20default%20BSP%20for%20ov5640_mipi.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113317%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Sample%20code%20for%20iMX6%20SabreSD%20to%20use%20MIPI%20CSI%20camera%20with%20virtual%20channel%203%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113317%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2FQiang_FSL%22%20target%3D%22_blank%22%3EQiang_FSL%3C%2FA%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDo%20you%20know%20which%20virtual%20channel%20number%20using%20in%20OV5640_mipi.c%20base%20on%203.14.28%20BSP%20%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EApollo%20Chang.%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-09-2014 12:54 AM
Updated by: