Usage Guide
  • 01 Oct 2021
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Usage Guide

  • Dark
    Light
  • PDF

Article Summary

Introduction

This article shows you how to get started using the VizionLink-HDMI card. The VizionLink HDMI card is an HDMI receiver that plugs onto the 70-pin camera connectors on our more recent development kits:

  • WB-EDM-G-IMX8M-PLUS
  • WB-EDM-G-IMX8M-MINI

The VizionLink HDMI card converts received HDMI video data into MIPI-CSI2 data using a Toshiba TC358743 device so that it can be captured and utilized by the SOC (either i.MX8M Plus or i.MX8M Mini).

On WB-EDM-G-IMX8M-PLUS, the i.MX8M Plus SOC has two MIPI-CSI2 ports, and it is possible to connect up to two VizionLink HDMI cards.

On WB-EDM-G-IMX8M-MINI, the i.MX8M Mini SOC has one MIPI-CSI2 ports, and supports connecting only one VizionLink HDMI card.

When using the Vizionlink-HDMI card, the device tree and kernel must be updated.

Background knowledge needed

You must have the background knowledge to modify the kernel configuration, rebuild, and replace the kernel and the device tree source (DTS)

Steps:

  • Please modify your device DTS file or DTS overlay file to declare Vizionlink-HDMI device.
  • If you are on the IMX8M plus platform, please apply the corresponding kernel patch.
  • Please make sure your Kernel config has selected "CONFIG_VIDEO_TC358743" option.
  • Please compile the kernel and dts, and then update the kernel image, dtb, or dtbo files.

Kernel Configuration

Ensure that the kernel has the CONFIG_VIDEO_TC358743 enabled, and rebuild the kernel.

For the i.MX8M Plus platform, you must apply a corresponding kernel patch.
i
### Modify the device tree to announce the Vizionlink-HDMI device

Example of DTS overlay modification on Wandboard EDM-G platform is below:

WB-EDM-G-IMX8M-PLUS + 2 VizionLink-HDMI cards:

/dts-v1/;                                                                        
/plugin/;                                                                        
                                                                                 
#include <dt-bindings/interrupt-controller/irq.h>                                
#include <dt-bindings/gpio/gpio.h>                                               
                                                                                 
/ {                                                                              
        fragment@0 {                                                             
                target = <&ov5640_otp_0>;                                        
                __overlay__ {                                                    
                        status = "disabled";                                     
                };                                                               
        };                                                                       
                                                                                 
        fragment@1 {                                                             
                target = <&ov5640_otp_1>;                                        
                __overlay__ {                                                    
                        status = "disabled";                                     
                };                                                               
        };                                                                       
                                                                                 
        fragment@2 {                                                             
                target = <&ov5640_0>;                                            
                __overlay__ {                                                    
                        status = "disabled";                                     
                };                                                               
        };                                                                       
                                                                                 
        fragment@3 {                                                             
                target = <&ov5640_1>;                                            
                __overlay__ {                                                    
                        status = "disabled";                                     
                };                                                               
        };                                                                       
                                                                                 
        fragment@4 {                                                             
                target = <&i2c2>;                                                
                __overlay__ {                                                    
                        #address-cells = <1>;                                    
                        #size-cells = <0>;                                       
                        status = "okay";                                         
                                                                                 
                        hdmi_in_0: tc358743@f {                                  
                                compatible = "toshiba,tc358743";                 
                                reg = <0x0f>;                                    
                                pinctrl-names = "default";                       
                                pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>;
                                reset-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;       
                                status = "okay";                                 
                                port {                                           
                                        hdmi_in_ep_0: endpoint {                 
                                                remote-endpoint = <&mipi_csi0_ep>;
                                                data-lanes = <1 2 3 4>;          
                                                clock-lanes = <0>;               
                                                clock-noncontinuous;             
                                                link-frequencies = /bits/ 64 <297000000>;
                                        };                                       
                                };                                               
                        };                                                       
                };                                                               
        };                                                                       
                                                                                 
        fragment@5 {                                                             
                target = <&i2c5>;                                                
                __overlay__ {                                                    
                        #address-cells = <1>;                                    
                        #size-cells = <0>;                                       
                        status = "okay";                                         
                                                                                 
                        hdmi_in_1: tc358743@f {                                  
                                compatible = "toshiba,tc358743";                 
                                reg = <0x0f>;                                    
                                pinctrl-names = "default";                       
                                pinctrl-0 = <&pinctrl_csi1_pwn>, <&pinctrl_csi1_rst>;
                                reset-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;       
                                status = "okay";                                 
                                port {                                           
                                        hdmi_in_ep_1: endpoint {                 
                                                remote-endpoint = <&mipi_csi1_ep>;
                                                data-lanes = <1 2 3 4>;          
                                                clock-lanes = <0>;               
                                                clock-noncontinuous;             
                                                link-frequencies = /bits/ 64 <297000000>;
                                        };                                       
                                };                                               
                        };                                                       
                };                                                               
        };                                                                       
                                                                                 
        fragment@6 {                                                             
                target = <&mipi_csi_0>;                                          
                __overlay__ {                                                    
                        #address-cells = <1>;                                    
                        #size-cells = <0>;                                       
                        status = "okay";                                         
                        port@0 {                                                 
                                reg = <0>;                                       
                                mipi_csi0_ep: endpoint {                         
                                        remote-endpoint = <&hdmi_in_ep_0>;       
                                        data-lanes = <4>;                        
                                        csis-hs-settle = <13>;                   
                                        csis-clk-settle = <2>;                   
                                        csis-wclk;                               
                                };                                               
                        };                                                       
                };                                                               
        };                                                                       
                                                                                 
        fragment@7 {                                                             
                target = <&mipi_csi_1>;                                          
                __overlay__ {                                                    
                        #address-cells = <1>;                                    
                        #size-cells = <0>;                                       
                        status = "okay";                                         
                        port@1 {                                                 
                                reg = <1>;                                       
                                mipi_csi1_ep: endpoint {                         
                                        remote-endpoint = <&hdmi_in_ep_1>;       
                                        data-lanes = <4>;                        
                                        csis-hs-settle = <13>;                   
                                        csis-clk-settle = <2>;                   
                                        csis-wclk;                               
                                };                                               
                        };                                                       
                };                                                               
        };                                                                       
                                                                                 
};                                                                               

For WB-EDM-G-IMX8M-MINI + single VizionLink-HDMI card:

/dts-v1/;
/plugin/;

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/imx8mm-clock.h>
#include <dt-bindings/gpio/gpio.h>

/ {
       fragment@0 {
               target = <&csi1_bridge>;
               __overlay__ {                                         
                       status = "okay";
               };
       };
        fragment@1 {                                                             
                target = <&mipi_csi_1>;                                          
                __overlay__ {                                                    
                        status = "okay";                                         
                        #address-cells = <1>;                                    
                        #size-cells = <0>;                                       
                                                                                 
                        port {                                                   
                                mipi1_sensor_ep: endpoint@1 {                    
                                        remote-endpoint = <&tc358743_out>;       
                                        data-lanes = <4>;                        
                                        csis-hs-settle = <13>;                   
                                        csis-clk-settle = <2>;                   
                                        csis-wclk;                               
                                };                                               
                        };                                                       
                };                                                               
        };

        fragment@2 {                                                             
                target = <&i2c2>;                                                
                __overlay__ {                                                    
                        #address-cells = <1>;                                    
                        #size-cells = <0>;                                       
                        status = "okay";                                         
                                                                                 
                        hdmi_in: tc358743@f {                                    
                                compatible = "toshiba,tc358743";                 
                                reg = <0x0f>;                                    
                                pinctrl-names = "default";                       
                                pinctrl-0 = <&pinctrl_csi_rst>;                  
                                reset-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;       
                                status = "okay";                                 
                                                                                 
                                port {                                           
                                        tc358743_out: endpoint {                 
                                                remote-endpoint = <&mipi1_sensor_ep>;
                                                data-lanes = <1 2 3 4>;          
                                                clock-lanes = <0>;               
                                                clock-noncontinuous;
                                                link-frequencies = /bits/ 64 <297000000>;
                                        };                                       
                                };                                               
                        };                                                       
                };                                                               
        };                                                                    
}

Usage (Example on WB-EDM-G-IMX8M-PLUS)

  • Please use the UART port to connect to the uart console of the edm-g wb board, and prepare the UART terminal software, UART setting: 115200, 8N1
  • Please power up the WB-EDM-G-IMX8M-PLUS board
  • After the WB-EDM-G-IMX8M-PLUS is power up completed, you will see the login: prompt message on the UART terminal software, please enter root to log in to the system.
  • Type in the command below:
# dmesg | grep tc358743

to confirm whether the tc358743 driver is started correctly, if it is started correctly, you should see a message similar to the following

tc358743 1-000f: tc358743 found @ 0x1e (30a30000.i2c)                          
mx8-img-md: Registered sensor subdevice: tc358743 1-000f (1)      
mx8-img-md: created link [tc358743 1-000f] => [mxc-mipi-csi2.0]   

if you plug two VizionLink-HDMI cards into the WB-EDM-G-IMX8M-PLUS, you should see a message similar to the following:

tc358743 1-000f: tc358743 found @ 0x1e (30a30000.i2c)             
tc358743 4-000f: tc358743 found @ 0x1e (30ad0000.i2c)             
mx8-img-md: Registered sensor subdevice: tc358743 4-000f (1)      
mx8-img-md: Registered sensor subdevice: tc358743 1-000f (2)      
mx8-img-md: created link [tc358743 1-000f] => [mxc-mipi-csi2.0]   
mx8-img-md: created link [tc358743 4-000f] => [mxc-mipi-csi2.1]

If the message you see is not like above, please check your DTS description, kernel config, or the process of compiling kernel/dtb/dtbo again for errors.

  • Please prepare an HDMI output device, such as a PC, laptop, TV game device, or DVD player, etc. Use HDMI cable ver. 1.4 or above to connect HDMI output device and VizionLink HDMI card.
  • Output HDMI signal to VizionLink HDMI card by operating the above mentioned device. After confirming that the HDMI signal has been output to the VizionLink HDMI card, you can execute the following command to preview the image captured by the VizionLink HDMI card.
# gst-launch-1.0 v4l2src device=<device_node> ! video/x-raw,width=<x>,height=<y> ! waylandsink

note:

  • The value of the "device_node" depends on which port VizionLink HDMI card is connected to. if the VizionLink HDMI card is connected to CSI1 port, device will be "/dev/video0", if the VizionLink HDMI card is connected to CSI2 port, device will be "/dev/video1"
  • The values of "x" and "y" depends on the resolution selected by your hdmi output device. example, if your DVD player select resolution 1920x1080 , x value will be 1920,y value will be 1080. So, command will be
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080 ! waylandsink
  • if you want to preview the dual VizionLink HDMI card simultaneously via two small preview window, you can type in command below:
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=<x>,height=<y> ! waylandsink window-width=320 window-height=240 &
# gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=<x>,height=<y> ! waylandsink window-width=320 window-height=240 &

Was this article helpful?