Hello all,
I am working on porting an IMX378 camera driver to the i.MX 8MP EVK board. I am following the i.MX 8M Plus Camera and Display Guid, section 2 Camera Sensor Porting Guide.
I have followed section 2.7 Camera Sensor Driver in V4L2 mode and I get the following dmesg output:
6.440486] imx378: loading out-of-tree module taints kernel.
[ 6.449105] enter imx378_probe
[ 6.458998] enter imx378_retrieve_capture_properties
[ 6.466931] imx378 1-001a: supply DOVDD not found, using dummy regulator
[ 6.474198] imx378 1-001a: supply DVDD not found, using dummy regulator
[ 6.481092] imx378 1-001a: supply AVDD not found, using dummy regulator
[ 6.489336] enter imx378_regulator_enable
[ 6.493550] enter imx378_set_clk_rate
[ 6.497365] enter imx378_power_on
[ 6.500962] enter imx378_reset
[ 6.539481] imx8_media_dev: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.558768] enter imx378_read_reg
[ 6.562991] enter imx378_read_reg
[ 6.590179] imx378_probe camera mipi imx378, is found
[ 6.648388] mx8-img-md: Registered sensor subdevice: imx378 1-001a (1)
[ 6.740810] enter imx378_link_setup
[ 6.744958] mx8-img-md: created link [imx378 1-001a] => [mxc-mipi-csi2.0]
[ 6.751831] mxc-md 32c00000.bus:camera: mxc_md_create_links
[ 6.768425] enter viv_dwe_init_module
[ 6.772649] enter dwe_hw_probe
[ 6.778619] enter viv_isp_init_module
[ 6.783472] vvcam dewa74] vvcam isp driver registered
[ 7.206408] enter imx378_priv_ioctl (cmd = -2140645888)
[ 7.211671] enter imx378_query_capability
My media-ctl output is as follows:
root@imx8mpevk:~# media-ctl -p
[ 2002.167891] enter imx378_get_fmt
Media controller API version 5.10.52
Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info
hw revision 0x0
driver version 5.10.52
Device topology
- entity 1: mxc-mipi-csi2.0 (8 pads, 1 link)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "imx378 1-001a":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
pad5: Source
pad6: Source
pad7: Source
- entity 10: imx378 1-001a (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:SGBRG10_1X10/4056x3040 field:none]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]
root@imx8mpevk:~#
At this point I can see that the I2C communication is working, however I cannot for the life of me figure out how to tell V4L2 to start the stream so I can view it. When I list V4L2 devices I do not see a video source:
root@imx8mpevk:~# v4l2-ctl --list-devices
[ 2130.712823] enter imx378_priv_ioctl (cmd = -2140645888)
[ 2130.718106] enter imx378_query_capability
():
/dev/v4l-subdev0
(csi0):
/dev/v4l-subdev1
FSL Capture Media Device (platform:mxc-md):
/dev/media0
vsi_v4l2dec (platform:vsi_v4l2dec):
/dev/video1
vsi_v4l2enc (platform:vsi_v4l2enc):
/dev/video0
What am I missing?
My DTS file is as below:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright 2020 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/dts-v1/;
#include "imx8mp-evk.dts"
&i2c2 {
/delete-node/ov5640_mipi@3c;
imx378_0: imx378_mipi@1a {
compatible = "sony,imx378";
reg = <0x1a>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>;
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
csi_id = <0>;
pwn-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
rst-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
mclk = <24000000>;
mclk_source = <0>;
status = "okay";
port {
imx378_mipi_0_ep: endpoint {
data-lanes = <1 2 3 4>;
clock-lanes = <0>;
max-pixel-frequency = /bits/ 64 <500000000>;
remote-endpoint = <&mipi_csi0_ep>;
};
};
};
};
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
ov5640_1: ov5640_mipi@3c {
status = "disabled";
};
};
&cameradev {
status = "okay";
};
&isi_0 {
status = "disabled";
};
&isi_1 {
status = "disabled";
};
&isp_0 {
status = "okay";
};
&dewarp {
status = "okay";
};
&mipi_csi_0 {
status = "okay";
clock-frequency = <500000000>;
assigned-clock-rates = <500000000>;
port@0 {
endpoint {
remote-endpoint = <&imx378_mipi_0_ep>;
data-lanes = <4>;
csis-hs-settle = <16>;
};
};
};
&mipi_csi_1 {
status = "disabled";
};
ISI driver, and VVCAM driver Attached
Thank you,
Chris