-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ov5640 Camera Support #17
Comments
Does the Ubuntu Version with the Kernel version 5.3.11 include driver for the ov5640 camera ? |
Sorry for the long delay to answer but i was expecting to find a way to use the sensor. |
Is there any camera for the csi working with the BPI Zero and a Linux Kernel > 5.3 ? |
Any new infos ? Is there any camera for the csi working with the BPI Zero and Linux Kernel > 5.3 ? |
Sorry. only kernel 3.4.y at the moment. Not ready for the mainline. |
Here is the correct DTB with support for OV5640 in Kernel 5.6.13-server. This was made possible with a hint from Armbian forum. The current ov5640 driver for the mainline kernel 5.x can work with frame 640x480, with some effort it can be changed. Tested with
In case someone would like to try it, here is the DTB with support for OV5640. (Kernel 5.6.13-server) |
@shmuelzon did you solve the issue? I have been having similar trouble. your solution might be handy for me |
Sadly, I never got around to try @avafinger's new DTB but it looks promising |
I will try to build the latest kernel with ov5640 support this weekend. |
@avafinger thank you |
You can test this: https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal/releases/tag/v3.9 @software3daerospace Decompile the dtb, find the ov5640 node and see what you can transplant to your board. |
@avafinger I have node for the camera. The Mipi is not initializing properly and due to which the camera is not able to switch on /include/ "system-conf.dtsi" /{ /{
}; &v_tc_0 { &usb0 { &sdhci0 { &uart1 { &qspi { &flash0 { &mipi_csi2_rx_subsyst_0 {
}; / {
chosen { &i2c0 { &v_frmbuf_wr_0 { &csiss_in { &csiss_port0 { &csiss_port1 { &amba_pl {
}; |
Hey @avafinger, I'm trying out release v3.9 but I can't get it to work. It seems to communicate with the ov5640 fine:
And I don't get an error when setting it to JPEG with
But running mjpg_streamer doesn't work:
I also tried 640x480 in case what you previously wrote was still valid but no luck. Thanks! |
The fix is here: #56 (comment) |
The sensor in bpi-m2z is a DVP and not Mipi, I don't know if you need anything else. In order to talk to the sensor, I2C bit-bang must be enabled in your kernel. Try to format the DTS you posted, mark the start of the DTS and the end the DTS and click ctrl+e. |
@avafinger yes, I have been looking for all the posts from forum. I just figured out that I2C switch of the camera is not setting right |
Nice, thanks! BTW, I did have one issue with the new where the I do get a rather low frame-rate by default, I'll try to play around with it. Other than that, things are looking pretty good and I don't feel it running too hot yet, I'll let it work through the night and see if it's stable. |
This is to set the sensor to deliver JPEG (compressed images), this releases the CPU to compress YUV to JPEG.
Ouch, indeed, it should be ports.ubuntu.com/ubuntu-ports everywhere in the file, will try to fix it.. Thanks. |
That part I understand, but I was under the impression that when specifying the pixel format in V4L, as with the change you suggested from mjpg_streamer, it would be enough.
Except |
BTW - It seems the mjpg_streamer is taking 80-90% CPU, I though it would be much lower if it doesn't need to encode the image. |
|
This is not implemented yet in the mainline kernel, you need to tell the sensor what should be delivered. |
I don't think that's it. I tried sending a 50MB file via Maybe the camera isn't truly providing JPEGs or, for some reason, Thanks again for all you help with getting this working! |
I will investigate this issue, it may take some time... No timeline, maybe next weekend.. :) |
So, grabbing the frame from the sensor is taking CPU. Original mjpg_streamer is never idle, always grabbing frames, even without clients connected. It would be interesting to have a look at the mjpg_streamer source code you use in Raspberry Pi Zero, can you provide the sources? I think there is no memory content transfer when grabbing frames, so not much CPU, let's see the code. |
I am not sure the driver has support for the DMA buffer... |
@avafinger I think it ssuports DMA buffer. |
I'm running |
Hey,
First of all, thanks for publishing this. It's really very helpful!
I was wondering if there was any chance in getting the ov5640 camera to work with your image.
I saw that kernel v4.20.0 includes the relevant driver and I can hear the camera click when the driver is loaded, so something works, but I don't have a
/dev/video0
entry available. In addition, I can see the following log messages during boot:I saw a few entries in the DTB regarding the camera and relevant i2c definitions but still something is off.
If it helps, the BSP's kernel has this configuration.
Do you have any ideas or leads I can pursue to get the camera to work?
Thanks in advance!
The text was updated successfully, but these errors were encountered: