Hi Igor,
Thank you for your response.
We looked into the link you mentioned.
Unfortunately we couldn't get our interface working.
Could you please go through the below notes
Our System Setting :
++++++++++++++++++++
The set up contains 2 parallel cameras and one MIPI interface.We are using a custom video pipeline driver
Parallel cameras are connected to the iMx6 IPU0-CSIO and IPU1-CSI1 resepectively and this is working fine.
The MIPI imgae source is interfaced to IPU0-CSI1.
FPGA ( our MIPI image source) is programmed to send the MIPI video in Virtual Channel - 1.
Also the MIPI- DPHY is emulated in the FPGA with the help resistors.
(we are using reference design from Lattice Semi : http://www.latticesemi.com/~/media/Documents/ReferenceDesigns/NR/ParalleltoMIPIDSITXBridge.pdf?docum...)
Device Tree Configuration:
++++++++++++++++++++++++++++++++++++
mipi_csi: mipi_csi@021dc000 {
compatible = "fsl,imx6q-mipi-csi2";
ipu_id = <0>;
csi_id = <1>;
v_channel =<1>;
lanes =<2>;
reg = <0x021dc000 0x4000>;
interrupts = <0 100 0x04>, <0 101 0x04>;
clocks = <&clks 138>, <&clks 53>, <&clks 204>;
/* Note: clks 138 is hsi_tx, however, the dphy_c
* hsi_tx and pll_refclk use the same clk gate.
* In current clk driver, open/close clk gate do
* use hsi_tx for a temporary debug purpose.
*/
clock-names = "dphy_clk", "pixel_clk", "cfg_clk";
status = "okay";
};
Board File Configuration : ( for parallel cameras)
++++++++++++++++++++++++++
regmap_update_bits(gpr, IOMUXC_GPR1, 1 << 19, 1 << 19);
regmap_update_bits(gpr, IOMUXC_GPR1, 1 << 20, 1 << 20);
MIPI-CSI Host Side Configuration :
+++++++++++++++++++++++++++++++++++++
mipi_csi2_info:
mipi_csi2_info.mipi_en = 1
mipi_csi2_info.ipu_id = 0
mipi_csi2_info.csi_id = 1
mipi_csi2_info.v_channel = 1
mipi_csi2_info.lanes = 1
mipi_csi2_info.datatype = 0x1e (YUV422)
Observations :
+++++++++++++++
Start up and execution :
Will keep the MIPI lanes ( CK,D0 and D1) in LP-11 state from FPGA .
The MIPI-HOST controller section of i.MX6 is configured as mentioned in the i.MX6 resource manual chapter 40.
The MIPI_CSI2_DPHY_STATUS at this stage is 0x630.
Start the FPGA pump data out.
The FPGA clock and data lanes start to switch between LP and HS modes.
We see activity on all the lanes in oscilloscope ( CK+,CK-, D0+,D0-,D1+,D1-)
The MIPI_CSI2_DPHY_STATUS at this stage switches between 0x300 and 0x630.But we are not receiving any IPU interrupts.
Also the following registers are monitored.
mipi_csi2_dphy_status = 0x300
mipi_csi2 error1 = 0x2000000
mipi_csi2 error2 = 0x0
MIPI_CSI2_DATA_IDS_1 = 0x0
MIPI_CSI2_DATA_IDS_2 = 0x0
MIPI_CSI2_N_LANES = 0x1
Otherwise we are get everything similar to what is mentioned in the document "Debug steps for customer MIPI sensor.docx"
From this we understand that there is a checksum error in Virtual Channel -1 in the received data.
As an experiment we changed the virtual channel to 0 in FPGA.
Then in the iMX6 side the error shifted , mipi_csi2 error1 = 0x1000000. From this can we conclude that Data ID was correctly deteced by MIPI Host controller.
Is there any way to dump the received data to memory ( though there is error) from where we can manually compare it with the transmitted data and see what is happening?
Any help to debug our issue is highly appreciated.
Thanks,
Sonu