Toshiba TC358743 Linux driver for Jetson: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
 
(91 intermediate revisions by 10 users not shown)
Line 1: Line 1:
= TC358743 features =  
<seo title="Toshiba TC358743 | TC358743 Linux Driver for Jetson" titlemode="replace" metakeywords="GStreamer, Embedded Linux, Device Drivers, NVIDIA, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, TC358743, Toshiba TC358743, Toshiba TC358743 Linux driver, Toshiba TC358743 Linux driver for Jetson TX1, Toshiba TC358743 Linux driver for Jetson TX2, Toshiba TC358743 Linux driver for Jetson Nano, Toshiba TC358743 Linux driver for Jetson Xavier, NVIDIA Jetson TX1, NVIDIA Jetson TX2, NVIDIA Jetson Nano, NVIDIA Jetson Xavier, Jetson Nano, Jetson TX1, Jetson TX2, Jetson Xavier, TX1, TX2, Nano, Xavier" metadescription="Learn more about the Toshiba TC358743 Linux driver for Jetson which is capable of handling video data up to 1080P at 60fps."></seo>
 
{{Driver-shoppingcart & NVIDIA logo & RR Contact}}
<br>
<td>
{{GStreamer debug}}
<td>
 
{{message|title=Driver List Information|Refer to the [[RidgeRun_Linux_Camera_Drivers/Available_Camera_Drivers/List_of_Tested_Camera_Sensors|RidgeRun Linux Camera Drivers]] to meet all the list of Drivers available}}
 
== Toshiba TC358743 HDMI® Interface Bridge features ==  
Reference: [http://toshiba.semicon-storage.com/us/product/assp/detail.TC358743XBG.html Toshiba TC358743 bridge chip]
Reference: [http://toshiba.semicon-storage.com/us/product/assp/detail.TC358743XBG.html 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.
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, 1280x720, 1920x1080. Tested format is UYVY.
== Supported platforms ==


= Source code =
* NVIDIA Jetson TX1
In order to get the source code please send an email to support@ridgerun.com or [http://www.ridgerun.com/#!contact/c3vn contact us]
* NVIDIA Jetson TX2
* NVIDIA Jetson Nano
* NVIDIA Jetson Xavier


= Enable driver =
== Features included in this driver ==
The driver was developed for kernel 3.10.67 using NVIDIA kernel source l4t-r23.2.
<br>
<center>
{| class="wikitable sortable"
|-
! TX1
|<!--
-->
{| class="wikitable sortable mw-collapsible mw-collapsed" style="width:100%; margin:0;"
! Feature
! Details
! SDK Support
|-
| 1280x720@30fps
| 2/4 Lanes, UYVY
| Jetpack 3.2
|-
| 1280x720@60fps
| 2/4 Lanes, UYVY
| Jetpack 3.2
|-
| 1920x1080@30fps
| 2/4 Lanes, UYVY
| Jetpack 3.2
|}<!--
-->
|-
! TX2
|<!--
-->
{| class="wikitable sortable mw-collapsible mw-collapsed" style="width:100%; margin:0;"
! Feature
! Details
! SDK Support
|-
| 1280x720@30fps
| 2/4 Lanes, UYVY
| Jetpack 3.2
|-
| 1280x720@60fps
| 2/4 Lanes, UYVY
| Jetpack 3.2
|-
| 1920x1080@30fps
| 2/4 Lanes, UYVY
| Jetpack 3.2
|-
|}<!--
-->
|-
! Nano
|<!--
-->
{| class="wikitable sortable mw-collapsible mw-collapsed" style="width:100%; margin:0;"
! Feature
! Details
! SDK Support
|-
| 1280x720@30fps
| 2/4 Lanes, UYVY
| Jetpack 4.2 / Jetpack 4.3
|-
| 1280x720@60fps
| 2/4 Lanes, UYVY
| Jetpack 4.2 / Jetpack 4.3
|-
| 1920x1080@30fps
| 2/4 Lanes, UYVY
| Jetpack 4.2 / Jetpack 4.3
|-
|}<!--
-->
|-
! Xavier
|<!--
-->
{| class="wikitable sortable mw-collapsible mw-collapsed" style="width:100%; margin:0;"
! Feature
! Details
! SDK Support
|-
| 1280x720@30fps
| 2/4 Lanes, UYVY
| Jetpack 4.5
|-
| 1280x720@60fps
| 2/4 Lanes, UYVY
| Jetpack 4.5
|-
| 1920x1080@30fps
| 2/4 Lanes, UYVY
| Jetpack 4.5
|-
|}<!--
-->
|}
</center>


'''1.''' Follow the instructions in [http://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X1_source_code#Build_Kernel Compiling_Tegra_X1_source_code (Downloading the code)] to get the kernel source code.
== Build instructions ==
===Build kernel using Jetpack and tc358743 driver===
==== Jetson TX1 TX2 ====
===== Building kernel sources =====
Follow the instructions in [[Compiling_Jetson_TX1/TX2_source_code#Build_Kernel | Compiling Jetson TX1 TX2 source code (Build_Kernel)]] to build the kernel sources.


'''2.''' Once you have the source code, apply the following two patches if you haven't yet, for fixing kernel errors during compilation.
===== Enable driver =====
Once you are following there is a step '''make menuconfig''' it allows you to enable the tc358743 driver as built-in.  


kernel_r7_asm.patch
<syntaxhighlight lang=bash>
make O=$TEGRA_KERNEL_OUT menuconfig
</syntaxhighlight>


logical_comparison.patch
Select the driver. The menu option is located:


'''3.''' Apply the driver patches:
<pre class="config">
-> Device Drivers
  -> Multimedia support (MEDIA_SUPPORT [=y])
    -> Encoders, decoders, sensors and other helper chips
      <*> Toshiba TC358743 decoder
</pre>


add-tc358743-driver.patch
==== Jetson Nano ====
===== Building kernel sources =====
Follow the instructions in [[NVIDIA_Jetson_Nano_-_Building_the_Kernel_from_Source | NVIDIA_Jetson_Nano - Building the Kernel from Source]] to build the kernel sources for the Jetson Nano.


add-tc358743-dtb.patch
===== Enable driver =====
Once you are following the guide there is a step '''make menuconfig''', which allows you to enable the tc358743 driver as built-in.  


fix-continuos-clock-in-v4l2-driver.patch
<syntaxhighlight lang=bash>
make ARCH=arm64 O=$KERNEL_OUT menuconfig
</syntaxhighlight>


'''4.''' Follow the instructions in [http://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X1_source_code#Build_Kernel Compiling_Tegra_X1_source_code (Build Kernel)] for building the kernel, and then flash the image.
Select the driver. The menu option is located:


Make sure to enable tc358743 driver support and soc_camera support, and disable platform camera support.
<pre class="config">
<pre>
-> Device Drivers
make menuconfig
  -> Multimedia support (MEDIA_SUPPORT [=y])
    -> NVIDIA overlay Encoders, decoders, sensors and other helper chips
      <*> Toshiba TC358743 decoder
</pre>
</pre>


<pre>
== Test your Kernel image using Jetpack root file system==
-> Device Drivers                                                                                                                       
 
  -> Multimedia support                                                                                         
Check the kernel version. At this moment you can test the image created in order to see the new kernel is working correctly. You have to see a new kernel version with the correct date of compilation:
    -> Sensors used on soc_camera driver
 
      -> <M>tc358743 support
===Jetson TX1/TX2===
</pre>
<syntaxhighlight lang=bash>
uname -a
Linux tegra-ubuntu 4.4.38 #21 SMP PREEMPT Thu May 9 14:30:09 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
</syntaxhighlight>


<pre>
====J100 TX2====
-> Device Drivers                                                                                                                       
  -> Multimedia support
    ->V4L platform devices
        -> <*> SoC camera support
            -> < > platform camera support
</pre>


= Mount the kernel module =
You can see that the driver is probed, execute the line:  dmesg | grep "(Tegra I2C adapter)"
<pre>
sudo rmmod nvhost_vi


sudo modprobe tc358743
Expected output:
<syntaxhighlight lang=bash>
[2.683236] tc358743 1-000f: tc358743 found @ 0xf (Tegra I2C adapter)
</syntaxhighlight>


sudo modprobe tegra_camera
video devices created:
</pre>


=Examples=
<syntaxhighlight lang=bash>
ls /dev/video*
/dev/video0 
</syntaxhighlight>


==Yavta==
===Jetson Nano===
Yavta [https://github.com/fastr/yavta (Yet Another V4L2 Test Application)] can be used for testing the driver, according to the input video resolution:
<syntaxhighlight lang=bash>
uname -a
Linux nvidia 4.9.140 #6 SMP PREEMPT Tue May 7 16:25:38 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
</syntaxhighlight>


<pre>
==== Nano EVM kit ====
./yavta /dev/video0 -c1 -n1 -s640x480 -Ftest1.raw
</pre>


<pre>
You can see that the driver is probed, execute the line:  dmesg | grep "(Tegra I2C adapter)"
./yavta /dev/video0 -c1 -n1 -s1280x720 -Ftest2.raw
</pre>


<pre>
Expected output:
./yavta /dev/video0 -c1 -n1 -s1920x1080 -Ftest3.raw
<syntaxhighlight lang=bash>
</pre>
nvidia@nvidia:~$ dmesg | grep "(Tegra I2C adapter)"
[    4.226382] tc358743 6-000f: tc358743 found @ 0xf (Tegra I2C adapter)
</syntaxhighlight>


Also [http://rawpixels.net/ Raw pixels] can be used for visualizing the captured frame.
video devices created:


==GStreamer==
<syntaxhighlight lang=bash>
To capture a video of 100 frames, and according to the input video resolution use:
ls /dev/video*
<pre>
/dev/video0
gst-launch-1.0 v4l2src num-buffers=100 ! 'video/x-raw,width=640,height=480,format=UYVY,framerate=60/1'\
</syntaxhighlight>
! filesink location=test4.raw
</pre>


<pre>
==Examples==
gst-launch-1.0 v4l2src num-buffers=100 ! 'video/x-raw,width=1280,height=720,format=UYVY,framerate=60/1'\
! filesink location=test5.raw
</pre>


<pre>
===GStreamer TX1 TX2 Nano Xavier===
gst-launch-1.0 v4l2src num-buffers=100 ! 'video/x-raw,width=1920,height=1080,format=UYVY,framerate=60/1'\
====720p@30 - 720p@60====
! filesink location=test6.raw
<syntaxhighlight lang=bash>
</pre>
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! 'video/x-raw,format=UYVY,width=1280,height=720' ! \
filesink location=test.yuv
</syntaxhighlight>


Output video can be visualized using [http://www.offminor.de/downloads.html Vooya]
<syntaxhighlight lang=bash>
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1280,height=720' ! \
nvvidconv ! 'video/x-raw(memory:NVMM),format=I420,width=1280,height=720' ! nvoverlaysink
</syntaxhighlight>


<syntaxhighlight lang=bash>
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1280,height=720' ! \
nvvidconv ! omxh264enc ! mpegtsmux ! filesink location=test.ts
</syntaxhighlight>


Also, the following pipeline can be used to visualize the input video in the Tegra X1:
====1080p@30====
<pre>
<syntaxhighlight lang=bash>
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=640,height=480' ! queue ! videoconvert ! nveglglessink
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! \
</pre>
filesink location=test.yuv
</syntaxhighlight>


<pre>
<syntaxhighlight lang=bash>
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=1280,height=720' ! queue ! videoconvert ! nveglglessink
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! \
</pre>
nvvidconv ! 'video/x-raw(memory:NVMM),format=I420,width=1920,height=1080' ! nvoverlaysink
</syntaxhighlight>


<pre>
<syntaxhighlight lang=bash>
gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! queue ! videoconvert ! nveglglessink
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! \
</pre>
nvvidconv ! omxh264enc ! mpegtsmux ! filesink location=test.ts
</syntaxhighlight>


= Articles related  =
== See also ==
[[Toshiba TC358743 Linux driver for iMX6]]
[[Toshiba TC358743 Linux driver for iMX6]]


[[Category:TegraX1]][[Category:BoardDocumentation]]
{{ContactUs}}
 
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:Toshiba]]

Latest revision as of 21:15, 18 September 2024



Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.


Driver List Information
Refer to the RidgeRun Linux Camera Drivers to meet all the list of Drivers available


Toshiba TC358743 HDMI® Interface Bridge 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.

Supported platforms

  • NVIDIA Jetson TX1
  • NVIDIA Jetson TX2
  • NVIDIA Jetson Nano
  • NVIDIA Jetson Xavier

Features included in this driver


TX1
Feature Details SDK Support
1280x720@30fps 2/4 Lanes, UYVY Jetpack 3.2
1280x720@60fps 2/4 Lanes, UYVY Jetpack 3.2
1920x1080@30fps 2/4 Lanes, UYVY Jetpack 3.2
TX2
Feature Details SDK Support
1280x720@30fps 2/4 Lanes, UYVY Jetpack 3.2
1280x720@60fps 2/4 Lanes, UYVY Jetpack 3.2
1920x1080@30fps 2/4 Lanes, UYVY Jetpack 3.2
Nano
Feature Details SDK Support
1280x720@30fps 2/4 Lanes, UYVY Jetpack 4.2 / Jetpack 4.3
1280x720@60fps 2/4 Lanes, UYVY Jetpack 4.2 / Jetpack 4.3
1920x1080@30fps 2/4 Lanes, UYVY Jetpack 4.2 / Jetpack 4.3
Xavier
Feature Details SDK Support
1280x720@30fps 2/4 Lanes, UYVY Jetpack 4.5
1280x720@60fps 2/4 Lanes, UYVY Jetpack 4.5
1920x1080@30fps 2/4 Lanes, UYVY Jetpack 4.5

Build instructions

Build kernel using Jetpack and tc358743 driver

Jetson TX1 TX2

Building kernel sources

Follow the instructions in Compiling Jetson TX1 TX2 source code (Build_Kernel) to build the kernel sources.

Enable driver

Once you are following there is a step make menuconfig it allows you to enable the tc358743 driver as built-in.

make 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 TC358743 decoder

Jetson Nano

Building kernel sources

Follow the instructions in NVIDIA_Jetson_Nano - Building the Kernel from Source to build the kernel sources for the Jetson Nano.

Enable driver

Once you are following the guide there is a step make menuconfig, which allows you to enable the tc358743 driver as built-in.

make ARCH=arm64 O=$KERNEL_OUT menuconfig

Select the driver. The menu option is located:

-> Device Drivers
  -> Multimedia support (MEDIA_SUPPORT [=y])
    -> NVIDIA overlay Encoders, decoders, sensors and other helper chips
       <*> Toshiba TC358743 decoder

Test your Kernel image using Jetpack root file system

Check the kernel version. At this moment you can test the image created in order to see the new kernel is working correctly. You have to see a new kernel version with the correct date of compilation:

Jetson TX1/TX2

uname -a
Linux tegra-ubuntu 4.4.38 #21 SMP PREEMPT Thu May 9 14:30:09 CST 2019 aarch64 aarch64 aarch64 GNU/Linux

J100 TX2

You can see that the driver is probed, execute the line: dmesg | grep "(Tegra I2C adapter)"

Expected output:

[2.683236] tc358743 1-000f: tc358743 found @ 0xf (Tegra I2C adapter)

video devices created:

ls /dev/video*
/dev/video0

Jetson Nano

uname -a 
Linux nvidia 4.9.140 #6 SMP PREEMPT Tue May 7 16:25:38 CST 2019 aarch64 aarch64 aarch64 GNU/Linux

Nano EVM kit

You can see that the driver is probed, execute the line: dmesg | grep "(Tegra I2C adapter)"

Expected output:

nvidia@nvidia:~$ dmesg | grep "(Tegra I2C adapter)"
[    4.226382] tc358743 6-000f: tc358743 found @ 0xf (Tegra I2C adapter)

video devices created:

ls /dev/video*
/dev/video0

Examples

GStreamer TX1 TX2 Nano Xavier

720p@30 - 720p@60

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! 'video/x-raw,format=UYVY,width=1280,height=720' ! \
filesink location=test.yuv
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1280,height=720' ! \
nvvidconv ! 'video/x-raw(memory:NVMM),format=I420,width=1280,height=720' ! nvoverlaysink
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1280,height=720' ! \
nvvidconv ! omxh264enc ! mpegtsmux ! filesink location=test.ts

1080p@30

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! \
filesink location=test.yuv
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! \
nvvidconv ! 'video/x-raw(memory:NVMM),format=I420,width=1920,height=1080' ! nvoverlaysink
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,format=UYVY,width=1920,height=1080' ! \
nvvidconv ! omxh264enc ! mpegtsmux ! filesink location=test.ts

See also

Toshiba TC358743 Linux driver for iMX6


RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us
RidgeRun.ai: Artificial Intelligence | Generative AI | Machine Learning

Contact Us

Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering information is available at RidgeRun Engineering Services, RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page.