Toshiba TC358743 Linux driver for iMX6
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.
Supported features:
- RGB, YCbCr444, YCbCr422: 24-bpp 1080P at 60 fps
- Audio
- EDID
- I2C for chip configuration
All other chip features are not supported at this time. RidgeRun can add support if required.
Enable driver
The Toshiba TC358743 Linux driver was developed for kernel 3.0.35-4.1.0, but can be ported to other versions as needed.
1. Apply the add_tc358743_driver.patch to your kernel.
2. Enable the driver from the kernel configuration:
-> Kernel configuration -> Device Drivers -> Multimedia support (MEDIA_SUPPORT [=y]) -> Video capture adapters (VIDEO_CAPTURE_DRIVERS [=y]) -> MXC Video For Linux Camera (VIDEO_MXC_CAMERA [=m]) -> MXC Camera/V4L2 PRP Features support -> <M> Toshiba tc358743 Hdmi to CSI 2 bridge
3. Compile the kernel
Driver testing
Driver loading
modprobe tc358743_h2c_bridge modprobe mxc_v4l2_capture
Testing with GStreamer
- 1080p60 capture and preview
With an 1080p60 HDMI source attached to the device run:
gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_isink
- 720p60 capture and preview
With an 720p60 HDMI source attached to the device run:
gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_isink
Testing tips in case of trouble getting the output
Check for available video devices
run
ls /dev/video*
Output will be something similar to
/# ls /dev/video* /dev/video0 /dev/video1 /dev/video16 /dev/video17
run ( without connecting the HD Video Source to the HDMI-MIPI card )
gst-launch mfw_v4lsrc device=/dev/video1 ! mfw_v4lsink
You should get colour bars as a output on the HDMI out cable connected from Sabrelite board to the TV Monitor.
and next run the same pipeline mentioned above ( by connecting the HD video Source to the HDMI-MIPI card ).
You should now get the video from HD video Source in the TV monitor instead of colour bars.
Test Results
The following results are for 720p60 and 1080p60 inputs and using a 1080p HDMI monitor.
Codesourcery Toolchain
- 720p60 capture-preview V4l2 video sink
/ # gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_v4lsink / # ... perf0: frames: 293 current: 58.16 average: 57.42 arm-load: 34 perf0: frames: 351 current: 57.17 average: 57.37 arm-load: 14 perf0: frames: 411 current: 58.97 average: 57.60 arm-load: 29 perf0: frames: 470 current: 57.90 average: 57.64 arm-load: 33 perf0: frames: 529 current: 57.85 average: 57.66 arm-load: 33 perf0: frames: 588 current: 57.89 average: 57.69 arm-load: 33 perf0: frames: 647 current: 57.86 average: 57.70 arm-load: 33 perf0: frames: 707 current: 58.83 average: 57.80 arm-load: 33 perf0: frames: 767 current: 58.80 average: 57.87 arm-load: 33 perf0: frames: 826 current: 57.80 average: 57.87 arm-load: 34
- 720p60 capture-preview IPU video sink
/ # gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_isink / # ... perf0: frames: 241 current: 59.82 average: 59.83 arm-load: 1 perf0: frames: 301 current: 59.82 average: 59.83 arm-load: 1 perf0: frames: 361 current: 59.82 average: 59.83 arm-load: 1 perf0: frames: 421 current: 59.83 average: 59.83 arm-load: 4 perf0: frames: 481 current: 59.83 average: 59.83 arm-load: 0 perf0: frames: 542 current: 60.78 average: 59.93 arm-load: 3 perf0: frames: 602 current: 59.82 average: 59.92 arm-load: 1 perf0: frames: 662 current: 59.83 average: 59.92 arm-load: 2 perf0: frames: 722 current: 59.84 average: 59.91 arm-load: 0 perf0: frames: 782 current: 59.83 average: 59.90 arm-load: 4 perf0: frames: 842 current: 59.83 average: 59.90 arm-load: 1 perf0: frames: 903 current: 60.79 average: 59.96 arm-load: 1 perf0: frames: 963 current: 59.83 average: 59.95 arm-load: 1
- 720p60 capture only
/ # gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 ! gstperf ! fakesink / # ... / # perf0: frames: 62 current: 61.01 average: 61.01 arm-load: 9 / # perf0: frames: 122 current: 59.99 average: 60.51 arm-load: 0 / # perf0: frames: 182 current: 59.99 average: 60.34 arm-load: 0 / # perf0: frames: 242 current: 59.99 average: 60.25 arm-load: 0 / # perf0: frames: 302 current: 59.99 average: 60.20 arm-load: 0 / # perf0: frames: 362 current: 59.99 average: 60.16 arm-load: 0 / # perf0: frames: 422 current: 59.99 average: 60.14 arm-load: 0 / # perf0: frames: 482 current: 59.99 average: 60.12 arm-load: 0
- 720p60 H.264 encoded
/ # gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 ! vpuenc codec=6 ! gstperf ! fakesink / # ... / # perf0: frames: 63 current: 62.54 average: 62.54 arm-load: 2 / # perf0: frames: 123 current: 59.99 average: 61.27 arm-load: 0 / # perf0: frames: 183 current: 59.99 average: 60.85 arm-load: 0 / # perf0: frames: 243 current: 59.99 average: 60.63 arm-load: 0 / # perf0: frames: 303 current: 59.99 average: 60.51 arm-load: 1 / # perf0: frames: 363 current: 59.99 average: 60.42 arm-load: 8
- 1080p60 capture-preview mfw_v4lsink
/ # gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_v4lsink / # ... perf0: frames: 152 current: 37.97 average: 36.32 arm-load: 26 perf0: frames: 192 current: 38.07 average: 36.67 arm-load: 50 perf0: frames: 232 current: 38.07 average: 36.90 arm-load: 25 perf0: frames: 272 current: 38.00 average: 37.06 arm-load: 51 perf0: frames: 312 current: 38.01 average: 37.18 arm-load: 25 perf0: frames: 352 current: 38.00 average: 37.27 arm-load: 50 perf0: frames: 392 current: 37.97 average: 37.34 arm-load: 26 perf0: frames: 432 current: 37.96 average: 37.40 arm-load: 48 perf0: frames: 472 current: 37.87 average: 37.44 arm-load: 26
- 1080p60 capture-preview IPU video sink
/ # gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_isink / # ... perf0: frames: 242 current: 59.55 average: 59.14 arm-load: 10 perf0: frames: 303 current: 59.67 average: 59.24 arm-load: 1 perf0: frames: 365 current: 60.47 average: 59.45 arm-load: 7 perf0: frames: 426 current: 59.55 average: 59.46 arm-load: 2 perf0: frames: 487 current: 59.67 average: 59.49 arm-load: 6 perf0: frames: 549 current: 60.50 average: 59.60 arm-load: 2 perf0: frames: 610 current: 59.61 average: 59.60 arm-load: 9 perf0: frames: 672 current: 60.49 average: 59.68 arm-load: 0 perf0: frames: 733 current: 59.48 average: 59.67 arm-load: 0 perf0: frames: 794 current: 59.63 average: 59.66 arm-load: 2
- 1080p60 capture only
/ # gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 ! gstperf ! fakesink / # ... / # perf0: frames: 61 current: 60.95 average: 60.95 arm-load: 6 / # perf0: frames: 121 current: 59.94 average: 60.45 arm-load: 0 / # perf0: frames: 181 current: 59.94 average: 60.28 arm-load: 1 / # perf0: frames: 241 current: 59.94 average: 60.19 arm-load: 0 / # perf0: frames: 301 current: 59.94 average: 60.14 arm-load: 0 / # perf0: frames: 361 current: 59.94 average: 60.11 arm-load: 0 / # perf0: frames: 421 current: 59.94 average: 60.08 arm-load: 3
- 1080p60 H.264 encoded
/ # gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 ! vpuenc codec=6 ! gstperf ! fakesink / # ... / # perf0: frames: 40 current: 39.24 average: 39.24 arm-load: 5 / # perf0: frames: 79 current: 38.38 average: 38.81 arm-load: 1 / # perf0: frames: 118 current: 38.33 average: 38.65 arm-load: 4 / # perf0: frames: 157 current: 38.40 average: 38.59 arm-load: 0 / # perf0: frames: 196 current: 38.45 average: 38.56 arm-load: 1 / # perf0: frames: 235 current: 38.28 average: 38.51 arm-load: 0
Linaro Toolchain (Hardware and Software floating point supported)
- 1080p60 capture-preview using V4L2 Video Sink
/ # gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_v4lsink / # ... perf0: frames: 595 current: 59.70 average: 59.01 arm-load: 25 perf0: frames: 655 current: 59.72 average: 59.08 arm-load: 25 perf0: frames: 716 current: 60.66 average: 59.21 arm-load: 25 perf0: frames: 776 current: 59.72 average: 59.25 arm-load: 25 perf0: frames: 836 current: 59.76 average: 59.29 arm-load: 25 perf0: frames: 896 current: 59.74 average: 59.32 arm-load: 25 perf0: frames: 956 current: 59.73 average: 59.34 arm-load: 26 perf0: frames: 1017 current: 60.72 average: 59.42 arm-load: 25 perf0: frames: 1077 current: 59.61 average: 59.43 arm-load: 25
- 1080p60 capture-preview using IPU Video Sink
/ # gst-launch mfw_v4lsrc capture-mode=5 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_isink / # ... perf0: frames: 485 current: 60.04 average: 59.77 arm-load: 0 perf0: frames: 546 current: 59.71 average: 59.76 arm-load: 0 perf0: frames: 608 current: 60.64 average: 59.85 arm-load: 2 perf0: frames: 669 current: 60.00 average: 59.86 arm-load: 2 perf0: frames: 729 current: 59.16 average: 59.80 arm-load: 1 perf0: frames: 790 current: 60.02 average: 59.82 arm-load: 0 perf0: frames: 851 current: 60.09 average: 59.84 arm-load: 1 perf0: frames: 912 current: 60.10 average: 59.86 arm-load: 3 perf0: frames: 973 current: 60.14 average: 59.87 arm-load: 2 perf0: frames: 1034 current: 60.19 average: 59.89 arm-load: 2
- 720p60 capture-preview using V4L2 Video Sink
/ # gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_v4lsink / # ... perf0: frames: 240 current: 59.82 average: 59.66 arm-load: 20 perf0: frames: 301 current: 60.76 average: 59.88 arm-load: 33 perf0: frames: 361 current: 59.83 average: 59.87 arm-load: 17 perf0: frames: 421 current: 59.82 average: 59.86 arm-load: 19 perf0: frames: 481 current: 59.78 average: 59.85 arm-load: 25 perf0: frames: 542 current: 60.72 average: 59.95 arm-load: 23 perf0: frames: 602 current: 59.79 average: 59.93 arm-load: 24 perf0: frames: 662 current: 59.79 average: 59.92 arm-load: 33
- 720p60 capture-preview using IPU Video Sink
/ # gst-launch mfw_v4lsrc capture-mode=3 fps-n=60 queue-size=7 ! queue max-size-buffers=3 ! gstperf ! mfw_isink / # ... perf0: frames: 299 current: 59.90 average: 59.68 arm-load: 2 perf0: frames: 359 current: 59.94 average: 59.73 arm-load: 1 perf0: frames: 419 current: 59.91 average: 59.75 arm-load: 2 perf0: frames: 480 current: 59.79 average: 59.76 arm-load: 1 perf0: frames: 540 current: 59.96 average: 59.78 arm-load: 2 perf0: frames: 600 current: 59.98 average: 59.80 arm-load: 1 perf0: frames: 661 current: 59.79 average: 59.80 arm-load: 2 perf0: frames: 721 current: 59.96 average: 59.81 arm-load: 2 perf0: frames: 781 current: 59.86 average: 59.82 arm-load: 1 perf0: frames: 842 current: 60.87 average: 59.89 arm-load: 1 perf0: frames: 902 current: 59.97 average: 59.90 arm-load: 2
For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.
Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.