GMSL MAX9296+MAX9295+IMX390 camera

Continuing the discussion from GMSL MAX9296+MAX9295+IMX390 camera driver develop:
Hi,The module I use is AGX Orin, the system version is R35.1.
I tried Jetson-IO to configure Jetson AGX CSI Connector(enable [Jetson Camera IMX390]),the file kernel_tegra234-p3701-0004-p3737-0000-user-custom.dtb not saved to /boot,but I can see the change in extlinux.


Can you give me some suggest ?

hello 1415281912,

may I know what’s the issue here?
is the device already register to linux kernel as video node? i.e. /dev/video0

No, it’s not registered yet.

hello 1415281912,

may I know the failure? please share the kernel logs for reference. i.e. $ dmesg > klogs.txt
besides, is it possible for moving to the latest Jetpack release version, JP-5.1.2/l4t-r35.4.1

This is the kernel log.
klogs.txt (67.8 KB)
GMSL is now upregulated on the custom board, but no /dev/video0 device is created.
Considering that it may not be configured well, we used the official dtb file to adjust it.
Both 9295 and 9296A can be found under IIC7, but the information about tca9546@70 in dmesg is not configured, and this part of the configuration cannot be adjusted under IIC7 (the original dtb part is under IIC2).

hello 1415281912,

it’s pca954x as i2c mux. you should check you’ve given regulator settings correctly to enable that.
you should also check reference SerDes camera driver for reference.
for instance, $public_sources/kernel_src/hardware/nvidia/platform/t23x/common/kernel-dts/t234-common-modules/tegra234-camera-imx390-a00.dtsi

OK. I tried to enable all imx390 related, including i2cmux,tegra-capture-vi、nvcsi@15a0000, and now /dev/video0 can be found, but still can’t open it by gst-launch-1.0.
As for the camera part, I only modify it in dtb and then replace the file under /boot/dtb/. Is it valid?

hello 1415281912,

for better supports. please share the related error messages to know the root cause.

Ok, got it.
This is a related error.


And the kernel log.
klogs_1.txt (68.3 KB)

the device registration has not complete, it still shows probing failures.

[    6.485955] pca954x 2-0070: pca954x_probe: forcing device bus number, start 30.
[    6.486170] pca954x 2-0070: device detect skipped.
[    6.488182] pca954x 2-0070: probe failed
[    6.491796] pca954x: probe of 2-0070 failed with error -121
[    6.506236] pca954x 7-0070: pca954x_probe: could not read force bus number
[    6.506809] pca954x 7-0070: probe failed
[    6.508453] pca954x: probe of 7-0070 failed with error -121

In this part, I opened i2cmux@70 and pca9546@70, and the system did not read it, so an error was reported. However, I read it through the i2c-tools, but I did not find 70 related items in the IIC. Is this part of the hardware that does not work?

it’s an i2c bus multiplexer/switch (at address 0x70) will have several child bus that are numbered uniquely in a device dependent manner.
BTW, are you kept using r35.1? is it possible for moving to the latest Jetpack release version, JP-5.1.2/l4t-r35.4.1

If there is no tca9546 on our board, how should we modify the configuration of this part?
Yes, the current version is R35.1, there is a system adaptation of R35.4.1, but now need a system that can use R35.1 of GMSL.

hello 1415281912,

please see-also reference device tree, it’s based-on an i2c bus multiplexer.
you may refer to this device tree for implementation to define the node accordingly.
for example,
$public_sources/kernel_src/hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3737-0000-camera-imx390-a00.dtsi

        i2c@3180000 {
                tca9546@70 {
                        i2c@0 {
                                imx390_a@1b {
                                imx390_b@1c {

Thank you for your reply.
I updated to R35.4.1 system as you said and enabled IMX390 through jetson-io, but /dev/video* was not created after saving and restarting.
dmesg_custom.log (86.9 KB)

Hello, I still use R35.1 system for adaptation, R35.4.1 has not created video*.

imx390_a@1b {
                    compatible = "sony,imx390";
                    reg = <0x0000001b>;
                    physical_w = "15.0";
                    physical_h = "12.5";
                    sensor_model = "imx390";
                    post_crop_frame_drop = "0";
                    use_decibel_gain = "true";
                    use_sensor_mode_id = "true";
                    def-addr = <0x0000001a>;
                    clocks = <0x00000004 0x00000024 0x00000004 0x00000024>;
                    clock-names = "extperiph1", "pllp_grtba";
                    mclk = "extperiph1";
                    nvidia,gmsl-ser-device = <0x00000041>;
                    nvidia,gmsl-dser-device = <0x00000042>;
                    status = "okay";
                    phandle = <0x0000031b>;
                    mode0 {
                        mclk_khz = "24000";
                        num_lanes = "2";
                        tegra_sinterface = "serial_a";
                        vc_id = "0";
                        discontinuous_clk = "no";
                        dpcm_enable = "false";
                        cil_settletime = "0";
                        dynamic_pixel_bit_depth = "12";
                        csi_pixel_bit_depth = "12";
                        mode_type = "bayer";
                        pixel_phase = "rggb";
                        active_w = "1920";
                        active_h = "1080";
                        readout_orientation = "0";
                        line_length = "2200";
                        inherent_gain = "1";
                        pix_clk_hz = "74250000";
                        serdes_pix_clk_hz = "200000000";
                        gain_factor = "10";
                        min_gain_val = "0";
                        max_gain_val = "300";
                        step_gain_val = "3";
                        default_gain = "0";
                        min_hdr_ratio = "1";
                        max_hdr_ratio = "1";
                        framerate_factor = "1000000";
                        min_framerate = "30000000";
                        max_framerate = "30000000";
                        step_framerate = "1";
                        default_framerate = "30000000";
                        exposure_factor = "1000000";
                        min_exp_time = "59";
                        max_exp_time = "33333";
                        step_exp_time = "1";
                        default_exp_time = "33333";
                        embedded_metadata_height = "0";
                    };
                    ports {
                        #address-cells = <0x00000001>;
                        #size-cells = <0x00000000>;
                        port@0 {
                            reg = <0x00000000>;
                            endpoint {
                                vc-id = <0x00000000>;
                                port-index = <0x00000000>;
                                bus-width = <0x00000002>;
                                remote-endpoint = <0x00000040>;
                                phandle = <0x0000031c>;
                            };
                        };
                    };
                    gmsl-link {
                        src-csi-port = "b";
                        dst-csi-port = "a";
                        serdes-csi-link = "a";
                        csi-mode = "1x4";
                        st-vc = <0x00000000>;
                        vc-id = <0x00000000>;
                        num-lanes = <0x00000002>;
                        streams = "ued-u1", "raw12";
                    };
                };
                imx390_b@1c {
                    compatible = "sony,imx390";
                    reg = <0x0000001c>;
                    physical_w = "15.0";
                    physical_h = "12.5";
                    sensor_model = "imx390";
                    post_crop_frame_drop = "0";
                    use_decibel_gain = "true";
                    use_sensor_mode_id = "true";
                    def-addr = <0x0000001a>;
                    clocks = <0x00000004 0x00000024 0x00000004 0x00000024>;
                    clock-names = "extperiph1", "pllp_grtba";
                    mclk = "extperiph1";
                    nvidia,gmsl-ser-device = <0x00000043>;
                    nvidia,gmsl-dser-device = <0x00000042>;
                    status = "okay";
                    phandle = <0x0000031d>;
                    mode0 {
                        mclk_khz = "24000";
                        num_lanes = "2";
                        tegra_sinterface = "serial_a";
                        vc_id = "1";
                        discontinuous_clk = "no";
                        dpcm_enable = "false";
                        cil_settletime = "0";
                        dynamic_pixel_bit_depth = "12";
                        csi_pixel_bit_depth = "12";
                        mode_type = "bayer";
                        pixel_phase = "rggb";
                        active_w = "1920";
                        active_h = "1080";
                        readout_orientation = "0";
                        line_length = "2200";
                        inherent_gain = "1";
                        pix_clk_hz = "74250000";
                        serdes_pix_clk_hz = "200000000";
                        gain_factor = "10";
                        min_gain_val = "0";
                        max_gain_val = "300";
                        step_gain_val = "3";
                        default_gain = "0";
                        min_hdr_ratio = "1";
                        max_hdr_ratio = "1";
                        framerate_factor = "1000000";
                        min_framerate = "30000000";
                        max_framerate = "30000000";
                        step_framerate = "1";
                        default_framerate = "30000000";
                        exposure_factor = "1000000";
                        min_exp_time = "59";
                        max_exp_time = "33333";
                        step_exp_time = "1";
                        default_exp_time = "33333";
                        embedded_metadata_height = "0";
                    };
                    ports {
                        #address-cells = <0x00000001>;
                        #size-cells = <0x00000000>;
                        port@0 {
                            reg = <0x00000000>;
                            endpoint {
                                vc-id = <0x00000001>;
                                port-index = <0x00000000>;
                                bus-width = <0x00000002>;
                                remote-endpoint = <0x00000044>;
                                phandle = <0x0000031e>;
                            };
                        };
                    };
                    gmsl-link {
                        src-csi-port = "b";
                        dst-csi-port = "a";
                        serdes-csi-link = "b";
                        csi-mode = "1x4";
                        st-vc = <0x00000000>;
                        vc-id = <0x00000001>;
                        num-lanes = <0x00000002>;
                        streams = "ued-u1", "raw12";
                    };
                };

tca9546@70 This part is enabled, but does not match.
Please give me some suggestion.
Thanks.

according to the kernel logs.

it’s still reporting pca954x 2-0070: device detect skipped.
and there’re lots of tegra-i2c 31b0000.i2c: I2C transfer timed out failures.

may I confirm the camera setup you’re using?
for example, which camera vendor it is. had you also contact with them to confirm the functional Jetpack version?
the default IMX390 dtbo is supported with Leopard’s LPRD-001 board. please see-also… Hardware Module Connectivity.

Yes, errors have been reported about pca.
timed out error because I used i2c-tools to read each IIC bus.
The camera vendor we connected is SENSING, the model is as follows:SG2-IMX390C-GMSL2-H190X
SG2-IMX390C-GMSL2-Hxxx-s.pdf (1.3 MB)
Have asked the vendor, is to support JP5.02 version.

The documentation on this part of Hardware Module Connectivity has been studied, and R35.1 is configured in this way.
The problem may be that it is not clear why the pca954x field keeps reporting errors.

hello 1415281912,

you may also check with camera vendor for additional changes to enable this on JP-5.0.2

Hi,JerryChang.
I’m trying to figure out why the IMX390 never loaded, but it’s set to y in the kernel.
dmesg_1214.log (68.6 KB)

I see other posts in the forum have this part.
image