Toshiba TC358840 Linux driver for Jetson TX1 and TX2: Difference between revisions
mNo edit summary |
|||
Line 1: | Line 1: | ||
<seo title="Toshiba TC358840XBG | Toshiba Linux Driver for Tegra X1" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP, Embedded Linux, Device Drivers, Nvidia, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, GStreamer Multimedia Framework." description="The Toshiba TC358840XBG bridge converts high resolution HDMI® stream to MIPI® CSI-2 TX video. Read about the Toshiba Linux driver for Tegra X1 today."></seo> | |||
<table> | <table> | ||
<tr> | <tr> |
Revision as of 19:07, 7 December 2017
|
Template:Eval SDK Download, Demo Image download and Contact Us buttons |
TC358840 features
Reference: Toshiba TC358840 bridge chip
TC358840XBG, Ultra HD to CSI-2, bridge converts high resolution (higher than 4 Gbps) HDMI® stream to MIPI® CSI-2 Tx video. It is a follow up device of TC358840XBG.
- Tested resolutions are 1280x720, 1920x1080. The tested format is UYVY.
- TC358840 supports Dual links CSI-2 (CSI0 and CSI1), each link supports 4 data lanes @ 1 Gbps/data for Video resolution up to 4K×2K / 30fps (under development)
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
Build driver
Let's call $DEVDIR the path where you download the kernel.
1. In a browser, navigate to: https://developer.nvidia.com/embedded/downloads, Locate and download the L4T Sources (L4T Sources 24.2.1 2016/11/21). Also, you can use wget command:
wget http://developer2.download.nvidia.com/embedded/L4T/r24_Release_v2.1/BSP/sources_r24.2.1.tbz2
2. Copy L4T kernel sources into DEVDIR.
cp sources_r24.2.1.tbz2 $DEVDIR
3. Expand tarball file.
tar -vxjf sources_r24.2.1.tbz2 # Decompress kernel cd sources/ sudo tar -xjf kernel_src.tbz2
4. Download tc358840-r24.2.1-j130.tar.gz file and apply the patches.
cp tc358840-r24.2.1-j130.tar.gz $DEVDIR cd $DEVDIR tar -xzvf tc358840-r24.2.1-j130.tar.gz quilt push -a
5. Compile the kernel. Specify the path to the toolchain and architecture: (see http://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X1_source_code#Toolchain)
export CROSS_COMPILE=/opt/linaro/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- export CROSS32CC=/opt/linaro/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc export ARCH=arm64
6. Define and create destination directories.
export TEGRA_KERNEL_OUT=/home/$USER/sources_tc358840/images export TEGRA_MODULES_OUT=/home/$USER/sources_tc358840/modules mkdir -p $TEGRA_KERNEL_OUT mkdir -p $TEGRA_MODULES_OUT
7. Configure your kernel
make -C sources/kernel/ O=$TEGRA_KERNEL_OUT tegra21_defconfig
8. Enable driver
make -C sources/kernel/ O=$TEGRA_KERNEL_OUT menuconfig
Select the driver. The menu option is located:
-> Device Drivers -> Multimedia support (MEDIA_SUPPORT [=y]) -> Encoders, decoders, sensors and other helper chips <*> Toshiba TC358840 decoder
Save your new configuration.
9. Compile kernel, device tree and modules. To speed up compilation on multiprocessor systems, use -j n, this option tells make to execute many recipes simultaneously.
make -C sources/kernel/ O=$TEGRA_KERNEL_OUT zImage make -C sources/kernel/ O=$TEGRA_KERNEL_OUT dtbs make -C sources/kernel/ O=$TEGRA_KERNEL_OUT modules make -C sources/kernel/ O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$TEGRA_MODULES_OUT
Examples
Yavta
Yavta (Yet Another V4L2 Test Application) can be used for testing the driver, according to the input video resolution:
./yavta /dev/video1 -c600 -n4 -s1920x1080 --enum-formats -fUYVY
v4l2-ctl
v4l2-ctl is an application to control video4linux drivers.
v4l2-ctl -d /dev/video1 --set-fmt-video=width=1920,height=1080, --set-ctrl bypass_mode=0 --stream-mmap --stream-count=600
GStreamer
The following pipeline can be used to visualize the input video in the Tegra X1:
DISPLAY=:0 gst-launch-1.0 v4l2src device=/dev/video1 do-timestamp=true num-buffers=600 ! \ 'video/x-raw,format=I420,width=1920,height=1080,framerate=(fraction)30/1' ! \ nvvidconv ! \ autovideosink sync=false -v