TC258743 on Jetson Orin NX

Hi,

I’d like to use HDMI-CSI bridge TC358743 with Orin Nx, but I have a simmilar problem to this topics:

I know that I should reduce pix_clk_hz value, but I don’t know how to do it. When I added mode0 with pix_clk_hz, orin cannot boot.

tc358743_cam0: tc358743@0f {
	compatible = "toshiba,tc358743";
	/* I2C device address */
	reg = <0x0f>;
	
	status = "okay";
	
	/* V4L2 device node location */
	devnode = "video0";
	
	clocks = <&tc358743_clk>;
	clock-names = "refclk";
	
	reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
	
	/* Physical dimensions of sensor */
	physical_w = "4.713";
	physical_h = "3.494";

	sensor_model = "tc358743";			
	
	ports {
		status = "okay";
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			status = "okay";
			reg = <0>;
			tc358743_out0: endpoint {
				port-index = <0>;
				bus-width = <2>;
				data-lanes = <1 2>;
				clock-lanes = <0>;
				link-frequencies = /bits/ 64 <297000000>;
				remote-endpoint = <&tc358743_csi_in0>;
			};
		};
	};
};

hello piotr_nbt,

how you update the device tree, did you confirm the changes is applied correctly?
besides, what’s the failure on kernel side to enable the camera stream?

Yes, I’m sure that DT is applied correctly (new dtb in /boot/dtb and extlinux.conf updated).

TC358743 log

 [  828.471448] tegra-camrtc-capture-vi tegra-captu: =================  START STATUS  =================
   [  828.475679] tc358743 33-000f: -----Chip status-----
   [  828.475882] tc358743 33-000f: Chip ID: 0x00
   [  828.476084] tc358743 33-000f: Chip revision: 0x00
   [  828.476086] tc358743 33-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
   [  828.476088] tc358743 33-000f: Sleep mode: off
   [  828.476090] tc358743 33-000f: Cable detected (+5V power): yes
   [  828.476267] tc358743 33-000f: DDC lines enabled: yes
   [  828.476443] tc358743 33-000f: Hotplug enabled: no
   [  828.476645] tc358743 33-000f: CEC enabled: no
   [  828.476646] tc358743 33-000f: -----Signal status-----
   [  828.476647] tc358743 33-000f: TMDS signal detected: yes
   [  828.476648] tc358743 33-000f: Stable sync signal: yes
   [  828.476649] tc358743 33-000f: PHY PLL locked: yes
   [  828.476650] tc358743 33-000f: PHY DE detected: yes
   [  828.478939] tc358743 33-000f: Detected format: 720x576p50.00 (864x625)
   [  828.478941] tc358743 33-000f: horizontal: fp = 0, -sync = 144, bp = 0
   [  828.478943] tc358743 33-000f: vertical: fp = 0, -sync = 49, bp = 0
   [  828.478945] tc358743 33-000f: pixelclock: 27000000
   [  828.478947] tc358743 33-000f: flags (0x0):
   [  828.478949] tc358743 33-000f: standards (0x0):
   [  828.478951] tc358743 33-000f: Configured format: 720x576p50.00 (864x625)
   [  828.478953] tc358743 33-000f: horizontal: fp = 0, -sync = 144, bp = 0
   [  828.478955] tc358743 33-000f: vertical: fp = 0, -sync = 49, bp = 0
   [  828.478956] tc358743 33-000f: pixelclock: 27000000
   [  828.478958] tc358743 33-000f: flags (0x0):
   [  828.478959] tc358743 33-000f: standards (0x0):
   [  828.478961] tc358743 33-000f: -----CSI-TX status-----
   [  828.478963] tc358743 33-000f: Lanes needed: 1
   [  828.478964] tc358743 33-000f: Lanes in use: 1
   [  828.479165] tc358743 33-000f: Waiting for particular sync signal: no
   [  828.479367] tc358743 33-000f: Transmit mode: no
   [  828.479568] tc358743 33-000f: Receive mode: no
   [  828.479769] tc358743 33-000f: Stopped: no
   [  828.479770] tc358743 33-000f: Color space: YCbCr 422 16-bit
   [  828.479947] tc358743 33-000f: -----HDMI status-----
   [  828.479948] tc358743 33-000f: HDCP encrypted content: no
   [  828.479950] tc358743 33-000f: Input color space: YCbCr 601 limited range
   [  828.480127] tc358743 33-000f: AV Mute: off
   [  828.480303] tc358743 33-000f: Deep color mode: 8-bits per channel
   [  828.481061] tc358743 33-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
   [  828.481064] tc358743 33-000f:     colorspace: YCbCr 4:2:2
   [  828.481066] tc358743 33-000f:     scan mode: Underscan
   [  828.481068] tc358743 33-000f:     colorimetry: ITU601
   [  828.481069] tc358743 33-000f:     picture aspect: 4:3
   [  828.481071] tc358743 33-000f:     active aspect: Same as Picture
   [  828.481072] tc358743 33-000f:     itc: No Data
   [  828.481074] tc358743 33-000f:     extended colorimetry: xvYCC 601
   [  828.481075] tc358743 33-000f:     quantization range: Limited
   [  828.481077] tc358743 33-000f:     nups: Unknown Non-uniform Scaling
   [  828.481078] tc358743 33-000f:     video code: 17
   [  828.481080] tc358743 33-000f:     ycc quantization range: Limited
   [  828.481081] tc358743 33-000f:     hdmi content type: Graphics
   [  828.481083] tc358743 33-000f:     pixel repeat: 0
   [  828.481085] tc358743 33-000f:     bar top 0, bottom 0, left 0, right 0
   [  828.481086] tegra-camrtc-capture-vi tegra-captu: ==================  END STATUS  ==================

Kernel log

[   93.209161] falcon 154c0000.nvenc: Direct firmware load for nvhost_nvenc080.fw failed with error -2
[   93.218514] falcon 154c0000.nvenc: Falling back to sysfs fallback for: nvhost_nvenc080.fw
[   93.229249] falcon 154c0000.nvenc: looking for firmware in subdirectory
[   93.307829] bwmgr API not supported
[   95.993057] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[   96.005810] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[   96.016192] (NULL device *): vi_capture_control_message: NULL VI channel received
[   96.023987] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[   96.034683] (NULL device *): vi_capture_control_message: NULL VI channel received
[   96.042424] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[   96.053219] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[   98.809028] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[   98.818191] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[   98.828836] (NULL device *): vi_capture_control_message: NULL VI channel received
[   98.836795] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[   98.847476] (NULL device *): vi_capture_control_message: NULL VI channel received
[   98.855191] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[   98.866180] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  101.624926] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  101.634078] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  101.644814] (NULL device *): vi_capture_control_message: NULL VI channel received
[  101.652698] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  101.663402] (NULL device *): vi_capture_control_message: NULL VI channel received
[  101.671141] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  101.682001] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  104.440091] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  104.449221] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  104.459940] (NULL device *): vi_capture_control_message: NULL VI channel received
[  104.467668] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  104.478323] (NULL device *): vi_capture_control_message: NULL VI channel received
[  104.486040] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  104.496783] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  107.255993] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  107.265137] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  107.280115] (NULL device *): vi_capture_control_message: NULL VI channel received
[  107.287836] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  107.298493] (NULL device *): vi_capture_control_message: NULL VI channel received
[  107.306210] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  107.316997] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  110.071896] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  110.081034] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  110.090784] (NULL device *): vi_capture_control_message: NULL VI channel received
[  110.098497] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  110.109159] (NULL device *): vi_capture_control_message: NULL VI channel received
[  110.116879] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  110.127628] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  112.887817] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  112.896949] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  112.906777] (NULL device *): vi_capture_control_message: NULL VI channel received
[  112.914493] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  112.925154] (NULL device *): vi_capture_control_message: NULL VI channel received
[  112.932871] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  112.943583] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  115.455768] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  115.464911] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  115.475273] (NULL device *): vi_capture_control_message: NULL VI channel received
[  115.482988] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  115.493650] (NULL device *): vi_capture_control_message: NULL VI channel received
[  115.501364] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  115.512214] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  115.529896] bwmgr API not supported

camrtc trace

# tracer: nop
#
# entries-in-buffer/entries-written: 39945/487753   #P:8
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
  gst-launch-1.0-4072    [006] ....  7198.280282: tegra_channel_open: vi-output, 13e40000.host1x:nvcs
  gst-launch-1.0-4072    [006] ....  7198.280372: tegra_channel_close: vi-output, 13e40000.host1x:nvcs
  gst-launch-1.0-4072    [006] ....  7198.280381: tegra_channel_open: vi-output, tc358743 33-000f
  gst-launch-1.0-4072    [006] ....  7198.280393: tegra_channel_close: vi-output, tc358743 33-000f
  gst-launch-1.0-4072    [006] ....  7198.356877: tegra_channel_open: vi-output, tc358743 33-000f
##### CPU 7 buffer started ####
    v4l2src0:src-4080    [007] ....  7198.369356: tegra_channel_set_power: tc358743 33-000f : 0x1
    v4l2src0:src-4080    [007] ....  7198.369360: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2src0:src-4080    [007] ....  7198.369363: csi_s_power: enable : 0x1
    v4l2src0:src-4080    [007] ....  7198.369997: tegra_channel_capture_setup: vnc_id 0 W 720 H 576 fmt 13
    v4l2src0:src-4080    [007] ....  7198.376400: tegra_channel_set_stream: enable : 0x1
    v4l2src0:src-4080    [007] ....  7198.388535: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2src0:src-4080    [007] ....  7198.388538: csi_s_stream: enable : 0x1
    v4l2src0:src-4080    [007] ....  7198.389153: tegra_channel_set_stream: tc358743 33-000f : 0x1
##### CPU 4 buffer started ####
 vi-output, tc35-4083    [004] ....  7206.711728: tegra_channel_capture_setup: vnc_id 0 W 720 H 576 fmt 13
##### CPU 3 buffer started ####
     kworker/3:9-166     [003] ....  7208.462669: rtcpu_nvcsi_intr: tstamp:225941763378 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462669: rtcpu_nvcsi_intr: tstamp:225941764012 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462670: rtcpu_nvcsi_intr: tstamp:225941764650 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462670: rtcpu_nvcsi_intr: tstamp:225941765284 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462670: rtcpu_nvcsi_intr: tstamp:225941765921 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462671: rtcpu_nvcsi_intr: tstamp:225941766556 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462671: rtcpu_nvcsi_intr: tstamp:225941767202 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462671: rtcpu_nvcsi_intr: tstamp:225941767849 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462672: rtcpu_nvcsi_intr: tstamp:225941768483 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462672: rtcpu_nvcsi_intr: tstamp:225941769117 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462673: rtcpu_nvcsi_intr: tstamp:225941769754 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462673: rtcpu_nvcsi_intr: tstamp:225941770390 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462673: rtcpu_nvcsi_intr: tstamp:225941771026 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462674: rtcpu_nvcsi_intr: tstamp:225941771661 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462674: rtcpu_nvcsi_intr: tstamp:225941772461 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462674: rtcpu_nvcsi_intr: tstamp:225941773107 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462675: rtcpu_nvcsi_intr: tstamp:225941773742 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462675: rtcpu_nvcsi_intr: tstamp:225941774378 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
     kworker/3:9-166     [003] ....  7208.462676: rtcpu_nvcsi_intr: tstamp:225941775013 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004

hello piotr_nbt,

the VI tracing log indicate there’s PHY interrupt error.
for example, rtcpu_nvcsi_intr: tstamp:225941763378 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000004
it’s trigger bit-2, which means there’s more than one bit error detected on the data-lane sync word.
this usually the failure from the sensor side, please review the configuration of your bridge driver.

BTW,
please download Jetson Orin NX Series and Orin Nano Series Design Guide and check [Figure 10-1. CSI Connection Options].
you’ll see lane polarity swizzle for 1st CSI brick, i.e. CSI-A and CSI-B.
you should moving to the latest Jetpack release, JP-5.1. there’s device tree property, lane_polarity to configure lane polarity for the camera connections.
please see-also reference driver, for example, $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-camera-rbpcv2-imx219.dtsi
re-cap as below for lane_polarity descriptions,

                                * lane_polarity
                                * Based on the camera connector pin.
                                * CSIx_D0 | CSIx_D1 | CSI(X+1)_D0 | CSI(X+1)CSIx_D1
                                *    LSB  |   BIT1  |     BIT2    |      MSB
                                * if there is a polarity swap on any lane, the bit corrsponding
                                * to the lane should be set
                                * e.g. polarity swap on CSIx_D0 only -> lane_polarity = "1"; 0001
                                * e.g. polarity swap on CSIx_D1 and CSI(X+1)_D0 -> lane_polarity = "6"; 0110

@JerryChang Thank you for your replay.

Coud you give me advice how to update lane_polarity wihout modeX property in the DT? I’m using MIPI-CSI 2 bridge driver (tc358743), if I add the modeX, I will have a kernel panic.

hello piotr_nbt,

it shall also parse lane_polarity under the same node without mode property.
please check kernel sources for the csi5_stream_set_config() function.
for example, $public_sources/kernel_src/kernel/nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c

Hi,

I have tested lane_polarity, different CSI port, different dev board with tc358743 and different HDMI image source but still not working (green image on gstreamer).

My actual logs:

camrtc

 kworker/2:3-146     [002] ....   141.297345: rtcpu_string: tstamp:5092805165 id:0x04010000 str:"VM0 deactivating."
  gst-launch-1.0-3026    [005] ....   160.904809: tegra_channel_open: vi-output, tc358743 30-000f
  gst-launch-1.0-3026    [005] ....   160.904901: tegra_channel_close: vi-output, tc358743 30-000f
  gst-launch-1.0-3026    [005] ....   160.904910: tegra_channel_open: vi-output, imx477 31-001a
  gst-launch-1.0-3026    [005] ....   160.904922: tegra_channel_close: vi-output, imx477 31-001a
  gst-launch-1.0-3026    [005] ....   160.982067: tegra_channel_open: vi-output, tc358743 30-000f
    v4l2src0:src-3034    [007] ....   160.994369: tegra_channel_set_power: tc358743 30-000f : 0x1
    v4l2src0:src-3034    [007] ....   160.994372: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2src0:src-3034    [007] ....   160.994373: csi_s_power: enable : 0x1
    v4l2src0:src-3034    [007] ....   160.995050: tegra_channel_capture_setup: vnc_id 0 W 720 H 576 fmt 13
    v4l2src0:src-3034    [007] ....   161.001601: tegra_channel_set_stream: enable : 0x1
    v4l2src0:src-3034    [007] ....   161.016727: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2src0:src-3034    [007] ....   161.016729: csi_s_stream: enable : 0x1
    v4l2src0:src-3034    [007] ....   161.017037: tegra_channel_set_stream: tc358743 30-000f : 0x1
     kworker/2:3-146     [002] ....   161.022149: rtcpu_string: tstamp:5709547893 id:0x04010000 str:"VM0 activating."
     kworker/2:3-146     [002] ....   161.022152: rtcpu_vinotify_event: tstamp:5710049939 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:182709813696 data:0x399e300010000000
     kworker/2:3-146     [002] ....   161.022153: rtcpu_vinotify_event: tstamp:5710050139 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:182709820192 data:0x0000000031000001
     kworker/2:3-146     [002] ....   161.022153: rtcpu_vinotify_event: tstamp:5710050339 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:182709865920 data:0x399e2d0010000000
     kworker/2:3-146     [002] ....   161.022153: rtcpu_vinotify_event: tstamp:5710050507 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:182709872448 data:0x0000000031000002
     kworker/2:3-146     [002] ....   161.022155: rtcpu_nvcsi_intr: tstamp:5710190525 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022156: rtcpu_nvcsi_intr: tstamp:5710191213 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022156: rtcpu_nvcsi_intr: tstamp:5710191848 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022156: rtcpu_nvcsi_intr: tstamp:5710192482 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022156: rtcpu_nvcsi_intr: tstamp:5710193117 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022157: rtcpu_nvcsi_intr: tstamp:5710193754 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022157: rtcpu_nvcsi_intr: tstamp:5710194389 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022157: rtcpu_nvcsi_intr: tstamp:5710195025 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022158: rtcpu_nvcsi_intr: tstamp:5710195660 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004
     kworker/2:3-146     [002] ....   161.022158: rtcpu_nvcsi_intr: tstamp:5710196473 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000004

kenrel

[  161.004868] bwmgr API not supported
[  163.502260] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  163.514989] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  163.525201] (NULL device *): vi_capture_control_message: NULL VI channel received
[  163.532920] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=3, csi_port=3
[  163.544072] (NULL device *): vi_capture_control_message: NULL VI channel received
[  163.551792] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 3 vc- 0
[  163.562611] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

v4l2-ctl

[  438.297327] tegra-camrtc-capture-vi tegra-captu: =================  START STATUS  =================
   [  438.301548] tc358743 30-000f: -----Chip status-----
   [  438.301754] tc358743 30-000f: Chip ID: 0x00
   [  438.301960] tc358743 30-000f: Chip revision: 0x00
   [  438.301962] tc358743 30-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
   [  438.301964] tc358743 30-000f: Sleep mode: off
   [  438.301965] tc358743 30-000f: Cable detected (+5V power): yes
   [  438.302145] tc358743 30-000f: DDC lines enabled: yes
   [  438.302323] tc358743 30-000f: Hotplug enabled: no
   [  438.302527] tc358743 30-000f: CEC enabled: no
   [  438.302528] tc358743 30-000f: -----Signal status-----
   [  438.302530] tc358743 30-000f: TMDS signal detected: yes
   [  438.302531] tc358743 30-000f: Stable sync signal: yes
   [  438.302532] tc358743 30-000f: PHY PLL locked: yes
   [  438.302533] tc358743 30-000f: PHY DE detected: yes
   [  438.304847] tc358743 30-000f: Detected format: 720x576p50.00 (864x625)
   [  438.304849] tc358743 30-000f: horizontal: fp = 0, -sync = 144, bp = 0
   [  438.304851] tc358743 30-000f: vertical: fp = 0, -sync = 49, bp = 0
   [  438.304853] tc358743 30-000f: pixelclock: 27000000
   [  438.304855] tc358743 30-000f: flags (0x0):
   [  438.304856] tc358743 30-000f: standards (0x0):
   [  438.304858] tc358743 30-000f: Configured format: 720x576p50.00 (864x625)
   [  438.304860] tc358743 30-000f: horizontal: fp = 0, -sync = 144, bp = 0
   [  438.304861] tc358743 30-000f: vertical: fp = 0, -sync = 49, bp = 0
   [  438.304862] tc358743 30-000f: pixelclock: 27000000
   [  438.304864] tc358743 30-000f: flags (0x0):
   [  438.304865] tc358743 30-000f: standards (0x0):
   [  438.304866] tc358743 30-000f: -----CSI-TX status-----
   [  438.304868] tc358743 30-000f: Lanes needed: 1
   [  438.304869] tc358743 30-000f: Lanes in use: 1
   [  438.305080] tc358743 30-000f: Waiting for particular sync signal: no
   [  438.305290] tc358743 30-000f: Transmit mode: no
   [  438.305497] tc358743 30-000f: Receive mode: no
   [  438.305702] tc358743 30-000f: Stopped: no
   [  438.305703] tc358743 30-000f: Color space: YCbCr 422 16-bit
   [  438.305882] tc358743 30-000f: -----HDMI status-----
   [  438.305883] tc358743 30-000f: HDCP encrypted content: no
   [  438.305885] tc358743 30-000f: Input color space: RGB limited range
   [  438.306065] tc358743 30-000f: AV Mute: off
   [  438.306244] tc358743 30-000f: Deep color mode: 8-bits per channel
   [  438.307010] tc358743 30-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
   [  438.307013] tc358743 30-000f:     colorspace: RGB
   [  438.307014] tc358743 30-000f:     scan mode: No Data
   [  438.307016] tc358743 30-000f:     colorimetry: ITU601
   [  438.307018] tc358743 30-000f:     picture aspect: 4:3
   [  438.307020] tc358743 30-000f:     active aspect: Same as Picture
   [  438.307021] tc358743 30-000f:     itc: No Data
   [  438.307023] tc358743 30-000f:     extended colorimetry: xvYCC 601
   [  438.307024] tc358743 30-000f:     quantization range: Default
   [  438.307026] tc358743 30-000f:     nups: Unknown Non-uniform Scaling
   [  438.307028] tc358743 30-000f:     video code: 17
   [  438.307029] tc358743 30-000f:     ycc quantization range: Limited
   [  438.307031] tc358743 30-000f:     hdmi content type: Graphics
   [  438.307032] tc358743 30-000f:     pixel repeat: 0
   [  438.307034] tc358743 30-000f:     bar top 0, bottom 0, left 0, right 0
   [  438.307035] tegra-camrtc-capture-vi tegra-captu: ==================  END STATUS  ==================

Do you have any other idea?

I managed to get distorted video by changing link-frequencies = /bits/ 64 <297000000> to link-frequencies = /bits/ 64 <148500000>.

It means that data rate 297Mbps is ok, but 594Mbps to high. I know that output data rate without skew calibration should to be < 1.5Gbps, but 594Mbps is much less. Do you have idea what is wrong?

Below logs with distorted video.

Kernel

[  143.626982] bwmgr API not supported
[  143.635858] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  143.655863] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  143.675867] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  143.695866] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072

Camrtc

     kworker/1:2-126     [001] ....    93.495977: rtcpu_string: tstamp:3600216070 id:0x04010000 str:"VM0 deactivating."
  gst-launch-1.0-3539    [001] ....   143.574347: tegra_channel_open: vi-output, tc358743 30-000f
  gst-launch-1.0-3539    [001] ....   143.574437: tegra_channel_close: vi-output, tc358743 30-000f
  gst-launch-1.0-3539    [001] ....   143.574446: tegra_channel_open: vi-output, imx477 31-001a
  gst-launch-1.0-3539    [001] ....   143.574458: tegra_channel_close: vi-output, imx477 31-001a
  gst-launch-1.0-3539    [001] ....   143.607902: tegra_channel_open: vi-output, tc358743 30-000f
    v4l2src0:src-3542    [000] ....   143.618933: tegra_channel_set_power: tc358743 30-000f : 0x1
    v4l2src0:src-3542    [000] ....   143.618936: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2src0:src-3542    [000] ....   143.618938: csi_s_power: enable : 0x1
    v4l2src0:src-3542    [000] ....   143.619502: tegra_channel_capture_setup: vnc_id 0 W 720 H 576 fmt 13
    v4l2src0:src-3542    [001] ....   143.625377: tegra_channel_set_stream: enable : 0x1
    v4l2src0:src-3542    [001] ....   143.631377: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
    v4l2src0:src-3542    [001] ....   143.631380: csi_s_stream: enable : 0x1
    v4l2src0:src-3542    [001] ....   143.631678: tegra_channel_set_stream: tc358743 30-000f : 0x1
     kworker/1:2-126     [001] ....   143.666166: rtcpu_string: tstamp:5166899331 id:0x04010000 str:"VM0 activating."
     kworker/1:2-126     [001] ....   143.666170: rtcpu_nvcsi_intr: tstamp:5167288735 class:GLOBAL type:PHY_INTR0 phy:1 cil:1 st:0 vc:0 status:0x00000040
     kworker/1:2-126     [001] ....   143.666170: rtcpu_vinotify_event: tstamp:5167345229 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:165344585152 data:0x399e300010000000
     kworker/1:2-126     [001] ....   143.666171: rtcpu_vinotify_event: tstamp:5167345366 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:165344591552 data:0x0000000031000001
     kworker/1:2-126     [001] ....   143.666171: rtcpu_vinotify_event: tstamp:5167345524 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:165344631904 data:0x399e2d0010000000
     kworker/1:2-126     [001] ....   143.666171: rtcpu_vinotify_event: tstamp:5167345658 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:165344638464 data:0x0000000031000002
     kworker/1:2-126     [001] ....   143.666171: rtcpu_vinotify_event: tstamp:5167345810 cch:0 vi:1 tag:FS channel:0x00 frame:0 vi_tstamp:165351712768 data:0x0000000000000013
     kworker/1:2-126     [001] ....   143.666171: rtcpu_vinotify_event: tstamp:5167345947 cch:0 vi:1 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:165351712800 data:0x0000000800000000
     kworker/1:2-126     [001] ....   143.666172: rtcpu_vinotify_event: tstamp:5167346099 cch:0 vi:1 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:165351716672 data:0x0000000000000001
     kworker/1:2-126     [001] ....   143.666172: rtcpu_vinotify_event: tstamp:5167346231 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:165351718656 data:0x0000000008020001
     kworker/1:2-126     [001] ....   143.666172: rtcpu_vinotify_event: tstamp:5167346385 cch:0 vi:1 tag:FE channel:0x00 frame:0 vi_tstamp:165354939104 data:0x0000000000000023
     kworker/1:2-126     [001] ....   143.666172: rtcpu_vinotify_event: tstamp:5167346538 cch:0 vi:1 tag:CHANSEL_SHORT_FRAME channel:0x08 frame:0 vi_tstamp:165354939104 data:0x0049200001000000

hello piotr_nbt,

there’s show PHY interrupts. the error code PHY_INTR0=0x40 indicate more than one bit error detected on the data-lane sync word. this usually the configuration issues on sensor side.
also, an error CHANSEL_SHORT_FRAME reported means the receiving MIPI signal height is less than your DT configuration.

I still can’t run tc358743 with data rate 594Mbps.

@JerryChang How can I flash rce firmware on Orin NX with NVMe SSD?

please double confirm your l4t release, $ cat /etc/nv_tegra_release
this debug camera firmware, Camera failed with log:VIFALC_TDSTATE on Jetpack5.0.2 - #4 by JerryChang only works with JP-5.0.2 and also JP-5.1
please do not use this debug firmware with the latest JP-5.1.1 release.

and…
here’re steps to perform partition flash on Orin NX.

  1. Run full flash command to generate images folder:
    $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” -p --showlogs --network usb0 jetson-orin-nx-devkit-16gb internal
  2. Copy debug camera firmware to Linux_for_Tegra/bootloader
  3. Run below command to generate signed camera-rtcpu-t234-rce.img
    $ sudo ./flash.sh --no-flash -r -k A_rce-fw jetson-agx-orincd boot-devkit mmcblk0p1
  4. Copy Linux_for_Tegra/bootloader/camera-rtcpu-t234-rce_sigheader.img.encrypt to… Linux_for_Tegra/tools/kernel_flash/images
  5. Run below command to update camera firmware:
    $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh -k A_rce-fw --flash-only --showlogs

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.