MIPI CSI support in the Linux release

Hi all,

As per release notes of linux release of 15.07, MIPI CSI is not supported.

can we expect MIPI CSI support in the new Linux release???

thanks.

hi,

it won’t happen in the next few releases, at least. we are starting to look into that, but all the drivers need to be done, so this is going to take some time.

What are you requirements, do you already know which sensor/camera you would need to use?

Hi:
The following is the image sensor type:
AR0331
mt9p031
mt9j003
ov2715

Thank you

Just to pitch in, we also need CSI support, with OV5647 image sensors. Additionally, we will need to connect up to 3 cameras, so I am really hoping the drivers will be flexible enough to permit multiplexing of both CSI connections and I2C control lines.

BTW, supporting OV5647 would be great for many reasons, also because there are plenty of raspberry pi cameras available, which use that sensor.

hi,

there are 2 main parts for camera support:

  1. CSI and v4l2 drivers / infrastructure
  2. ISP for image processing

we (linaro) is looking at #1 only. with the goal to enable CSI ‘smart/YUV’ sensors.

OV5647 is a raw bayer sensor that would need #2 to post process the RAW images. Unfortunately, #2 will require proprietary component which we do not have access to.

Hi ndec,

You said that you are looking at #1. Does that mean you have access to the MIPI-CSI2 configuration registers? I went through the HRD document for the snapdragon 410c soc. But it was lacking the required registers.

Could you share them with us? This being a community board, will help the entire community greatly.

As you said, The ISP is proprietary and might require NDA with Qualcomm. Do you have any idea on how to gain access to the ISP as well? Any insight will be helpful.

hi,

we have access to a few more documents than what is publicly available… and of course cannot share more than what is public.

I believe the CSI drivers are in the msm 3.10 kernel tree already (which is public), e.g. the Android kernel. You should be able to get the best documentation there (e.g. the source code :wink:

For ISP, you need to get in touch with QCOM business/OEM i believe, and probably need a business case for it…

Thanks for the clue. I’ll have a look into it. I did check the kernel branch for the linux release. If support is already present in the android kernel, porting it to the linux release should be easy.

I am using your kernel git.

git: working/qualcomm/kernel.git - Qualcomm Landing Team kernel

Which tag should I use to obtain the android kernel source ? Or is it an entirely different git repo? There is no mention of android kernel source code in the android release notes either.

the android kernel is not in the git tree, but in the QCOM git (on codeaurora.org).

https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/

commit id of the latest android release: 281185b642ac42be4ff82aa9cceea91c093ac0bc

HI,
OV5610
OV13850
IMX 2XX

OV5647 is a very popular camera, which can be bought in ready-to-use inexpensive modules (with 15-pin connectors), because it was used as the Raspberry PI camera.

Support for OV5647 would allow people to immediately start using all those $15-$18 “RPI cameras” from AliExpress and EBay.

Might I also suggest: some of us work on stereo vision, where it is very important to acquire two CSI streams simultaneously with as little time difference between them as possible. Please take this into account if working on kernel support. And some of us (ahem) will be connecting three cameras, using external multiplexers to switch between cameras on the same CSI data bus.

mipi csi is a bit of a mess. Have any of you considered using USB instead? I realize that the SD410 only has one native USB-HS port, which can be very limiting, but easier than the enormous undertaking of building the software side of CSI along with a CSI board, you could use a MAX3421E to add an additional USB-HS port via SPI. In fact, the DB410C implements TWO SPI ports, which means that it can be extended to a total of THREE USB-HS host ports.

FWIW, I’ve been bashing away in Android with an RPI Camera (OV5647) hooked up to a Dragonboard. The camera is connected on the CSI#0 interface and the i2c lines are hooked up to i2c2 (the dedicated CCI i2c, not one of the BAM-based i2c ports). The RPI Camera module includes its own clock so only an enable line is needed which I’ve just mashed high for now.

I hacked in a few changes to the existing OV5645 setup (abridged below) and the device is at least recognized over i2c now:

+++ b/arch/arm/boot/dts/qcom/apq8016-camera-sensor-sbc.dtsi ... + qcom,camera@6c { compatible = "ovti,ov5645"; ... + reg = <0x6c 0x0>; + qcom,slave-id = <0x6c 0x300a 0x5647>; + qcom,csiphy-sd-index = <0>; + qcom,csid-sd-index = <0>;

I’m working through some register changes to drivers/media/platform/msm/camera_v2/sensor/ov5645.c based on a known working setup I have with a Gumstix DuoVero but don’t yet have any output from the sensor yet.

RE:Raw Bayer output from this sensor. I noticed a ‘qcom,sensor-type’ binding from the msm-cci.txt that suggests some hardware support for raw Bayer. From the kernel source though, it looks like this binding isn’t read by the kernel so this is probably moot. (Any chance this binding could be read by the secret, you-need-an-NDA video processing hardware? Yes, seems far-fetched but RaspberryPi actually does things like this).

You are talking about Android but this thread is Linux related (it is a complete different story when it comes to the media driver).

The Android kernel does integrate the v4l2 kernel changes to support HAL3 . However this AOSP doesn’t seem to execute the mm-qcamera-daemon (the proprietary code that sets up the video pipelines required to get sensor input).

Until that runs, you have no chances of getting processed output from the sensor: mm-qcamera-daemon is required to setup the sensor, CSIPHY, CSID, CCI, ISP etc.

This RFC a fair description of the multimedia driver in case you are curious (I recommend you follow the discussion, I found it to be interesting)

https://www.mail-archive.com/linux-media@vger.kernel.org/msg26091.html

The android HAL talks to the daemon via unix sockets and via v4l2 requests that are routed back to the daemon: basically no daemon means no hardware setup happening (even if you manage to do the basic i2c sensor initialization you wont get the pipeline running)

Thanks for the pointers (RFC was rather interesting reading) and apologies for accidentally hijacking a Linux thread to Android. Looks like I should be digging into understanding why qcamerasvr is marked as ‘disabled’ in the init.rc.

Is there any ISP document for porting MIPI-CSI bayer sensor?

There is a new document about

connecting 5MP MIPI-CSI camera

to the Dragonboard. It is listed in the

documentation
https://github.com/96boards/documentation/tree/master/ConsumerEdition/DragonBoard-410c/VendorDocs

Not sure if the software side (drivers etc.) is ready too though.

Hi,

Can anyone please share the details how to configure/interface ov13850 image sensor to snapdragon board 410c. i’m tried applying patch file which is given in codeaurora but couldnt find any change. please help us to proceed.

thanks in advance