Hello,
We are trying to enable an IMX219 on CSI2 with an AM625 design. I am attaching the device tree overlay we have made for it (below).
IMX219 driver loads and we are able to run the example pipeline, but we don't get any frames out of the CSI2 engine. I have checked that the camera is outputting data using an oscilloscope. Both data lanes and clock lanes appear to be active (I can only really see the blanking periods, my scope isn't fast enough to see more than noise for the data portions, but it looks like something is there). I am suspicious that I don't have something correct in the device tree setup, because the cdns_dphy module is not used during the operation of the camera while the gstreamer pipeline is active. I am wondering if the DHPY part of the CSI2 bridge may not be running (so nothing is getting through). I am not seeing any errors in dmesg regarding the imx219 (it probes fine and reports in on i2cdetect when not identified to the kernel, no I2C errors communicating with the device).
Any suggestions how to debug this?
root@am62xx-evm:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw , width=640, height=480 ! waylandsink &
[1] 1248
root@am62xx-evm:~# [ 36.804536] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 36.825108] Bridge firewalling registered
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 38.447239] process 'docker/tmp/qemu-check654253808/check' started with executable stack
root@am62xx-evm:~# !gst
gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw , width=640, height=480 ! waylandsink &
[1] 1248
root@am62xx-evm:~# [ 36.804536] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 36.825108] Bridge firewalling registered
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
root@am62xx-evm:~# lsmod | grep 'csi\|cdns\|dhpy'
cdns_csi2rx 24576 1
j721e_csi2rx 24576 1
videobuf2_dma_contig 24576 8 j721e_csi2rx
videobuf2_v4l2 32768 1 j721e_csi2rx
cdns_dphy 16384 0
v4l2_fwnode 24576 2 imx219,cdns_csi2rx
videobuf2_common 57344 2 j721e_csi2rx,videobuf2_v4l2
// SPDX-License-Identifier: GPL-2.0 /* * ALINX AN5641 & Digilent PCam 5C - OV5640 camera module * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ */ /dts-v1/; /plugin/; #include <dt-bindings/gpio/gpio.h> / { fragment@101 { target-path = "/"; __overlay__ { clk_imx219_fixed: imx219-xclk { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <24000000>; }; cam_supplies: cam_pwr_enables { compatible = "regulator-fixed"; regulator-name = "cam_supplies"; gpio = <&mcu_gpio0 8 GPIO_ACTIVE_HIGH>; enable-active-high; startup-delay-us = <100000>; }; }; }; }; &main_i2c1 { #address-cells = <1>; #size-cells = <0>; /* MIPI Raspberry Pi Camera V2 0x10 */ imx219_1: imx219_1@10 { compatible = "sony,imx219"; reg = <0x10>; clocks = <&clk_imx219_fixed>; clock-names = "xclk"; pinctrl-names = "default"; pinctrl-0 = <&cam0_pin2_default &cam0_pin1_default>; // reset-gpios = <&mcu_gpio0 8 GPIO_ACTIVE_HIGH>; // the enable line on the camera enables all the local power supplies. VDIG-supply = <&cam_supplies>; port { csi2_cam0: endpoint { remote-endpoint = <&csi2rx0_in_sensor>; link-frequencies = /bits/ 64 <456000000>; clock-lanes = <0>; data-lanes = <1 2>; }; }; }; }; &ti_csi2rx0 { status = "okay"; }; &csi0_port0 { status = "okay"; csi2rx0_in_sensor: endpoint { remote-endpoint = <&csi2_cam0>; bus-type = <4>; /* CSI2 DPHY. */ clock-lanes = <0>; data-lanes = <1 2>; }; }; &dphy0 { status = "okay"; };