• Content Count

  • Joined

  • Last visited

About rreignier

  • Rank

Recent Profile Visitors

812 profile views
  1. Hi @srinath Your Python script works for me. The numpy transformation seems useless but does not prevent to write the image on my side. But with your script, I only get black pictures. Adding the property settings and the loop (the first images are always black, I don't know why) I have managed to get good images: import cv2 capture = cv2.VideoCapture(1, cv2.CAP_V4L2) capture.set(cv2.CAP_PROP_FRAME_WIDTH, 1280.0) capture.set(cv2.CAP_PROP_FRAME_HEIGHT, 720.0) capture.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('Y', 'U', '1', '2')) for i in range(10): retu
  2. I do not have the board with me right now, I will try later. But yesterday, after a system update to Linux 5.10, the camera switched to /dev/video1 and I had to use this fork of fswebcam with these commands: $ media-ctl --device /dev/media1 --set-v4l2 '"ov5640 1-003c":0[fmt:YUYV8_2X8/1280x720]' $ ./fswebcam --displayfps 1 -S 30 -d /dev/video0 -r 1280x720 -p YUV420P - > /tmp/cam_1280x720_yuv420p.jpg And for reference, to use it with OpenCV I had to specify the size and format: #include <iostream> #include <opencv2/opencv.hpp> int main(int, char**) {
  3. Hi @rdeyes On an Orange Pi One (which might be close to your Orange Pi PC), I have managed to get the OV5640 thanks to the amazing work of the contributors of this thread. Last time I have tried was on Armbian 20.08.17 with Linux 5.8.16. The device tree overlay I use is this one (you may have to change some pins) : /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; }; &ccu { assigned-clocks = <&ccu 107>; assigned-clock-parents = <&osc24M>; assigned-clock-rates = <24000000>; }; &
  4. Hi @gsumner No, I did not have time to try it out on my board yet But I am very glad that you have managed to get this camera working on mainline and shared your progress. I am following with great attention! Thanks! Did you have a look at the blog post about PinePhone camera which happen to be an OV5640 too? https://blog.brixit.nl/camera-on-the-pinephone/
  5. Wow! That's very nice! Thanks a lot for the help. I did not have the time to try it yet. But for sure, a dts overlay should be pushed to armbian!
  6. Yes, I have been trying on an Orange Pi One. I also have Orange Pi PC Plus and Orange Pi Lite2 (H6) on which I could also try. But since I have received the ov5640 board, I did not try the driver, only the i2cdetect.
  7. Interesting, indeed. But avafinger does not appear to be a contributor of the mainline driver : here. I think he has worked the old one, for kernel 3.4. Interestingly, the PineTab device tree uses an ov5640 here. On a A64 that uses the same sun6i_csi driver that the H3. So I am sure there is still hope. What device tree are you using? Are you using the device tree overlay I have posted above?
  8. Thnak you @jgauthier very interesting report. I did not take the time yet to test a 3.4 kernel to make sure my module is actually working or not.
  9. Before talking to /dev/video0, I would like to see some activity on the i2c side, so just with i2cdetect. But it did not work for me. If you have another camera module, maybe you could try.
  10. Actually. I cannot see the device on the i2c bus, so I don't think that the driver is to blame here. Or maybe i2c driver, but I don't think so. Which kernel are you using to make use of the OV5640 so I could check that my camera works?
  11. @olivluca Sorry, but I don't feel like writing a full kernel driver After some discussions with the vendor and some delivery delays because of the COVID-19, I have now received the OV5640 camera sensor board! But with the overlay previously posted, there is not anything better I have then crafted this simple overlay to enable the `i2c2` with pull-up: /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&pio>; __overlay__ { i2c2_pins: i2c2-pins { pins = "PE12", "PE13";
  12. Actually, I have just discovered that the camera module I have received is a GC2035 and not a OV5640 as ordered. So I won't be able to continue my investigations.
  13. By replacing `CLK_CSI_MCLK`, `GPIO_ACTIVE_LOW` and `GPIO_ACTIVE_HIGH` constants by respectively `107`, `1` and `0` the device-tree overlay can be compiled. But during the boot, I got: [ 10.837084] i2c i2c-1: mv64xxx: I2C bus locked, block: 1, time_left: 0 [ 10.843681] ov5640 1-003c: ov5640_read_reg: error: reg=300a [ 10.849315] ov5640 1-003c: ov5640_check_chip_id: failed to read chip identifier So I have disabled my overlay and load the sun8i-h3-i2c2 overlay instead. With the command: i2cdetect -y 1 I got a lot of these errors in the serial console: [
  14. Ok, I see. Thank you @martinayotte From sun8i-h3-ccu.h I see: #define CLK_CSI_MCLK 107 So what syntax should I use to set it to 107? clocks = <&ccu 107>; or clocks = <107>; or clocks = "107"; Thank you