The configurations on Jetson Nano platform about MIPI CSI

Hi teams,
Our current hardware design is IT6510 + Jetson Nano. IT6510 is a high-performance single-chip DisplayPort to MIPI-CSI/DSI converter.
The design as below.
IT6510 output 4 lane MIPI CSI to Jetson Nano CSI C/D

image

Can you help to confirm whether the device tree configuration is correct? (The complete device tree is in the attached file)
In addition, if the output color space of IT6510 is RGB888/YUV444 or YUV422, need to describe tegra-camera-platform?

tegra210-it6510.dtsi (2.0 KB)

You may need to reference to tc358840.c to report the pixel format then don’t need to describe it in the sensor mode in device tree.

Thank you for your reply!

The tc358840 driver is include in LT4 using kernel 4.4 but Jestson NANO is using Kernel 4.9 now.

We have some question about driver implementation.

  1. Use tegra_media_entity_init() or media_entity_pads_init()?
  2. How to set parameter is_subdev and is_sensor with tegra_media_entity_init() ?
  3. Is the implementation of v4l2_subdev_internal_ops->open() necessary?

After modify device tree and driver(I put the modified device tree in the attachment), kernel panic after running capture command
tegra210-it6510_delete_node_pltfrm.dtsi (1.6 KB)

sudo v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RGB888 --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video0

it seems we need modify something for tegra-camera-platform?

[ 98.112623] Unable to handle kernel read from unreadable memory at virtual address 000000a0
[ 98.122279] Mem abort info:
[ 98.125095] ESR = 0x96000005
[ 98.128162] Exception class = DABT (current EL), IL = 32 bits
[ 98.134084] SET = 0, FnV = 0
[ 98.137144] EA = 0, S1PTW = 0
[ 98.140290] Data abort info:
[ 98.143177] ISV = 0, ISS = 0x00000005
[ 98.147001] CM = 0, WnR = 0
[ 98.149977] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc09b820000
[ 98.156505] [00000000000000a0] *pgd=0000000000000000, *pud=0000000000000000
[ 98.164968] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 98.170525] Modules linked in: fuse zram userspace_alert overlay it6510 nvgpu ip_tables x_tables [last unloaded: gpio_bb]
[ 98.181536] CPU: 1 PID: 7142 Comm: vi-output, it65 Not tainted 4.9.253-tegra #47
[ 98.188914] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[ 98.194904] task: ffffffc0f9177000 task.stack: ffffffc093610000
[ 98.200813] PC is at tegra_camera_update_clknbw+0x28/0x2a8
[ 98.206286] LR is at tegra_channel_set_stream+0x1a8/0x4f0
[ 98.211670] pc : [] lr : [] pstate: 20400045
[ 98.219046] sp : ffffffc093613c90
[ 98.222349] x29: ffffffc093613c90 x28: 0000000000000001
[ 98.227661] x27: ffffffc0f6c22018 x26: ffffffc0f6c228a0
[ 98.232973] x25: ffffffc0f6c22818 x24: 0000000000000001
[ 98.238283] x23: ffffffc0f6c22018 x22: ffffffc0f6c228a0
[ 98.243595] x21: 0000000000000001 x20: 0000000000000000
[ 98.248906] x19: ffffffc0f6c22018 x18: 0000000000000000
[ 98.254218] x17: 0000000000000001 x16: 0000000000000000
[ 98.259527] x15: 000000000000008c x14: 0000000002b513fc
[ 98.264839] x13: 00000000000014d6 x12: ffffffc0fa7baa00
[ 98.270149] x11: 000000000000000b x10: 0000000000000a10
[ 98.275460] x9 : ffffffc093613d70 x8 : ffffffc0f9177a70
[ 98.280772] x7 : fefefeff646c606d x6 : 00000000781dd0ff
[ 98.286084] x5 : ffffffc0f6c2251c x4 : 0000000000000000
[ 98.291395] x3 : 0000000000000008 x2 : ffffffc0f6c22018
[ 98.296706] x1 : 0000000000000001 x0 : 0000000000000000

[ 98.303500] Process vi-output, it65 (pid: 7142, stack limit = 0xffffffc093610000)
[ 98.310963] Call trace:
[ 98.313402] [] tegra_camera_update_clknbw+0x28/0x2a8
[ 98.319914] [] tegra_channel_set_stream+0x1a8/0x4f0
[ 98.326338] [] tegra_channel_kthread_capture_start+0x7f8/0x9e0
[ 98.333717] [] kthread+0xec/0xf0
[ 98.338494] [] ret_from_fork+0x10/0x30
[ 98.343793] —[ end trace 8bde0ee4758787a8 ]—
[ 102.452862] Unable to handle kernel read from unreadable memory at virtual address 00000000
[ 102.461467] Mem abort info:
[ 102.464491] ESR = 0x96000005
[ 102.467646] Exception class = DABT (current EL), IL = 32 bits
[ 102.473615] SET = 0, FnV = 0
[ 102.476693] EA = 0, S1PTW = 0
[ 102.479844] Data abort info:
[ 102.482716] ISV = 0, ISS = 0x00000005
[ 102.486556] CM = 0, WnR = 0
[ 102.489532] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc0ed681000
[ 102.496063] [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
[ 102.503047] Internal error: Oops: 96000005 [#2] PREEMPT SMP
[ 102.508643] Modules linked in: fuse zram userspace_alert overlay it6510 nvgpu ip_tables x_tables [last unloaded: gpio_bb]
[ 102.520136] CPU: 2 PID: 7141 Comm: v4l2-ctl Tainted: G D 4.9.253-tegra #47
[ 102.528194] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[ 102.534262] task: ffffffc093632a00 task.stack: ffffffc0f2d74000
[ 102.540281] PC is at __ll_sc_atomic_sub_return+0x4/0x20
[ 102.545579] LR is at exit_creds+0x2c/0x78
[ 102.549657] pc : [] lr : [] pstate: 60400045
[ 102.557094] sp : ffffffc0f2d779b0
[ 102.560458] x29: ffffffc0f2d779b0 x28: ffffffc093632a00
[ 102.565917] x27: ffffff8008f32000 x26: ffffffc0f6c22018
[ 102.571366] x25: ffffffc0a3a5ede8 x24: ffffffc0f3342830
[ 102.576817] x23: 0000000000000001 x22: ffffffc0f6c22018
[ 102.582261] x21: ffffffc0f9177030 x20: 000000000000000b
[ 102.587704] x19: ffffffc0f9177000 x18: 00000000ffffffff
[ 102.593143] x17: 0000000000000000 x16: 000000000000009f
[ 102.598579] x15: 0000000000000001 x14: ffffff8008f399f8
[ 102.604017] x13: 0000000000000000 x12: 00000000ffffffff
[ 102.609453] x11: ffffffc0a3a5ed80 x10: 00000000000000ba
[ 102.614893] x9 : 0000000000000001 x8 : 0000000000000000
[ 102.620332] x7 : 000000007f200000 x6 : ffffffc093632a00
[ 102.625768] x5 : 0000000000000800 x4 : 0000000000000000
[ 102.631200] x3 : 000000000000009f x2 : 0000000000000000
[ 102.636633] x1 : 0000000000000000 x0 : 0000000000000001

[ 102.643625] Process v4l2-ctl (pid: 7141, stack limit = 0xffffffc0f2d74000)
[ 102.650544] Call trace:
[ 102.653084] [] __ll_sc_atomic_sub_return+0x4/0x20
[ 102.659424] [] __put_task_struct+0x4c/0x140
[ 102.665238] [] kthread_stop+0x1e4/0x1e8
[ 102.670712] [] vi2_channel_stop_streaming+0xe0/0x658
[ 102.677316] [] tegra_channel_stop_streaming+0x34/0x48
[ 102.683992] [] __vb2_queue_cancel+0x34/0x188
[ 102.689885] [] vb2_core_queue_release+0x2c/0x58
[ 102.696038] [] _vb2_fop_release+0x84/0xa0
[ 102.701678] [] tegra_channel_close+0x64/0x140
[ 102.707675] [] v4l2_release+0x48/0xa0
[ 102.712977] [] __fput+0x90/0x1d0
[ 102.717835] [] ____fput+0x20/0x30
[ 102.722788] [] task_work_run+0xbc/0xd8
[ 102.728168] [] do_exit+0x2e0/0xa88
[ 102.733199] [] do_group_exit+0x40/0xa8
[ 102.738580] [] get_signal+0xbc/0x750
[ 102.743790] [] do_signal+0x130/0x500
[ 102.748992] [] do_notify_resume+0x90/0xb0
[ 102.754625] [] work_pending+0x8/0x10
[ 102.759837] —[ end trace 8bde0ee4758787a9 ]—
[ 102.899659] Fixing recursive fault but reboot is needed!
[ 125.067485] Bridge firewalling registered
[ 125.091334] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 125.487678] Netfilter messages via NETLINK v0.30.
[ 125.494436] ctnetlink v0.93: registering with nfnetlink.
[ 125.706552] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready

K4.9 also have include it in …/kernel/nvidia/driver/media/i2c/

We down load L4T public source 32.7.1 and cannot find it, only tc398743.c.

I mean to reference to tc358840 to implement yours.

Our driver is first reference to tc358743.c included in kernel and has been verified on other platform.

And we try porting IT6510 to Jetson NANO in following link
TC358743 Jetson Nano driver and device tree · GitHub

And also we check tc358740.c too.

But we need to figure out how to write device tree correctly to bring tegra_camera up and connect V4L2 to our Driver

The TC358740 is describe in Linux_for_Tegra\source\public\kernel_src\hardware\nvidia\platform\t210\jetson\kernel-dts\jetson-platforms\tegra210-jetson-cv-camera-imx274-hdmi.dtsi

And combine imx274 together with tegra-camera-platform{}

If we enable tegra-camera-platform{} in our device tree, the log shows kernel try to bring up camera_platform_driver.

[ 1.017740] tegra_camera_platform tegra-camera-platform: tegra_camera_probe:camera_platform_driver probe
[ 1.017957] misc tegra_camera_ctrl: tegra_camera_isomgr_register: some fields not in DT.
[ 1.017964] misc tegra_camera_ctrl: bits_per_pixel is invalid
[ 1.018000] misc tegra_camera_ctrl: tegra_camera_probe: failed to register CAMERA as isomgr client
[ 1.018030] tegra_camera_platform: probe of tegra-camera-platform failed with error -12

And then follow by v4l2 register error

[ 5.021629] it6510 6-0058: tegra_media_entity_init() 0
[ 5.028196] Unable to handle kernel paging request at virtual address ffffffffffffffe8
[ 5.036646] Mem abort info:
[ 5.039875] ESR = 0x96000005
[ 5.043842] Exception class = DABT (current EL), IL = 32 bits
[ 5.050116] SET = 0, FnV = 0
[ 5.053454] EA = 0, S1PTW = 0
[ 5.057563] Data abort info:
[ 5.060716] ISV = 0, ISS = 0x00000005
[ 5.061452] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 5.067137] CM = 0, WnR = 0
[ 5.070133] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff800a16e000
[ 5.077596] [ffffffffffffffe8] *pgd=0000000000000000, *pud=0000000000000000
[ 5.084910] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 5.090475] Modules linked in: overlay it6510(+) nvgpu ip_tables x_tables
[ 5.097305] CPU: 0 PID: 3381 Comm: systemd-udevd Not tainted 4.9.253-tegra #31
[ 5.104512] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[ 5.110507] task: ffffffc0f975e200 task.stack: ffffffc0eee78000
[ 5.116419] PC is at v4l2_async_belongs+0x4c/0x120
[ 5.121201] LR is at v4l2_async_register_subdev+0x74/0x100
[ 5.126675] pc : [] lr : [] pstate: 80400045
[ 5.134055] sp : ffffffc0eee7b9d0
[ 5.137359] x29: ffffffc0eee7b9d0 x28: 0000000000000018
[ 5.142675] x27: 000000000000020c x26: 0000000000000030
[ 5.147991] x25: ffffff8001180b70 x24: ffffff8008b28000
[ 5.153305] x23: ffffff8008b28148 x22: ffffff8008b28088
[ 5.158620] x21: ffffffc0f328c848 x20: ffffffc0f6c31968
[ 5.163935] x19: ffffffffffffffe8 x18: 0000000000000010
[ 5.169248] x17: 0000000000000000 x16: 0000000000000000
[ 5.174561] x15: ffffffffffffffff x14: ffffff808a0dd5b7
[ 5.179876] x13: ffffff800a0dd5c5 x12: 0000000000000000
[ 5.185189] x11: 0000000005f5e0ff x10: 0000000000000376
[ 5.190505] x9 : 00000000ffffffd0 x8 : ffffff80083d6cf0
[ 5.195818] x7 : ffffff8009e544e8 x6 : ffffffc0fefe5bf0
[ 5.201131] x5 : ffffffc0fefe5bf0 x4 : 0000000000000000
[ 5.206446] x3 : ffffffc0fefeb7f8 x2 : ffffffc0fefe5bf0
[ 5.211760] x1 : ffffff8008b28000 x0 : ffffff8008b28000

If we remove tegra-camera-platform{} in device tree, driver can register to Video0, but sine the camera_platform_driver not bring up,
It will cause kernel panic when try to open video deivce.

[ 98.200813] PC is at tegra_camera_update_clknbw+0x28/0x2a8
[ 98.206286] LR is at tegra_channel_set_stream+0x1a8/0x4f0
[ 98.211670] pc : [] lr : [] pstate: 20400045
[ 98.219046] sp : ffffffc093613c90
[ 98.222349] x29: ffffffc093613c90 x28: 0000000000000001
[ 98.227661] x27: ffffffc0f6c22018 x26: ffffffc0f6c228a0
[ 98.232973] x25: ffffffc0f6c22818 x24: 0000000000000001
[ 98.238283] x23: ffffffc0f6c22018 x22: ffffffc0f6c228a0
[ 98.243595] x21: 0000000000000001 x20: 0000000000000000
[ 98.248906] x19: ffffffc0f6c22018 x18: 0000000000000000
[ 98.254218] x17: 0000000000000001 x16: 0000000000000000
[ 98.259527] x15: 000000000000008c x14: 0000000002b513fc
[ 98.264839] x13: 00000000000014d6 x12: ffffffc0fa7baa00
[ 98.270149] x11: 000000000000000b x10: 0000000000000a10
[ 98.275460] x9 : ffffffc093613d70 x8 : ffffffc0f9177a70
[ 98.280772] x7 : fefefeff646c606d x6 : 00000000781dd0ff
[ 98.286084] x5 : ffffffc0f6c2251c x4 : 0000000000000000
[ 98.291395] x3 : 0000000000000008 x2 : ffffffc0f6c22018
[ 98.296706] x1 : 0000000000000001 x0 : 0000000000000000

Add min_bits_per_pixel in tegra-camera-platform{} to check.

Thank you for your suggestion. I added tegra-camera-platform back to the device tree and set min_bits_per_pixel to 16, it seems that there is no kernel panic.

But running v4l2 commnad
"sudo v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RGB888 --stream-mmap --stream-count=100 --set-ctrl bypass_mode=0 -d /dev/video0 "
frame start syncpt timeout occurred!

After that, I opened capture status and printed the following status, what does this mean?

Have a check REG CSI_CSI_CIL_A_STATUS_0 in TRM.

CILA_CTRL_ERR: Control Error. Set when CIL-A detects LP state 01 or 10 followed by a stop state (LP11)
instead of transitioning into the Escape mode or Turn Around mode (LP00).

Thanks for your reply.
According to the error interpretation you provided, I measured the D0n/D0p MIPI CSI waveforms, but it seems that the LP-11/LP-01/LP-00 waveforms are all normal. What else needs to be confirmed?

Have confirm the sensor output continuous clocks or discontinuous clocks to modify discontinuous_clk in device tree to try.

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