Integrating TC358743 HDMI to MIPI converter with ORIN_NX devkit

Hello everyone,

I’m currently trying to integrate a TC358743 HDMI to MIPI converter to ORIN_NX, running on Jetpack 5.1.2.

I followed this documentation to prepare the dtsi file

I even went through this forum to figure out why i’m facing the capture issue, by the way i’m using the tc358743.c which came along with source files.

It did help me in getting the video node i.e ls/dev/video0, also i added the extra step in csi5_fops.c to make that the lane_polarity of csi0 is set to 6.

But still i’m not able to stream the video.
In the forum many are working on ORIN NANO or a custom board, they are able to stream the video, but i’m facing issue in streaming in ORIN_NX devkit, can someone please help me figuring out the problem.
I have attached the dtsi file, the trace logs and also the dmesg that i’m getting.

include <dt-bindings/media/camera.h>
include <dt-bindings/gpio/gpio.h>
/{
/* Reference clock node required by the Toshiba driver /
tc358743_refclk: tc358743_refclk {
compatible = “fixed-clock”;

#clock-cells = <0>;
clock-frequency = <27000000>; /
27 MHz OSC */
};

    /* Direct I2C Bus Configuration (No Mux) */
    i2c@3180000 {
            status = "okay";

            tc358743@0f {
                    compatible = "toshiba,tc358743";
                    reg = <0x0f>;
                    status = "okay";

                    clocks = <&tc358743_refclk>;
                    clock-names = "refclk";
                    
                    /* 
                     * HARDWARE RESET PIN: 
                     * Replace 'H, 6' below with your specific schematic GPIO pin if different.
                     */
                    //reset-gpios = <&tegra_main_gpio TEGRA234_MAIN_GPIO(H, 6) GPIO_ACTIVE_LOW>;

                    /* NVIDIA Camera Core Properties */
                    mclk_khz = <27000>;
                    num_lanes = <2>;        /* YOUR REQUIREMENT: 2 Lanes */
                    tegra_s_fmt = "uyvy";   /* YOUR REQUIREMENT: UYVY Format */
		tegra_sinterface = "serial_a";
                    phy_mode = "DPHY";
                    discontinuous_clk = "no"; /* Forces RCE to stabilize the clock line */
                    sensor_model = "tc358743";
                    use_sensor_mode_id = "true";

                    /* THE CRITICAL FIX: The RCE Firmware Verification Modes Block */
                    modes {
                            mode0 {
                                    status = "okay";
                                    tegra_s_fmt = "uyvy";
                                    //pix_clk_hz = <74250000>; /* 1080p30 standard pixel clock */
				pix_clk_hz = <148500000>;
                                    num_lanes = <2>;
                                    width = <1920>;
                                    height = <1080>;
                                    fps = <60>;
                                    
                                    /* RCE Parser Constraints */
				active_w = "1920";
				active_h = "1080";
                                    dynamic_pixel_bit_depth = "16";
                                    csi_pixel_bit_depth = "16";
                                    mode_type = "color";
                                    pixel_t = "uyvy";
                                    line_length = <2200>;
                                    embedded_metadata_height = <0>;
                            };
                    };

                    /* V4L2 Graph: Outgoing link from Toshiba Bridge */
                    ports {
                            #address-cells = <1>;
                            #size-cells = <0>;
                            port@0 {
                                    reg = <0>;
                                    tc358743_out0: endpoint {
                                            status = "okay";
                                            port-index = <0x00>; 
                                            bus-width = <2>;
                                            clock-lanes = <0>;
                                            data-lanes = <1 2>;
                                            //link-frequencies = /bits/ 64 <297000000>;
					link-frequencies = /bits/ 64 <594000000>;
                                            remote-endpoint = <&nvcsi_in0>;
                                    };
                            };
                    };
            };
    };

    /* Hardware CSI Engine Routing */
    host1x@13e00000 {
            nvcsi@15a00000 {
                    status = "okay";
                    num-channels = <1>;
                    #address-cells = <1>;
                    #size-cells = <0>;

                    channel@0 {
                            reg = <0>;
                            status = "okay";
                            ports {
                                    #address-cells = <1>;
                                    #size-cells = <0>;
                                    /* Input Port: Receives stream from Toshiba */
                                    port@0 {
                                            reg = <0>;
                                            status = "okay";
                                            nvcsi_in0: endpoint@0 {
                                                    status = "okay";
                                                    port-index = <0x00>;
                                                    bus-width = <2>;
                                                    remote-endpoint = <&tc358743_out0>;
                                            };
                                    };
                                    /* Output Port: Pushes stream to VI Engine */
                                    port@1 {
                                            reg = <1>;
                                            status = "okay";
                                            nvcsi_out0: endpoint@1 {
                                                    status = "okay";
						port-index = <0x00>;
                                                    remote-endpoint = <&vi_in0>;
                                            };
                                    };
                                    
                            };
                    };
            };
    };

    /* Video Ingestion (VI) Routing Engine */
    tegra-capture-vi {
            status = "okay";
            num-channels = <1>;
            ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    port@0 {
                            reg = <0>;
                            status = "okay";
                            vi_in0: endpoint {
                                    status = "okay";
                                    port-index = <0x00>;
                                    bus-width = <2>;
                                    remote-endpoint = <&nvcsi_out0>;
                            };
                    };
            };
    };

    /* NVIDIA Core Camera Tracking Subsystem */
    tegra-camera-platform {
            status = "okay";
            compatible = "nvidia,tegra-camera-platform"; /* FIXED: Typo space removed */
            num_csi_lanes = <2>;
            max_lane_speed = <1500000>;
            min_bits_per_pixel = <16>;
            vi_peak_byte_per_pixel = <2>;
            vi_bw_margin_pct = <25>;
            max_pixel_rate = <150000>;
            isp_peak_byte_per_pixel = <5>;
            isp_bw_margin_pct = <25>;

            modules {
                    module0 {
                            status = "okay";
                            badge = "tc358743_hdmi_in";
                            position = "front";
                            orientation = "0";

                            drivernode0 {
                                    status = "okay";
                                    pcl_id = "v4l2_sensor";
                                    /* Assumes your kernel assigns I2C Bus index 2 to 3180000 */
                                    devname = "tc358743 2-000f"; 
                                   // proc-device-tree = "/proc/device-tree/i2c@3180000/tc358743@0f";
				sysfs-device-tree = "/sys/firmware/devicetree/base/i2c@3180000/tc358743@0f";
                            };
                    };
            };
    };

};

&tegra_main_gpio{
cam0-bridge-hog{
gpio-hog;
gpios = <TEGRA234_MAIN_GPIO(H, 6) 0>;
output-high;
line-name = “toshiba-bridge-wakeup”;
};
};

The logs
root@ubuntu:~# grep -i -E “tc358743|TCDBG|nvcsi|vi|uncorr|timeout|NULL VI|stream_id|csi_port|CHANSEL|PHY|CIL|SOF|EOF|NOMATCH|bwmgr|lane_polarity|pll|bps” ~/dmesg_trace_test.txt
[230121.123847] bwmgr API not supported
[230208.197104] bwmgr API not supported
[230208.209179] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: TCDBG: forcing lane_polarity=6 for csi_port=0
[230208.222666] tc358743 2-000f: TCDBG: s_stream enable=1 lanes_needed=2 lanes_in_use=2 refclk=27000000 pll_prd=4 pll_fbd=88 bps_pr_lane=594000000 bus_flags=0x100 mbus_fmt=0x200f
[230208.341987] tc358743 2-000f: TCDBG: after stream ON TXOPTIONCNTRL=0x00000001 CSI_STATUS=0x1244 CSI_ERR=0x00000000 VI_MUTE=0xc0 CONFCTL=0x0cd7
[230210.829005] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[230210.838239] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[230210.848361] (NULL device *): vi_capture_control_message: NULL VI channel received
[230210.856163] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[230210.866911] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: TCDBG: forcing lane_polarity=6 for csi_port=0
[230210.876416] (NULL device *): vi_capture_control_message: NULL VI channel received
[230210.884219] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[230210.895044] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[230213.644920] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[230213.654154] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[230213.664356] (NULL device *): vi_capture_control_message: NULL VI channel received
[230213.672161] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[230213.682914] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: TCDBG: forcing lane_polarity=6 for csi_port=0
[230213.692430] (NULL device *): vi_capture_control_message: NULL VI channel received
[230213.700218] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[230213.711085] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

tonbo@ubuntu:~$ v4l2-ctl -d /dev/video0 \

--set-ctrl=bypass_mode=0
–stream-mmap=4
–stream-count=5
–stream-to=/dev/null
–verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
New timings found
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 4147200 ts: 0.000000 (error, ts-monotonic, ts-src-eof)

tonbo@ubuntu:~$ grep -i -E “tegra_channel|csi_s_stream|capture|rtcpu|vinotify|nvcsi|CHANSEL|PHY|CIL|SOF|EOF|NOMATCH|TDSTATE|CSIMUX|VI|ERROR|uncorr|timeout” ~/trace_deep_trace.txt | tail -300

| / _—=> hardirq/softirq

    v4l2-ctl-9530    [002] .... 230473.028947: tegra_channel_open: vi-output, tc358743 2-000f
    v4l2-ctl-9530    [002] .... 230473.040340: tegra_channel_set_power: tc358743 2-000f : 0x1
    v4l2-ctl-9530    [002] .... 230473.040348: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2-ctl-9530    [002] .... 230473.041025: nvhost_module_enable_clk: dev=13e40000.host1x:nvcsi@15a00000, num_clks=1
    v4l2-ctl-9530    [002] .... 230473.041031: nvhost_vm_init_device: name=13e40000.host1x:nvcsi@15a00000
    v4l2-ctl-9530    [002] .... 230473.041259: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
    v4l2-ctl-9530    [002] .... 230473.049957: tegra_channel_set_stream: enable : 0x1
    v4l2-ctl-9530    [002] .... 230473.049968: nvhost_module_update_rate: dev=13e40000.host1x:vi1@14c00000, clock=vi, rate=165000001
    v4l2-ctl-9530    [002] .... 230473.052597: nvhost_module_update_rate: dev=13e40000.host1x:vi0@15c00000, clock=vi, rate=165000001
    v4l2-ctl-9530    [002] .... 230473.055364: nvhost_module_update_rate: dev=13e40000.host1x:nvcsi@15a00000, clock=nvcsi, rate=206250001
    v4l2-ctl-9530    [002] .... 230473.070077: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2-ctl-9530    [002] .... 230473.070079: csi_s_stream: enable : 0x1
    v4l2-ctl-9530    [002] .... 230473.083559: tegra_channel_set_stream: tc358743 2-000f : 0x1

vi-output, tc35-9532 [001] … 230475.847942: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13

Can someone please tell me where i’m going wrong?

— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —

Based on the provided context, it appears that you are trying to integrate a TC358743 HDMI to MIPI converter with the ORIN_NX devkit, running on Jetpack 5.1.2. You have prepared the dtsi file according to the documentation and have even gone through a forum to figure out why you are facing a capture issue.

The logs you provided show that the camera sensor driver is acquiring data from the camera’s sensor over the CSI bus, but there are errors related to the VI channel not being found, and the capture channel being reset.

One possible issue is that the lane polarity of the CSI port is not set correctly. In the provided dtsi file, the lane polarity is set to 6, but it’s not clear if this is the correct value for your specific setup.

Another possible issue is that the Toshiba Bridge is not being properly configured. The dtsi file includes a section for the Toshiba Bridge, but it’s not clear if this is being properly initialized.

To troubleshoot this issue, you may want to try the following:

  1. Verify that the lane polarity is set correctly for your specific setup.
  2. Check that the Toshiba Bridge is being properly initialized.
  3. Try setting the lane_polarity value to a different value, such as 0 or 1, to see if this resolves the issue.
  4. Check the kernel logs for any errors related to the CSI port or the Toshiba Bridge.

Here is an example of how you can modify the dtsi file to set the lane polarity to 0:

nvcsi@15a00000 {
    status = "okay";
    num-channels = <1>;
    #address-cells = <1>;
    #size-cells = <0>;
    channel@0 {
        reg = <0>;
        status = "okay";
        ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
                reg = <0>;
                status = "okay";
                nvcsi_in0: endpoint@0 {
                    status = "okay";
                    port-index = <0x00>;
                    bus-width = <2>;
                    remote-endpoint = <&tc358743_out0>;
                    lane-polarity = <0>; // Set lane polarity to 0
                };
            };
        };
    };
};

Note that this is just an example, and you should verify that the lane polarity value is correct for your specific setup.

I hope this helps! Let me know if you have any further questions or if there’s anything else I can help with.

— We support team will also look into your issue to have further suggestions soon. please stay tuned. —

Doesn’t looks like receive any validate data from the trace log.

Thanks

Hello Shane, thanks for reply.

What do you mean there’s no valid data, should i provide you with any other data or isn’t the data reaching ORIN?

From the trace log the nvcsi/vi don’t receive any data from the sensor.

Yes, thanks for confirmation, how do i debug it, because i checked the connections, I have connected to CSI0 and also set the lane polarity to 6, but still i’m not able to recieve the data, what can be done?

You may need have scope to probe the MIPI signal to confirm the output signal follow the MIPI spec.

Thanks

Ok thank you, I will try that.

Hello @ShaneCCC , I used the scope to probe the MIPI lanes, I checked the clock lane and the data lanes coming out from the tc358743, the voltages and frequency were present. I also confirmed it from software side, the tc358743 is defintely giving out the necessary data, but ORIN is not accepting it, why is that happening?

tonbo@ubuntu:~$ sudo dmesg | grep -i -E “Chip status|Signal status|CSI-TX status|HDMI status|Detected format|Configured format|Cable|TMDS|Stable|PLL|DE|Transmit|Receive|Stopped|Lanes|Color|tc358743|CSI_STATUS|CSI_ERR”

[ 164.610646] tc358743 2-000f: TCDBG: s_stream enable=1 lanes_needed=2 lanes_in_use=2 refclk=27000000 pll_prd=4 pll_fbd=88 bps_pr_lane=594000000 bus_flags=0x100 mbus_fmt=0x200f

[ 164.728403] tc358743 2-000f: TCDBG: after stream ON TXOPTIONCNTRL=0x00000001 CSI_STATUS=0x1244 CSI_ERR=0x00000000 VI_MUTE=0xc0 CONFCTL=0x0cd7

[ 167.359137] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 167.387097] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 170.175151] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 170.203025] (NULL device *): vi_capture_control_message: NULL VI channel received

[ 170.884710] tc358743 2-000f: -----Chip status-----
[ 170.884906] tc358743 2-000f: Chip ID: 0x00
[ 170.885100] tc358743 2-000f: Chip revision: 0x00
[ 170.885103] tc358743 2-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
[ 170.885105] tc358743 2-000f: Sleep mode: off
[ 170.885106] tc358743 2-000f: Cable detected (+5V power): yes
[ 170.885275] tc358743 2-000f: DDC lines enabled: yes
[ 170.885443] tc358743 2-000f: Hotplug enabled: yes
[ 170.885637] tc358743 2-000f: CEC enabled: no
[ 170.885638] tc358743 2-000f: -----Signal status-----
[ 170.885640] tc358743 2-000f: TMDS signal detected: yes
[ 170.885641] tc358743 2-000f: Stable sync signal: yes
[ 170.885642] tc358743 2-000f: PHY PLL locked: yes
[ 170.885643] tc358743 2-000f: PHY DE detected: yes
[ 170.887959] tc358743 2-000f: Detected format: 1920x1080p30.00 (2200x1125)
[ 170.887964] tc358743 2-000f: horizontal: fp = 0, -sync = 280, bp = 0
[ 170.887967] tc358743 2-000f: vertical: fp = 0, -sync = 45, bp = 0
[ 170.887969] tc358743 2-000f: pixelclock: 74250000
[ 170.887973] tc358743 2-000f: flags (0x0):
[ 170.887975] tc358743 2-000f: standards (0x0):
[ 170.887979] tc358743 2-000f: Configured format: 1920x1080p30.00 (2200x1125)
[ 170.887982] tc358743 2-000f: horizontal: fp = 0, -sync = 280, bp = 0
[ 170.887985] tc358743 2-000f: vertical: fp = 0, -sync = 45, bp = 0
[ 170.887987] tc358743 2-000f: pixelclock: 74250000
[ 170.887990] tc358743 2-000f: flags (0x0):
[ 170.887992] tc358743 2-000f: standards (0x0):
[ 170.887994] tc358743 2-000f: -----CSI-TX status-----
[ 170.887997] tc358743 2-000f: Lanes needed: 2
[ 170.887999] tc358743 2-000f: Lanes in use: 2
[ 170.888195] tc358743 2-000f: Waiting for particular sync signal: no
[ 170.888388] tc358743 2-000f: Transmit mode: yes
[ 170.888625] tc358743 2-000f: Receive mode: no
[ 170.888819] tc358743 2-000f: Stopped: no
[ 170.888820] tc358743 2-000f: Color space: YCbCr 422 16-bit
[ 170.888986] tc358743 2-000f: -----HDMI status-----
[ 170.888987] tc358743 2-000f: HDCP encrypted content: no
[ 170.888989] tc358743 2-000f: Input color space: YCbCr 709 limited range
[ 170.889156] tc358743 2-000f: AV Mute: off
[ 170.889356] tc358743 2-000f: Deep color mode: 8-bits per channel
[ 170.890098] tc358743 2-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
[ 170.890101] tc358743 2-000f: colorspace: YCbCr 4:4:4
[ 170.890103] tc358743 2-000f: scan mode: No Data
[ 170.890105] tc358743 2-000f: colorimetry: ITU709
[ 170.890106] tc358743 2-000f: picture aspect: 16:9
[ 170.890108] tc358743 2-000f: active aspect: Same as Picture
[ 170.890109] tc358743 2-000f: itc: No Data
[ 170.890111] tc358743 2-000f: extended colorimetry: xvYCC 601
[ 170.890112] tc358743 2-000f: quantization range: Default
[ 170.890114] tc358743 2-000f: nups: Unknown Non-uniform Scaling
[ 170.890116] tc358743 2-000f: video code: 34
[ 170.890117] tc358743 2-000f: ycc quantization range: Limited
[ 170.890119] tc358743 2-000f: hdmi content type: Graphics
[ 170.890120] tc358743 2-000f: pixel repeat: 0
[ 170.890122] tc358743 2-000f: bar top 0, bottom 0, left 0, right 0

[ 172.991160] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 173.018987] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 175.807138] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 175.834918] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 178.623140] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 178.650985] (NULL device *): vi_capture_control_message: NULL VI channel received

Please get the trace log.

sudo su
modprobe rtcpu_debug

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl --stream-mmap -c bypass_mode=0

cat /sys/kernel/debug/tracing/trace


Thanks for reply @ShaneCCC , I couldn’t find the rtcpu_debug in my currnet kernel version
tonbo@ubuntu:~$ sudo su
root@ubuntu:/home/tonbo# modprobe rtcpu_debug
modprobe: FATAL: Module rtcpu_debug not found in directory /lib/modules/5.10.120-tegra

So I used this

root@ubuntu:/home/tonbo# echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
root@ubuntu:/home/tonbo# echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
root@ubuntu:/home/tonbo# echo 4096 > /sys/kernel/debug/tracing/buffer_size_kb

root@ubuntu:/home/tonbo# echo “” > /sys/kernel/debug/tracing/trace
root@ubuntu:/home/tonbo# echo 1 > /sys/kernel/debug/tracing/tracing_on
root@ubuntu:/home/tonbo# echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
root@ubuntu:/home/tonbo# echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
root@ubuntu:/home/tonbo# echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
root@ubuntu:/home/tonbo# echo 3 > /sys/kernel/debug/camrtc/log-level
root@ubuntu:/home/tonbo# echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
root@ubuntu:/home/tonbo# echo > /sys/kernel/debug/tracing/trace

root@ubuntu:/home/tonbo# v4l2-ctl --stream-mmap -c bypass_mode=0
New timings found

This is what i got from cat /sys/kernel/debug/tracing/trace

ype:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333994: rtcpu_nvcsi_intr: tstamp:12611700109 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333994: rtcpu_nvcsi_intr: tstamp:12611701034 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333994: rtcpu_nvcsi_intr: tstamp:12611701959 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333994: rtcpu_nvcsi_intr: tstamp:12611702885 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333995: rtcpu_nvcsi_intr: tstamp:12611703811 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333995: rtcpu_nvcsi_intr: tstamp:12611704738 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333995: rtcpu_nvcsi_intr: tstamp:12611705664 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333995: rtcpu_nvcsi_intr: tstamp:12611706589 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333995: rtcpu_nvcsi_intr: tstamp:12611707514 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333996: rtcpu_nvcsi_intr: tstamp:12611708440 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333996: rtcpu_nvcsi_intr: tstamp:12611709366 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333996: rtcpu_nvcsi_intr: tstamp:12611710293 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333996: rtcpu_nvcsi_intr: tstamp:12611711219 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333996: rtcpu_nvcsi_intr: tstamp:12611712142 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333997: rtcpu_nvcsi_intr: tstamp:12611713068 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333997: rtcpu_nvcsi_intr: tstamp:12611713995 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333997: rtcpu_nvcsi_intr: tstamp:12611714921 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333997: rtcpu_nvcsi_intr: tstamp:12611715848 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333997: rtcpu_nvcsi_intr: tstamp:12611716774 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333998: rtcpu_nvcsi_intr: tstamp:12611717697 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333998: rtcpu_nvcsi_intr: tstamp:12611718624 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333998: rtcpu_nvcsi_intr: tstamp:12611719550 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333998: rtcpu_nvcsi_intr: tstamp:12611720476 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333998: rtcpu_nvcsi_intr: tstamp:12611721403 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333999: rtcpu_nvcsi_intr: tstamp:12611722327 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333999: rtcpu_nvcsi_intr: tstamp:12611723252 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333999: rtcpu_nvcsi_intr: tstamp:12611724179 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333999: rtcpu_nvcsi_intr: tstamp:12611725105 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333999: rtcpu_nvcsi_intr: tstamp:12611726031 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.333999: rtcpu_nvcsi_intr: tstamp:12611726958 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044
kworker/0:9-176 [000] … 391.334000: rtcpu_nvcsi_intr: tstamp:12611727881 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000044

PHY_INTR0 ... status:0x00000044 means MIPI SOT multi-bit errors on both data lanes.

More specifically:

  • bit 0x04 = lane 0 SOT MB error
  • bit 0x40 = lane 1 SOT MB error

So your two lines indicate the receiver is seeing corrupted Start-Of-Transmission on both lanes of PHY0/CIL0.

What it usually points to

The closest internal guidance says 0x44 is a hardware/link-side issue, commonly tied to MIPI settle-time problems.

What to check first

  1. cil_settletime in DT / driver.
  2. pix_clk_hz and, if using SerDes, serdes_pix_clk_hz.
  3. Lane count / mapping / polarity and overall MIPI SI margin.

Thank you , I’ll check these 3 points and update you.

@ShaneCCC , I referred this Sensor Software Driver Programming — NVIDIA Jetson Linux Developer Guide , to calculate the pix_clk_hz and the driver and datasheet ,

With the driver’s tested/default link-frequencies = <297000000>, lane rate is 2 * 297 MHz = 594 Mbps/lane.

  1. pix_clk_hz = 594 Mbps * 2 lanes / 16 bpp = 74,250,000

    cil_settletime = 20

I changes these values in the main device tree, i cross checked with the lanes, i’m using CSI0(J12 CAM1) in the devkit.
Even after all these changes , I’m still getting the same output in the trace logs

kworker/2:0-2024 [002] … 4478.011508: rtcpu_nvcsi_intr: tstamp:140324446715 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011508: rtcpu_nvcsi_intr: tstamp:140324447642 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011508: rtcpu_nvcsi_intr: tstamp:140324448568 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011509: rtcpu_nvcsi_intr: tstamp:140324449494 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011509: rtcpu_nvcsi_intr: tstamp:140324450420 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011509: rtcpu_nvcsi_intr: tstamp:140324451347 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011510: rtcpu_nvcsi_intr: tstamp:140324452270 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011510: rtcpu_nvcsi_intr: tstamp:140324453200 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:5 status:0x00000002
kworker/2:0-2024 [002] … 4478.011511: rtcpu_nvcsi_intr: tstamp:140324453200 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:5 status:0x00000002
kworker/2:0-2024 [002] … 4478.011511: rtcpu_nvcsi_intr: tstamp:140324454009 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:5 status:0x00000008
kworker/2:0-2024 [002] … 4478.011511: rtcpu_nvcsi_intr: tstamp:140324454009 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:5 status:0x00000008
kworker/2:0-2024 [002] … 4478.011512: rtcpu_nvcsi_intr: tstamp:140324454582 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011512: rtcpu_nvcsi_intr: tstamp:140324455049 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011512: rtcpu_nvcsi_intr: tstamp:140324455976 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011513: rtcpu_nvcsi_intr: tstamp:140324456899 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011513: rtcpu_nvcsi_intr: tstamp:140324457825 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011514: rtcpu_nvcsi_intr: tstamp:140324458751 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011514: rtcpu_nvcsi_intr: tstamp:140324459678 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040
kworker/2:0-2024 [002] … 4478.011514: rtcpu_nvcsi_intr: tstamp:140324460604 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000040

Is there any mistake in the device tree?

CSI0 should set the port-index=1 and lane_polarity = 6

@ShaneCCC , First of all sorry for wrong information in the previous reply, I thought i was getting data through MIPI, when i checked with scope, but a hardware engineer came and probed the MIPI lanes using differential probe, only the clock was coming, but the data through the MIPI lanes were not coming.

This was what coming through MIPI data lanes, its just noise

This is the clock signal

We probed these lanes

We checked CSI0_D0_N and CSI0_D0_P, and CSI0_D1_N, CSI0_D1_P, both these lanes were showing nothing, while the clock CSI0_CLK_N and CSI0_CLK_P were working fine.

Can you please tell why this is happening?I checked the same converter with Raspberry pi 3, it was working there, i could also see the video, but here the video data is not even reaching ORIN

You are working on customized carrier board instead of devkit?

No, I’m working on the devkit, this one, eventually i’ll be integrating this on a custom board, our custom board is designed similar to this devkit. So i wanted to test this on the devkit

For the dekit you should probe the CSI-1 instead of CSI-0

Yes, i probed both CSI0 and CSI1 just to be sure, i wasn’t getting data on any of the lanes