IMX93 OV5647 / IMX219 "mxc-md: probe of 42800000.bus:camera failed with error -515"

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

IMX93 OV5647 / IMX219 "mxc-md: probe of 42800000.bus:camera failed with error -515"

1,024 Views
Srini12
Contributor I

We are trying to work with imx93-11x11-evk with RPI camera (either ov5647 (v1. 3) or IMX219 (v2)) .

I was able to enable the drivers on the kernel and modify the DTS file accordingly (PFA).

On boot the camera (either one of them) get's registered as /dev/video0. But after linking the media_entity the camera fails and unregisters all entities.

Dmesg ->

 

[    9.708968] mx8-img-md: Registered mxc_isi.0.capture as /dev/video0          
[    9.717386] mx8-img-md: Registered sensor subdevice: ov5647 2-0036 (1)       
[    9.727133] CAN device driver interface                                      
[    9.731559] mx8-img-md: created link [mxc_isi.0] => [mxc_isi.0.capture]      
[    9.739402] debugfs: File 'Playback' in directory 'dapm' already present!    
[    9.748834] debugfs: File 'Capture' in directory 'dapm' already present!     
[    9.757027] mx8-img-md: created link [mxc-mipi-csi2.0] => [mxc_isi.0]                                              
[    9.792604] mx8-img-md: subdev_notifier_complete error exit                  
[    9.802572] mxc-md 42800000.bus:camera: Sensor register failed 
[    9.819400] input: WM8962 Beep Generator as /devices/platform/soc@0/440000001
[    9.821730] mx8-img-md: Unregistered all entities                            
[    9.835577] mxc-md: probe of 42800000.bus:camera failed with error -515 
 

 

 

Please let me know if we made any mistake on DTS file modification or need any change on the driver. Also it would be great if anyone can point out how to follow the error code -515 & what it means. 

Tags (1)
0 Kudos
Reply
3 Replies

812 Views
tmerciai
Contributor I

Hi

Have you tried the following?

https://github.com/nxp-imx/linux-imx/pull/17

0 Kudos
Reply

1,000 Views
Srini12
Contributor I

We tried the ov5647_mipi that comes with the kernel, but we couldn't successfully compile it.

 /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:319:19: error: initialization of 'int (*)(struct i2c_client *)' from incompatible pointer type 'int (*)(struct i2c_client *, const struct i2c_device_id *)' [-Werror=incompatible-pointer-types]
|   319 |         .probe  = ov5647_probe,
|       |                   ^~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:319:19: note: (near initialization for 'ov5647_i2c_driver.probe')
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:320:19: error: initialization of 'void (*)(struct i2c_client *)' from incompatible pointer type 'int (*)(struct i2c_client *)' [-Werror=incompatible-pointer-types]
|   320 |         .remove = ov5647_remove,
|       |                   ^~~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:320:19: note: (near initialization for 'ov5647_i2c_driver.remove')
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c: In function 'ov5647_enum_frameintervals':
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1442:17: error: implicit declaration of function 'pr_warning'; did you mean 'acpi_warning'? [-Werror=implicit-function-declaration]
|  1442 |                 pr_warning("Please assign pixel format, width and height.\n");
|       |                 ^~~~~~~~~~
|       |                 acpi_warning
|   AR      crypto/asymmetric_keys/built-in.a
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c: At top level:
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1522:34: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_frame_size_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_frame_size_enum *)' [-Werror=incompatible-pointer-types]
|  1522 |         .enum_frame_size       = ov5647_enum_framesizes,
|       |                                  ^~~~~~~~~~~~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1522:34: note: (near initialization for 'ov5647_subdev_pad_ops.enum_frame_size')
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1523:34: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_frame_interval_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_frame_interval_enum *)' [-Werror=incompatible-pointer-types]
|  1523 |         .enum_frame_interval   = ov5647_enum_frameintervals,
|       |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1523:34: note: (near initialization for 'ov5647_subdev_pad_ops.enum_frame_interval')
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1524:34: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
|  1524 |         .enum_mbus_code        = ov5647_enum_mbus_code,
|       |                                  ^~~~~~~~~~~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1524:34: note: (near initialization for 'ov5647_subdev_pad_ops.enum_mbus_code')
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1525:34: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
|  1525 |         .set_fmt               = ov5647_set_fmt,
|       |                                  ^~~~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1525:34: note: (near initialization for 'ov5647_subdev_pad_ops.set_fmt')
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1526:34: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_state *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
|  1526 |         .get_fmt               = ov5647_get_fmt,
|       |                                  ^~~~~~~~~~~~~~
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1526:34: note: (near initialization for 'ov5647_subdev_pad_ops.get_fmt')
|   AR      crypto/built-in.a
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1532:27: error: 'ov5647_get_register' undeclared here (not in a function); did you mean 'ov5647_get_shutter'?
|  1532 |         .g_register     = ov5647_get_register,
|       |                           ^~~~~~~~~~~~~~~~~~~
|       |                           ov5647_get_shutter
| /home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/drivers/media/platform/mxc/capture/ov5647_mipi.c:1533:27: error: 'ov5647_set_register' undeclared here (not in a function); did you mean 'ov5647_set_shutter'?
|  1533 |         .s_register     = ov5647_set_register,
|       |                           ^~~~~~~~~~~~~~~~~~~
|       |                           ov5647_set_shutter
| cc1: some warnings being treated as errors
| make[6]: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/scripts/Makefile.build:243: drivers/media/platform/mxc/capture/ov5647_mipi.o] Error 1
| make[5]: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/scripts/Makefile.build:480: drivers/media/platform/mxc/capture] Error 2
| make[4]: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/scripts/Makefile.build:480: drivers/media/platform] Error 2
| make[3]: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/scripts/Makefile.build:480: drivers/media] Error 2
| make[3]: *** Waiting for unfinished jobs....
|   AR      lib/built-in.a
|   AR      drivers/mxc/hantro/built-in.a
|   AR      drivers/mxc/built-in.a
| make[2]: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/scripts/Makefile.build:480: drivers] Error 2
| make[1]: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/Makefile:1913: .] Error 2
| make: *** [/home/ubuntu/imx-chrome-inc/build/tmp/work-shared/imx93-11x11-lpddr4x-evk/kernel-source/Makefile:234: __sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/ubuntu/imx-chrome-inc/sources/meta-imx/meta-imx-bsp/recipes-kernel/linux/linux-imx_6.6.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 8193 tasks of which 8192 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/ubuntu/imx-chrome-inc/sources/meta-imx/meta-imx-bsp/recipes-kernel/linux/linux-imx_6.6.bb:do_compile
Summary: There were 16 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.

 

Are we compiling the correct ov5647? (https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/drivers/media/platform/mxc/capture/ov5647_mipi.c)

Tags (1)
0 Kudos
Reply

1,012 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

ov5647 is supported for i.MX93:
drivers/media/platform/mxc/subdev/ov5647_mipi.c

IMX219 driver

Sony-IMX219-Raspberry-Pi-V2-CMOS/imx219mipiraw_Sensor.c at master · rellimmot/Sony-IMX219-Raspberry-... 

Debugging can be start with adjusting clocks:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Debug-steps-for-customer-MIPI-sensor-doc...

 

Regards

0 Kudos
Reply