How to Make ov5640 Camera work in imx8MP Board

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

How to Make ov5640 Camera work in imx8MP Board

Jump to solution
924 Views
riteshkrmehta
Contributor III

I have one custom board which have an imx8MP chipset. and there is 2 camera that used 2 lanes mipi CSI 0 and 1. I can see too many ov5640 drivers in mxc/capture directories. Can anyone help me to figure out which driver and corresponding dts details for ov5640 camera I can use which is tested for the imx8mp-based Board?

Kernel version:- origin/lf-5.15.y

Thanks in advance.

IMX8MPLUS #OV5640

0 Kudos
1 Solution
804 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @riteshkrmehta 

I hope you are doing well.
 
My apology for the delayed response.
One can use the proper driver as mentioned in chapter 6.1.2 Omnivision Camera IMX_REFERENCE_MANUAL.pdf
Kindly try to unplug and plug the camera and check if are you able to reproduce this error every time.
Please share the device tree you have used in this case. 
 
For more information, one can refer to the documents below.
Chapter 6 Video from the i.MX Linux Reference Manual.
Section 4 Changing DTB Files on Linux from Appnote: AN13284 i.MX 8M Plus EVK Video Accessory Guide 
 
Thanks & Regards
Sanket Parekh

View solution in original post

0 Kudos
6 Replies
799 Views
riteshkrmehta
Contributor III

@Sanket_Parekh 

Thanks for the help I am able to solve this problem.

I will check docs for which driver I need to use.

Thanks.

Ritesh

0 Kudos
842 Views
riteshkrmehta
Contributor III

Hi @Sanket_Parekh,

I am using /driver/media/i2c/ov5640.c driver as I can see in the example of ov5640 in imx8mp-evk.dts.
But I am getting this error what could be a possible reason for this type of error?

[ 1.735610] ov5640 3-003e: supply DOVDD not found, using dummy regulator
[ 1.742416] ov5640 3-003e: supply AVDD not found, using dummy regulator
[ 1.749081] ov5640 3-003e: supply DVDD not found, using dummy regulator
[ 1.804556] ov5640 3-003e: ov5640_init_slave_id: failed with -11
[ 1.810799] ov5640: probe of 3-003e failed with error -11

I checked in the I2c driver. the error looks like -EAGAIN.

Please let me know if you have any ideas about this.

Thanks,

Ritesh Kumar

0 Kudos
805 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @riteshkrmehta 

I hope you are doing well.
 
My apology for the delayed response.
One can use the proper driver as mentioned in chapter 6.1.2 Omnivision Camera IMX_REFERENCE_MANUAL.pdf
Kindly try to unplug and plug the camera and check if are you able to reproduce this error every time.
Please share the device tree you have used in this case. 
 
For more information, one can refer to the documents below.
Chapter 6 Video from the i.MX Linux Reference Manual.
Section 4 Changing DTB Files on Linux from Appnote: AN13284 i.MX 8M Plus EVK Video Accessory Guide 
 
Thanks & Regards
Sanket Parekh

0 Kudos
858 Views
riteshkrmehta
Contributor III

Hi @Sanket_Parekh 

Thanks for your quick help.

I understand about the DTS file to get details for the ov5640 camera sensor bring up. But I have seen it in imx8mp-evk-os08a20-ov5640.dts that the camera driver used here for ov5640 is driver/media/i2c/ov5640.c. This is correct? Or I need to use the driver from drivers/media/platform/mxc/capture/ov5640_mipi_v2.c but this one is not getting used for imx8mp? Let me know if my understanding is correct or not.

Thanks,

Ritesh Kumar

0 Kudos
871 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @riteshkrmehta,

I hope you are doing well
 
For the kernel and device tree configuration for the 'oc5640' camera, kindly refer to the below documents.
 
i.MX Linux Reference Manual Chapter 6 Video
i.MX Linux Release Notes Table 10. Kernel and device tree configurations
 
The documents can be downloaded from the below link.
 
Thanks & Regards,
Sanket Parekh
0 Kudos
852 Views
riteshkrmehta
Contributor III

Hi @Sanket_Parekh 

Thanks for your quick help.

I understand about the DTS file to get details for the ov5640 camera sensor bring up. But I have seen it in imx8mp-evk-os08a20-ov5640.dts that the camera driver used here for ov5640 is driver/media/i2c/ov5640.c. This is correct? Or I need to use the driver from drivers/media/platform/mxc/capture/ov5640_mipi_v2.c but this one is not getting used for imx8mp? Let me know if my understanding is correct or not.

Thanks,

Ritesh Kumar

0 Kudos