imx477 sensor driver for i.MX8M-Plus

cancel
Showing results for 
Search instead for 
Did you mean: 

imx477 sensor driver for i.MX8M-Plus

371 Views
malik_cisse
Contributor II

Hi,

I am writing imx477 sensor driver for i.mx8m-plus based on some preexisting driver in kernel_source_code/drivers/media/i2c/imx319.c (which is part of official linux kernel)

Unfortunatelly I get some kernel error: "mxc-md: probe of 32c00000.bus:camera failed with error -515"

As can be seen in dmesg shippet below.

I have the feeling that some system callback functions aremissing.

Any insight? Thank you

 

dmesg output:

...

[ 3.229148] bus: 'i2c': driver_probe_device: matched device 2-001a with driver imx477
[ 3.229153] bus: 'i2c': really_probe: probing driver imx477 with device 2-001a
[ 3.229181] imx477 2-001a: no pinctrl handle
[ 3.229209] imx477 2-001a: ########## Probing IMX477 Driver ##########
[ 3.236113] link-frequencies 0 value 450000000
[ 3.240597] imx477 2-001a: 2-001a supply VANA not found, using dummy regulator
[ 3.247872] devices_kset: Moving 2-001a to end of list
[ 3.247876] PM: Moving i2c:2-001a to end of list
[ 3.247883] imx477 2-001a: Linked as a consumer to regulator.0
[ 3.247897] imx477 2-001a: 2-001a supply VDIG not found, using dummy regulator
[ 3.255179] imx477 2-001a: 2-001a supply VDDL not found, using dummy regulator
[ 3.273479] imx477 2-001a: $$$ Read I2C: IMX477 CHIP ID = 477 $$$
[ 3.279644] imx477 2-001a: ########## End Probing IMX477##########
[ 3.285839] driver: 'imx477': driver_bound: bound to device '2-001a'
[ 3.285844] devices_kset: Moving 2-001a to end of list
[ 3.285851] PM: Moving i2c:2-001a to end of list
[ 3.285877] bus: 'i2c': really_probe: bound device 2-001a to driver imx477

...

[ 3.660712] platform 32c00000.bus:camera: Retrying from deferred list
[ 3.661350] bus: 'platform': driver_probe_device: matched device 32c00000.bus:camera with driver mxc-md
[ 3.661358] bus: 'platform': really_probe: probing driver mxc-md with device 32c00000.bus:camera
[ 3.661376] mxc-md 32c00000.bus:camera: no pinctrl handle
[ 3.661518] device: 'video0': device_add
[ 3.661570] PM: Adding info for No Bus:video0
[ 3.661672] mx8-img-md: Registered mxc_isi.0.capture as /dev/video0
[ 3.668100] mx8-img-md: Registered sensor subdevice: imx477 2-001a (1)
[ 3.674700] mx8-img-md: created link [mxc_isi.0] => [mxc_isi.0.capture]
[ 3.681355] mx8-img-md: created link [mxc-mipi-csi2.0] => [mxc_isi.0]
[ 3.687817] mx8-img-md: subdev_notifier_complete error exit
[ 3.693453] mxc-md 32c00000.bus:camera: Sensor register failed
[ 3.699324] mxc-md: probe of 32c00000.bus:camera failed with error -515

0 Kudos
6 Replies

315 Views
malik_cisse
Contributor II

Thank you Igor. 

Yes, Basler Cam is definitelly a good source of knowledge to get started.

Do you know if one can buy the NXP devkit + Basler cam?

Thx, Malik

0 Kudos

322 Views
malik_cisse
Contributor II

Hi,

I finally solved the missing callback function issue.

One needs to implement dummy ".link_setup" callback function returning 0. The system is expecting this callback. This is a bug in the Kernel driver.

static const struct media_entity_operations ar0144_entity_ops = {
.link_setup = ar0144_link_setup,
};

 

static int ar0144_link_setup(struct media_entity *entity,
struct media_pad const *local,
struct media_pad const *remote,
u32 flags)
{

return 0;
}

333 Views
gghy
Contributor I

Hi, i'm having the same problem with a imx334 sensor, if i find anything useful i will keep you updated

0 Kudos

354 Views
malik_cisse
Contributor II

I will look at those examples.

Thank you Igor

Malik

0 Kudos