GMSL imx390 no video0

  • Basic Info:

hardware: jetson-agx-orin-devkit
JetPack : 6.2
Jetson Linux : 36.4.3

  • Qeustion:

no video0 under /dev/ directory, any debug suggestion?

  • Current status

Deserializer max96712 under on i2c8 direct

proc device info see attach imx390.dts.txt

kernel bootup log see attach imx390.txt

Deserializer and serializer and sensor driver is loaded without error

deserializer: // power up by hardware

[ 9.756288] max96712: loading out-of-tree module taints kernel.
[ 9.761972] max96712 8-0029: max96712_probe: enter
[ 9.762024] max96712 8-0029: max96712_power_on: pwdn_gpio = -2
[ 9.870111] max96712 8-0029: max96712_probe: success
[ 9.870706] max96712 8-0029: i2c addr: 0x52
[ 9.871252] max96712 8-0029: device : 0xa0

serializer:

[ 10.884944] max9295 8-0062: [MAX9295]: probing GMSL Serializer
[ 10.884994] max9295 8-0062: max9295_probe: success
[ 10.885037] max9295 8-0040: [MAX9295]: probing GMSL Serializer
[ 10.885077] max9295 8-0040: max9295_probe: success

sensor:

[ 62.304551] imx390 8-0021: probing v4l2 sensor at addr 0x21
[ 62.304779] imx390 8-0021: mclk name not present, assume sensor driven externally
[ 62.304785] imx390 8-0021: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[ 62.304948] imx390 8-0021: tegracam sensor driver:imx390_v2.0.6
[ 62.304954] imx390 8-0021: imx390_power_on: power on
[ 62.605643] imx390 8-0021: detected imx390 sensor

  • i2c 8 info
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
20: -- UU -- -- -- -- -- -- -- UU -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

imx390.txt (82.3 KB)

imx390.dts.txt (342.8 KB)

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are experiencing an issue with the Jetson AGX Orin development kit, where there is no video output under the /dev directory. You have provided various logs and information about the deserializer, serializer, and sensor driver loading without errors. Here’s a comprehensive analysis and some debug suggestions:

  1. Deserializer and Serializer Loading: The logs indicate that the deserializer (max96712) and serializer (max9295) drivers are loaded successfully. The deserializer is powered on by hardware, and the serializer is probing the GMSL serializer.
  2. Sensor Driver Loading: The sensor driver (imx390) is also loaded successfully, and it detects the IMX390 sensor on I2C bus 8.
  3. Kernel Bootup Log: The kernel bootup log shows that the deserializer, serializer, and sensor drivers are loaded without errors. However, there is no indication of any video output or display initialization.
  4. Device Tree: The kernel device tree is not explicitly mentioned in the logs, but it’s essential to ensure that the device tree is correctly configured for the IMX390 sensor and the deserializer/serializer.

Debug Suggestions:

  1. Verify Device Tree Configuration: Check the kernel device tree configuration to ensure that it correctly defines the IMX390 sensor, deserializer, and serializer. You can use the dtc command to compile and decompile the device tree.
  2. Check Video Output Configuration: Verify that the video output is correctly configured in the kernel. You can check the kernel configuration using menuconfig or xconfig.
  3. Inspect Sysfs: Inspect the sysfs directory (/sys/class/video4linux) to see if the video device is present and correctly configured.
  4. Use v4l2-ctl: Use the v4l2-ctl command to query the video device and check if it’s correctly configured. You can also use v4l2-ctl to test the video capture.
  5. Check Power Management: Ensure that the power management is correctly configured for the deserializer, serializer, and sensor. You can check the power management configuration using cat /sys/kernel/debug/pm_debug.
  6. Consult NVIDIA Documentation: Consult the NVIDIA documentation for the Jetson AGX Orin development kit and the IMX390 sensor to ensure that you are following the correct setup and configuration procedures.

By following these debug suggestions, you should be able to identify and resolve the issue with the video output on your Jetson AGX Orin development kit.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

hello m_o_bz,

during kernel initialization stage, it’s step for camera device registration to setup a video device node to linux kernel. sensor probing only run once during kernel initialization stage of system boot-up.
for a typical camera application running cycle, the driver will Power On the sensor, Start Sensor Streaming, sending relevant v4l2 controls, and finally power off the sensor. so… if there’s a error returns, it’ll not register a video node, (/dev/video0).

but.. there should be /dev/video0 created after this message.

So , current status is sensor driver probe success, but no video0 appear
Which config may lead to this issue happen?

Is there any debug way to figure that out?

hello m_o_bz,

I assume you’ve enable Jetson Virtual Channel with GMSL Camera Framework. you must set the vc-id property in the gmsl-link node for each sensor to match the vc_id property in the sensor mode device node.
please see-also reference camera driver,
for instance,
$public_sources/kernel_src/r36.4.2/hardware/nvidia/t23x/nv-public/overlay/tegra234-camera-ar0234-a00.dtsi

imx390-vcid.dts.txt (342.9 KB)

add vc_id and vc-id, still no video0 device

mode0 {/*mode IMX390_MODE_1936X1096_CROP_30FPS*/
     vc_id = "0";

tegra-capture-vi {
my-imx390-a00-overlay;
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liimx390_vi_in0: endpoint {
vc-id = <0>;

ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liimx390_imx390_out0: endpoint {
vc-id = <0>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&liimx390_csi_in0>;
};
};

hello m_o_bz,

please check with.. $ sudo media-ctl -p -d /dev/media0 to review port bindings.
BTW, as you can see of NVIDIA Jetson AGX Xavier Series and Jetson AGX Orin Series Camera Module Hardware Design Guide, it’s default using i2c2 = "/bus@0/i2c@3180000" as CAM_I2C.

media-ctl -p -d /dev/media0

Media controller API version 5.15.148

Media device information

driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148

Device topology

hello m_o_bz,

it’s incorrect, the output should looks like this.. To verify the port binding result.
please see-also reference camera driver for the DT settings.
$public_sources/kernel_src/r36.4.2/hardware/nvidia/t23x/nv-public/overlay/tegra234-camera-ar0234-a00.dtsi

But I already config the VI and CSI and sensor, all the node is status ok, and config all the vc-id and vc_id, all the node info is in the attatch dts file which from proc/device-tree

hello m_o_bz,

it’s subdev to holds a handle for the V4L2 subdevice, which used to run subdev operations (ops).
please check your sensor driver, it should call tegracam_v4l2subdev_register() to register a video node to linux system.

in sensor driver, already call the api and the last log detected imx390 sensor print

err = tegracam_v4l2subdev_register(tc_dev, true);
if (err) {
    tegracam_device_unregister(tc_dev);
    dev_err(dev, "tegra camera subdev registration failed\n");
    return err;
}

dev_err(dev, "detected imx390 sensor\n");

no dev_err(dev, “tegra camera subdev registration failed\n”); found in console log

The IMX390 is already supported in the SDK release

tegra234-camera-imx390-a00.dtsi.txt (12.5 KB)

my current dts for imx390

vi:

        tegra-capture-vi {
            my-imx390-a00-overlay;
            num-channels = <1>;
            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    imx390_vi_in0: endpoint {
                        vc-id = <0>;
                        port-index = <0>;
                        bus-width = <4>;
                        camera-imx390-a00-start-dts;
                        remote-endpoint = <&imx390_csi_out0>;
                        camera-imx390-a00-end-dts;
                    };
                };

nvcsi:

                   channel@0 {
                        reg = <0>;
                        ports {
                            #address-cells = <1>;
                            #size-cells = <0>;
                            port@0 {
                                reg = <0>;
                                imx390_csi_in0: endpoint@0 {
                                    port-index = <0>;
                                    bus-width = <4>;
                                    remote-endpoint = <&imx390_imx390_out0>;
                                };
                            };
                            port@1 {
                                reg = <1>;
                                imx390_csi_out0: endpoint@1 {
                                    //port-index = <1>;
                                    //bus-width = <4>;
                                    remote-endpoint = <&imx390_vi_in0>;
                                };
                            };
                        };

sensor:

                    ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        port@0 {
                            reg = <0>;
                            imx390_imx390_out0: endpoint {
                                vc-id = <0>;
                                port-index = <0>;
                                bus-width = <4>;
                                remote-endpoint = <&imx390_csi_in0>;
                            };
                        };
                    };

wondering why this setup result no link

hello m_o_bz,

did you have another overlay to enable the status of VI/CSI?
for instance,

	tegra-capture-vi {
		port@0 {
			imx390_vi_in0: endpoint {
				status = "okay";
	host1x@13e00000 {
		nvcsi@15a00000 {
			channel@0 {
				ports {
					port@0 {
						status = "okay";

tegra234-camera-imx390-a00.dtsi.txt (12.7 KB)

tegra234-p3737-camera-modules.dtsi.txt (8.4 KB)

imx390-reenable.dtsi.txt (341.6 KB) // /proc/device-tree output

sdk enable the VI/CSI in tegra234-p3737-camera-modules.dtsi.txt

current, I reenable it in tegra234-camera-imx390-a00.dtsi.txt as below

vi:

        tegra-capture-vi {
            my-imx390-a00-overlay;
            num-channels = <1>;
            status = "okay";
            ports {
                status = "okay";
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    status = "okay";
                    reg = <0>;
                    imx390_vi_in0: endpoint {
                        status = "okay";
                        vc-id = <0>;
                        port-index = <0>;
                        bus-width = <4>;
                        camera-imx390-a00-start-dts;
                        remote-endpoint = <&imx390_csi_out0>;
                        camera-imx390-a00-end-dts;
                    };
                };

nvcsi:

            host1x@13e00000 {
                nvcsi@15a00000 {
                    my-imx390-a00-overlay;
                    num-channels = <1>;
                    #address-cells = <1>;
                    #size-cells = <0>;

                    channel@0 {
                        status = "okay";
                        reg = <0>;
                        ports {
                            status = "okay";
                            #address-cells = <1>;
                            #size-cells = <0>;
                            port@0 {
                                reg = <0>;
                                status = "okay";
                                imx390_csi_in0: endpoint@0 {
                                    status = "okay";
                                    port-index = <0>;
                                    bus-width = <4>;
                                    remote-endpoint = <&imx390_imx390_out0>;
                                };
                            };
                            port@1 {
                                reg = <1>;
                                imx390_csi_out0: endpoint@1 {
                                    status = "okay";
                                    //port-index = <1>;
                                    //bus-width = <4>;
                                    remote-endpoint = <&imx390_vi_in0>;

now the current status is : sensor source can be found, but VI/CSI can not be found

media-ctl -p
Media controller API version 5.15.148

Media device information

driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148

Device topology

  • entity 1: imx390 8-0021 (1 pad, 0 link)
    type V4L2 subdev subtype Sensor flags 0
    pad0: Source

and console log: new line show up says “tegra-camrtc-capture-vi tegra-capture-vi: subdev imx390 8-0021 bound”

[ 38.227499] imx390 8-0021: probing v4l2 sensor at addr 0x21
[ 38.227571] imx390 8-0021: mclk name not present, assume sensor driven externally
[ 38.227573] imx390 8-0021: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[ 38.227653] imx390 8-0021: tegracam sensor driver:imx390_v2.0.6
[ 38.227656] imx390 8-0021: imx390_power_on: power on
[ 38.528103] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx390 8-0021 bound <== this line show up
[ 38.528112] imx390 8-0021: detected imx390 sensor

hello m_o_bz,

it seems there’re conflicts with base IMX390 and yours,
for instance, the reference driver it uses i2c@3180000 but you’re using i2c@31e0000.
you should try to exclude that default driver to enable yours.

furthermore, you should refer to below to configure device tree overlay.
$public_sources/kernel_src/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-camera-imx390-overlay.dts

But in the /proc/device-tree/

imx390-reenable.dtsi.txt (341.6 KB)

there is no imx390 under i2c@3180000, so How can it conflicts?

I used to modify the file $public_sources/kernel_src/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-camera-imx390-overlay.dts, but I found it will no take overlay to the /proc/device-tree, so I turn to modify the file tegra234-camera-imx390-a00.dtsi.txt

So. I was wondering why I modify the tegra234-p3737-camera-imx390-overlay.dts, but it can not have influence to the /proc/device-tree

hello m_o_bz,

it’s overlay file, you’ll need to configure Jetson-IO to apply it.
please see-also Configuring the CSI Connector.

modify the tegra234-p3737-camera-imx390-overlay.dts is not necessary

I copy the all the info from it to my current dtsi:

tegra234-camera-imx390-a00.dtsi.txt (13.7 KB)

which to avoid conflict, but it seems the result is unchanged

only sensor entity can be found

entity 1: imx390 8-0021 (1 pad, 0 link)
type V4L2 subdev subtype Sensor flags 0
pad0: Source

the /proc/device-tree:

proc-devicetree.txt (341.7 KB)

Why the VI and CSI entity can not show up?

I also check the VI driver is probe which is in tegra-camera module

hello m_o_bz,

please revise it as below..
fragment-camera@0{} <== VI
fragment-camera@1{} <== NVCSI
fragment-camera@2{} <== tegra-camera-platform