This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: am6234

Part Number: AM623

你好,我们使用的是am6234自制版,现在调试csi  imx219摄像头使用的是8.6最新的SDK ,使用的是SDK内核中自带的imx219 驱动。现在驱动加载后已经出现的/devvideo* 设备节点,但是无法采集数据,采集数据程序会卡在drivers/media/common/videobuf2/videobuf2-core.c 文件中的__vb2_wait_for_done_vb函数中的wait_event_interruptible。加打印调试信息如图

通过打印分析发现drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c 驱动中的dma 回调函数ti_csi2rx_dma_callback一直没有调用导致采集数据是卡住。

同时发现drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c 驱动中dma初始化只设置了dma 的宽度没有设置dma的源地址。

我们的是设设备树配置如下:

&main_i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;

imx219_0: imx219_0@10 {
compatible = "sony,imx219";
reg = <0x10>;

clocks = <&clk_mipi_csi_fixed>;
clock-names = "xclk";
pinctrl-names = "default";
pinctrl-0 = <&imx219_reset_gpio>;

reset-gpios = <&mcu_gpio0 11 GPIO_ACTIVE_HIGH>;

port {
csi2_cam0: endpoint {
remote-endpoint = <&csi2rx0_in_sensor>;
link-frequencies = /bits/ 64 <456000000>;
clock-lanes = <0>;
data-lanes = <1 2>;
};
};
};
};

&csi0_port0 {
status = "okay";

csi2rx0_in_sensor: endpoint {
remote-endpoint = <&csi2_cam0>;
bus-type = <4>; /* CSI2 DPHY. */
clock-lanes = <0>;
data-lanes = <1 2>;
};
};

  • 您好,您的问题我们需要升级到英文论坛看下,有答复尽快给您。

  • 您方便提供下media-ctl -p "和"v4l2-ctl --list-devices"的log吗?

  • 您好下面是我执行这两个命令的log

    root@am62xx-evm:~# media-ctl -p
    Media controller API version 5.10.168

    Media device information
    ------------------------
    driver j721e-csi2rx
    model TI-CSI2RX
    serial
    bus info platform:30102000.ticsi2rx
    hw revision 0x1
    driver version 5.10.168

    Device topology
    - entity 1: 30102000.ticsi2rx (5 pads, 5 links, 1 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    routes:
    0/0 -> 1/0 [ACTIVE]
    pad0: Sink
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    pad2: Source
    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    pad3: Source
    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    pad4: Source
    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]

    - entity 7: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 0 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    pad0: Sink
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    <- "imx219 0-0010":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    pad3: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    pad4: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]

    - entity 13: imx219 0-0010 (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
    crop.bounds:(8,8)/3280x2464
    crop:(8,8)/3280x2464]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    - entity 19: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

    - entity 25: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video1
    pad0: Sink
    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

    - entity 31: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video2
    pad0: Sink
    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

    - entity 37: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
    type Node subtype V4L flags 0
    device node name /dev/video3
    pad0: Sink
    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

    root@am62xx-evm:~#

    root@am62xx-evm:~# v4l2-ctl --list-devices
    j721e-csi2rx (platform:30102000.ticsi2rx):
    /dev/video0
    /dev/video1
    /dev/video2
    /dev/video3
    /dev/media0

    root@am62xx-evm:~#

  • 传感器格式和 CNDS CSI 桥接器格式似乎不同: 

    - entity 7: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 0 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    pad0: Sink
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    <- "imx219 0-0010":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    pad3: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    pad4: Source
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    
    - entity 13: imx219 0-0010 (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:SRGGB10_1X10/3280x2464 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
    crop.bounds:(8,8)/3280x2464
    crop:(8,8)/3280x2464]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    您需要将传感器和电桥的格式设置为相同。 以下命令应设置传感器格式和桥接格式:

    media-ctl -V '"imx219 0-0010":0 [fmt:SRGGB10_1X10/1920x1080 field:none]'

  • 您好,我试了执行上面的命令,情况还是这样

  • 您好,

    请问下您的自制板和 TI EVM 之间的差异是什么?您能具体说下吗? 

  • 您好,我问了下我们硬件工程师,我们的自制板电源和TI EVM板不太一样,csi接口这块这个 CSI0_RXRCALIB 下拉电阻实际焊的是1%的不是%0.1 , 其他的配置都一样

  • 我们的自制板电源和TI EVM板不太一样,csi接口这块这个 CSI0_RXRCALIB 下拉电阻实际焊的是1%的不是%0.1 , 其他的配置都一样

    您这边是否做过硬件测试,来确保此更改有效?

  • 您好,我的问题解决了,是我的测试方式不太对,现在已经可以采集到摄像头原始数据了,另外我想问下am6234 没有ISP 那如果使用不带ISP 的摄像头,需要如果处理,TI 有没有相应的使用示例。

  • 您好,

    好的,您的问题解决了就好。

    另外我想问下am6234 没有ISP 那如果使用不带ISP 的摄像头,需要如果处理,TI 有没有相应的使用示例。

    您可以重新发布一个新的帖子,我们会有专家来跟进您的问题。谢谢。