For quite some time I now try to get a TC358743 HDMI-to-CSI-2 adapter working (with a Non-Jetson board). I first tried with an T30, but now switched to a Tegra K1 due to the newer available kernel.
However, I can not get video output, a captured file always only contains zeroes (0x00), which gives a dark green image when rendered as a YUV image.
My current setup is as follows:
TC358743 on an Auvidea B102 board (http://www.auvidea.eu/index.php/theme-styles/2014-12-30-22-32-06/b102)
Tegra K1 on Toradex Apalis TK1 (https://www.toradex.com/computer-on-modules/apalis-arm-family/nvidia-tegra-k1)
Apalis Evaluation board with custom adapter to connect B102 (https://www.toradex.com/products/carrier-board/apalis-evaluation-board)
Raspberry Pi as HDMI source (configured for 640x480)
TC358743 driver from Antmicro (https://github.com/antmicro/linux-tk1/commit/1548e89ba6430e91dfdd05edf1d7792b02307038) imported into Kernel from Toradex
tegra_camera as V4L2 module, yavta as the capture tool
Whatever I try, I was not able to get something different than zeros (or prefilled buffer data) in the captured file when using the HDMI adapter. I tried with tegra_camera’s tpg_mode, which works just fine. The resulting image then can be rendered as a colourful checker pattern.
I added some more debugging to the TC358743 driver and tegra_camera to hopefully find the problem. I configured CSI debug counter 0 to count PPA line packets and counter 1 for frame starts.
This is what I get in the kernel log when I run
./yavta /dev/video0 -c1 -n1 -Fhdmi.rgba
[ 2324.234137] tc358743_s_fmt: Resetting…
[ 2325.866007] tc358743_s_fmt: Setting HDMI…
[ 2326.115252] Image is 640x480@60, ~295 Gbps bandwidth (~148MHz/lane)
[ 2326.115431] Setting pll to frequency 500 (500) MHz
[ 2326.125300] tc358743_s_fmt: Starting stream
[ 2326.129046] tc358743 2-000f: -----Chip status-----
[ 2326.135190] tc358743 2-000f: Chip ID: 0x00
[ 2326.140737] tc358743 2-000f: Chip revision: 0x00
[ 2326.146658] tc358743 2-000f: Reset: IR: 0, CEC: 0, CSI TX: 0, HDMI: 0
[ 2326.154297] tc358743 2-000f: Sleep mode: off
[ 2326.159871] tc358743 2-000f: Cable detected (+5V power): yes
[ 2326.166711] tc358743 2-000f: DDC lines enabled: no
[ 2326.172645] tc358743 2-000f: Hotplug enabled: no
[ 2326.179136] tc358743 2-000f: CEC enabled: no
[ 2326.184391] tc358743 2-000f: -----Signal status-----
[ 2326.190215] tc358743 2-000f: TMDS signal detected: yes
[ 2326.196216] tc358743 2-000f: Stable sync signal: yes
[ 2326.201974] tc358743 2-000f: PHY PLL locked: yes
[ 2326.207427] tc358743 2-000f: PHY DE detected: yes
[ 2326.215691] tc358743 2-000f: Detected format: 640x480p60.0 (800x525)
[ 2326.222954] tc358743 2-000f: horizontal: fp = 0, -sync = 160, bp = 0
[ 2326.230780] tc358743 2-000f: vertical: fp = 0, -sync = 45, bp = 0
[ 2326.238805] tc358743 2-000f: pixelclock: 25200000
[ 2326.244497] tc358743 2-000f: standards (0x0):
[ 2326.250027] tc358743 2-000f: -----CSI-TX status-----
[ 2326.256076] tc358743 2-000f: Lanes in use: 2
[ 2326.261404] tc358743 2-000f: Waiting for particular sync signal: no
[ 2326.268773] tc358743 2-000f: Transmit mode: no
[ 2326.274424] tc358743 2-000f: Receive mode: no
[ 2326.279830] tc358743 2-000f: Stopped: no
[ 2326.285183] tc358743 2-000f: -----HDMI status-----
[ 2326.290726] tc358743 2-000f: HDCP encrypted content: no
[ 2326.296812] tc358743 2-000f: Input color space: RGB full range
[ 2326.303620] tc358743 2-000f: VI_MUTE: 0xc0
[ 2326.308399] tc358743 2-000f: AV Mute: off
[ 2326.313272] tc358743 2-000f: Deep color mode: 8-bits per channel
[ 2326.321672] vi vi.0: tegra_camera_videobuf_prepare (vb=0xec9a6000) 0xf0b01000 614400
[ 2326.333995] vi vi.0: Failed to create debugfs directory
[ 2326.343546] vi vi.0: MIPI calibration for CSI is done
[ 2326.374781] vi vi.0: syncpt reached, status:
[ 2326.400803] TEGRA_CSI_DEBUG_COUNTER_0 0x000001e0
[ 2326.406351] TEGRA_CSI_DEBUG_COUNTER_1 0x00000001
[ 2326.412001] TEGRA_CSI_DEBUG_COUNTER_2 0x00000000
[ 2326.417652] TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
[ 2326.423341] TEGRA_CSI_CSI_CILA_STATUS 0x00000000
[ 2326.428729] TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
[ 2326.434312] TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
[ 2326.439702] TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
[ 2326.445265] TEGRA_CSI_CSI_CIL_E_STATUS 0x00000000
[ 2326.450648] TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
[ 2326.456915] TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
[ 2326.463030] TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
[ 2326.468416] TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000
Yavta shows the following output:
Device /dev/video0 opened: vi ().
Video format: UYVY (59565955) 640x480
1 buffers requested.
length: 614400 offset: 0
Buffer 0 mapped at address 0xb6d7c000.
0 (0) 0 614400 bytes 1474031924.002136 1474031924.002268
Captured 0 frames in 0.032367 seconds (0.000000 fps, 18982296.783761 B/s).
1 buffers released.
This looks perfectly good to me: No error flags set, 480 line packets and one frame start received. Now I do not know whether the HDMI bridge is just outputting all zeroes or whether the data is lost somewhere else…
I tried to configure the test pattern generator inside the TC358743, but the functional specification I have was not very helpful. I tried register value sets from an older version of the Antmicro driver, but the result was the same: All 0s, green image…
I am currently at a loss. I do not know what else I could try to debug the issue. I once had the CSI data- and clock lines connected to an oscilloscope, but due to the high speed nature of the signals I was not really able to manually decode whether there are really just zeroes beeing sent. Sadly, the scope is now quite a few kilometres away.
Do you have any other ideas what to test? Thank you!
I’m sorry for the rather long text, but I tried to include all the information I currently have.