imx6q-capture driver: mainline kernel + CMOS sensor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6q-capture driver: mainline kernel + CMOS sensor

508 Views
Jay_ganatra
Contributor I

 

Title:
Issue with Custom CMOS Sensor on IPU1 CSI0 - No /dev/media0 Node, VIDIOC_STREAMON Fails

Post:
Hi,

I’m working on a custom i.MX6Q-based board and trying to bring up a custom CMOS parallel camera sensor connected via `ipu1_csi0`. I’m using a mainline kernel with the staging `imx-media` driver.

Below is the relevant snippet from my device tree (`.dtsi`):

dts
test_cam: camera {
compatible = "test,test_camera";
clocks = <&clks IMX6QDL_CLK_CKO>;
clock-names = "xvclk";
powerdown-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
status = "okay";

port {
test_cam_to_ipu1_csi0_mux: endpoint {
remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
link-frequencies = /bits/ 64 <70000000>;
bus-width = <8>;
hsync-active = <1>;
vsync-active = <1>;
};
};
};

&ipu1_csi0_from_ipu1_csi0_mux {
bus-width = <8>;
data-shift = <12>; // Lines 19:12 used
hsync-active = <1>;
vsync-active = <1>;
};

&ipu1_csi0_mux_from_parallel_sensor {
remote-endpoint = <&test_cam_to_ipu1_csi0_mux>;
};

&ipu1_csi0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_csi0>;
status = "okay";
};


The issue I’m facing is:

- `/dev/media0` is not being created.
- When I attempt to start streaming, I see the following errors in the kernel log:


ipu1_csi0: pipeline start failed with -32
VIDIOC_STREAMON returned -1 (Broken pipe)


And these are some of the log messages leading up to it:


imx-media capture-subsystem: walk: skipping disabled link 'ipu1_csi0':2 -> 'ipu1_csi0 capture':0
...


It appears links in the media graph are not getting enabled, which might be why the pipeline fails.

My questions:

1. Is there anything missing in the device tree for the media links to be properly enabled?
2. Do I need to explicitly define any subdev links in the DTS or user space?
3. How can I debug why `/dev/media0` is not being created?

Any guidance or pointers to working examples for a similar setup (CMOS parallel sensor + IPU1 CSI0) would be greatly appreciated.

Thanks in advance!

Tags (2)
0 Kudos
Reply
2 Replies

470 Views
joanxie
NXP TechSupport
NXP TechSupport

I didn't find any syntax error in your dts settings, but this is based on your own camera driver and your own HW, and your information is too limited, you can refer to the nxp source code as reference, which use ov5642 as parallel camera with IPU1 CSI0

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm/boot/dts/nxp/imx/imx6qdl-sabresd.dtsi

pls refer to the document as below

https://docs.kernel.org/admin-guide/media/imx.htm

you can compare your code with nxp code, to check  if you miss any kernel configure or any driver issue

0 Kudos
Reply

465 Views
Jay_ganatra
Contributor I
Hi,

First of all, thank you for your time and effort.

I’ve outlined below the steps I followed to make the mainline kernel compatible with the CMOS sensor. I tried looking for the ov5642 driver, but I wasn’t able to find it in the link you shared or in the mainline kernel source.

Would you happen to have a reference to that driver—particularly one that demonstrates endpoint mapping or media link creation within the driver code? That would be really helpful as I work on creating this driver.

Thanks again!
0 Kudos
Reply