Request support: Use Case where the CSI-2 Camera sensor not in I2C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear linux-media colleagues,

I am sending this e-mail to kindly request your support.
Although I understand that the typical CSI-2 Camera use case is to be part of a I2C bus, I have the use case in which the camera is not part of I2C, having its registers accessible through AXI.  
I created a camera driver (dw_vdk_gen_cam) based on a I2C camera driver, but adapting has best as possible to a platform driver approach.

The current issue: 
When the top glue driver executes v4l2_async_notifier_register(), v4l2_async_find_match() is not successful as shown below, and so the .bound  callback is not called, not allowing the link between the Camera and the CSI-2 Host CTRL.
I would greatly appreciate if you could provide an insight of what might be missing.

A snippet of the execution:

D-PHY driver:
[   28.927984] phy phy-50000040.dphy.0: Probing dphy finished

CSI-2 Host Core driver:
[   28.981723] dw-csi 50000000.csi2: got demo_irq.
[   28.981937] dw-csi 50000000.csi2: Version minor not supported.
[   28.982028] dw-csi 50000000.csi2: DW MIPI CSI-2 Host registered successfully HW v1.54
[   28.982120] phy phy-50000040.dphy.0: Init DPHY.
[   28.982196] dw-csi 50000000.csi2: Probing csi finished

Generic Camera driver:
[   34.178568] gen_cam_parse_dt(): Node Name: endpoint
[   34.178972] dw_vdk_gen_cam 50002000.camera1: DW VDK Generic Camera registered successfully

Video-Device driver:
[   34.199102] video-device video-pipeline:video-device: Requesting DMA
[   34.199369] video-device video-pipeline:video-device: VIDEOBUF2 DMA CONTIG
[   34.199461] video-device video-pipeline:video-device: Video Device registered successfully

Top v4l2 glue driver:
[   34.243452] Executing plat_csi_probe()
[   34.243516] Executing plat_csi_register_platform_entities()
[   34.243635] dw-plat video-pipeline: Platform device video-device found
[   34.243699] Executing plat_csi_register_platform_entity()
[   34.243757] Executing register_videodev_entity()
[   34.243811] Executing plat_csi_pipeline_create()
[   34.243896] dw-plat video-pipeline: Entity type for entity Capture device was not initialized!
[   34.244442] plat-ipk: Registered video-device as /dev/video0
[   34.244567] dw-plat video-pipeline: Platform device csi2@50000000 found
[   34.244631] Executing of_get_port_id()
[   34.244686] Executing plat_csi_register_platform_entity()
[   34.244745] Executing register_mipi_csi_entity()
[   34.244798] Executing of_get_port_id()
[   34.244863] Executing plat_csi_register_sensor_entities()
[   34.244925] Checking node video-device
[   34.244982] Checking node csi2
[   34.245031] Going to execute plat_csi_parse_port_node()
[   34.245088] Inside plat_csi_parse_port_node()
[   34.245144] Endpoint Name: endpoint
[   34.245232] Endpoint REM Name: camera1
[   34.245282] Sensor has been found
[   34.245333] Number of sensors in plat_csi_parse_port_node(): 1
[   34.249688] Executing v4l2_async_notifier_register()
[   34.249743] Executing __v4l2_async_notifier_register()
[   34.249800] __v4l2_async_notifier_register(): Check list of asds
[   34.249863] __v4l2_async_notifier_register(): Going to v4l2_async_notifier_try_all_subdevs()
[   34.249935] Executing v4l2_async_notifier_try_all_subdevs()
[   34.249997] v4l2_async_notifier_try_all_subdevs(): v4l2_dev->name: plat-ipk
[   34.250071] v4l2_async_notifier_try_all_subdevs(): List Entry => subdev  | Module dw_vdk_gen_cam
[   34.250147]  v4l2_async_notifier_try_all_subdevs(): Going to execute v4l2_async_find_match()
[   34.250218] Executing v4l2_async_find_match()
[   34.250272] v4l2_async_find_match(): SubDev Name = 
[   34.250331] v4l2_async_find_match(): Module name = dw_vdk_gen_cam
[   34.250392] v4l2_async_find_match(): Ups... return NULL
[   34.250451] __v4l2_async_notifier_register(): Going to v4l2_async_notifier_try_complete()
[   34.250521] Executing v4l2_async_notifier_try_complete()
[   34.250579] v4l2_async_notifier_try_complete(): All done!
[   34.250636] Executing subdev_notifier_complete()
[   34.250691] In subdev_notifier_complete() - Going to execute plat_csi_create_links()
[   34.250763] Executing plat_csi_create_links() | Num Sensors: 0

Current device tree:
	mipi_dphy_rx1: dphy@50000040 {
		compatible = "snps,dw-dphy-rx";
		reg = <0x0 0x50000040 0x0 0x20>;
		#phy-cells = <1>;
		bus-width = <12>;
		snps,dphy-frequency = <300000>;
		snps,dphy-te-len = <12>;
		snps,phy_type = <0>;
	};
	camera1@50002000 {
		compatible = "snps,dw-vdk-gen-cam";
		reg = <0x0 0x50002000 0x0 0x7f>;
		port {
			camera1_0: endpoint {
				remote = <&csi2_0_ep1>;
			};
		};
	};
	video-pipeline {
		compatible = "snps,dw-plat", "simple-bus";
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;
		video_device:video-device {
			compatible = "snps,video-device";
			dmas = <&axi_vdma_0 0>;
			dma-names = "vdma0";
		};
		csi2_0:csi2@50000000 {
			compatible = "snps,dw-csi";
			reg = <0x0 0x50000000 0x0 0x7ff>;
			interrupts = <0 10 4>;
			#address-cells = <1>;
			#size-cells = <0>;
			output-type = <2>;
			phys = <&mipi_dphy_rx1 0>;
			phy-names = "dw-dphy";
			ipi-mode = <0>;
			ipi-color-mode = <0>;
			ipi-auto-flush = <1>;
			virtual-channel = <0>;
			port@1 {
				reg = <1>;
				csi2_0_ep1: endpoint {
					data-lanes = <1 2>;
					remote-endpoint = <&camera1_0>;
				};
			};
		};
	};

Thank you in advance.

Regards,
Joao






[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux