How to initialize camera driver at u-boot in iMX8MM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to initialize camera driver at u-boot in iMX8MM

1,013 Views
shivam_awasthi
Contributor II

Hello...

I want to initialize camera driver in the u-boot device tree, is there any information related to this that how can I achieve  this target.

I'm using i.MX8MM V2 board.

0 Kudos
Reply
3 Replies

990 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @shivam_awasthi,

I hope you are doing well.

->Please decide the camera interface which is used by the camera, define a node for it, and set the required properties for it.
->Build a dtb file of that dts & then load it into u-boot.

->Please refer to this Omnivision OV2685 MIPI CSI-2 sensor(Camera Sensor).
Example:
&i2c7 {
     ov2685: camera-sensor@3c {
         compatible = "ovti,ov2685";
         reg = <0x3c>;
         pinctrl-names = "default";
         pinctrl-0 = <&clk_24m_cam>;
 
         clocks = <&cru SCLK_TESTCLKOUT1>;
         clock-names = "xvclk";
 
         avdd-supply = <&pp2800_cam>;
         dovdd-supply = <&pp1800>;
         dvdd-supply = <&pp1800>;
         reset-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;         
     port {
             ucam_out: endpoint {
             remote-endpoint = <&mipi_in_ucam>;
             data-lanes = <1>;
            };
       };
   };
};
 
->One can take a reference of it to create a node of a camera on the desired interface.
Please refer to the below file for more details.
Documentation/devicetree/bindings/media/i2c/ov2685.txt

Thanks & Regards,
Dhruvit Vasavada
0 Kudos
Reply

964 Views
shivam_awasthi
Contributor II
@Dhruvit

I have tried but I want to start camera at U-Boot and display it on the screen using MIPI lanes and frame buffer so we can run the camera within 2-3 sec. is there any solution or guide availabe related to it.
0 Kudos
Reply

934 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @shivam_awasthi,

I hope you are doing well.

->For i.MX 8MM EVK has just one Device Tree file available that affects the behavior of the camera connected to the MIPI-CSI connector.
fsl-imx8mm-evk.dtb

This camera will be allocated on /dev/video0. In order to test it, use the fsl-imx8mm-evk.dtb in combination with the pipelines below:
gst-launch1.0 v4l2src device=/dev/video0 ! autovideosink

Please refer to section 4.1. i.MX 8MM EVK Device Tree is available for more details.
https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors%40tkb/3405/1/camera_use_c...

Please refer to section 6.3.1.4 Menu Configuration Options and section 6.1.2 Omnivision Camera to make sure the menuconfig options are set or not.
https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf

Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply