Hi,
I'm trying to get an ov7251 sensor working on the MIPI CSI interface of the IMX8MM EVK. We have a custom breakout board that exactly matches the connector pinout of the ov5640 board available from NXP, and I have edited the imx8mm-evk.dts as follows (using the device tree binding document supplied with the mainline ov7251 driver):
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
ov7251: ov7251@60 {
compatible = "ovti,ov7251";
reg = <0x60>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi_pwn>, <&pinctrl_csi_rst>;
clocks = <&clk IMX8MM_CLK_CLKO1>;
clock-names = "xclk";
clock-frequency = <24000000>;
enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; //same as the ov5640
//these are all hardwired on, 0 here seems to assign dummy registers ok
vdddo-supply = <0>;
vdda-supply = <0>;
vddd_supply = <0>;
//assume these can be culled if not required
assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
assigned-clock-rates = <24000000>;
csi_id = <0>;
pwn-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
mclk = <24000000>;
mclk_source = <0>;
port {
ov7251_mipi1_ep: endpoint {
clock-lanes = <1>;
data-lanes = <2>;
remote-endpoint = <&mipi1_sensor_ep>;
};
};
};
};
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi1_sensor_ep: endpoint@1 {
remote-endpoint = <&ov7251_mipi1_ep>;
data-lanes = <2>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
csi1_mipi_ep: endpoint@2 {
remote-endpoint = <&csi1_ep>;
};
};
};
The driver has been enabled in imx_v8_defconfig, and dmesg shows the sensor is successfully being probed and initialised during boot, with a final message of:
mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: ov7251 2-0060
Running gst-device-monitor-1.0 does not show the interface however. Checking dmesg after running the device monitor command shows the following:
mxc_mipi-csi 32e30000.mipi_csi: format not match
I added a printk to the mipi_csis_enum_mbus_code() fn in mxc_mipi_csi.c and this returns a code of 301021992, but I am not sure why this is invalid.
I have tried adding an entry to the formats struct in mx6s_capture.c:
{
.name = "RAW-10",
.fourcc = V4L2_PIX_FMT_Y10,
.pixelformat = V4L2_PIX_FMT_Y10,
.mbus_code = MEDIA_BUS_FMT_Y10_1X10,
.bpp = 1,
}
I have also tried fourcc and pixelformat set to V4L2_PIX_FMT_Y10P, but the "format not match" error persists.
I'm not sure if I'm barking up the wrong tree here. Perhaps I should I be trying to create an equivalent of the ov5640_mipi_v2.c driver for the ov7251, in addition to the one found in the i2c folder?
Any pointers to helpful documentation regarding the MIPI subsystems would also be appreciated.
Many thanks,
Will