Environment
- Platform: Jetson Orin NX with Xavier carrier board
- JetPack Version: 6.1 (L4T r36.x)
- Kernel: 5.15.148-tegra
- Bridge Chip: Toshiba TC358743 HDMI-to-CSI-2
Problem Summary
We have successfully ported the TC358743 driver from JetPack 5 to JetPack 6.1. The bridge works perfectly on CAM1 connector (csi_port=0), but fails with timeout errors on CAM0 connector (csi_port=2), even though both use the same hardware bridge and identical driver configuration.
Working Configuration (CAM1 - csi_port=0)
When the TC358743 bridge is connected to CAM1, we get frames (with some correctable errors):
[ 62.277587] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 18432, flags: 0, err_data 512
[ 62.744253] tc358743 10-000f: Calling tc358743_s_stream - start of attempt
[ 62.744258] tc358743 10-000f: enable_stream: enable
[ 62.745245] jc- csi5_stop_streaming: csi5 csi_pt=0, st_id=0, vc_id=0, pg_mode=0x0
Key observations for CAM1:
csi_pt=0, st_id=0(csi_port=0)- Frames are coming through (corr_err indicates data is being received)
- I2C communication successful (tc358743 10-000f)
Failing Configuration (CAM0 - csi_port=2)
When the same TC358743 bridge is connected to CAM0, we get timeout errors with no data:
[ 393.536850] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- DEBUG csi5_start_streaming: port_idx=0
[ 393.536858] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- DEBUG port->csi_port=2, port->stream_id=0
[ 393.536861] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- DEBUG port->lanes=2, port->virtual_channel_id=0
[ 393.536863] jc- csi5 csi5_start_streaming: csi_pt=2, st_id=2, vc_id=0, pg_mode=0x0
[ 393.536866] jc- csi5 csi5_stream_set_config: stream_id=2, csi_port=2
[ 393.536878] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- lane_polarity BEFORE fix: 0, csi_port: 2
[ 393.536881] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- lane_polarity AFTER fix: 6
[ 393.536885] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- brick_config.lane_polarity[0-3]: 0 1 1 0 (raw value: 6)
[ 393.536890] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- using hardcode 5940
[ 393.536892] t194-nvcsi 13e00000.host1x:nvcsi@15a00000: X-- mipi_clock_rate is : 297000
[ 393.537215] tc358743 9-000f: Calling tc358743_s_stream - start of attempt
[ 393.537218] tc358743 9-000f: enable_stream: enable
[ 396.249301] tegra-camrtc-capture-vi tegra-capture-vi: jc-- vi5_ops.c : uncorr_err: request timed out after 2500 ms
[ 396.249322] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
Key observations for CAM0:
csi_pt=2, st_id=2(csi_port=2)- Timeout error - no data received at all
- I2C communication successful (tc358743 9-000f)
- Same lane_polarity=6 applied
- Same mipi_clock_rate=297000
HDMI Signal Verification
HDMI signal is properly detected on CAM0:
$ v4l2-ctl -d /dev/video0 --query-dv-timings
Active width: 1920
Active height: 1080
Total width: 2200
Total height: 1125
Frame format: progressive
Pixelclock: 148500000 Hz (60.00 frames per second)
Driver Modifications (csi5_fops.c)
We modified csi5_fops.c to hardcode lane_polarity for TC358743:
/* Lane polarity fix based on physical CSI port */
dev_err(csi->dev, " X-- lane_polarity BEFORE fix: %d, csi_port: %d\n", lane_polarity, csi_port);
if (csi_port == 0 || csi_port == 2) {
lane_polarity = 6;
}
dev_err(csi->dev, " X-- lane_polarity AFTER fix: %d\n", lane_polarity);
Device Tree Configuration (tc358743.dts)
tegra-capture-vi {
num-channels = <2>;
ports {
vi_port0: port@0 {
reg = <0>;
toshiba_tc358743_vi_in0: endpoint {
port-index = <0>; /* CAM0 */
bus-width = <2>;
};
};
vi_port1: port@1 {
reg = <1>;
toshiba_tc358743_vi_in1: endpoint {
port-index = <2>; /* CAM1 */
bus-width = <2>;
};
};
};
};
/* CAM0 configuration */
tc358743_cam0: toshiba_tc358743_a@0f {
tegra_sinterface = "serial_a";
num_lanes = "2";
/* ... */
ports {
port@0 {
toshiba_tc358743_out0: endpoint {
port-index = <0>;
bus-width = <2>;
data-lanes = <1 2>;
};
};
};
};
/* CAM1 configuration */
tc358743_cam1: toshiba_tc358743_c@0f {
tegra_sinterface = "serial_c";
num_lanes = "2";
/* ... */
ports {
port@0 {
toshiba_tc358743_out1: endpoint {
port-index = <2>;
bus-width = <2>;
data-lanes = <1 2>;
};
};
};
};
What I’ve Tried
- Lane polarity fix (lane_polarity=6) - works for CAM1, not for CAM0
- Verified I2C communication works on both ports
- Verified HDMI signal detection on both ports
- mipi_clock_rate hardcoded to 297000 kHz
- Device tree port-index configuration matching JetPack 5
Questions
-
Why does csi_port=0 (CAM1) work but csi_port=2 (CAM0) times out with identical configuration?
-
Does csi_port=2 (Brick B/serial_c) require different lane_polarity than csi_port=0 (Brick A/serial_a)? We tried lane_polarity=6 for both, but only CAM1 works.
-
Is there any Orin NX hardware-level difference between CSI port 0 and port 2 that we need to account for?
-
Are there any additional NVCSI/VI configurations needed for csi_port=2 that differ from csi_port=0?
Any guidance would be greatly appreciated. I can provide additional logs or test different configurations as needed. (what is the lane polarity of cam0)