Hello,
I'm trying to bring up camera support on an i.MX8M Mini board with an ON Semiconductor MT9M114 camera sensor. I'm facing a number of different problems, which I'll bring up in different threads to keep the discussion flow focussed and readable.
The first issue is related to the configuration of the D-PHY Ths-settle and Tclk-settle parameters, set respectively in the HSSETTLE and S_CLKSETTLECTL fields of the MIPI_CSI_DPHY_COMMON_CTRL register. The reference manual documents those fields as follows:
31–24 HSSETTLE[7:0] | HS-RX settle time control Slave Clock Lane Control for Ths-settle |
23–22 S_CLKSETTLECTL[1:0] | Slave clock lane control for Tclk-settle 2'b0x - 110ns to 280ns (v0.87 to v1.00) 2'b10 - 150 ns to 430ns (v0.83 to v0.86) 2'b11 - 60 ns to 140ns (v0.82) |
More information regarding the HSSETTLE and S_CLKSETTLECTL fields has been supplied in this forum, at https://community.nxp.com/t5/i-MX-Processors/Explenation-for-HS-SETTLE-parameter-in-MIPI-CSI-D-PHY-r.... The S_CLKSETTLECTL value is however incorrect.
To debug the issue, I have acquired an i.MX8M Mini EVK with an OV5640 camera module, and run the official imx_5.4.70_2.3.0 kernel branch, without modification. The device tree specifies the S_CLKSETTLECTL parameter through the csis-clk-settle property, and sets it to 2:
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi1_sensor_ep: endpoint@1 {
remote-endpoint = <&ov5640_mipi1_ep>;
data-lanes = <2>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
csi1_mipi_ep: endpoint@2 {
remote-endpoint = <&csi1_ep>;
};
};
};
This allows me to correctly capture frames from the OV5640. However, if I set csis-clk-settle to 0, no frames are produced by the device (the driver doesn't signal any buffer being completed). The S_CLKSETTLECTL value this makes a difference.
My main question is: how should the S_CLKSETTLECTL value be selected for a sensor, based on its D-PHY clock lane frequency ?
The side question is: in the reference manual, what does the version number listed in the S_CLKSETTLECTL documentation (v0.82, v0.83 to v0.86, v0.87 to v1.00) correspond to ?