[libcamera-devel] How to detect camera after power on the raspberryPi.

tetsuya.nomura at soho-enterprise.com tetsuya.nomura at soho-enterprise.com
Mon Oct 19 14:47:52 CEST 2020


Dear Dave-san

I really appreciate your kind advice.

I understand the point you explained.
You mean remove "dtoverlay=IMX219" in the config.txt and after boot create "/dev/video0" by command
"sudo dtoverlay imx219".

And maybe I need to take care of GPIO for regulators for image sensor.
But I think the DC power for image sensor is independently supplied via FPD LINK Transceiver.
Maybe no need to configure the GPIOs.

Let me check the below URL and try to solve the issue.

Best Regards,

NOMURA

#2020.7.1本社移転いたしました。
==== = = = = = = = = = = = = = = = = = = = =
双峰エンタープライズ株式会社 野村 哲哉
〒243-0014 神奈川県厚木市旭町四丁目11番26号
ジェントビル2F
URL: https://soho-enterprise.com
Email: tetsuya.nomura at soho-enterprise.com
Phone: 090-1839-1135
= = ==== = = = = = = = = = = = = = = = = = =

-----Original Message-----
From: Dave Stevenson <dave.stevenson at raspberrypi.com> 
Sent: Monday, October 19, 2020 7:11 PM
To: tetsuya.nomura at soho-enterprise.com
Cc: David Plowman <david.plowman at raspberrypi.com>; Naushir Patuck <naush at raspberrypi.com>; libcamera-devel at lists.libcamera.org
Subject: Re: [libcamera-devel] How to detect camera after power on the raspberryPi.

Hi Nomura

On Mon, 19 Oct 2020 at 10:38, <tetsuya.nomura at soho-enterprise.com> wrote:
>
> Dear Sirs.
>
> May I have your favor about initialization of the RaspberryPi and the camera?
>
> I'm now evaluating the camera extension board of FPD LINK III technology to extend the camera cable for 2~3m from the RaspberryPi.
> https://soho-enterprise.com/2020/10/11/post-866/
>
> This board can pass the I2C communication to IMX219 after configuring 
> the transceiver chip, However, after configuration and run the qcam, 
> it seems the qcam program does not detect the IMX219 And I cannot start the camera even I designate the image sensor name.

The Pi kernel driver for imx219 probes the sensor driver as the module loads, which is only a few seconds into boot if you've added "dtoverlay=imx219" into config.txt. No or incorrect response from the sensor and it won't create the /dev/video0 device nodes. If your transceivers need some form of configuration then I suspect this has not happened by this point.

The correct approach is probably to have a driver for your transceiver in the kernel driver chain, ie imx219 -> transceiver -> Unicam, however that opens a big can of worms over configuration as it forces the use of the Media Controller API to configure each link independently.

One workaround would be to remove "dtoverlay=imx219" from config.txt and use dynamic device tree overlay loading to load the relevant modules later in boot. "sudo dtoverlay imx219" should do that for you.
The niggle is that when done from config.txt the firmware fixes up the camera shutdown GPIO to match the platform (it moves GPIOs between different variants of the Pi). If loading dynamically then this can't happen, and you'll need to fix up the regulator shutdown line manually [1] (assuming that it is actually controllable at the other end of the FPD Link)

  Dave

[1] (https://github.com/raspberrypi/linux/blob/rpi-5.4.y/arch/arm/boot/dts/overlays/imx219-overlay.dts#L77)

> I can start the IMX219, get the RAW image by our own program and see the image.
> Then if qcam can send the necessary command to IMX219 when start 
> running the qcam, I think I can see the image through qcam program.
>
> It would be great if you could give us an advice to solve it.
> I appreciate your kind help in advance.
>
> Best Regards,
>
> NOMURA
>
> ================================
>   Tetsuya NOMURA
> ================================
>  Soho Enterprise Ltd.
>  4-11-26 Gent BLDG 2F, Asahi-cho, Atsugi-shi,  Kanagawa, Japan  
> 243-0014
>  URL: https://soho-enterprise.com
>  Mail: tetsuya.nomura at soho-enterprise.com
>  Phone: +81-90-1839-1135
> ================================
>
>
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel



More information about the libcamera-devel mailing list