TC358840 interface

Hello,
As I explained you that I am using default drivers of Nvidia for TC358840, but in that I put few messages to trace out the driver flow.

One more thing I have included in the dtsi is interrupt pin assignment.

   refclk_hz = <48000000>; /* 40 - 50 MHz */
        interrupt-parent = <&gpio>;
        interrupts = <TEGRA_GPIO(E, 6) GPIO_ACTIVE_HIGH>;

Now after this changes when I install default driver, I got following log.

log3007.txt (6.1 KB)

Now I am getting video0 device but still tc358840 module is not engaged.

Module Size Used by
tc358840 56736 0
bnep 16562 2
xt_conntrack 3609 1

This tc358840 I have connected to HDMI out of my laptop. After installation of driver laptop detect Toshiba device as second screen.

Also if I try to check video0 properties using v4l2 command it always shows 1920 x 1080 resolution.
Even if nothing is connected still it shows same resolution.

Did I still missing something in dtsi?

Please guide me on this.

Thanks a lot for support.

hello rusurya,

please share complete kernel logs, $ sudo dmesg --follow
you should also note that, v4l2 IOCTL it only checks the driver capability, which reported by sensor driver.

Hello,

Thanks a lot for reply.

Please check attached full log.
log3107.txt (95.4 KB)

Hello,

Sorry in full log parse_dt function log also appear.
There is one thing in dtsi

csi_port = <1>;

Currently I am using CSI 4 lane only. I am using CSI 0 and CSI 1 port for that.
So above parameter declaration is correct ? or csi_port = <0> is correct.?

hello rusurya,

according to the logs.
it seems you’ve tc358840 register to linux system, and the failure now related to streaming.
for instance, [ 99.518662] tc358840 0-000f: enable_stream: Timeout: HDMI input sync failed.

this meant CSI-B, whereas CSI-B doesn’t support with 4-lane configuration.
please revise the node as CSI-A, (i.e. csi_port = <0>;) to enable your 4-lane streaming.

Hello,

Thanks a lot for reply.
Actually I tried with csi_port=<0> but there is no difference.

Hello,

Any updates on query?

hello rusurya,

please also give it a try with below steps for setting VI, CSI, ISP engines to maximum clock for testing.

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

Hello,

Thanks a lot for reply.

Sorry for my lack of understanding.
I run above commands after installing driver but I am getting following output.

user@user-desktop:~$ sudo su
[sudo] password for user:
root@user-desktop:/home/user# echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
bash: /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked: No such file or directory

root@user-desktop:/home/user# echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
bash: /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked: No such file or directory

root@user-desktop:/home/user# echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
bash: /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked: No such file or directory

root@user-desktop:/home/user# cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat: /sys/kernel/debug/bpmp/debug/clk/vi/max_rate: No such file or directory
tee: /sys/kernel/debug/bpmp/debug/clk/vi/rate: No such file or directory

root@user-desktop:/home/user# cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
tee: /sys/kernel/debug/bpmp/debug/clk/isp/ratecat: /sys/kernel/debug/bpmp/debug/clk/isp/max_rate: No such file or directory
: No such file or directory

root@user-desktop:/home/user# cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat: /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate: No such file or directory
tee: /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate: No such file or directory

I thing I need to install something.
Please guide me on this.

please see-also similar topics to bringup TC358840 on Jetson Nano DevKit.
for instance, Topic 241569, Topic 289984, Topic 279777.

Hello,

Sorry for delayed reply.

I was going through all above links and tried to make changes in dtsi and driver.
But nothing helps.
I put function name display messages that gives idea about how program flows?
I took debug log please check attached log file.
In my case module is inserted.
I am getting video 0 device and tc358840 is detected on laptop but if I check lsmod command its not engaged.
Please guide me on this.
defaultdebug_2208.txt (4.2 KB)

hello rusurya,

it looks driver has functional according to the debug logs,
however, what’s the reason of below two? is it related to no signaling detected by the TC358840?
[ 373.077038] no_signal
[ 373.077248] no_sync

Hello,
Sorry for delayed reply.
Actually I was trying to find out where the things goes wrong?
For that I enable more debug and put messages to trace out the flow.
Finally I found the fault.
In driver probe function the last function is
v4l2_async_register_subdev(sd);
unfortunately we are failing there. Please check attached dmesg log.
I am trying to solve the problem.
If you have any suggestion then please let me know.
Thanks a lot for support.

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