MIPI camera device driver probe problem

Hi.

I am trying to operate camera in Jetson TX2 module.

But driver could not probe the device.

The camera have MIPI interface and sensor model is ov2311.

L4T version is 32.3.1.

Linux kernel version is 4.9.

Linux distribution version is ubuntu 18.04.

Device driver is provided by camera manufacturer.

And kernel and dts(i) files were patched by the manufacturer.

I configured KGDB with this manual.

Loaded symbols from ov2311.ko.

Set breakpoint in ov2311_probe() function.

After boot-time, I execute modprobe ov2311 command.

But kernel didn’t stop on ov2311_probe() function.

Additional information.

Kernel compilation configs:
Kernel is compiled in -O1 option.

CONFIG_DEBUG_INFO=y
CONFIG_VIDEO_ECAM=y
CONFIG_INPUT_LSM6DS3=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_KDB=n

This is device tree.

i2c@c250000 {

...

        ov2311_a@42 {
                status = "okay";
                compatible = "nvidia,ov2311";

This is kernel log related to camera.
But there is no log related to ov2311_probe() function.

[    0.460686] GPIO line 461 (camera-control-output-low) hogged as output/low
[    0.460712] GPIO line 456 (camera-control-output-low) hogged as output/low
[    0.460736] GPIO line 457 (camera-control-output-low) hogged as output/low
[    0.460760] GPIO line 426 (camera-control-output-low) hogged as output/low
...

[    1.115874] tegra_camera_platform tegra-camera-platform: tegra_camera_probe:camera_platform_driver probe
[    1.116127] misc tegra_camera_ctrl: tegra_camera_isomgr_register tpg_max_iso = 3916800KBs
[    1.116139] misc tegra_camera_ctrl: tegra_camera_isomgr_register isp_iso_bw=4687500, vi_iso_bw=2000000, max_bw=4687500

There is no /dev/video<n> file in device file directory.

Maybe probe() function was not called during modprobe.

Why probe() was not called during modprobe?

Is the function already called before modprobe? In that case, how can I debug it with KGDB?

Have a check the sensor driver follow this for Jetson.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/camera_sensor_prog.47.1.html

1 Like

Thank you for reply, can you advice me which topic in this document is helpful in this issue?

This is additional information:

Kernel log with some relationship with this issue.

[    1.175084] bus: 'i2c': registered
[    1.178691] bus: 'i2c': add driver dummy
...
[    2.009161] device: 'c250000.i2c': device_add
[    2.013777] bus: 'platform': add device c250000.i2c
[    2.018948] PM: Adding info for platform:c250000.i2c
[    2.024277] iommu: Adding device c250000.i2c to group 9
...
[    6.032561] device class 'tegra-vi-channel': registering
...

It’s would be better to implement the sensor driver follow document. You also can take reference sensor driver as template to modify yours.