Xavier NX support of 4 MIPI CSI camera

Hi all. I use Xavier NX module to access some cameras, but mipi signal cannot be identified. I don’t use VI0 , but let LT9211 turn MIPI input VI1, VI2,VI3, VI4 , and let a PAL turn MIPI input VI5 . The mipi input of vi1-vi5 all have not collected data in these ways and trace said :
v4l2-ctl-8852 [000] … 669.389366: tegra_channel_open: vi-output, iraytek 14-0034
v4l2-ctl-8852 [000] … 669.390873: tegra_channel_set_power: iraytek 14-0034 : 0x1
v4l2-ctl-8852 [000] … 669.390885: camera_common_s_power: status : 0x1
v4l2-ctl-8852 [000] … 669.414067: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x1
v4l2-ctl-8852 [000] … 669.414073: csi_s_power: enable : 0x1
v4l2-ctl-8852 [000] … 669.427030: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 10
v4l2-ctl-8852 [000] … 669.433261: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-8852 [000] … 669.434704: tegra_channel_set_stream: 15a00000.nvcsi–1 : 0x1
v4l2-ctl-8852 [000] … 669.434708: csi_s_stream: enable : 0x1
v4l2-ctl-8852 [000] … 669.434738: tegra_channel_set_stream: iraytek 14-0034 : 0x1
kworker/1:4-6018 [001] … 669.440528: rtos_queue_peek_from_isr_failed: tstamp:21343541525 queue:0x0bcbbbb8
kworker/1:4-6018 [001] … 669.440534: rtcpu_start: tstamp:21343543331
kworker/1:4-6018 [001] … 669.440537: rtos_queue_send_from_isr_failed: tstamp:21343553970 queue:0x0bcb2e38
kworker/1:4-6018 [001] … 669.440538: rtos_queue_send_from_isr_failed: tstamp:21343554122 queue:0x0bcb76a0
kworker/1:4-6018 [001] … 669.440542: rtcpu_string: tstamp:21343563192 id:0x04010000 str:“vi5_hwinit: firmware CL2018101701 protocol vers”
kworker/1:4-6018 [001] … 669.440544: rtcpu_string: tstamp:21343563312 id:0x04010000 str:"on 2.2
"
kworker/1:4-6018 [001] … 669.440570: rtos_queue_send_from_isr_failed: tstamp:21343651925 queue:0x0bcb2e38
kworker/1:4-6018 [001] … 669.440578: rtos_queue_send_from_isr_failed: tstamp:21343699503 queue:0x0bcbada0
kworker/1:4-6018 [001] … 669.496488: rtcpu_vinotify_event: tstamp:21344062350 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:21571973984 data:0x10000000
kworker/1:4-6018 [001] … 669.496491: rtcpu_vinotify_event: tstamp:21344062514 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:21571982176 data:0x31000001
kworker/1:4-6018 [001] … 669.496493: rtcpu_vinotify_event: tstamp:21344062676 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:21571984352 data:0x07020001
kworker/1:4-6018 [001] … 669.496494: rtcpu_vinotify_event: tstamp:21344062811 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:21572017664 data:0x10000000
kworker/1:4-6018 [001] … 669.496495: rtcpu_vinotify_event: tstamp:21344062968 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:21572025920 data:0x31000002
kworker/1:4-6018 [001] … 669.608472: rtos_queue_peek_from_isr_failed: tstamp:21348541898 queue:0x0bcbbbb8
and
kworker/0:2-1310 [000] … 159.965384: rtcpu_nvcsi_intr: tstamp:5421808113 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000088
kworker/0:2-1310 [000] … 159.965385: rtcpu_nvcsi_intr: tstamp:5421808113 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000088
My Device tree dts files such as:
tegra194-camera-jakku-rbpcv2-iraytek.dtsi (3.3 KB)
tegra194-camera-rbpcv2-iraytek.dtsi (25.3 KB)
I don’t know how to debug my error

Could anyone help me? Or what’s files do you want me to give you?

Boost the NVCSI/VI/ISP clocks then try capture by v4l2-ctl again.

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

Dear ShaneCCC,thanks your help. I execute your code and the v4l2-ctl capture results are as follows.
#v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=YUYV–set-ctrl --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_ENUM_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : ‘YUYV’
Field : None
Bytes per Line : 3840
Size Image : 4147200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 4147200
Bytesused: 4147200
Timestamp: 0.000000s (Monotonic, End-of-Frame)

But the camera still can’t collect information, my trace log is as follows.
trace.log (34.1 KB)
And I found that I set was 1280*720 in the DTS but it display 1920/1080 inthe v4l2-ctl.

What’s the real output size? Modify the driver to report correct size.

the real output size is 1280*720

Dear ShaneCCC, I have completed the camera recognition of the LT9211 turn MIPI input VI1-VI4, but the XS9922 chip PAL to MIPI input VI0 is still unsuccessful.There may be a problem with the VI5 board and I have abandoned it. There are some questions.
Firstly,it‘s said pix_clk_hz can be configured in three ways:
Using PLL multiplier and PLL pre/post dividers:
Using sensor CSI lane output rate:
Using frame size and frame rate:
but i use sensor CSI lane output rate: pix_clk_hz = 600M×2lane/16 = 75000000 and Using frame size and frame rate : pix_clk_hz = 1650×750*25 = 30937500. Which should i chance in my Device tree file?
My dtsi file is as follows
tegra194-camera-rbpcv2-iraytek(1).dtsi (24.3 KB)
Secondly, When my mipi input 1.5G/2lane, I collect the log print:
kworker/0:0-8728 [000] … 388.014154: rtcpu_vinotify_event: tstamp:12547617495 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10671441664 data:0x10000000
kworker/0:0-8728 [000] … 388.014156: rtcpu_vinotify_event: tstamp:12547617657 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10671449856 data:0x31000001
kworker/0:0-8728 [000] … 388.014157: rtcpu_vinotify_event: tstamp:12547617818 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:10671451968 data:0x07020001
kworker/0:0-8728 [000] … 388.014158: rtcpu_vinotify_event: tstamp:12547617954 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10671485312 data:0x10000000
kworker/0:0-8728 [000] … 388.014159: rtcpu_vinotify_event: tstamp:12547618112 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:10671493600 data:0x3100000

But when my mipi input 800M/2lane, I collect the log print:
kworker/0:2-1637 [000] … 102.734404: rtcpu_nvcsi_intr: tstamp:3631040994 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
kworker/0:2-1637 [000] … 102.734405: rtcpu_nvcsi_intr: tstamp:3631040994 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000080
kworker/0:2-1637 [000] … 102.734406: rtcpu_nvcsi_intr: tstamp:3631177700 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
kworker/0:2-1637 [000] … 102.734406: rtcpu_nvcsi_intr: tstamp:3631177700 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000080
kworker/0:2-1637 [000] … 102.734407: rtcpu_nvcsi_intr: tstamp:3631178248 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000080
If it means that I did not collect mipi data at 1.5G, and i can collect mipi date but the date have some error at 800M. How can i correct it?

For your case the pix_clk_hz only for calculating the NVCSI/VI/ISP clocks bandwidth you can configure is as much bigger as any of your calculation or boost those clocks and ignore the configure in device tree.

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