Jump to content

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


Rhythm

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

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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. 

 

 

 

 

 

Link to comment
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   

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

How can I check that my board has this patch applied? I installed a fresh image of bionic on my NeoAir a week ago and am also having the same issue with the camera module. It is not being recognised as a video device

On 10/16/2018 at 1:49 AM, @lex said:

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. 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Okay,

I got /dev/video0 on my board with all v4l2 modules loaded properly.

But am unable to set frame parameters, 

v4l2-ctl -d /dev/video0 --set-fmt-video=width=640,height=480

v4l2-ctl -d /dev/video0 --set-fmt-video=width=640,height=480

gives following error:

VIDIOC_S_FMT: failed: Invalid argument

The output of following command

v4l2-ctl -d /dev/video0 --list-formats-ext

is

ioctl: VIDIOC_ENUM_FMT

 

Please suggest how to set video output formats.

 

Link to comment
Share on other sites

Has anyone else faced the same issue, in dmesg log,  get following messages

[    7.198172] i2c i2c-2: mv64xxx: I2C bus locked, block: 1, time_left: 0
[    7.207253] ov5640 2-003c: ov5640_read_reg: error: reg=300a
[    7.217910] ov5640 2-003c: ov5640_check_chip_id: failed to read chip identifier
[    7.225490] ov5640: probe of 2-003c failed with error -110

I don't know how to work around this.

I checked into the code, `i2c_transfer()` method is returning timed out response. I don't know how to proceed with this.

Please suggest.

Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines