你好:
基于agx orin 32G(5.0.2固件版本)做自定义底板的摄像头开发,摄像头解码芯片使用的是RN6864M,视频流整体结构如下图。
当前存在问题:
1、现有tegra-camera-platform配置都是一个i2c地址对应一路摄像头,而RN6864M是一个i2c地址对应4个摄像头,应该如何正确添加设备树.
2、orin使用设备树后(
rn6864-camera-a00.txt (22.7 KB)
rn6864-mode-a00.txt (6.8 KB)),MIPI_CSI1能收到摄像头#1数据,MIPI_CSI3能收到摄像头#5数据,MIPI_CSI2和MIPI_CSI4收不到摄像头数据;测量MIPI_CSI2和MIPI_CSI4的数据线与时钟线均有信号输入,把设备树MIPI_CSI2的port配置与MIPI_CSI1的port配置替换,依旧是MIPI_CSI2没有摄像头数据。(其中0x2e和0x2f是为了能输出节点而添加的)
3、解码器的一个mipi是两路摄像头信号复用,通过设置了MIPI_CSI1中vi和i2c的vc-id属性,摄像头信号没有变化(虚拟通道设置没生效);
以上几点是否能提供什么解决思路?
驱动添加后视频节点链路如下:
orin@nvidia-agx-orin:~$ media-ctl -p -d /dev/media0
Media controller API version 5.10.104
Media device information
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.10.104
Device topology
-
entity 1: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
← “rn6864 2-002d”:0 [ENABLED]
pad1: Source
→ “vi-output, rn6864 2-002d”:0 [ENABLED] -
entity 4: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
← “rn6864 2-002e”:0 [ENABLED]
pad1: Source
→ “vi-output, rn6864 2-002e”:0 [ENABLED] -
entity 7: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
pad0: Sink
← “rn6864 2-002c”:0 [ENABLED]
pad1: Source
→ “vi-output, rn6864 2-002c”:0 [ENABLED] -
entity 10: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev3
pad0: Sink
← “rn6864 2-002f”:0 [ENABLED]
pad1: Source
→ “vi-output, rn6864 2-002f”:0 [ENABLED] -
entity 13: rn6864 2-002d (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev4
pad0: Source
[fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb]
→ “13e40000.host1x:nvcsi@15a00000-”:0 [ENABLED] -
entity 15: vi-output, rn6864 2-002d (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
← “13e40000.host1x:nvcsi@15a00000-”:1 [ENABLED] -
entity 33: rn6864 2-002e (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev5
pad0: Source
[fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb]
→ “13e40000.host1x:nvcsi@15a00000-”:0 [ENABLED] -
entity 35: vi-output, rn6864 2-002e (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
← “13e40000.host1x:nvcsi@15a00000-”:1 [ENABLED] -
entity 45: rn6864 2-002c (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev6
pad0: Source
[fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb]
→ “13e40000.host1x:nvcsi@15a00000-”:0 [ENABLED] -
entity 47: vi-output, rn6864 2-002c (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
← “13e40000.host1x:nvcsi@15a00000-”:1 [ENABLED] -
entity 57: rn6864 2-002f (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev7
pad0: Source
[fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb]
→ “13e40000.host1x:nvcsi@15a00000-”:0 [ENABLED] -
entity 59: vi-output, rn6864 2-002f (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
← “13e40000.host1x:nvcsi@15a00000-”:1 [ENABLED]
运行"4l2-ctl -d /dev/video1 --set-fmt-video=width=1920,height=1080,pixelformat=NV16 --stream-mmap=3 --stream-to=/home/orin/out0.yuv --stream-skip=9 --stream-count=1"时,反馈错误如下:
[ 2216.183243] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2216.190976] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[ 2216.201644] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2216.209363] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 0
[ 2216.220076] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 2218.979591] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2218.988755] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2218.999242] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2219.006974] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=2, csi_port=2
[ 2219.017627] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2219.025354] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 2 vc- 0
[ 2219.036066] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
Thanks♪(・ω・)ノ