MX53 Multiple CSI Support in Linux?

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

MX53 Multiple CSI Support in Linux?

2,231 Views
CraigPetku
Contributor III
Just ran across this comment from FSL in mxc_v4l2_capture.c (init_camera_structure) cam->csi = 0; /* Need to determine how to set this correctly with * multiple video input devices. */ It's causing me trouble since it implies FSL only supports v4l on CSI0 in the 10.2 Android release. Looks like Sabre & EVK may also confirm this since. Comments?
13 Replies

1,511 Views
paulhottell
Contributor I

Hello,

Has anyone had any luck finding a patch for multiple CSI support? I am currently trying to get this functionality working myself. I've seen several threads talking about it, but haven't seen any patches posted.

Any assistance would be greatly appreciated!

Regards,

Paul

0 Kudos

1,511 Views
MarekVasut
Senior Contributor I

The attached hack might give you an idea ...

0 Kudos

1,511 Views
paulhottell
Contributor I

Thanks!

0 Kudos

1,511 Views
cyrilcrocquesel
Contributor II

Hi,

Is there any news about multi CSI support ?

I'm working on this problem. But if since there some patch to allow multi CSI I will be pleased.

Cordially

Cyril

0 Kudos

1,511 Views
RobbieJiang
Contributor IV

One of my colleagues has the same problem.

Actually, I'm a little disappointed by FreeScale because such a big problem/bug is not fixed even in the latest BSP release.  And even there is no any explicit declaration about it. 

Has anybody fixed the problem of supporting two cameras simultaneously?

0 Kudos

1,511 Views
zhaozhao
Contributor III

Anyone solved this ?

Where can I got help on this ? i need mutiple CSI support in linux on MX51.

Thanks in advance

0 Kudos

1,511 Views
MarekVasut
Senior Contributor I

Maybe, check ENGcm08316 as it is imperative to get both CSI working. I will try to release patches eventually.

0 Kudos

1,511 Views
zhaozhao
Contributor III

Thank you !

Could you tell me what i should do if I want to use the CSI2 on MX51 ?

I cannot make the CSI2 work normal , the set of  CSI2 is almost the same  as CSI1 now

0 Kudos

1,511 Views
joanxie
NXP TechSupport
NXP TechSupport

Our BSP and demo codes only sets by-pass settings for CSI1 for some reason, here is what we usually have:

- reg32setbit(MIPI_HSC_BASE_ADDR+0x800,16);

- reg32setbit(MIPI_HSC_BASE_ADDR+HSC_MCD_OFFSET,10);

Now we need the following register settings to by-pass both CSI1 and CSI2

reg32_write(MIPI_HSC_BASE_ADDR+HSC_MCD_OFFSET,   0x00000F00);            //  @ECA

reg32_write(MIPI_HSC_BASE_ADDR+MCG_MCCMC_OFFSET, 0x0000000C);            //  @ECA

reg32_write(MIPI_HSC_BASE_ADDR+MXT_CONF_OFFSET,  0xF003008B);            //  @ECA

0 Kudos

1,511 Views
HenriBragge
Contributor I

Any updates about getting two cameras working at the same time? Is it possible?

0 Kudos

1,511 Views
YiayitKarabulut
Contributor I

Hi Craig, I am really interest in CSI1, Could you post your patch please?

0 Kudos

1,511 Views
PlartiNuhtl
Contributor I

@Craig:

 

Can you post your patch?

0 Kudos

1,511 Views
CraigPetku
Contributor III

So a solution for automatically switching between CSI ports in a system with two cameras is really quite simple.  In the case of the ADV7180, add an int csi;  in the platform definition then store the .csi parameter into a static var during the probe function of the sensor driver.  Modify your second camera (e.g., ov3640) to store the csi parameter in the field already in it's ov3640_data structure.

Next add and ioctl_g_ext_ctrl function to both sensors and define it in the appropriate .h files (e.g., ./include/media/v4l2-int-device.h)

Modify the kconfig file in the .drivers/media/video/mxc/capture directory to allow selecting two sensors both as modules, Update the platform data for each and place a call to the g_ext_ctrl function in mxc_v4l_open to get the csi number.  Update all of the places in the FSL code where the nasty hard coded parameters are and when your done the mxc_capture file will work the way it should have out of the factory (allow selecting the CSI number for each sensor in the platform data in the ./arch/arm/mach-mx5/mx53-XXX.c file.

Now if only I could get multiple cameras working at  the same time, The first challenge is to get rid of the hard coding of  dma channels and interrupts in csi-enc.c as well as some other oversights.

0 Kudos