The GMSL camera has MIPI signal output, but the Orin Nano is unable to receive the data

jetpack:6.2.1

device:orin nano

We used our own designed orin nano carrier board and connected the deserializer 96716 to the CSI2 pins of the orin nano in a 2-lane configuration.

The following is the configuration of the “port” section in my device tree.

#include <dt-bindings/tegra234-p3767-0000-common.h>

#include <dt-bindings/clock/tegra234-clock.h>

#include <dt-bindings/gpio/tegra234-gpio.h>



#define CAM0_PWDN   TEGRA234_MAIN_GPIO(H, 6)

#define CAM1_PWDN   TEGRA234_MAIN_GPIO(AC, 0)



/ {

    overlay-name = "";

    jetson-header-name = "Jetson 24pin CSI Connector";

    compatible = JETSON_COMPATIBLE_P3768;



    fragment@0 {

        target-path = "/";

        __overlay__ {

            tegra-capture-vi  {

                num-channels = <2>;

                ports {

                    #address-cells = <1>;

                    #size-cells = <0>;

                    port@0 {

                        reg = <0>;

                        jetson_vi_in0: endpoint {

                            vc-id = <0>;

                            port-index = <2>;

                            bus-width = <2>;

                            remote-endpoint = <&jetson_csi_out0>;

                        };

                    };

                    port@1 {

                        reg = <1>;

                        jetson_vi_in1: endpoint {

                            vc-id = <1>;

                            port-index = <2>;

                            bus-width = <2>;

                            remote-endpoint = <&jetson_csi_out1>;

                        };

                    };

                };

            };

            tegra-camera-platform {

                compatible = "nvidia, tegra-camera-platform";

                /**

                * Physical settings to calculate max ISO BW

                *

                * num_csi_lanes = <>;

                * Total number of CSI lanes when all cameras are active

                *

                * max_lane_speed = <>;

                * Max lane speed in Kbit/s

                *

                * min_bits_per_pixel = <>;

                * Min bits per pixel

                *

                * vi_peak_byte_per_pixel = <>;

                * Max byte per pixel for the VI ISO case

                *

                * vi_bw_margin_pct = <>;

                * Vi bandwidth margin in percentage

                *

                * max_pixel_rate = <>;

                * Max pixel rate in Kpixel/s for the ISP ISO case

                *

                * isp_peak_byte_per_pixel = <>;

                * Max byte per pixel for the ISP ISO case

                *

                * isp_bw_margin_pct = <>;

                * Isp bandwidth margin in percentage

                */

                num_csi_lanes = <4>;

                max_lane_speed = <1500000>;

                min_bits_per_pixel = <10>;

                vi_peak_byte_per_pixel = <2>;

                vi_bw_margin_pct = <25>;

                max_pixel_rate = <7500000>;

                isp_peak_byte_per_pixel = <5>;

                isp_bw_margin_pct = <25>;

                /**

                 * The general guideline for naming badge_info contains 3 parts, and is as follows,

                 * The first part is the camera_board_id for the module; if the module is in a FFD

                 * platform, then use the platform name for this part.

                 * The second part contains the position of the module, ex. "rear" or "front".

                 * The third part contains the last 6 characters of a part number which is found

                 * in the module's specsheet from the vendor.

                 */

                modules {

                    module0 {

                        status = "okay";

                        badge = "cam0_position";

                        position = "position";

                        orientation = "1";

                        drivernode0 {

                            status = "okay";

                            pcl_id = "v4l2_sensor";

                            sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3160000/cam_0@20";

                        };

                    };

                    module1 {

                        status = "okay";

                        badge = "cam1_position";

                        position = "position";

                        orientation = "1";

                        drivernode0 {

                            status = "okay";

                            pcl_id = "v4l2_sensor";

                            sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3160000/cam_1@21";

                        };

                    };

                };

            };

            bus@0 {

                host1x@13e00000 {

                    nvcsi@15a00000 {

                        num-channels = <2>;

                        #address-cells = <1>;

                        #size-cells = <0>;

                        status = "okay";

                        channel@0 {

                            reg = <0>;

                            status = "okay";

                            ports {

                                #address-cells = <1>;

                                #size-cells = <0>;

                                status = "okay";

                                port@0 {

                                    reg = <0>;

                                    status = "okay";

                                    jetson_csi_in0: endpoint@0 {

                                        status = "okay";

                                        port-index = <2>;

                                        bus-width = <2>;

                                        remote-endpoint = <&mipi_cam_out0>;

                                    };

                                };

                                port@1 {

                                    reg = <1>;

                                    status = "okay";

                                    jetson_csi_out0: endpoint@1 {

                                        status = "okay";

                                        remote-endpoint = <&jetson_vi_in0>;

                                    };

                                };

                            };

                        };

                        channel@1 {

                            reg = <1>;

                            status = "okay";

                            ports {

                                #address-cells = <1>;

                                #size-cells = <0>;

                                status = "okay";

                                port@0 {

                                    reg = <0>;

                                    status = "okay";

                                    jetson_csi_in1: endpoint@2 {

                                        status = "okay";

                                        port-index = <2>;

                                        bus-width = <2>;

                                        remote-endpoint = <&mipi_cam_out1>;

                                    };

                                };

                                port@1 {

                                    reg = <1>;

                                    status = "okay";

                                    jetson_csi_out1: endpoint@3 {

                                        status = "okay";

                                        remote-endpoint = <&jetson_vi_in1>;

                                    };

                                };

                            };

                        };

                    };

                };



                i2c@3160000 {

                    max96716_0@2a {

                        status = "okay";

                        compatible = "nvidia,max96716_0";

                        reg = <0x2a>;

                        // reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;

                    };

                    cam_1@21 {

                        status = "okay";

                        compatible = "";

                        reg = <0x21>;

                        def-addr = <0x36>;

                        devnode = "video1";



                        /* Physical dimensions of sensor */

                        physical_w = "15.0";

                        physical_h = "12.5";



                        sensor_model ="shw3g";



                        /* Defines number of frames to be dropped by driver internally after applying */

                        /* sensor crop settings. Some sensors send corrupt frames after applying */

                        /* crop co-ordinates */

                        post_crop_frame_drop = "0";



                        /* Convert Gain to unit of dB (decibel) befor passing to kernel driver */

                        use_decibel_gain = "true";



                        /* enable CID_SENSOR_MODE_ID for sensor modes selection */

                        use_sensor_mode_id = "true";



                        clocks = <&bpmp TEGRA234_CLK_EXTPERIPH1>,

                                <&bpmp TEGRA234_CLK_EXTPERIPH1>;

                        clock-names = "extperiph1", "pllp_grtba";

                        mclk = "extperiph1";

                        der_id = <0>;

                        reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;



                        mode0 {/*mode SENSOR_MODE_2064X1552_30FPS*/

                            status = "okay";

                            mclk_khz = "24000";

                            num_lanes = "2";

                            tegra_sinterface = "serial_c";

                            phy_mode = "DPHY";

                            vc_id = "1";

                            discontinuous_clk = "no";

                            dpcm_enable = "false";

                            cil_settletime = "0";

                            lane_polarity = "0";

                            dynamic_pixel_bit_depth = "12";

                            csi_pixel_bit_depth = "12";

                            mode_type = "bayer";

                            pixel_phase = "rggb";



                            active_w = "2064";

                            active_h = "1552";

                            readout_orientation = "0";

                            line_length = "2400";

                            inherent_gain = "1";

                            pix_clk_hz = "240000000";

                            serdes_pix_clk_hz = "560000000";



                            gain_factor = "10";

                            min_gain_val = "10"; /* 1.00x */

                            max_gain_val = "480"; /* 22x */

                            step_gain_val = "5";

                            default_gain = "10"; /* 1.00x */

                            min_hdr_ratio = "1";

                            max_hdr_ratio = "1";

                            framerate_factor = "1000000";

                            min_framerate = "51000000";

                            max_framerate = "51000000";

                            step_framerate = "1";

                            default_framerate = "51000000";

                            exposure_factor = "1000000";

                            min_exp_time = "12"; /*us, 2 lines*/

                            max_exp_time = "19000";

                            step_exp_time = "1";

                            default_exp_time = "19000";/* us */

                            embedded_metadata_height = "0";

                        };

                        ports {

                            #address-cells = <1>;

                            #size-cells = <0>;

                            port@0 {

                                reg = <0>;

                                mipi_cam_out1: endpoint {

                                    vc-id = <1>;

                                    port-index = <2>;

                                    bus-width = <2>;

                                    remote-endpoint = <&jetson_csi_in1>;

                                };

                            };

                        };

                    };

                    cam_0@20 {

                        status = "okay";

                        compatible = "";

                        reg = <0x20>;

                        def-addr = <0x36>;

                        devnode = "video0";



                        /* Physical dimensions of sensor */

                        physical_w = "15.0";

                        physical_h = "12.5";



                        sensor_model ="shw3g";



                        /* Defines number of frames to be dropped by driver internally after applying */

                        /* sensor crop settings. Some sensors send corrupt frames after applying */

                        /* crop co-ordinates */

                        post_crop_frame_drop = "0";



                        /* Convert Gain to unit of dB (decibel) befor passing to kernel driver */

                        use_decibel_gain = "true";



                        /* enable CID_SENSOR_MODE_ID for sensor modes selection */

                        use_sensor_mode_id = "true";



                        clocks = <&bpmp TEGRA234_CLK_EXTPERIPH1>,

                                <&bpmp TEGRA234_CLK_EXTPERIPH1>;

                        clock-names = "extperiph1", "pllp_grtba";

                        mclk = "extperiph1";

                        der_id = <0>;

                        reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;



                        mode0 {/*mode SENSOR_MODE_2064X1552_30FPS*/

                            status = "okay";

                            mclk_khz = "24000";

                            num_lanes = "2";

                            tegra_sinterface = "serial_c";

                            vc_id = "0";

                            phy_mode = "DPHY";

                            discontinuous_clk = "no";

                            dpcm_enable = "false";

                            cil_settletime = "0";

                            lane_polarity = "0";

                            dynamic_pixel_bit_depth = "12";

                            csi_pixel_bit_depth = "12";

                            mode_type = "bayer";

                            pixel_phase = "rggb";



                            active_w = "2064";

                            active_h = "1552";

                            readout_orientation = "0";

                            line_length = "2800";

                            inherent_gain = "1";

                            mclk_multiplier = "25";

                            pix_clk_hz = "600000000";

                            serdes_pix_clk_hz = "1000000000";



                            gain_factor = "10";

                            min_gain_val = "10"; /* 1.00x */

                            max_gain_val = "480"; /* 22x */

                            step_gain_val = "5";

                            default_gain = "10"; /* 1.00x */

                            min_hdr_ratio = "1";

                            max_hdr_ratio = "1";

                            framerate_factor = "1000000";

                            min_framerate = "51000000";

                            max_framerate = "51000000";

                            step_framerate = "1";

                            default_framerate = "51000000";

                            exposure_factor = "1000000";

                            min_exp_time = "12"; /*us, 2 lines*/

                            max_exp_time = "19000";

                            step_exp_time = "1";

                            default_exp_time = "19000";/* us */

                            embedded_metadata_height = "0";

                        };

                        ports {

                            #address-cells = <1>;

                            #size-cells = <0>;

                            status = "okay";

                            port@0 {

                                reg = <0>;

                                status = "okay";

                                mipi_cam_out0: endpoint {

                                    status = "okay";

                                    vc-id = <0>;

                                    port-index = <2>;

                                    bus-width = <2>;

                                    remote-endpoint = <&jetson_csi_in0>;

                                };

                            };

                        };

                    };

                };

            };

        };

    };

};

I think my port settings are fine.Below is my media topology:

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: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
                <- "shw3g 0-0020":0 [ENABLED]
        pad1: Source
                -> "vi-output, shw3g 0-0020":0 [ENABLED]

- entity 4: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                <- "shw3g 0-0021":0 [ENABLED]
        pad1: Source
                -> "vi-output, shw3g 0-0021":0 [ENABLED]

- entity 7: shw3g 0-0020 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev2
        pad0: Source
                [fmt:SRGGB12_1X12/2064x1552@1/30 field:none colorspace:srgb]
                -> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 9: vi-output, shw3g 0-0020 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]

- entity 23: shw3g 0-0021 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev3
        pad0: Source
                [fmt:SRGGB12_1X12/2064x1552@1/30 field:none colorspace:srgb]
                -> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 25: vi-output, shw3g 0-0021 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
        pad0: Sink
                <- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]

I attempted to set the frame rate but the dmesg command kept reporting a timeout error.

v4l2-ctl -d /dev/video0   --set-ctrl bypass_mode=0   --stream-mmap   --stream-count=10000000  
[ 3199.709770] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3199.709788] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3199.710409] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3202.269752] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3202.269773] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3202.270394] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3204.829762] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3204.829786] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3204.830405] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3207.389760] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3207.389779] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3207.390416] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3209.953793] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3209.953811] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3209.954389] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3212.509754] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3212.509774] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3212.510391] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3215.037898] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 3215.037914] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 3215.038403] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 3215.038660] max96716 0-002a: 0x0040-w: 0x3000 = 0x01

Trace log is as follows:

sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 83/83   #P:8
#
#                                _-------=> irqs-off
#                               / _------=> need-resched
#                              | / _-----=> need-resched-lazy
#                              || / _----=> hardirq/softirq
#                              ||| / _---=> preempt-depth
#                              |||| / _--=> preempt-lazy-depth
#                              ||||| / _-=> migrate-disable
#                              |||||| /     delay
#           TASK-PID     CPU#  |||||||  TIMESTAMP  FUNCTION
#              | |         |   |||||||      |         |
        v4l2-ctl-7414    [006] .......  3280.633833: tegra_channel_open: vi-output, shw3g 0-0020
        v4l2-ctl-7414    [006] .......  3280.640415: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = ANY, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [006] .......  3280.640420: v4l2_qbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = ANY, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [006] .......  3280.640421: v4l2_qbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = ANY, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [006] .......  3280.640422: v4l2_qbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = ANY, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [006] .......  3280.641217: tegra_channel_set_power: shw3g 0-0020 : 0x1
        v4l2-ctl-7414    [006] .......  3280.641225: camera_common_s_power: status : 0x1
        v4l2-ctl-7414    [006] .......  3280.661973: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-7414    [006] .......  3280.661977: csi_s_power: enable : 0x1
        v4l2-ctl-7414    [006] .......  3280.662323: tegra_channel_capture_setup: vnc_id 0 W 2064 H 1552 fmt c4
 vi-output, shw3-7415    [005] .......  3280.662925: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3280.662933: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3280.662934: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3280.662935: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
        v4l2-ctl-7414    [006] .......  3280.662952: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-7414    [004] .......  3280.663519: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-7414    [004] .......  3280.663523: csi_s_stream: enable : 0x1
        v4l2-ctl-7414    [004] .......  3280.663846: tegra_channel_set_stream: shw3g 0-0020 : 0x1
     kworker/5:4-156     [005] .......  3280.705752: rtcpu_vinotify_event: tstamp:103272301465 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3304703210720 data:0x799e300010000000
     kworker/5:4-156     [005] .......  3280.705754: rtcpu_vinotify_event: tstamp:103272301604 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3304703217152 data:0x0000000031000001
     kworker/5:4-156     [005] .......  3280.705754: rtcpu_vinotify_event: tstamp:103272301761 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:3304703220128 data:0x0000000007020001
     kworker/5:4-156     [005] .......  3280.705754: rtcpu_vinotify_event: tstamp:103272301897 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3304703262400 data:0x799e2d0010000000
     kworker/5:4-156     [005] .......  3280.705755: rtcpu_vinotify_event: tstamp:103272302052 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3304703268896 data:0x0000000031000002
        v4l2-ctl-7414    [004] .......  3283.165938: v4l2_dqbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3283.165972: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
 vi-output, shw3-7416    [003] .......  3283.166312: tegra_channel_capture_setup: vnc_id 0 W 2064 H 1552 fmt c4
        v4l2-ctl-7414    [004] .......  3283.166356: v4l2_dqbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3283.166384: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3283.166387: v4l2_dqbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 1
        v4l2-ctl-7414    [004] .......  3283.166389: v4l2_qbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3283.166391: v4l2_dqbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 2
        v4l2-ctl-7414    [004] .......  3283.166392: v4l2_qbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3283.166394: v4l2_dqbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 3
        v4l2-ctl-7414    [004] .......  3283.166395: v4l2_qbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
 vi-output, shw3-7415    [005] .......  3283.166429: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3283.166439: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3283.166441: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3283.166443: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
     kworker/5:4-156     [005] .......  3283.209753: rtcpu_vinotify_event: tstamp:103350389613 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3307206714592 data:0x799e300010000000
     kworker/5:4-156     [005] .......  3283.209754: rtcpu_vinotify_event: tstamp:103350389770 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3307206720992 data:0x0000000031000001
     kworker/5:4-156     [005] .......  3283.209755: rtcpu_vinotify_event: tstamp:103350389906 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:3307206724000 data:0x0000000007020001
     kworker/5:4-156     [005] .......  3283.209755: rtcpu_vinotify_event: tstamp:103350390059 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3307206771136 data:0x799e2d0010000000
     kworker/5:4-156     [005] .......  3283.209755: rtcpu_vinotify_event: tstamp:103350390194 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3307206777632 data:0x0000000031000002
        v4l2-ctl-7414    [004] .......  3285.725797: v4l2_dqbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3285.725829: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3285.726215: v4l2_dqbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3285.726222: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3285.726225: v4l2_dqbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 1
        v4l2-ctl-7414    [004] .......  3285.726229: v4l2_qbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3285.726232: v4l2_dqbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 2
        v4l2-ctl-7414    [004] .......  3285.726235: v4l2_qbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3285.726238: v4l2_dqbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 3
        v4l2-ctl-7414    [004] .......  3285.726241: v4l2_qbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
 vi-output, shw3-7416    [003] .......  3285.726313: tegra_channel_capture_setup: vnc_id 0 W 2064 H 1552 fmt c4
 vi-output, shw3-7415    [005] .......  3285.726426: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3285.726438: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3285.726439: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3285.726440: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
     kworker/5:4-156     [005] .......  3285.773754: rtcpu_vinotify_event: tstamp:103430506208 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3309766712000 data:0x799e300010000000
     kworker/5:4-156     [005] .......  3285.773755: rtcpu_vinotify_event: tstamp:103430506348 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3309766718400 data:0x0000000031000001
     kworker/5:4-156     [005] .......  3285.773755: rtcpu_vinotify_event: tstamp:103430506504 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:3309766721376 data:0x0000000007020001
     kworker/5:4-156     [005] .......  3285.773756: rtcpu_vinotify_event: tstamp:103430506637 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3309766768544 data:0x799e2d0010000000
     kworker/5:4-156     [005] .......  3285.773756: rtcpu_vinotify_event: tstamp:103430506792 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3309766775040 data:0x0000000031000002
        v4l2-ctl-7414    [004] .......  3288.285796: v4l2_dqbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3288.285827: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3288.286208: v4l2_dqbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3288.286215: v4l2_qbuf: minor = 0, index = 0, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3288.286218: v4l2_dqbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 1
        v4l2-ctl-7414    [004] .......  3288.286222: v4l2_qbuf: minor = 0, index = 1, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3288.286225: v4l2_dqbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 2
        v4l2-ctl-7414    [004] .......  3288.286228: v4l2_qbuf: minor = 0, index = 2, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
        v4l2-ctl-7414    [004] .......  3288.286231: v4l2_dqbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|ERROR|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 3
        v4l2-ctl-7414    [004] .......  3288.286234: v4l2_qbuf: minor = 0, index = 3, type = VIDEO_CAPTURE, bytesused = 6406656, flags = MAPPED|QUEUED|TIMESTAMP_UNKNOWN|TIMESTAMP_MONOTONIC, field = NONE, timestamp = 0, timecode = { type = 0x0, flags = , frames = 0, seconds = 0, minutes = 0, hours = 0, userbits = { 0 0 0 0 } }, sequence = 0
 vi-output, shw3-7416    [003] .......  3288.286297: tegra_channel_capture_setup: vnc_id 0 W 2064 H 1552 fmt c4
 vi-output, shw3-7415    [005] .......  3288.286409: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3288.286420: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3288.286422: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
 vi-output, shw3-7415    [005] .......  3288.286423: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:7415 tid:7415
     kworker/5:4-156     [005] .......  3288.321755: rtcpu_vinotify_event: tstamp:103510211189 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3312326694112 data:0x799e300010000000
     kworker/5:4-156     [005] .......  3288.321756: rtcpu_vinotify_event: tstamp:103510521130 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3312326713792 data:0x0000000031000001
     kworker/5:4-156     [005] .......  3288.321757: rtcpu_vinotify_event: tstamp:103510521269 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:3312326716800 data:0x0000000007020001
     kworker/5:4-156     [005] .......  3288.321757: rtcpu_vinotify_event: tstamp:103510521422 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3312326760064 data:0x799e2d0010000000
     kworker/5:4-156     [005] .......  3288.321757: rtcpu_vinotify_event: tstamp:103510521556 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:3312326766592 data:0x0000000031000002

However, strangely enough, I was able to measure the output of the MIPI signal at pin 96716. At the same time, I also confirmed that the electrical connection between 96716 and Orin was normal.

I also attempted to improve the clock.

echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked

echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked

echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked

echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked

cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate

cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate

cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

Could you please offer some troubleshooting and solution methods? Thank you very much.

hello 2309200691,

ideally, these two should be identical.
please refer to SerDes Pixel Clock. you should configure serdes_pix_clk_hz to be output from SerDes chip, not from the sensors.

HI JerryChang

May I ask if the setting of “vi” in my device tree is correct?serdes_pix_clk_hz is just something I used for testing. I tried many parameters but still encountered the same problem.

hello 2309200691,

it’s NVCSI/VI to have port bindings, it should be okay per your device topology.
there’s no validate frame packet received by VI engine according to your tracing logs,
please double check the sensor side configuration.

HI JerryChang

I actually measured my MIPI output using my demultiplexer. Could the problem be occurring on the link from the demultiplexer to the Orin? For instance, the signal did not reach orin correctly or the signal quality was compromised.

hello 2309200691,

yes, it could be. as mentioned by developer guide, it be set correctly to avoid potential issues.

HI JerryChang

I modified the “lane_polarity” to 6 in the device tree. However, the trace reported an error indicating a change. Could you please tell me if this direction is correct?

     kworker/5:2-153     [005] .......    99.446358: rtcpu_nvcsi_intr: tstamp:3858209266 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
     kworker/5:2-153     [005] .......    99.446359: rtcpu_nvcsi_intr: tstamp:3858223667 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
     kworker/5:2-153     [005] .......    99.446359: rtcpu_nvcsi_intr: tstamp:3858228484 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
     kworker/5:2-153     [005] .......    99.446359: rtcpu_nvcsi_intr: tstamp:3858247028 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
     kworker/5:2-153     [005] .......    99.446359: rtcpu_nvcsi_intr: tstamp:3858248395 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
     kworker/5:2-153     [005] .......    99.446359: rtcpu_nvcsi_intr: tstamp:3858253209 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
     kworker/5:2-153     [005] .......    99.446360: rtcpu_nvcsi_intr: tstamp:3858255285 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080

hello 2309200691,

class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
it means LP sequence error. normally, it should follow by LP11->LP01->LP00->LP11 sequence. it’s more like a hardware issue.

HI JerryChang

Thank you very much for your reply.

So, should I keep lane_polarity at 6 and continue debugging, or should I restore it to 0?

hello 2309200691,

IIUC, you’re going to enable camera which utilize CSI2, right?
please keep lane_polarity = "0"; since it’s only CSI0_D1 and CSI1_D0 always been swizzled for P/N.