TC358743 on Orin NX with CTI Hadron DM - Query Timings all zeros

Hi All,

I am currently having issues setting up my TC358743 driver (GeeekPi HDMI to CSI converter) on my Orin NX (CTI Hadron DM carrier running J5.1.2 r35.4.1).

I have downloaded, built, and installed the TC358743.c driver (shipped in NVIDIA kernel_src.tbz2) as an out-of-tree kernel module TC358743.ko and added it to the device’s kernel.

I have also created a device tree overlay that I apply to the base kernel_tegra234-orin-nx-cti-NGX024.dtbto configure the driver.

mipi_driver.txt (5.4 KB)

The issue I am having is a timeout when trying to stream from the device. I believe this is likely a configuration issue as my timings and configuration format are returned as zeros and the defaults.

sudo v4l2-ctl -d /dev/video0 \
>   --set-fmt-video=width=1920,height=1080,pixelformat=UYVY \
>   --stream-mmap --stream-count=10
New timings found
[  622.563084] bwmgr API not supported
[  625.311809] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  625.324589] tegra-camrtc-capture-vi tegra-capture-vi: Uncorr_ERR_Occured 1 Times
[  625.332244] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  625.342165] (NULL device *): vi_capture_control_message: NULL VI channel received
[  625.350122] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  625.360822] (NULL device *): vi_capture_control_message: NULL VI channel received
[  625.368540] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  625.379365] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  628.128287] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  628.137435] tegra-camrtc-capture-vi tegra-capture-vi: Uncorr_ERR_Occured 2 Times
[  628.145065] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  628.155159] (NULL device *): vi_capture_control_message: NULL VI channel received
[  628.162890] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  628.173609] (NULL device *): vi_capture_control_message: NULL VI channel received
[  628.181340] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  628.192101] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  630.944032] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  630.953180] tegra-camrtc-capture-vi tegra-capture-vi: Uncorr_ERR_Occured 3 Times
[  630.960814] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  630.971120] (NULL device *): vi_capture_control_message: NULL VI channel received
[  630.978837] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  630.989505] (NULL device *): vi_capture_control_message: NULL VI channel received
[  630.997216] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  631.007952] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  633.760173] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  633.769336] tegra-camrtc-capture-vi tegra-capture-vi: Uncorr_ERR_Occured 4 Times
[  633.776978] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  633.787147] (NULL device *): vi_capture_control_message: NULL VI channel received
[  633.794861] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  633.805518] (NULL device *): vi_capture_control_message: NULL VI channel received
[  633.813233] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  633.824018] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  636.351999] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  636.361190] tegra-camrtc-capture-vi tegra-capture-vi: Uncorr_ERR_Occured 5 Times
[  636.368820] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  636.379129] (NULL device *): vi_capture_control_message: NULL VI channel received
[  636.386840] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  636.397493] (NULL device *): vi_capture_control_message: NULL VI channel received
[  636.405202] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  636.415974] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
sudo v4l2-ctl -d /dev/v4l-subdev1 --verbose --query-dv-timings
VIDIOC_QUERY_DV_TIMINGS: ok
  Active width: 0
  Active height: 0
  Total width: 0
  Total height: 0
  Frame format: progressive
  Polarities: -vsync -hsync
  Pixelclock: 0 Hz
  Horizontal frontporch: 0
  Horizontal sync: 0
  Horizontal backporch: 0
  Vertical frontporch: 0
  Vertical sync: 0
  Vertical backporch: 0
  Standards: 
  Flags: 

It is also worth noting I have to manually add the EDID on startup for the HDMI signal to be detected.

v4l2-ctl -d /dev/v4l-subdev1 --set-edid=type=hdmi --fix-edid-checksums
sudo v4l2-ctl -d /dev/v4l-subdev1 --log-status
Status Log:

   [  286.392493] tc358743 9-000f: =================  START STATUS  =================
   [  286.393562] tc358743 9-000f: -----Chip status-----
   [  286.393915] tc358743 9-000f: Chip ID: 0x00
   [  286.394267] tc358743 9-000f: Chip revision: 0x00
   [  286.394269] tc358743 9-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
   [  286.394271] tc358743 9-000f: Sleep mode: off
   [  286.394272] tc358743 9-000f: Cable detected (+5V power): yes
   [  286.394596] tc358743 9-000f: DDC lines enabled: yes
   [  286.394922] tc358743 9-000f: Hotplug enabled: yes
   [  286.395272] tc358743 9-000f: CEC enabled: no
   [  286.395273] tc358743 9-000f: -----Signal status-----
   [  286.395274] tc358743 9-000f: TMDS signal detected: yes
   [  286.395275] tc358743 9-000f: Stable sync signal: yes
   [  286.395276] tc358743 9-000f: PHY PLL locked: yes
   [  286.395277] tc358743 9-000f: PHY DE detected: yes
   [  286.399823] tc358743 9-000f: Detected format: 1920x1080p60.00 (2200x1125)
   [  286.399826] tc358743 9-000f: horizontal: fp = 0, -sync = 280, bp = 0
   [  286.399827] tc358743 9-000f: vertical: fp = 0, -sync = 45, bp = 0
   [  286.399828] tc358743 9-000f: pixelclock: 148500000
   [  286.399830] tc358743 9-000f: flags (0x0):
   [  286.399831] tc358743 9-000f: standards (0x0):
   [  286.399833] tc358743 9-000f: Configured format: 640x480p59.94 (800x525)
   [  286.399834] tc358743 9-000f: horizontal: fp = 16, -sync = 96, bp = 48
   [  286.399835] tc358743 9-000f: vertical: fp = 10, -sync = 2, bp = 33
   [  286.399836] tc358743 9-000f: pixelclock: 25175000
   [  286.399837] tc358743 9-000f: flags (0x80): HAS_CEA861_VIC
   [  286.399838] tc358743 9-000f: standards (0x3): CEA DMT
   [  286.399839] tc358743 9-000f: CEA-861 VIC: 1
   [  286.399840] tc358743 9-000f: -----CSI-TX status-----
   [  286.399842] tc358743 9-000f: Lanes needed: 1
   [  286.399843] tc358743 9-000f: Lanes in use: 1
   [  286.400195] tc358743 9-000f: Waiting for particular sync signal: no
   [  286.400545] tc358743 9-000f: Transmit mode: no
   [  286.400896] tc358743 9-000f: Receive mode: no
   [  286.401268] tc358743 9-000f: Stopped: no
   [  286.401271] tc358743 9-000f: Color space: RGB 888 24-bit
   [  286.401603] tc358743 9-000f: -----HDMI status-----
   [  286.401605] tc358743 9-000f: HDCP encrypted content: no
   [  286.401607] tc358743 9-000f: Input color space: RGB full range
   [  286.401935] tc358743 9-000f: AV Mute: off
   [  286.402264] tc358743 9-000f: Deep color mode: 8-bits per channel
   [  286.403324] tc358743 9-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
   [  286.403327] tc358743 9-000f:     colorspace: RGB
   [  286.403328] tc358743 9-000f:     scan mode: No Data
   [  286.403330] tc358743 9-000f:     colorimetry: No Data
   [  286.403331] tc358743 9-000f:     picture aspect: 16:9
   [  286.403332] tc358743 9-000f:     active aspect: Same as Picture
   [  286.403333] tc358743 9-000f:     itc: IT Content
   [  286.403335] tc358743 9-000f:     extended colorimetry: xvYCC 601
   [  286.403336] tc358743 9-000f:     quantization range: Full
   [  286.403338] tc358743 9-000f:     nups: Unknown Non-uniform Scaling
   [  286.403339] tc358743 9-000f:     video code: 16
   [  286.403340] tc358743 9-000f:     ycc quantization range: Limited
   [  286.403341] tc358743 9-000f:     hdmi content type: Graphics
   [  286.403342] tc358743 9-000f:     pixel repeat: 0
   [  286.403344] tc358743 9-000f:     bar top 0, bottom 0, left 0, right 0
   [  286.403345] tc358743 9-000f: ==================  END STATUS  ==================

The device does display as /dev/video0 and /dev/media0 with /dev/v4l-subdev0 and /dev/v4l-subdev1 and is detected on boot.

[   79.697623] tc358743 2-000f: tc358743 found @ 0x1e (3180000.i2c)

— 🤖 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 experiencing issues with the TC358743 driver on the Jetson Orin NX, specifically with regards to streaming video from the device. The error messages indicate a timeout issue, and the query-dv-timings command shows that the active width, height, and pixelclock are all set to 0.

The issue seems to be related to the configuration of the driver, as the timings and configuration format are returned as zeros. Additionally, the EDID needs to be manually added on startup for the HDMI signal to be detected.

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

  1. Verify that the device tree overlay is correctly configured and applied to the base kernel.
  2. Check the kernel logs for any errors or warnings related to the TC358743 driver.
  3. Try setting the timings and configuration format manually using the v4l2-ctl command.
  4. Ensure that the EDID is correctly configured and added on startup.

It’s also worth noting that the issue may be related to the specific hardware configuration of your setup, so you may want to try testing with a different HDMI source or cable to rule out any issues with the signal.

Here is an example of how you can set the timings and configuration format manually using the v4l2-ctl command:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY
v4l2-ctl -d /dev/video0 --set-dv-timings=active-width=1920,active-height=1080,pixelclock=148500000

Please note that these are just examples, and you should adjust the values to match your specific setup.

If you are still experiencing issues after trying these steps, it may be helpful to provide more information about your setup, such as the specific hardware configuration and any relevant kernel logs or error messages.

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

Hi,

Unfortunately I am unable to set the video or timings manually.

VIDEO:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=1 --stream-to=frame.raw 

New timings found
[  622.563084] bwmgr API not supported
[  625.311809] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  625.324589] tegra-camrtc-capture-vi tegra-capture-vi: Uncorr_ERR_Occured 1 Times
[  625.332244] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  625.342165] (NULL device *): vi_capture_control_message: NULL VI channel received
[  625.350122] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[  625.360822] (NULL device *): vi_capture_control_message: NULL VI channel received
[  625.368540] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[  625.379365] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

TIMINGS:

echo 3 | sudo tee /sys/module/tc358743/parameters/debug
3

-------------------

SUBDEV=$(media-ctl -p -d /dev/media0 | awk '/tc358743/{f=1} f&&/v4l-subdev/{print $NF; exit}')

-------------------

sudo dmesg -C

-------------------

sudo v4l2-ctl -d "$SUBDEV" --set-dv-bt-timings query
BT timings set

-------------------

sudo dmesg
[  136.402988] tc358743 9-000f: -----Chip status-----
[  136.403338] tc358743 9-000f: Chip ID: 0x00
[  136.403685] tc358743 9-000f: Chip revision: 0x00
[  136.403687] tc358743 9-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
[  136.403688] tc358743 9-000f: Sleep mode: off
[  136.403689] tc358743 9-000f: Cable detected (+5V power): yes
[  136.404008] tc358743 9-000f: DDC lines enabled: yes
[  136.404328] tc358743 9-000f: Hotplug enabled: yes
[  136.404673] tc358743 9-000f: CEC enabled: no
[  136.404674] tc358743 9-000f: -----Signal status-----
[  136.404675] tc358743 9-000f: TMDS signal detected: yes
[  136.404676] tc358743 9-000f: Stable sync signal: yes
[  136.404676] tc358743 9-000f: PHY PLL locked: yes
[  136.404678] tc358743 9-000f: PHY DE detected: yes
[  136.405006] tc358743 9-000f: detect: SYS_STATUS=0x9f TMDS=1 SYNC=1 PHY_PLL=1 SCDT=1
[  136.409201] tc358743 9-000f: detect: raw width=1920 height=1080 fw=2200 fh=1125 fival=167 fps=60
[  136.409206] tc358743 9-000f: Detected format: 1920x1080p60.00 (2200x1125)
[  136.409209] tc358743 9-000f: horizontal: fp = 0, -sync = 280, bp = 0
[  136.409210] tc358743 9-000f: vertical: fp = 0, -sync = 45, bp = 0
[  136.409211] tc358743 9-000f: pixelclock: 148500000
[  136.409213] tc358743 9-000f: flags (0x0):
[  136.409214] tc358743 9-000f: standards (0x0):
[  136.409216] tc358743 9-000f: Configured format: 640x480p59.94 (800x525)
[  136.409217] tc358743 9-000f: horizontal: fp = 16, -sync = 96, bp = 48
[  136.409218] tc358743 9-000f: vertical: fp = 10, -sync = 2, bp = 33
[  136.409219] tc358743 9-000f: pixelclock: 25175000
[  136.409221] tc358743 9-000f: flags (0x80): HAS_CEA861_VIC
[  136.409222] tc358743 9-000f: standards (0x3): CEA DMT
[  136.409223] tc358743 9-000f: CEA-861 VIC: 1
[  136.409224] tc358743 9-000f: -----CSI-TX status-----
[  136.409225] tc358743 9-000f: Lanes needed: 1
[  136.409226] tc358743 9-000f: Lanes in use: 1
[  136.409574] tc358743 9-000f: Waiting for particular sync signal: no
[  136.409920] tc358743 9-000f: Transmit mode: no
[  136.410274] tc358743 9-000f: Receive mode: no
[  136.410629] tc358743 9-000f: Stopped: no
[  136.410630] tc358743 9-000f: Color space: RGB 888 24-bit
[  136.410950] tc358743 9-000f: -----HDMI status-----
[  136.410952] tc358743 9-000f: HDCP encrypted content: no
[  136.410954] tc358743 9-000f: Input color space: RGB full range
[  136.411274] tc358743 9-000f: AV Mute: off
[  136.411595] tc358743 9-000f: Deep color mode: 8-bits per channel
[  136.412642] tc358743 9-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
[  136.412645] tc358743 9-000f:     colorspace: RGB
[  136.412647] tc358743 9-000f:     scan mode: No Data
[  136.412648] tc358743 9-000f:     colorimetry: No Data
[  136.412649] tc358743 9-000f:     picture aspect: 16:9
[  136.412651] tc358743 9-000f:     active aspect: Same as Picture
[  136.412652] tc358743 9-000f:     itc: IT Content
[  136.412653] tc358743 9-000f:     extended colorimetry: xvYCC 601
[  136.412654] tc358743 9-000f:     quantization range: Full
[  136.412656] tc358743 9-000f:     nups: Unknown Non-uniform Scaling
[  136.412657] tc358743 9-000f:     video code: 16
[  136.412658] tc358743 9-000f:     ycc quantization range: Limited
[  136.412660] tc358743 9-000f:     hdmi content type: Graphics
[  136.412661] tc358743 9-000f:     pixel repeat: 0
[  136.412662] tc358743 9-000f:     bar top 0, bottom 0, left 0, right 0
[  136.413004] tc358743 9-000f: detect: SYS_STATUS=0x9f TMDS=1 SYNC=1 PHY_PLL=1 SCDT=1
[  136.417168] tc358743 9-000f: detect: raw width=1920 height=1080 fw=2200 fh=1125 fival=167 fps=60
[  136.417170] tc358743 9-000f: tc358743_query_dv_timings: 1920x1080p60.00 (2200x1125)
[  137.378066] tc358743 9-000f: tc358743_isr: IntStatus = 0x0000
​sudo v4l2-ctl -d /dev/v4l-subdev1 --set-dv-bt-timings \
>   width=1920,height=1080,interlaced=0,pixelclock=148500000,\
> hfp=88,hs=44,hbp=148,\
> vfp=4,vs=5,vbp=36
VIDIOC_G_DV_TIMINGS: failed: Inappropriate ioctl for device
BT timings set

------------

sudo v4l2-ctl -d /dev/v4l-subdev1 --log-status | grep -iE "Configured|Lanes"
   [ 1187.331244] tc358743 9-000f: Configured format: 640x480p59.94 (800x525)
   [ 1187.331253] tc358743 9-000f: Lanes needed: 1
   [ 1187.331254] tc358743 9-000f: Lanes in use: 1

Each time timings are reported as 0:

sudo v4l2-ctl -d /dev/v4l-subdev1 --verbose --query-dv-timings
VIDIOC_QUERY_DV_TIMINGS: ok
  Active width: 0
  Active height: 0
  Total width: 0
  Total height: 0
  Frame format: progressive
  Polarities: -vsync -hsync
  Pixelclock: 0 Hz
  Horizontal frontporch: 0
  Horizontal sync: 0
  Horizontal backporch: 0
  Vertical frontporch: 0
  Vertical sync: 0
  Vertical backporch: 0
  Standards: 
  Flags: 

hello wal.footrot,

please dig into reference bridge driver, $public_sources/kernel_src/kernel/nvidia/drivers/media/i2c/tc358840.c
there’s temporary EDID, tc358840_s_edid(), the driver hard-codes the init timing to 1920x1080 at 60-fps
it’s tc358840_format_change() detects and reports the new timing, but does not copy it into state->timings. user-space must perform the set operation; please see-also tc358840_parse_dt() for the driver to parse the settings from device tree to program the CSI transmitter.

you should review your driver accordingly.
for instance, tc358743 defaults set to 640x480 in RGB888, it only switches to the detected mode after s_dv_timings;
for debug into this.. you may running below to detect the apply HDMI timing.
$ v4l2-ctl -d /dev/video0 --set-dv-bt-timings query
please have below to verify the applied timing.
$ v4l2-ctl -d /dev/video0 --get-dv-timings
and then, please enable the v4l2 IOCTL directly for fetching the stream.
$ v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=10 --stream-to=test.raw