Jetson version 36.4 camera driver probe function is not called

jetson Orin NX platform, JetPack version is Jetson Linux 36.4 (part of JetPack 6.1), Two cameras using mipi cables directly into the jetson:

I can see that the i2c address can be detected, indicating that I2C is physically connected.

pcai@pcai-desktop:~$ i2cdetect -y -r 9
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pcai@pcai-desktop:~$ i2cdetect -y -r 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

But the camera probe function is not called.


After checking, compatible and reg are both correct:


Driver registered but probe not called, no device under /sys/bus/i2c/drivers/iimx415/

root@pcai-desktop:/home/pcai/pkg_orin_nx_jp6.1_v6.30.5# ls /sys/bus/i2c/drivers/iimx415/
bind  module  uevent  unbind

v4l2 subdevice not registered

ls /dev/video*
ls: cannot access '/dev/video*': No such file or directory

9-0037 and 10-0037 do not have driver links, indicating that the I2C client is not bound to the driver

root@pcai-desktop:/home/pcai/pkg_orin_nx_jp6.1_v6.30.5# ls /sys/bus/i2c/devices/9-0037
modalias  name  of_node  power  subsystem  supplier:platform:13e00000.host1x:nvcsi@15a00000  supplier:platform:2200000.gpio  uevent  waiting_for_supplier
root@pcai-desktop:/home/pcai/pkg_orin_nx_jp6.1_v6.30.5# ls /sys/bus/i2c/devices/10-0037
modalias  name  of_node  power  subsystem  supplier:platform:13e00000.host1x:nvcsi@15a00000  supplier:platform:2200000.gpio  uevent  waiting_for_supplier

MODALIAS and compatible:

root@pcai-desktop:/home/pcai/pkg_orin_nx_jp6.1_v6.30.5# cat /sys/bus/i2c/devices/9-0037/uevent
OF_NAME=iimx415_c
OF_FULLNAME=/bus@0/cam_i2cmux/i2c@1/iimx415_c@37
OF_COMPATIBLE_0=nvidia,iimx415
OF_COMPATIBLE_N=1
MODALIAS=of:Niimx415_cT(null)Cnvidia,iimx415
root@pcai-desktop:/home/pcai/pkg_orin_nx_jp6.1_v6.30.5# cat /sys/bus/i2c/devices/10-0037/uevent
OF_NAME=iimx415_a
OF_FULLNAME=/bus@0/cam_i2cmux/i2c@0/iimx415_a@37
OF_COMPATIBLE_0=nvidia,iimx415
OF_COMPATIBLE_N=1
MODALIAS=of:Niimx415_aT(null)Cnvidia,iimx415

This is the source file :
iimx415-overlay.dts.txt (2.6 KB)
iimx415.dtsi.txt (11.8 KB)
iimx415.c.txt (29.6 KB)

log file:
dmesg.txt (57.0 KB)
trace.txt (998 Bytes)

Do you build as ko? What’s the message for insmod xxx.ko?

Yes, the iimx415.ko module can be loaded successfully without any error logs printed.

But when I commented out those two places, I could successfully call the probe. However, I don’t know why.

Why do you need reset-gpios = <…> ?

Hi ShareCCC,

Control the power on/off and reset functions of the camera.

Looks like your dts loss something like compatible like below.

                              rbpcv2_imx219_a@10 {
                                        sensor_model = "imx219";
                                        devnode = "video0";
                                        reset-gpios = <0xf3 0x3e 0x00>;
                                        compatible = "sony,imx219";
                                        physical_h = "2.760";

There is a compatibility string. This is only in the dst file; the compatibility string is in the dtsi:

Hi ShareCCC,

So is this caused by some mechanism in Jetson? Or is it due to other reasons?

Hi ShareCCC,

I further located the problem: the iimx415_c@37 node can be used if the gpios in the gpio@2200000 node do not define the CAM0_RST pin, but once the gpios define CAM0_RST, this iimx415_c@37 node must be commented out.

How can the CAM0_RST pin be defined in other nodes?What causes this phenomenon? How to avoid it?

i2c@1 {
        status = "okay";
        reg = <1>; 
        #address-cells = <1>;
        #size-cells = <0>;
        iimx415_c@37 {
             reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
        };
};
#define CAM0_RST        TEGRA234_MAIN_GPIO(H, 3)    //gpio-394
gpio@2200000 {
      camera-control-output-high-iimx415 {
           gpio-hog;
           output-high;
           gpios = <CAM0_RST 0 CAM0_PWDN 0 CAM1_PWDN 0>;
           label = "cam0-rst", "cam0-pwdn", "cam1-pwdn";
      };
};

That’s interesting. Maybe change another GPIO pin to check.

Hi ShaneCCC,

Since GPIO-486(TEGRA234_MAIN_GPIO(H, 3)) will conflict with other configurations when used, what should I do if I want to use another GPIO as the reset control pin for my camera? How should I select a suitable GPIO?

#define CAM0_RST        TEGRA234_MAIN_GPIO(H, 3)

Maybe have a check below pins.

#define CAM0_RST_L      TEGRA234_MAIN_GPIO(H, 3)
11 #define CAM0_PWDN       TEGRA234_MAIN_GPIO(H, 6)
12 #define CAM1_RST_L      TEGRA234_MAIN_GPIO(AC, 1)
13 #define CAM1_PWDN       TEGRA234_MAIN_GPIO(AC, 0)
14 #define PWR_EN      TEGRA234_MAIN_GPIO(AC, 7)
15 #define GYRO1_IRQ_GPIO  TEGRA234_AON_GPIO(CC, 1)
16 #define ACCE1_IRQ_GPIO  TEGRA234_AON_GPIO(CC, 0)