Hi,
My team is working on connecting Sony IMX298 camera to i.MX8MQ EVK using an adapter with 24MHz ref clk, 4 lanes CSI.
Our goal is to achieve maximum performance of the sensor. According to i.MX8MQ documentation - maximum CSI2 port performance is 1.5Gbps per lane * 4 = 6Gbps.
But in IMX8MDQLQRM, IOMUXC_GPR_GPR34 register can select only CSI2_1_HSEL (0 = 1.0 Gbps operation, 1 = 1.2Gbps operation).
regmap_update_bits(csi2dev->phy_gpr.gpr,
csi2dev->phy_gpr.req_src,
0x3FFF,
GPR_CSI2_1_RX_ENABLE |
GPR_CSI2_1_VID_INTFC_ENB |
GPR_CSI2_1_HSEL |
GPR_CSI2_1_CONT_CLK_MODE |
GPR_CSI2_1_S_PRG_RXHS_SETTLE(csi2dev->
hs_settle));
According to the discussion here:
in mxc-mipi-csi2_yav.c rxhs_settle set to 6.
We already did modified DTS section related to "mipi_csi_2":
assigned-clock-rates = <333000000>, <266000000>, <166000000>;
Another part:
cam_mipi2_ep: endpoint {
remote-endpoint = <&mipi2_sensor_ep>;
clock-lanes = <0>;
data-lanes = <1 2 3 4>;
link-frequencies =
/bits/ 64 <600000000>;
};
According to Sony documentation we set:
For Full resolution mode (16Mpix, 4656x3496), Pixel rate: 480Mbps, CSI data rate: 1200Mbps.
Checked by oscilloscope = CLK_P/N lines and frequency = 600MHz (looks correct).
Using Gstreamer we are trying to get RAW10 frames out of the sensor, but it cannot get them and the meantime we got the next log:
[ 32.257706] MIPI CSI2 HC register dump, mipi csi1
[ 32.262451] MIPI CSI2 HC num of lanes 0x100 = 0x3
[ 32.267520] MIPI CSI2 HC dis lanes 0x104 = 0x0
[ 32.273082] MIPI CSI2 HC BIT ERR 0x108 = 0x72
[ 32.278232] MIPI CSI2 HC IRQ STATUS 0x10C = 0x3f
[ 32.283386] MIPI CSI2 HC IRQ MASK 0x110 = 0x1ff
[ 32.288622] MIPI CSI2 HC ULPS STATUS 0x114 = 0x0
[ 32.293684] MIPI CSI2 HC DPHY ErrSotHS 0x118 = 0xd
[ 32.298749] MIPI CSI2 HC DPHY ErrSotSync 0x11c = 0x4
[ 32.303812] MIPI CSI2 HC DPHY ErrEsc 0x120 = 0x0
[ 32.308874] MIPI CSI2 HC DPHY ErrSyncEsc 0x124 = 0x0
[ 32.313937] MIPI CSI2 HC DPHY ErrControl 0x128 = 0x0
[ 32.319013] MIPI CSI2 HC DISABLE_PAYLOAD 0x12C = 0x0
[ 32.324101] MIPI CSI2 HC DISABLE_PAYLOAD 0x130 = 0x0
[ 32.329175] MIPI CSI2 HC IGNORE_VC 0x180 = 0x1
[ 32.334243] MIPI CSI2 HC VID_VC 0x184 = 0x1
[ 32.339318] MIPI CSI2 HC FIFO_SEND_LEVEL 0x188 = 0x40
[ 32.344474] MIPI CSI2 HC VID_VSYNC 0x18C = 0x0
[ 32.349546] MIPI CSI2 HC VID_SYNC_FP 0x190 = 0x0
[ 32.354613] MIPI CSI2 HC VID_HSYNC 0x194 = 0x0
[ 32.359685] MIPI CSI2 HC VID_HSYNC_BP 0x198 = 0x0
Reducing CSI line data rate to 600Mbps = starts producing stable images.
Is there any possibility to speed up CSI RX part to achieve 1.2Gbps per line?
Thank you