RKISP1: MIPI mis error

Hi,

I’m using Rock960 Model A board connected with custom camera board which can support dual 4 lane MIPI CSI.

If I stream the MIPI D-PHY TX1RX1 camera, I can able to get the preview but I get MIPI mis error continuously from the rkisp1.

[ 4478.007571] rkisp1: MIPI mis error: 0x00800000
[ 4478.008289] rkisp1: MIPI mis error: 0x00800000
[ 4478.008748] rkisp1: MIPI mis error: 0x00800000
[ 4478.009197] rkisp1: MIPI mis error: 0x00800000
[ 4478.009814] rkisp1: MIPI mis error: 0x00800000
[ 4478.010272] rkisp1: MIPI mis error: 0x00800000
[ 4478.010720] rkisp1: MIPI mis error: 0x00800000
[ 4478.011165] rkisp1: MIPI mis error: 0x00800000
[ 4478.014453] rkisp1: MIPI mis error: 0x00800000
[ 4478.014911] rkisp1: MIPI mis error: 0x00800000
[ 4478.015359] rkisp1: MIPI mis error: 0x00800000
[ 4478.015805] rkisp1: MIPI mis error: 0x00800000
[ 4478.016253] rkisp1: MIPI mis error: 0x00800000
[ 4478.016713] rkisp1: MIPI mis error: 0x00800000
[ 4478.017161] rkisp1: MIPI mis error: 0x00800000
[ 4478.017606] rkisp1: MIPI mis error: 0x00800000
[ 4478.018050] rkisp1: MIPI mis error: 0x00800000
[ 4478.018495] rkisp1: MIPI mis error: 0x00800000
[ 4478.018940] rkisp1: MIPI mis error: 0x00800000
[ 4478.019386] rkisp1: MIPI mis error: 0x00800000
[ 4478.019830] rkisp1: MIPI mis error: 0x00800000
[ 4478.020274] rkisp1: MIPI mis error: 0x00800000
[ 4478.021036] rkisp1: MIPI mis error: 0x01800000
[ 4478.022425] rkisp1: MIPI mis error: 0x00800000
[ 4478.022882] rkisp1: MIPI mis error: 0x00800000
[ 4478.024041] rkisp1: MIPI mis error: 0x00800000
[ 4478.024499] rkisp1: MIPI mis error: 0x00800000
[ 4478.025139] rkisp1: MIPI mis error: 0x00800000
[ 4478.026524] rkisp1: MIPI mis error: 0x00800000

Is anyone has this issue?

Note:

  • MIPI camera configuration
  • 1920x1080P @60 FPS
  • MIPI Lane: 4
  • pixel_clock = 500000000
  • link_freq = 500000000
  • XVCLK = 24MHz

Thanks & Regards,
Bala

Hi,

If I changed the clk in the sensor side from 1GHz to 800MHz, the “MIPI mis error” issue is not occurring.

I found that the error message is printing from the below source only. But I can’t able to find the CIF_MIPI_MIS register details in the reference manual.
Can you share the register details to understand the issue clearly?

drivers/media/platform/rockchip/isp1/dev.c
** mis_val = readl(rkisp1_dev->base_addr + CIF_MIPI_MIS);**
** if (mis_val)**
** rkisp1_mipi_isr(mis_val, rkisp1_dev);**

What’s the relationship between xvclk, pixel clock and the link frequency?

Note:

  • This MIPI mis error occurs only in MIPI D-PHY TX1RX1 camera and MIPI D-PHY RX0 camera is working fine in both 800MHz and 1GHz mode.

Thanks & Regards,
Bala

@Bala Sorry, we don’t have access to RK3399 MIPI CSI2 datasheet. But I have seen the MIPI miss error too and it occurs when the complete frame is not received by the DPHY. The fact that it goes away when you decrease the pixel clock freq means there could be a mismatch in the link freq or pixel rate between DPHY and the sensor.

Hi @Mani ,

Thanks for the info , when i looked into mipidphy_get_sensor_data_rate() from drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c , it seemed like DPHY clock is obtained from the sensor’s link frequency and in mipidphy_txrx_stream_on() we choose a clock which is slightly greater than the sensor’s link frequency. After looking at the file kernel/drivers/media/platform/rockchip/isp1/regs.h , the following registers are set ,
CIF_MIPI_SYNC_FIFO_OVFLW for the MIPI mis error 0x00000006 , 0x00000004 and 0x00000001
CIF_MIPI_ERR_SOT_SYNC for the MIPI mis error 0x00000300
Does that help in getting an idea how to debug this issue? If not , thank you for your time.