using the camera

  • Dear Support-Team,


    we have a 5MP CSI camera on the armstonea9r2 board.
    The #define CONFIG_ARMSTONEA9R2_SERIAL_CAMERA is enabled.


    The camara hardware is an OmniVision OV5647.
    I have enabled kernel drivers:
    Device Drivers/Multimedia support/Cameras video grabbers support
    Device Drivers/Multimedia support/V4L platform devices (all default settings)
    Device Drivers/Multimedia support/V4L platform devices/mxc mipi csi driver/Omnivision OV5647 camera support using mipi


    On the device I can see a /dev/video0 /dev/video16 and /dev/viedo17 device.


    When I try to capture an image:

    Code
    1. v4l2grab -o cam.jpg -d /dev/video0
    2. Cannot open '/dev/video0': 11, Resource temporarly unavailable.


    When using /dev/viedo16 or 17 I get: dev/video16 is no capture device


    Any idea ?
    Thanks.

  • We are currently checking this again. We hope we have a solution very soon, maybe even today.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Mr Schubert,


    we have checked the mipi camera on armstonea9r2 and we have found out that we have to change something in the device tree and in the kernel driver. Now the camera OV5640 works with our adapter on armstonea9r2. I can give you the device tree change for the armstonea9r2.


    We must change the OV5640 camera driver because it expected a reset-gpio for the camera. On our adapter the reset will be automatically generated so the driver doesn´t have to handle the reset. We changed the driver that it works without setting a reset gpio in device tree.
    The OV5647_mipi driver in the Kernel can handle both, if a reset pin is set the driver perform a reset if not it doesn´t.


    There is no reset pin on the mipi connector so you have to handle the camera reset on OV5647 by yourself. Either you have to braze a free gpio to the camera or you have to create a reset automatically.
    The problem of the OV5647_mipi driver in linux is that it is written for a CPU that doesnt have a IPU e.g. i.MX6SL, i.MX6SX, i.MX7 etc. So if you want to use the OV5647 camera you have to port the driver that it works with CPUs which using IPUs. Thats why the folder are devided to capture (driver which using IPU) and subdev (driver which using no IPU).


    Source: difference capture camera driver and subdev camera drivers
    https://community.nxp.com/thread/391228


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Support-Team,


    thanks for your answer. That was much information. I need a little summary to look through.


    Is it possible to use the OV5647 with your changes on kernel and device tree?
    If not, is it better to use an OV5640 based camera with your changes on kernel and device tree?
    Please send me the changes that have to be made.


    Thanks again.


    Have a nice weekend.

  • Dear Mr. Schubert,


    Is it possible to use the OV5647 with your changes on kernel and device tree?


    You can test it with the changes of our device tree but it shouldn´t work because you have to modify the kernel driver. The kernel driver of the OV5647 is made for CPUs which haven´t a IPU thats why you have to modify the OV5647 driver.


    If not, is it better to use an OV5640 based camera with your changes on kernel and device tree?


    The easiest solution is to ordner the OV5640 camera modul from our Homepage, because we have tested and verified this module and know everything works fine.
    https://www.fs-net.de/de/produkte/zubehoer/mipi-kamera-kit/


    You can purchase the OV5640 camera by your own but you have to ensure that the camera will be correctly reseted.


    Your F&S Support Team

    Files

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited once, last by fs-support_PJ ().