Toshiba TC358743 Linux driver for Tegra X1

From RidgeRun Developer Connection
Jump to: navigation, search

RR Eval SDK download button.png RR Pre built demo image download.png RR Contact Us.png

TC358743 features

Reference: Toshiba TC358743 bridge chip

The Toshiba TC358743 is an HDMI 1.4 to MIPI CSI-2 1.01 bridge chip capable of handling video data up to 1080P at 60 fps.

* Tested resolutions are 640x480, 720x480, 1280x720, 1920x1080. Tested format is UYVY.
* The TC358743 driver supports 2 and 4 lanes configuration for the given resolutions.

Source code

In order to purchase the source code please send an email to inquiries@ridgerun.com or You can submit your Inquiry at our Contact Us Page

Enable driver

The driver was developed for kernel 3.10.67 using NVIDIA kernel source l4t-r23.2.

1. Follow the instructions in Compiling_Tegra_X1_source_code (Downloading the code) to get the kernel source code.

2. Once you have the source code, apply the following two patches if you haven't yet, for fixing kernel errors during compilation.

kernel_r7_asm.patch

logical_comparison.patch

3. Apply the driver patches:

add-tc358743-driver.patch

add-tc358743-dtb.patch

fix-continuos-clock-in-v4l2-driver.patch

4. Follow the instructions in Compiling_Tegra_X1_source_code (Build Kernel) for building the kernel, and then flash the image.

Make sure to enable tc358743 driver support and soc_camera support, and disable platform camera support.

make menuconfig
-> Device Drivers                                                                                                                        
  -> Multimedia support                                                                                           
    -> Sensors used on soc_camera driver
       -> <M>tc358743 support
-> Device Drivers                                                                                                                        
  -> Multimedia support 
     ->V4L platform devices
         -> <*> SoC camera support
             -> < > platform camera support

Mount the kernel module

sudo rmmod nvhost_vi

sudo modprobe tc358743

sudo modprobe tegra_camera

Examples

Yavta

Yavta (Yet Another V4L2 Test Application) can be used for testing the driver, according to the input video resolution:

./yavta /dev/video0 -c1 -n1 -s640x480 -Ftest1.raw
./yavta /dev/video0 -c1 -n1 -s1280x720 -Ftest2.raw
./yavta /dev/video0 -c1 -n1 -s1920x1080 -Ftest3.raw

Also Raw pixels can be used for visualizing the captured frame.

GStreamer

To capture a video of 100 frames, and according to the input video resolution use:

gst-launch-1.0 v4l2src num-buffers=100 ! 'video/x-raw,width=640,height=480,format=UYVY,framerate=60/1'\
 ! filesink location=test4.raw
gst-launch-1.0 v4l2src num-buffers=100 ! 'video/x-raw,width=1280,height=720,format=UYVY,framerate=60/1'\
 ! filesink location=test5.raw
gst-launch-1.0 v4l2src num-buffers=100 ! 'video/x-raw,width=1920,height=1080,format=UYVY,framerate=60/1'\
 ! filesink location=test6.raw

Output video can be visualized using Vooya


Also, the following pipeline can be used to visualize the input video in the Tegra X1:

  • 640x480@60fps
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=640,height=480,framerate=(fraction)60/1' ! queue ! videoconvert ! nveglglessink
  • 720x480@60fps
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=720,height=480,framerate=(fraction)60/1' ! queue ! videoconvert ! nveglglessink
  • 1280x720@60fps
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=1280,height=720,framerate=(fraction)60/1' ! queue ! videoconvert ! nveglglessink
  • 1280x720@30fps
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=1280,height=720,framerate=(fraction)30/1' ! queue ! videoconvert ! nveglglessink
  • 1920x1080@60fps
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=1920,height=1080,framerate=(fraction)60/1' ! queue ! videoconvert ! nveglglessink
  • 1920x1080@30fps
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=1920,height=1080,framerate=(fraction)30/1' ! queue ! videoconvert ! nveglglessink

Articles related

Toshiba TC358743 Linux driver for iMX6