imx8m-plus Onsemi AR1335 camera

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8m-plus Onsemi AR1335 camera

ソリューションへジャンプ
4,291件の閲覧回数
malik_cisse
Senior Contributor I

Hi,

Anyone developed a driver for Onsemi AR1335 image sensor for imx8m CPU?

I would appreciate if you could share some code.

Thx, MC

0 件の賞賛
返信
1 解決策
4,268件の閲覧回数
khang_letruong
Senior Contributor III
14 返答(返信)
1,371件の閲覧回数
matthijskooijman
Contributor I

FYI: Today I've tested with a bare AR1335 camera module (designed within the company I work for). I've extracted the ar1335 v4l sensor driver from the isp-vvcam package, as suggested here, and that worked right away on the Toradex Verdin IMX8MP Dahlia board with 5.15 NXP/Toradex kernel I am using.

Image output is not perfect yet, since I am using the ISI, not the ISP, so I cannot get proper RGB output (instead I get RAW-interpreted-as-RGB, so images are all blue and somehow missing some bit depth) and RAW output did not work (probably because of issues in the ISI or ar1335 driver), but some capture at least works.

 

In case it is useful for anyone, I've published my work here: https://github.com/3devo/FM23-kernel-modules/tree/ar1335 That's the ar1335 driver in isolation, intended to be compiled as out of tree module (for example using torizon-core-builder in my case). The commit message where it is added also has the devicetree snippet I am using with this.

0 件の賞賛
返信
1,807件の閲覧回数
richardnardy
Contributor I

AR1335 resolution is too high for i.MX8MP integrated ISP. This is the reason why all available modules have external ISP.

0 件の賞賛
返信
1,730件の閲覧回数
malik_cisse
Senior Contributor I

>>AR1335 resolution is too high for i.MX8MP integrated ISP. This is the reason why all available modules have external ISP.

This statement is unfortunately not true.
I could make the native AR1335 resolution (4096x3072) work on i.mx8mp at 26FPS without problems.
Strictly follow the instructions below and you can make it work too. I only had to slightly modify the stock driver.

0 件の賞賛
返信
1,384件の閲覧回数
matthijskooijman
Contributor I
I am not sure about the ISP (I've not used it since the driver for it was too much hassle with shell scripts writing to random registers), but I have used the ISI module (which does not support demosaicing, so I did that in software) in the imx8mp to get images from CSI module (from a imx708 that we've been using, but planning to also try with the ar1335 - just received our custom pcb with bare AR1335 today).

Anyway, the ISI supports up to 4096 pixels wide (any height) because of limited line buffers.

I'm a bit confused about the AR1335 resolution, though. @malik_cisse mentions 4096x3072, and the ar1335.c driver from isp_vvcam also uses this resolution (which would be perfect for the ISI), but the AR1335 datasheet says "sensor with a pixel array of 4208 (H) × 3120 (V) (4224 (H) × 3136 (V) including border pixels)." suggesting it has a couple of pixels more (and too much for the ISI - not sure about the ISP, I would expect it might support more pixels than the ISI, but the datasheet is pretty silent on about the ISP).
0 件の賞賛
返信
2,412件の閲覧回数
matthijskooijman
Contributor I

@malik_cisseI'm also looking at the AR1335 sensor for a product, ideally using the integrated IMX ISP to make the system simpler and cheaper. I've read your post at https://community.nxp.com/t5/i-MX-RT/AR1335-camera-sensor-driver/m-p/1668563/highlight/true#M25510 where you point to a v4l2 linux driver, which I expect will be very helpful.

However, I am also running into the problem that I can find only (eval) modules with an integrated ISP.  Did you ever find a module without the ISP? Or did you end up making your own board right away?

0 件の賞賛
返信
2,398件の閲覧回数
malik_cisse
Senior Contributor I

Hi matthijskooijman,

I send you private message too.

When typing "ar1335 sensor module csi-2" as google search you will wind CSI-2 modules without integrated ISP. For example:

https://www.e-consystems.com/13mp-onsemi-autofocus-mipi-camera-module.asp#

0 件の賞賛
返信
2,364件の閲覧回数
matthijskooijman
Contributor I
Heh, I'm not sure how we missed that e-con module, given that we're working with some other e-con modules right now. Thanks for the pointers. I'll also reply to your private message in a minute.
0 件の賞賛
返信
4,279件の閲覧回数
malik_cisse
Senior Contributor I

Thank you for the feedback.

There is no stock driver for Onsemi AR1335 image sensor and the vendor has no driver either.
I found what could potentially be used as a starting point but this is developed for an NVIDIA Tegra platform which is quite different from the i.MX8M-Plus environment:
https://github.com/bogsen/STLinux-Kernel/blob/master/drivers/media/platform/tegra/ar1335.c

0 件の賞賛
返信
4,269件の閲覧回数
khang_letruong
Senior Contributor III

Hi @malik_cisse ,

I guess this is what you are looking for (or maybe you already found it) : https://source.codeaurora.org/external/imx/isp-vvcam/tree/vvcam/v4l2/sensor/ar1335?h=lf-5.15.y_2.0.0

 

3,869件の閲覧回数
malik_cisse
Senior Contributor I

Hi Khang,

 

I would like to test this driver. Do you know which camera module + eval Kit I can use for this?

The Basler daA4200-30mci uses this sensor but this has inbuilt ISP and is not using imx8mp embedded ISP.

https://www.baslerweb.com/en/products/cameras/area-scan-cameras/dart/daa4200-30mci-s-mount/

Also other camera module vendors can be found but they all have onboard ISP:
Arducam, e-con, basler, etc.

Thank you

0 件の賞賛
返信
4,260件の閲覧回数
malik_cisse
Senior Contributor I

Hi Khang,

You are the man. I did actually not know this exists. I had spent 2 days searching already.

You can't imagine how happy I am this is already part of stock vvcam driver. It simple, days of development saved.

Thank you, MC

 

0 件の賞賛
返信
4,256件の閲覧回数
khang_letruong
Senior Contributor III

Hi @malik_cisse ,

You are welcome. Also, you can find some bonus here : https://community.nxp.com/t5/i-MX-RT/AR1335-camera-sensor-driver/m-p/1243666

 

4,251件の閲覧回数
malik_cisse
Senior Contributor I

Yes, thank you.
I have seen this before and I had already posted on that thread.

4,285件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello malik,

We have several cameras installed with yocto BSP if you can not find your camara ask to your vendor about the driver for the kernel you are using, if they can't provide you the camera driver you have to build yourself.

Regards

0 件の賞賛
返信