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 : 0x1vi-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?





