I am developing a camera driver for InnoMaker OV7251 Mipi Camera for a Jetson Orin NX. The camera is connected to the CAM0 port using a 15-22 pin fpc cable.
Following the Sensor Software Driver Programming Guide and relevant technical documents (e.g., Jetson Orin Nano/NX Design Guide), I’ve been able to finish most of the steps, which result in the following .dts and .c files.
ov7251_c.txt (21.8 KB)
ov7251_dts.txt (5.2 KB)
The camera is a single-lane camera, so I connected it to CSI 1 (i.e., CSI B, I suppose) and set the bus-width to 1. There is no problem in probing the camera, communicating via i2c, and creating media graph. However, I am not able to get valid frame data when running the test cmd as below:
v4l2-ctl -d /dev/video0 --verbose --stream-mmap --stream-count=1 --verbose
Here is the dmesg debug report:
[ 37.287291] my_cam_driver 9-0060: ov7251_power_on is invoked
[ 37.287847] my_cam_driver 9-0060: ov7251_power_on: exit reset mode
[ 37.287894] my_cam_driver 9-0060: ov7251_power_on ov7251 powered on
[ 37.291208] my_cam_driver 9-0060: ov7251_set_mode is invoked
[ 37.414104] my_cam_driver 9-0060: Sensor MODE=0 PowerOn STATUS=0x80 i=0
[ 37.421231] my_cam_driver 9-0060: ov7251_start_streaming: external trigger mode disabled
[ 37.423373] my_cam_driver 9-0060: ov7251_start_streaming: streaming starts
[ 39.905777] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 39.905807] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 39.909823] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 42.429962] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 42.429982] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 42.431495] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
And here is the trace report:
# tracer: nop
#
# entries-in-buffer/entries-written: 349088/349088 #P:6
#
# _-------=> irqs-off
# / _------=> need-resched
# | / _-----=> need-resched-lazy
# || / _----=> hardirq/softirq
# ||| / _---=> preempt-depth
# |||| / _--=> preempt-lazy-depth
# ||||| / _-=> migrate-disable
# |||||| / delay
# TASK-PID CPU# ||||||| TIMESTAMP FUNCTION
# | | | ||||||| | |
v4l2-ctl-2601 [001] ....... 37.276701: tegra_channel_open: vi-output, my_cam_driver 9-0060
v4l2-ctl-2601 [001] ....... 37.287284: tegra_channel_set_power: my_cam_driver 9-0060 : 0x1
v4l2-ctl-2601 [001] ....... 37.287288: camera_common_s_power: status : 0x1
v4l2-ctl-2601 [001] ....... 37.288676: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-2601 [001] ....... 37.288678: csi_s_power: enable : 0x1
v4l2-ctl-2601 [001] ....... 37.289008: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c4
vi-output, my_c-2602 [000] ....... 37.289743: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:2602 tid:2602
vi-output, my_c-2602 [000] ....... 37.289754: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:2602 tid:2602
vi-output, my_c-2602 [000] ....... 37.289755: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:2602 tid:2602
vi-output, my_c-2602 [000] ....... 37.289756: vi_task_submit: class_id:48 ch:0 syncpt_id:15 syncpt_thresh:0 pid:2602 tid:2602
v4l2-ctl-2601 [001] ....... 37.290108: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-2601 [001] ....... 37.290891: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-2601 [001] ....... 37.290894: csi_s_stream: enable : 0x1
v4l2-ctl-2601 [001] ....... 37.291202: tegra_channel_set_stream: my_cam_driver 9-0060 : 0x1
kworker/5:3-618 [005] ....... 37.317784: rtcpu_nvcsi_intr: tstamp:1871235823 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317787: rtcpu_nvcsi_intr: tstamp:1871235823 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317788: rtcpu_nvcsi_intr: tstamp:1871236324 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317788: rtcpu_nvcsi_intr: tstamp:1871236324 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317789: rtcpu_nvcsi_intr: tstamp:1871236843 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317790: rtcpu_nvcsi_intr: tstamp:1871236843 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317791: rtcpu_nvcsi_intr: tstamp:1871237536 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317792: rtcpu_nvcsi_intr: tstamp:1871237536 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317793: rtcpu_nvcsi_intr: tstamp:1871238027 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000008
kworker/5:3-618 [005] ....... 37.317793: rtcpu_nvcsi_intr: tstamp:1871238027 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000008