Porting TC358840 device driver from TX1 to TX2

Hi there,

We are facing issues while porting HDMI2CSI driver from TX1 to TX2. Currently we are porting TC358840 driver from TX1 to TX2. The driver looks mounted, but unable to see /dev/video folder. In addition, we are not sure what changes are required in DTSi and DTB file? The confusing part is that it has many dts files.

Appreciate if anyone could share your thoughts on how to proceed.

Thank you in advance for your support.

Best Regards,
Vijay

hello vijay.ranganathapura,

may i know which release version you’re working on? is it R24.2.1 to R28.1 ?
also, had you read the driver probing message from the kernel log?
thanks

Hi Jerry,

Thanks for the reply.

We are using R28.1 and haven’t read the driver probing message.

Sorry, we are using L4T 27.1 from Jetsonhacks link:

hello vijay.ranganathapura,

if you haven’t read the probing message, then there’s should be issue within the sensor driver.
seems you’re bringup an HDMI2CSI driver, please refer to tc358840 sensor driver in r27.1

r27.1/kernel/kernel-4.4/drivers/media/i2c/tc358840.c
r27.1/hardware/nvidia/platform/t18x/quill/kernel-dts/quill-modules/tegra186-camera-imx274.dtsi

thanks

Thansk JerryChange. We will review and get back to you. Much appreciated!

We have changed and looks like the Device tree and driver is up. We are able to stream HDMI input from Raspberry Pi3 board using VLC command. However, when we run the Gstreamer command, we get Red flickering output. Wondering what could be the issue?

We connected with Chromecast as an input, using VLC command it streams but I see the bootup Google logo and then a black screen. Using Gstreamer, we get red flickering output. What are we missing?

We connected a Canon camera HDMI as an input. This doesn’t work at all.

There are errors when we dmesg.

Appreciate some clarification to resolve the issue at the earliest.

  • There are NO errors when we check dmesg.

hello vijay.ranganathapura,

when we run the Gstreamer command, we get Red flickering output
could you share the commands and also the videos?

Thanks for the quick response:

RPi3 working VLC command: vlc v4l2:///dev/video0

Rpi3 not working Gstreamer code: gst-launch-1.0 v4l2src device=/dev/video0 do-timestamp=true ! ‘video/x-raw, width=3840, height=2160, framerate=30/1, format=UYVY’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=3840, height=2160, framerate=30/1, format=I420’ ! nvoverlaysink sync=false

Same VLC command for Chromecast, it only displays logo (only when we restart the Chorecast) and then black screen.

Red flickering scree is same for both RPi3 and Chromecast.

Below are the modes on DT:

mode1 { //MODE_2592X1944
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
tegra_sinterface = “serial_a”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;

                            active_w = "2592";
                            active_h = "1944";
                            pixel_t = "bayer_bggr";
                            //pixel_t = "bayer_rggb";
                            readout_orientation = "90";
                            line_length = "1752";
                            inherent_gain = "1";
                            mclk_multiplier = "6.67";
                            pix_clk_hz = "160000000";

                            min_gain_val = "1.0";
                            max_gain_val = "16";
                            min_hdr_ratio = "1";
                            max_hdr_ratio = "64";
                            min_framerate = "2.787078";
                            //max_framerate = "120";
                            max_framerate = "30";
                            min_exp_time = "22";
                            max_exp_time = "358733";
                            embedded_metadata_height = "1";
                    };

mode1 { //MODE_1920X1080
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;

                            active_w = "1920";
                            active_h = "1080";
                            pixel_t = "bayer_bggr";
                            //pixel_t = "bayer_rggb";
                            readout_orientation = "90";
                            line_length = "1752";
                            inherent_gain = "1";
                            mclk_multiplier = "6.67";
                            pix_clk_hz = "160000000";

                            min_gain_val = "1.0";
                            max_gain_val = "16";
                            min_hdr_ratio = "1";
                            max_hdr_ratio = "64";
                            min_framerate = "2.787078";
                            max_framerate = "30";
                            min_exp_time = "22";
                            max_exp_time = "358733";
                            embedded_metadata_height = "1";
                    };

mode2 { // MODE_3864x2174
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;

                            active_w = "3864";
                            active_h = "2174";
                            pixel_t = "bayer_rggb";
                            readout_orientation = "90";
                            line_length = "4200";
                            inherent_gain = "1";
                            mclk_multiplier = "25";
                            pix_clk_hz = "756000000";

                            min_gain_val = "1.0";
                            max_gain_val = "16.0";
                            min_hdr_ratio = "1";
                            max_hdr_ratio = "64";
                            min_framerate = "1.462526";
                            max_framerate = "30";
                            min_exp_time = "16.165";
                            max_exp_time = "165770";
                            embedded_metadata_height = "1";
                    };

mode3 { // MODE_1280x720
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
discontinuous_clk = “no”;
dpcm_enable = “false”;
cil_settletime = “0”;

                            active_w = "1280";
                            active_h = "720";
                            pixel_t = "bayer_rggb";
                            readout_orientation = "90";
                            line_length = "4200";
                            inherent_gain = "1";
                            mclk_multiplier = "25";
                            pix_clk_hz = "756000000";

                            min_gain_val = "1.0";
                            max_gain_val = "16.0";
                            min_hdr_ratio = "1";
                            max_hdr_ratio = "64";
                            min_framerate = "1.462526";
                            max_framerate = "30";
                            min_exp_time = "16.165";
                            max_exp_time = "165770";
                            embedded_metadata_height = "1";
                    };

I can’t attach videos on this, will send the google drive link in a min.

For logo and black screen…is it do with HDCP?

https://www.chromestory.com/chromecast/help/

Chromecast Black Screen with a Chrome Logo Spinning – Fix

Is your Chromecast stuck with a black screen and a spinning Google Chrome logo? When you unplug and re-plug it, does it show starting Chromecast and then this black screen? Here is a troubleshooting step that you can try.

If you saw your Chromecast’s loading screen (“Chromecast” with a spinning Chrome logo) but the home screen is black, you could be experiencing an HDCP (High-bandwidth Digital Content Protection) with your TV. This issue is easily fixed by rebooting your TV. Turn your TV off, unplug it, turn everything back on and try again.”

We just checked Gstreamer command for 1280*720. It works for RPi and get black and green signal for Chromecast and Laptop HDMI IN.

could you please suggest what’s wrong?

Also, do we need to override anything on common_platform file?