Bringup toshiba tc358840 mipi csi-2 IC

Hi all,

we trying for few weeks to bring up the TC358840 CSI-2 HDMI convertor on Jetson nano evk,
we sucsses to bring up the powers and identify him on our laptop (EDID reading ok) and
dmesg log seems ok (attached the log in txt file).
but on the final stage when starting to stream the vi output we got message of: tegra_channel_error_status:error 4000 frame 0

We think that one of the parameters dont configure ok on the dtsi file (attached also),
maybe the “bus-width = <4>” under: “host1x” node or under “nvcsi” node.

attached also log when running: media-ctl -p -d /dev/media0 command which seems ok.

when running v4l2-ctl command:
v4l2-ctl --device /dev/video0 --stream-mmap --set-fmt-video=width=3840,height=2160,pixelformat=UYVY

it seems that the video can`t lock on the signal. and therefore we dont see video output on the monitor. we also enable the “jetson_clocks” command to get better clock performace.

please assist us on how we can find the issue, what other tools we can use for this.
also, if it possible we would like to knew if we can pay for some external assist from Nvidia on this issue since this part we be placted on our video products line (many units per year).

many thanks,
tc355840_log.txt (4.5 KB)
tc358840_media_device_info.txt (1.6 KB)

tc358840_dtsi.txt (5.6 KB)

hello znroee,

you may refer to kernel driver,
the reported failure 0x4000 is due to pixel parser.
for example,

int tegra_csi_error(struct tegra_csi_channel *chan, int port_idx)
  	val = pp_read(port, TEGRA_CSI_PIXEL_PARSER_STATUS);
  	err |= val & 0x4000;
  	pp_write(port, TEGRA_CSI_PIXEL_PARSER_STATUS, val);

you may see-also similar discussion threads,
for example, Topic 77250, and Topic 121110 to port the driver to Nano series.

Hi JerryChang,

Thanks for your respone,
Can you supply please more details about that?

Does it relate to dts configuration or kernel driver (i use Nvidia driver), hardware issue
Or the command that i run in the terminal ?

This is very important for us.

Many thanks,

hello znroee,

your device tree settings looks incorrect.
for example,

                tc358743_vi_in1: endpoint {
                    status = "okay";
                    port-index = <0>;  /* CSI-B */
                    bus-width = <4>; /* Use CSI-B only */


               port@0 {
                    tc358743_out1: endpoint {
                        port-index = <0>; /* CSI A */
                        bus-width = <8>;

may I know what’s the exact hardware connection? you should update the device tree settings as same as your physical camera connected.
furthermore, the port-index property should be 1, if you used CSI-B.


I use Nvidia Jeston Nano with dts:
i start my dts for tc358840 from Tc358743 and left the same labels for vi and nvcsi untouched since they are just labels (please correct me if im wrong). And im using port A (not b) - the one closer to electrical power jack.

Regarding the data: bus width, refclk, and pll ? What should be the correct values for tc358840?

i fix the labels and the mismatch of the bus-width parameters on the dtsi (attached the new one).

now i`m getting error of:
[ 134.875034] video4linux video0: frame start syncpt timeout!0
[ 134.881122] TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 134.881155] TEGRA_CSI_CIL_STATUS 0x00000000
[ 134.881183] TEGRA_CSI_CILX_STATUS 0x00000000

attached full log.

dmesg_06_02.txt (26.4 KB)
tegra210-tc358840.dtsi (5.7 KB)

hello znroee,

this part is incorrect, what’s the lane configure you’re used exactly?
you may update the bus-width to the same as your VI/CSI definitions.

    csi_base: nvcsi {
                    tc358840_csi_in0: endpoint@0 {
                        bus-width = <4>;
    i2c7: i2c@546c0000 { 
        tc358840@0f {
                    tc358840_out1: endpoint {
                        port-index = <0>; /* CSI A */
                        bus-width = <2>;

since you’ve only single camera in the system.
please update the position property to rear as default
for example,

tegra-camera-platform {
	modules {
	    module1 {
	        position = "front";

you may refer to TX2 device tree sources of tc358840.
as you can see, it uses 8-lane configure, and it’s VI driver to enable two CSI bricks for running gang mode to sending frames.

Hi JerryChanh,

I already fix that on the dtsi that i upload on my previous replay.

beside changing the front line, please give some more info about the values that i need to configure (bus-width, csi oanes, refclk).

If you van please add link to TX2 tc358840 dtsi file it can help me a lot (i knew ridge-run have this fils but i need to pay for that).

Many thanks,

hello znroee,

please check Jetson Linux Archive, you may see the r32 release and download [Driver Package (BSP) Sources] package for obtain public release sources.
please extract kernel_src.tbz2 for device tree sources,
for example,
you may check below for TX2 tc358840 dtsi file.


I review the mention TX2 dtsi, can i use the values of PLL and refclock on Jetson Nano ?

Also, on this dtsi they dont mention csi-lanes and bus-width. What should by thier values ? Bus-width = 4 or 2 ?


hello znroee,

you may dig into quill-modules/ folder for sensor specific settings,
for example, $public_sources/kernel_src/hardware/nvidia/platform/t18x/quill/kernel-dts/quill-modules/tegra186-camera-imx274.dtsi

as I mentioned,
it uses 8-lane configure, and it’s VI driver to enable two CSI bricks for running gang mode to sending frames.

                tc358840@1f {
                        compatible = "toshiba,tc358840";
                                        tc358840_out0: endpoint {
                                                port-index = <2>;
                                                bus-width = <8>;

Hi JerryChang,

Since i use only one sensor (TC358840) i think that in my case port-index = 0.
I changed my dtsi file accroding to TX-2 and get diffrenent run behviours:

[ 222.827433] video4linux video0: frame start syncpt timeout!0
[ 222.833646] TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 222.833658] TEGRA_CSI_CIL_STATUS 0x00000000
[ 222.833669] TEGRA_CSI_CILX_STATUS 0x00000000
[ 222.833680] TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 222.833690] TEGRA_CSI_CIL_STATUS 0x00000010
[ 222.833700] TEGRA_CSI_CILX_STATUS 0x00040041
[ 222.833710] TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 222.833719] TEGRA_CSI_CIL_STATUS 0x00000000
[ 222.833728] TEGRA_CSI_CILX_STATUS 0x00000000
[ 222.833737] TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 222.833747] TEGRA_CSI_CIL_STATUS 0x00000010
[ 222.833756] TEGRA_CSI_CILX_STATUS 0x00040041

please point me how to debug this issues.
or check if related to my hardware or software side.

Best regards,

tegra210-tc358840.dtsi (5.4 KB)
dmesg_log.txt (16.1 KB)

hello znroee,

what’s the actual hardware connections? for example, do you have this camera connections to CSI-A?

Yes, my TC358840 connected to csi-A port. Jerry please replay about my last answer. What’s the meaning of those mipi issues.

hello znroee,

you may reading TRM for register description.
for example, 29.16.26 CSI_CSI_CILA_STATUS_0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.