Greetings, I have been trying to bring up one of our carrier boards for the jetson orin NX by testing its CSI ports on pi cameras V2.1.
The board has an I2C mux (pca9548) to communicate with the 4 cameras from one bus on the SOC, as well as a GPIO mux to control their EN pins (so i didn’t have to wire jetson GPIOs directly), both of these work as excpected, i can communicate with 1->4 IMX219s and the driver probes them ok:
example with one here
... dmesg
[ 10.377239] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[ 10.393743] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx219 10-0010 bound
[ 10.409122] nv_platform 13800000.display: Adding to iommu group 46
[ 10.430652] platform 13800000.display:nvdisplay-niso: Adding to iommu group 47
...
tegra@tegra-ubuntu:~$ ls /dev/video*
/dev/video0
I have not modified the pinmux from the default which seems already configured for 2 lane mipi-csi. We’re using CSI A to D here.
We know the actual hardware is good as the pi camera modules respond over I2C (no flipped connectors, mipi lanes also look correct), and these modules have been tested on a PI4.
Upon running the V4L2 test however, the system times out on getting a frame:
tegra@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1640,height=1232,pixelformat=RG10 --stream-mmap --stream-count=1
[ 67.045932] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 67.045950] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 67.046643] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 69.605538] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 69.605564] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 69.607013] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
So there is something wrong with the CSI part of this, we know this isn’t a clocking issue since the pi cam V2.1 has an onboard clock and doesn’t care about the MCLK pin. Also the EN pin is validated high so that’s not the issue either.
When we start the V4L2 command, we do observe some activity on the mipi lines of the selected port, and only on that port, hinting at a correct CSI port to physical port matching at least. (from the low speed mode between HS packets)
So there has to be something wrong on the SOC side, we did try to set the polarity mode of the ports to “6” to reverse them but that did not help either, polarity looks good on the schematics anyways.
The common debug script commands we used to use on the xavier:
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
export enableCamPclLogs=5
export enableCamScfLogs=5
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace
#tests done here
cat /sys/kernel/debug/tracing/trace
root@tegra-ubuntu:~# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 29/29 #P:4
#
# _-------=> irqs-off
# / _------=> need-resched
# | / _-----=> need-resched-lazy
# || / _----=> hardirq/softirq
# ||| / _---=> preempt-depth
# |||| / _--=> preempt-lazy-depth
# ||||| / _-=> migrate-disable
# |||||| / delay
# TASK-PID CPU# ||||||| TIMESTAMP FUNCTION
# | | | ||||||| | |
v4l2-ctl-3279 [002] ....... 1684.413956: tegra_channel_open: vi-output, imx219 10-0010
v4l2-ctl-3279 [002] ....... 1684.447992: tegra_channel_set_power: imx219 10-0010 : 0x1
v4l2-ctl-3279 [002] ....... 1684.448093: camera_common_s_power: status : 0x1
v4l2-ctl-3279 [002] ....... 1684.458381: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-3279 [002] ....... 1684.458384: csi_s_power: enable : 0x1
v4l2-ctl-3279 [002] ....... 1684.459018: tegra_channel_capture_setup: vnc_id 0 W 3280 H 2464 fmt c4
vi-output, imx2-3280 [003] ....... 1684.467697: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
vi-output, imx2-3280 [003] ....... 1684.467706: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
vi-output, imx2-3280 [003] ....... 1684.467707: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
vi-output, imx2-3280 [003] ....... 1684.467708: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
v4l2-ctl-3279 [002] ....... 1684.467728: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-3279 [002] ....... 1684.469649: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-3279 [002] ....... 1684.469651: csi_s_stream: enable : 0x1
v4l2-ctl-3279 [002] ....... 1684.469954: tegra_channel_set_stream: imx219 10-0010 : 0x1
vi-output, imx2-3281 [000] ....... 1687.007205: tegra_channel_capture_setup: vnc_id 0 W 3280 H 2464 fmt c4
vi-output, imx2-3280 [003] ....... 1687.007542: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
vi-output, imx2-3280 [003] ....... 1687.007552: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
vi-output, imx2-3280 [003] ....... 1687.007553: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
vi-output, imx2-3280 [003] ....... 1687.007554: vi_task_submit: class_id:48 ch:0 syncpt_id:36 syncpt_thresh:0 pid:3280 tid:3280
v4l2-ctl-3279 [003] ....... 1687.787767: tegra_channel_close: vi-output, imx219 10-0010
vi-output, imx2-3281 [002] ....... 1689.535253: tegra_channel_capture_setup: vnc_id 0 W 3280 H 2464 fmt c4
v4l2-ctl-3279 [003] ....... 1689.535382: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-3279 [003] ....... 1689.535384: tegra_channel_set_stream: imx219 10-0010 : 0x0
v4l2-ctl-3279 [003] ....... 1689.535568: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-3279 [003] ....... 1689.535570: csi_s_stream: enable : 0x0
v4l2-ctl-3279 [003] ....... 1689.537057: tegra_channel_set_power: imx219 10-0010 : 0x0
v4l2-ctl-3279 [003] ....... 1689.537061: camera_common_s_power: status : 0x0
v4l2-ctl-3279 [003] ....... 1689.542249: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-3279 [003] ....... 1689.542253: csi_s_power: enable : 0x0
root@tegra-ubuntu:~#
somehow didn’t yield any useful RTCPU errors for us to work off of either. I’ve attached our DTSI for this carrier here as well as a full boot log, any clue on what might be misconfigured here is welcome.
dtsi.zip (4.4 KB)
boot.log (95.0 KB)
PS: the imx sensor is definite in streaming mode as well:
i2ctransfer -f -y 10 w2@0x10 0x01 0x00 r1
0x01
