diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c
index 880f0023f202..e9721f147c10 100644
--- a/drivers/staging/media/imx/imx8-isi-cap.c
+++ b/drivers/staging/media/imx/imx8-isi-cap.c
@@ -54,6 +54,13 @@ struct mxc_isi_fmt mxc_isi_src_formats[] = {
 		.memplanes	= 1,
 		.colplanes	= 1,
 		.align		= 2,
+	}, {
+		.name		= "BG12",
+		.fourcc		= V4L2_PIX_FMT_SBGGR12,
+		.depth		= { 12 },
+		.memplanes	= 1,
+		.colplanes	= 1,
+		.align		= 2,
 	}
 };
 
@@ -99,6 +106,8 @@ struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt)
 	    sd_fmt->format.code == MEDIA_BUS_FMT_UYVY8_2X8 ||
 	    sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_2X8)
 		index = 1;
+	else if (sd_fmt->format.code == MEDIA_BUS_FMT_SBGGR12_1X12)
+		index = 2;
 	else
 		index = 0;
 	return &mxc_isi_src_formats[index];
@@ -939,6 +948,7 @@ static int mxc_isi_source_fmt_init(struct mxc_isi_cap_dev *isi_cap)
 	src_fmt.pad = source_pad->index;
 	src_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
 	src_fmt.format.code = MEDIA_BUS_FMT_UYVY8_2X8;
+	if (dst_f->fmt->fourcc == V4L2_PIX_FMT_SBGGR12) src_fmt.format.code = MEDIA_BUS_FMT_SBGGR12_1X12;
 	src_fmt.format.width = dst_f->width;
 	src_fmt.format.height = dst_f->height;
 	ret = v4l2_subdev_call(src_sd, pad, set_fmt, NULL, &src_fmt);
diff --git a/drivers/staging/media/imx/imx8-isi-core.c b/drivers/staging/media/imx/imx8-isi-core.c
index c8c6c4ed9d33..aba509ffc5af 100644
--- a/drivers/staging/media/imx/imx8-isi-core.c
+++ b/drivers/staging/media/imx/imx8-isi-core.c
@@ -36,6 +36,24 @@ static const struct soc_device_attribute imx8_soc[] = {
 
 static const struct of_device_id mxc_isi_of_match[];
 
+int status_data_ready = 0;
+static void dum_data_ready(void) {
+	if (status_data_ready > 10) return;
+
+	status_data_ready++;
+
+	pr_info("zjs isi_status status_data_ready %d", status_data_ready);
+}
+
+int status_status = 0;
+static void dum_status_status(u32 status) {
+	if (status_status > 10) return;
+
+	status_status++;
+
+	pr_info("zjs isi_status status %#x", status);
+}
+
 static irqreturn_t mxc_isi_irq_handler(int irq, void *priv)
 {
 	struct mxc_isi_dev *mxc_isi = priv;
@@ -50,7 +68,10 @@ static irqreturn_t mxc_isi_irq_handler(int irq, void *priv)
 	mxc_isi->status = status;
 	mxc_isi_clean_irq_status(mxc_isi, status);
 
+	dum_status_status(status);
+
 	if (status & CHNL_STS_FRM_STRD_MASK) {
+		dum_data_ready();
 		if (mxc_isi->m2m_enabled)
 			mxc_isi_m2m_frame_write_done(mxc_isi);
 		else
@@ -60,22 +81,22 @@ static irqreturn_t mxc_isi_irq_handler(int irq, void *priv)
 	if (status & (CHNL_STS_AXI_WR_ERR_Y_MASK |
 		      CHNL_STS_AXI_WR_ERR_U_MASK |
 		      CHNL_STS_AXI_WR_ERR_V_MASK))
-		dev_dbg(dev, "%s, IRQ AXI Error stat=0x%X\n", __func__, status);
+		dev_info(dev, "%s, IRQ AXI Error stat=0x%X\n", __func__, status);
 
 	if (status & (ier_reg->panic_y_buf_en.mask |
 		      ier_reg->panic_u_buf_en.mask |
 		      ier_reg->panic_v_buf_en.mask))
-		dev_dbg(dev, "%s, IRQ Panic OFLW Error stat=0x%X\n", __func__, status);
+		dev_info(dev, "%s, IRQ Panic OFLW Error stat=0x%X\n", __func__, status);
 
 	if (status & (ier_reg->oflw_y_buf_en.mask |
 		      ier_reg->oflw_u_buf_en.mask |
 		      ier_reg->oflw_v_buf_en.mask))
-		dev_dbg(dev, "%s, IRQ OFLW Error stat=0x%X\n", __func__, status);
+		dev_info(dev, "%s, IRQ OFLW Error stat=0x%X\n", __func__, status);
 
 	if (status & (ier_reg->excs_oflw_y_buf_en.mask |
 		      ier_reg->excs_oflw_u_buf_en.mask |
 		      ier_reg->excs_oflw_v_buf_en.mask))
-		dev_dbg(dev, "%s, IRQ EXCS OFLW Error stat=0x%X\n", __func__, status);
+		dev_info(dev, "%s, IRQ EXCS OFLW Error stat=0x%X\n", __func__, status);
 
 	spin_unlock_irqrestore(&mxc_isi->slock, flags);
 	return IRQ_HANDLED;
diff --git a/drivers/staging/media/imx/imx8-isi-fmt.c b/drivers/staging/media/imx/imx8-isi-fmt.c
index fa26e5a2a359..88b8ec570b98 100644
--- a/drivers/staging/media/imx/imx8-isi-fmt.c
+++ b/drivers/staging/media/imx/imx8-isi-fmt.c
@@ -88,6 +88,15 @@ struct mxc_isi_fmt mxc_isi_out_formats[] = {
 		.colplanes	= 1,
 		.align		= 2,
 		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
+	}, {
+		.name		= "BG12",
+		.fourcc		=  V4L2_PIX_FMT_SBGGR12,
+		.depth		= { 16 },															// IMX8MPRM Rev. 1, 06/2021, page 7406
+		.color		= MXC_ISI_OUT_FMT_RAW16,
+		.memplanes	= 1,
+		.colplanes	= 1,
+		.align		= 2,
+		.mbus_code	= MEDIA_BUS_FMT_SBGGR12_1X12,
 	}
 };
 
diff --git a/drivers/staging/media/imx/imx8-mipi-csi2-sam.c b/drivers/staging/media/imx/imx8-mipi-csi2-sam.c
index 1d12365520a6..1025c61de35b 100644
--- a/drivers/staging/media/imx/imx8-mipi-csi2-sam.c
+++ b/drivers/staging/media/imx/imx8-mipi-csi2-sam.c
@@ -632,7 +632,7 @@ static struct v4l2_subdev *csis_get_remote_subdev(struct csi_state *state,
 static const struct csis_pix_format *find_csis_format(u32 code)
 {
 	int i;
-
+// return &mipi_csis_formats[0];
 	for (i = 0; i < ARRAY_SIZE(mipi_csis_formats); i++)
 		if (code == mipi_csis_formats[i].code)
 			return &mipi_csis_formats[i];
@@ -727,6 +727,9 @@ static void __mipi_csis_set_format(struct csi_state *state)
 	if (state->csis_fmt->fmt_reg == MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT)
 		val |= (PIXEL_MODE_DUAL_PIXEL_MODE <<
 			MIPI_CSIS_ISPCONFIG_CH0_PIXEL_MODE_SHIFT);
+	else if (state->csis_fmt->fmt_reg == MIPI_CSIS_ISPCFG_FMT_RAW12)
+		val |= (PIXEL_MODE_QUAD_PIXEL_MODE <<
+			MIPI_CSIS_ISPCONFIG_CH0_PIXEL_MODE_SHIFT);									// IMX8MPRM Rev. 1, 06/2021, page 5358
 	mipi_csis_write(state, MIPI_CSIS_ISPCONFIG_CH0, val);
 
 	/* clean 32bit , with normal mode */
@@ -1137,7 +1140,7 @@ static int mipi_csis_set_fmt(struct v4l2_subdev *mipi_sd,
 	}
 
 	format->pad = source_pad->index;
-	mf->code = MEDIA_BUS_FMT_UYVY8_2X8;
+	// mf->code = MEDIA_BUS_FMT_UYVY8_2X8;
 	ret = v4l2_subdev_call(sen_sd, pad, set_fmt, NULL, format);
 	if (ret < 0) {
 		v4l2_err(&state->sd, "%s, set sensor format fail\n", __func__);
@@ -1440,6 +1443,30 @@ static struct v4l2_subdev_ops mipi_csis_subdev_ops = {
 	.pad = &mipi_csis_pad_ops,
 };
 
+int dump_err_id  = 0;
+int dump_err_crc = 0;
+int dump_err_ecc = 0;
+int dump_err_wrong_config = 0;
+int dump_err_overflow = 0;
+int dump_err_lost_fe = 0;
+int dump_err_lost_fs = 0;
+int dump_err_lan0 = 0;
+int dump_err_lan1 = 0;
+int dump_err_lan2 = 0;
+int dump_err_lan3 = 0;
+int dump_frame_end = 0;
+int dump_frame_start = 0;
+int dump_copy_data = 0;
+
+static void dump_csi_status(int * count, char * error, u32 status, int bit) {
+	if (count[0] > 10) return;
+
+	if (status & (1 << bit)) {
+		count[0]++;
+		pr_info("zjs csi_status %s %d", error, count[0]);
+	}
+}
+
 static irqreturn_t mipi_csis_irq_handler(int irq, void *dev_id)
 {
 	struct csi_state *state = dev_id;
@@ -1449,6 +1476,9 @@ static irqreturn_t mipi_csis_irq_handler(int irq, void *dev_id)
 
 	status = mipi_csis_read(state, MIPI_CSIS_INTSRC);
 
+	dump_csi_status(&dump_frame_end, "dump_frame_end", status, 20);
+	dump_csi_status(&dump_frame_start, "dump_frame_start", status, 24);
+
 	spin_lock_irqsave(&state->slock, flags);
 	if ((status & MIPI_CSIS_INTSRC_NON_IMAGE_DATA) && pktbuf->data) {
 		u32 offset;
@@ -1475,6 +1505,17 @@ static irqreturn_t mipi_csis_irq_handler(int irq, void *dev_id)
 				 state->events[i].counter);
 		}
 		v4l2_dbg(2, debug, &state->sd, "status: %08x\n", status);
+		dump_csi_status(&dump_err_id, "dump_err_id", status, 0);
+		dump_csi_status(&dump_err_crc, "dump_err_crc", status, 1);
+		dump_csi_status(&dump_err_ecc, "dump_err_ecc", status, 2);
+		dump_csi_status(&dump_err_wrong_config, "dump_err_wrong_config", status, 3);
+		dump_csi_status(&dump_err_overflow, "dump_err_overflow", status, 4);
+		dump_csi_status(&dump_err_lost_fe, "dump_err_lost_fe", status, 8);
+		dump_csi_status(&dump_err_lost_fs, "dump_err_lost_fs", status, 12);
+		dump_csi_status(&dump_err_lan0, "dump_err_lan0", status, 16);
+		dump_csi_status(&dump_err_lan1, "dump_err_lan1", status, 17);
+		dump_csi_status(&dump_err_lan2, "dump_err_lan2", status, 18);
+		dump_csi_status(&dump_err_lan3, "dump_err_lan3", status, 19);
 	}
 	spin_unlock_irqrestore(&state->slock, flags);
 
