0
Rhythm

OV5640 camera sensor with libretech tritium all-h3-cc board

Recommended Posts

Hi,

I have libretech all-h3-cc h2+ DIY board booting with armbian image from https://www.armbian.com/tritium-h3/.

I have updated overlays in armbianEnv.txt file to add i2c2 overlay which enable CSI in kernel. But even after I connect the camera sensor module, I can't find any `/dev/video0` and morever there is not any log in dmesg as well. 

Please suggest how can I add get the camera work with the board.

I referred to https://forum.armbian.com/topic/7502-ov5640-on-mainline-kernel/ but as according to that, `/dev/video0` should come up automatically. I don't know what I'm missing.

 

Please help

Thanks

Share this post


Link to post
Share on other sites
overlay_prefix=sun8i-h3
overlays=usbhost1 usbhost2 i2c2

so i2c2 overlay looks to be there, however I don't know if the camera driver is in the 32-bit allwinner distros.  You may need to add it, the K1+ example is for the 64-bit kernel.

Share this post


Link to post
Share on other sites
1 hour ago, TonyMac32 said:

overlay_prefix=sun8i-h3
overlays=usbhost1 usbhost2 i2c2

so i2c2 overlay looks to be there, however I don't know if the camera driver is in the 32-bit allwinner distros.  You may need to add it, the K1+ example is for the 64-bit kernel.

okay, and how do I add that? And I'm sorry, but I didn't quiet understand the k1+ example part. Can you please explain?

 

Also I check `uname -a`, kernel architecture is `armv7l` i.e. 32 bit. How do I change camera driver for the same?

Moreover, I can't even load `ov5640` or `sun6i-csi` modules with `modprobe`. The error is

 

modprobe: FATAL: Module ov5640 not found in directory /lib/modules/4.14.15-sunxi
modprobe: FATAL: Module sun6i-csi not found in directory /lib/modules/4.14.15-sunxi

Thanks

Share this post


Link to post
Share on other sites

you claimed:

 

On 10/13/2018 at 3:31 PM, Rhythm said:

 

Which is a thread about the nanopi K1+.  It is an Alwinner H5, a 64-bit SoC, whereas the H2+ and H3 are 32-bit.  Now, Allwinner is arranged somewhat uniquely, so perhaps the driver is there.  I'm not an expert in that part, perhaps @@lex can speak to it if willing.

Share this post


Link to post
Share on other sites

I have tested the OV5640 driver on K1+ (H5) only.

According to  @Igor comment, OV5640 is enabled on NeoAir (H3). Please see the patch:

https://github.com/armbian/build/commit/10e206519089b8ff81b0dd6a6f3caa6c1adba04d

 

- # Linux/arm 4.17.0-rc3 Kernel Configuration

+ # Linux/arm 4.17.2 Kernel Configuration

 

I think you should apply this patch to your board and see if it works. 

 

 

 

 

 

Share this post


Link to post
Share on other sites

I compared the kernel config in patch with my .config, the patched modules are already enabled. 

Also the dts patch is specific to nanopi-h3 board only. So, I don't think dts files will be updated for my board. Or shall I make same changes in my board's dts too?

Thanks   

Share this post


Link to post
Share on other sites

@@lex

I also tried building kernel from source, I managed to get kernel modules like sun6i-csi, ov5640 and other v4l2 modules. And I'm able to load them successfully without any error.

But still there's still no '/dev/video0', although there's no error in dmesg as well. Following is the `lsmod` output after loading modules.

image.png.b4f0c61d6f09cf5bbc3ab8fde05abab0.png

 

I compared it with output provided in https://forum.armbian.com/topic/7502-ov5640-on-mainline-kernel/, all the modules are available. 

So, now the only problem should be with dts/ dtsi files, if I'm not doing anything wrong?

 

And just to point out,  my board has parallel camera interface not serial, If it helps anyway.

 

Please suggest.

Share this post


Link to post
Share on other sites

Quoted from the CSI driver author: "Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2

interface and CSI1 is used for parallel interface. This is not

documented in datasheet but by test and guess."

 

I don't have this board, but from product page;

* DVP Parallel Camera Interface

 

I think if DVP is attached to CSI1 there is a good chance it can work. I may be wrong.

Please, check "dmesg | grep -i ov" and " dmesg  | grep 5640 " and " dmesg  | grep -i csi " for errors.

 

Hope it helps.

Share this post


Link to post
Share on other sites
16 hours ago, @lex said:

Quoted from the CSI driver author: "Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2

interface and CSI1 is used for parallel interface. This is not

documented in datasheet but by test and guess."

Actually, I don't know how to exactly do this. Sorry, if this is a dumb one, but can you tell what needs to be done, or some reference from where I can continue.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0