one ov5640 camera in imx8qm

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

one ov5640 camera in imx8qm

565 Views
ly_moving
Contributor I

Hi  NXP engineers,

 

we want to use one ov5640 camera in i.MX 8QuadMax MEK, don't use max9286.

we have tried build ov5640 driver as below:

drivers/media/platform/mxc/capture/ov5640_mipi_v2.c

or

drivers/media/i2c/ov5640.c

 

And disable 9286 driver, then insert ov5640 module in MIPI_CSI0, but after android boot, we can't find new /dev/video node.

So how to work ov5640 in MIPI_CSI0, and why can not generate new /dev/video node ?

 

Expect yours response, thank you very much !

0 Kudos
3 Replies

526 Views
jimmychan
NXP TechSupport
NXP TechSupport

Which version of BSP are you using?

0 Kudos

520 Views
ly_moving
Contributor I

our code is imx8qm-automotive-android-11.0.2.5.

//imx8qm-mek.dts

-&mipi_csi_0 {
+/*&mipi_csi_0 {
#address-cells = <1>;
#size-cells = <0>;
virtual-channel;
status = "okay";

- /* Camera 0 MIPI CSI-2 (CSIS0) */
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
@@ -1382,6 +1381,24 @@
data-lanes = <1 2 3 4>;
};
};
+};*/
+
+&mipi_csi_0 {
+ /delete-property/virtual-channel;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "okay";
+
+ /* Camera 0 MIPI CSI-2 (CSIS0) */
+ port@0 {
+ reg = <0>;
+ mipi_csi0_ep: endpoint {
+ remote-endpoint = <&ov5640_mipi_0_ep>;
+ data-lanes = <1 2>;
+ bus-type = <4>;
+ };
+ };
};


+&i2c_mipi_csi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c_mipi_csi0>;
+ clock-frequency = <100000>;
+ status = "okay";

+
+ ov5640_mipi_0: ov5640_mipi@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mipi_csi0>;
+ clocks = <&xtal24m>;
+ clock-names = "xclk";
+ csi_id = <0>;
+ powerdown-gpios = <&lsio_gpio1 28 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&lsio_gpio1 27 GPIO_ACTIVE_LOW>;
+ mclk = <24000000>;
+ mclk_source = <0>;
+ mipi_csi;
+ status = "okay";
+ port {
+ ov5640_mipi_0_ep: endpoint {
+ remote-endpoint = <&mipi_csi0_ep>;
+ data-lanes = <1 2>;
+ clocks-lanes = <0>;
+ };
+ };
+ };
+
+ /delete-node/max9286_mipi@6a;
};


and ov5640 probe success in kernel log:

//drivers/media/i2c/ov5640.c

[ 7.483521] ov5640_probe start!!!!!!
[ 7.483528] ov5640_probe 11
[ 7.487186] ov5640_probe 22
[ 7.490033] ov5640_probe 33
[ 7.492932] ov5640_probe 44
[ 7.495776] ov5640_probe 55
[ 7.498635] ov5640 5-003c: supply DOVDD not found, using dummy regulator
[ 7.508653] ov5640 5-003c: supply AVDD not found, using dummy regulator
[ 7.515455] ov5640 5-003c: supply DVDD not found, using dummy regulator
[ 7.522166] ov5640_probe 66
[ 7.564960] ov5640_probe 77
[ 7.568245] i2c i2c-5: LPI2C adapter registered


but can not create new /dev/video node. And dumpsys media.camera no devices.

0 Kudos

545 Views
ly_moving
Contributor I

Can you give me some ideas ?

0 Kudos