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>;
};
};

  • Hello Huan,

    Thank you for your post. Since this is the English forum for TI E2E, I would appreciate it if you could use English here.

    I assume you have the video device nodes properly generated and the device topology looked good. Can you still share the outputs of "v4l2-ctl --list-devices" and "media-ctl -p"?

    Have you set the format for imx219 before the capture? I've tried the following on AM62x starter kit and it worked well:

    root@am62xx-evm:~# media-ctl -d /dev/media0 --set-v4l2 "'imx219 4-0010':0 [fmt:SRGGB8/3280x2464 field:none]"
    root@am62xx-evm:~# media-ctl -d /dev/media0 -p
    - entity 13: imx219 4-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:SRGGB8_1X8/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]
    
    root@am62xx-evm:~# v4l2-ctl --device /dev/video0 --set-fmt-video=width=3280,height=2464,pixelformat=RGGB --stream-mmap --stream-to=imx219_10frm.raw --stream-count=10
    

    Regards,

    Jianzhong