Cannot capture image for SGRBG8_1X8 format with On semi MT9M114 Camera Module on I.MX8M nano

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot capture image for SGRBG8_1X8 format with On semi MT9M114 Camera Module on I.MX8M nano

1,825 Views
刘国华
Contributor III

Hi  

Currenty I am working on i.MX8M Nano with Camera module On semi MT9M114 , it is 1 data lane ,1 clock lane with 24M Mclk and 384M MIPI CLK , I just add the I.MX8 device tree setting and I.MX8M nano ISI and MIPI driver code setting below . I have already got the MIPI data and CLK with oscilloscope.But when I try to capture the MIPI image with command 

v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=1280,height=800,pixelformat=BA10 --stream-mmap --stream-count=1 --stream-to=raw10.raw

The system hang . 

I have dump the register value show below . 

root@imx8mnevk:/unit_tests# ./memtool -32 0x32E30000 0x48
E
Reading 0x48 count starting at address 0x32E30000

0x32E30000: 03060301 00004805 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000E2 08000003 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000AC 03200500 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000AC 03200500 00000000 DEADCAFE
0x32E30090: 00000000 00000000 00000000 DEADCAFE
0x32E300A0: 00000000 00000000 00000000 DEADCAFE
0x32E300B0: 00000000 00000000 00000000 DEADCAFE
0x32E300C0: 00000000 00000000 00000000 000000E4
0x32E300D0: 00000000 00000000 00000000 DEADCAFE
0x32E300E0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E300F0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E30100: 00000000 00000000 00000000 00000000
0x32E30110: 00000000 00000000 00000000 00000000

root@imx8mnevk:/unit_tests# ./memtool -32 0x32E30000 0x48
E
Reading 0x48 count starting at address 0x32E30000

0x32E30000: 03060301 00004805 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000E2 08000003 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000AC 03200500 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000AC 03200500 00000000 DEADCAFE
0x32E30090: 00000000 00000000 00000000 DEADCAFE
0x32E300A0: 00000000 00000000 00000000 DEADCAFE
0x32E300B0: 00000000 00000000 00000000 DEADCAFE
0x32E300C0: 00000000 00000000 00000000 000000E4
0x32E300D0: 00000000 00000000 00000000 DEADCAFE
0x32E300E0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E300F0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E30100: 00000000 00000000 00000000 00000000
0x32E30110: 00000000 00000000 00000000 00000000


root@imx8mnevk:/unit_tests# ./memtool -32 0x32E20000 0x28
E
Reading 0x28 count starting at address 0x32E20000

0x32E20000: E0000000 0C000001 0007C707 03200500
0x32E20010: 3DF80000 00000200 10001000 00000000
0x32E20020: 00000000 00000000 00000000 00000000
0x32E20030: 00000000 00000000 00000000 00000000
0x32E20040: 00000000 00000000 00000000 00000000
0x32E20050: 00000000 00000000 00000000 00000000
0x32E20060: 00000000 00000000 00000000 00000000
0x32E20070: 80A00000 00000000 00000000 00000A00
0x32E20080: 00000000 00000000 00000000 80200000
0x32E20090: 00000000 00000000 03200500 00000000

Please help to give some suggestion . Thanks 

 

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts b/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
index c2bd4e305b93..b279d14dee64 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
@@ -588,7 +588,7 @@
mclk = <24000000>;
mclk_source = <0>;
mipi_csi;
- status = "okay";
+ status = "disabled";
port {
ov5640_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
@@ -597,6 +597,32 @@
};
};
};
+
+ mt9m114_mipi: mt9m114_mipi@48 {
+ compatible = "Onsem,mt9m114_mipi";
+ reg = <0x48>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_csi_pwn>, <&pinctrl_csi_rst>;
+ clocks = <&clk IMX8MN_CLK_CLKO1>;
+ clock-names = "xclk";
+ assigned-clocks = <&clk IMX8MN_CLK_CLKO1>;
+ assigned-clock-parents = <&clk IMX8MN_CLK_24M>;
+ assigned-clock-rates = <24000000>;
+ csi_id = <0>;
+ powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ mclk = <24000000>;
+ mclk_source = <0>;
+ mipi_csi;
+ status = "okay";
+ port {
+ mt9m114_mipi1_ep: endpoint {
+ remote-endpoint = <&mipi1_sensor_ep>;
+ data-lanes = <1>;
+ clocks-lanes = <0>;
+ };
+ };
+ };
};

&fec1 {
@@ -920,10 +946,10 @@
port@0 {
reg = <0>;
mipi1_sensor_ep: endpoint {
- remote-endpoint = <&ov5640_ep>;
- data-lanes = <2>;
- csis-hs-settle = <13>;
- csis-clk-settle = <2>;
+ remote-endpoint = <&mt9m114_mipi1_ep>;
+ data-lanes = <1>;
+ csis-hs-settle = <8>;
+ csis-clk-settle = <0>;
csis-wclk;
};
};
diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index 5d4c245376b0..e16320d7aace 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -1390,7 +1390,7 @@
assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>;
assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>;
assigned-clock-rates = <333000000>;
- bus-width = <4>;
+ bus-width = <1>;
csi-gpr = <&mipi2csi_gasket>;
power-domains = <&mipi_pd>;
resets = <&mipi_csi_resets>;
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index fcffcc31d168..45285b41672f 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -677,6 +677,15 @@ config VIDEO_OV5640
This is a Video4Linux2 sensor driver for the Omnivision
OV5640 camera sensor with a MIPI CSI-2 interface.

+config VIDEO_MT9M114
+ tristate "Om semi mt9m114 mipi sensor support"
+ depends on OF
+ depends on GPIOLIB && VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
+ depends on MEDIA_CAMERA_SUPPORT
+ select V4L2_FWNODE
+ help
+ This is a Video4Linux2 sensor driver for the Omnivision
+ mt9m114 camera sensor with a MIPI CSI-2 interface.
config VIDEO_OV5645
tristate "OmniVision OV5645 sensor support"
depends on OF
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index beb170b002dc..fb7e94f1e492 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -91,6 +91,7 @@ obj-$(CONFIG_VIDEO_MT9T112) += mt9t112.o
obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
obj-$(CONFIG_VIDEO_MT9V111) += mt9v111.o
+obj-$(CONFIG_VIDEO_MT9M114) += mt9m114_mipi.o
obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
obj-$(CONFIG_VIDEO_RJ54N1) += rj54n1cb0c.o
diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c
index 6ba5b3a86f49..ec53cbf34092 100644
--- a/drivers/staging/media/imx/imx8-isi-cap.c
+++ b/drivers/staging/media/imx/imx8-isi-cap.c
@@ -105,6 +105,14 @@ struct mxc_isi_fmt mxc_isi_out_formats[] = {
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
+ },{
+ .name = "RAW10 (SGRBG10)",
+ .fourcc = V4L2_PIX_FMT_SGRBG10,
+ .depth = { 16 },
+ .color = MXC_ISI_OUT_FMT_RAW10,
+ .memplanes = 1,
+ .colplanes = 1,
+ .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,
}
};

@@ -124,6 +132,12 @@ struct mxc_isi_fmt mxc_isi_src_formats[] = {
.depth = { 32 },
.memplanes = 1,
.colplanes = 1,
+ },{
+ .name = "RAW10 (SGRBG10)",
+ .fourcc = V4L2_PIX_FMT_SGRBG10,
+ .depth = { 16 },
+ .memplanes = 1,
+ .colplanes = 1,
}
};

@@ -162,6 +176,17 @@ struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt)
{
u32 index;

+
+#if 1
+ // test for raw10
+ if (sd_fmt->format.code == MEDIA_BUS_FMT_SGRBG10_1X10)
+ {
+ printk("****** test mxc_isi_src_format SBGGR12_1x12 func:%s line:%d file:drivers/sta\n",__func__,__LINE__);
+ return &mxc_isi_src_formats[2];
+ }
+ printk("****** test mxc_isi_src_format:%x func:%s line:%d fil\n",sd_fmt->format.code,__func__,__LINE__);
+
+#endif
/* two fmt RGB32 and YUV444 from pixellink */
if (sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_1X16 ||
sd_fmt->format.code == MEDIA_BUS_FMT_YVYU8_2X8 ||
@@ -171,6 +196,7 @@ struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt)
index = 1;
else
index = 0;
+
return &mxc_isi_src_formats[index];
}

@@ -219,7 +245,7 @@ static int mxc_isi_pipeline_enable(struct mxc_isi_cap_dev *isi_cap, bool enable)

ret = v4l2_subdev_call(subdev, video, s_stream, enable);
if (ret < 0 && ret != -ENOIOCTLCMD) {
- dev_err(dev, "subdev %s s_stream failed\n", subdev->name);
+ dev_err(dev, "subdev %s \n", subdev->name);
break;
}
}
@@ -722,7 +748,7 @@ static int mxc_isi_capture_open(struct file *file)

ret = v4l2_subdev_call(sd, core, s_power, 1);
if (ret) {
- dev_err(dev, "Call subdev s_power fail!\n");
+ dev_err(dev, " v4l2_subdev_call fail!\n");
pm_runtime_put(dev);
return ret;
}
@@ -838,7 +864,8 @@ static int mxc_isi_cap_g_fmt_mplane(struct file *file, void *fh,
pix->height = dst_f->o_height;
pix->field = V4L2_FIELD_NONE;
pix->pixelformat = dst_f->fmt->fourcc;
- pix->colorspace = V4L2_COLORSPACE_JPEG;
+ //pix->colorspace = V4L2_COLORSPACE_JPEG;
+ pix->colorspace = V4L2_COLORSPACE_RAW;//kingliu
pix->num_planes = dst_f->fmt->memplanes;

for (i = 0; i < pix->num_planes; ++i) {
@@ -903,7 +930,8 @@ 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;
+ //src_fmt.format.code = MEDIA_BUS_FMT_UYVY8_2X8;
+ src_fmt.format.code = MEDIA_BUS_FMT_SGRBG10_1X10;//kingliu
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);
@@ -1071,10 +1099,12 @@ static int mxc_isi_cap_streamon(struct file *file, void *priv,
ret = mxc_isi_config_parm(isi_cap);
if (ret < 0)
return ret;
+printk(" mxc_isi_cap_streamon 11111 \r\n ");

ret = vb2_ioctl_streamon(file, priv, type);
mxc_isi_channel_enable(mxc_isi, mxc_isi->m2m_enabled);
ret = mxc_isi_pipeline_enable(isi_cap, 1);
+ printk(" mxc_isi_cap_streamon 222 \r\n ");
if (ret < 0 && ret != -ENOIOCTLCMD)
return ret;

@@ -1615,7 +1645,7 @@ static int mxc_isi_register_cap_device(struct mxc_isi_cap_dev *isi_cap,
/* Default configuration */
isi_cap->dst_f.width = 1280;
isi_cap->dst_f.height = 800;
- isi_cap->dst_f.fmt = &mxc_isi_out_formats[0];
+ isi_cap->dst_f.fmt = &mxc_isi_out_formats[9];
isi_cap->src_f.fmt = isi_cap->dst_f.fmt;

isi_cap->cap_pad.flags = MEDIA_PAD_FL_SINK;
diff --git a/drivers/staging/media/imx/imx8-mipi-csi2-sam.c b/drivers/staging/media/imx/imx8-mipi-csi2-sam.c
index 4d4896779753..04e27a585a67 100644
--- a/drivers/staging/media/imx/imx8-mipi-csi2-sam.c
+++ b/drivers/staging/media/imx/imx8-mipi-csi2-sam.c
@@ -1071,7 +1071,9 @@ 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;
+ mf->code = MEDIA_BUS_FMT_SGRBG10_1X10;//kingliu
+
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__);
@@ -1084,6 +1086,7 @@ static int mipi_csis_set_fmt(struct v4l2_subdev *mipi_sd,
mf->code = csis_fmt->code;
}

+state->csis_fmt = csis_fmt; // added by kingliu
return 0;
}

/////////////////////////////////////////////////////////////////////////////////////////////////

i.mx8m nano + On semi mt9m114 support MEDIA_BUS_FMT_SGRBG8_1X8, 1 datalane , 384 MIPI clk


v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=1280,height=800,pixelformat=BA10 --stream-mmap --stream-count=1 --stream-to=raw10.raw

root@imx8mnevk:~# v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=1280,height=800,pixelformat=BA10 --stream-mmap --stream-count=1 --stream-to=raw10.raw
[ 15.419112] ryl test mt9m114 func:mt9m114_ifp_sensor_power line:2214 ret=0
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
Width/Height :[ 15.435128] mt9m114_ifp_set_fmt
1280/800
Pixel Format : '[ 15.439517] ****** test mxc_isi_src_format SBGGR12_1x12 func:mxc_isi_get_src_fmt line:184 file:drivers/sta
BA10' (10-bit Bayer GRGR/BGBG)
Field : None
Numb[ 15.457001] bypass csc
er of planes : 1
Flags [ 15.459883] input fmt BA10
:
Colorspace : Raw[ 15.465463] output fmt BA10

Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Plane 0 :
Bytes per Line : 2560
Size Image : 2048000
[ 15.471137] mxc_isi_cap_streamon 11111
[ 15.471137]
[ 15.786866] mt9m114_ifp_s_stream 11111
[ 15.786866]
[ 15.792544] mt9m114_ifp_s_stream 2222
[ 15.792544]
[ 15.798272] mt9m114_ifp_s_stream 333
[ 15.798272]
[ 15.803881] mt9m114_configure 1111
[ 15.803881]
[ 15.812036] mt9m114_write to write register 0xc802: 1
[ 15.824429] mt9m114_write to write register 0xc800: 1
[ 15.830185] mt9m114_write to write register 0xc806: 1
[ 15.835960] mt9m114_write to write register 0xc804: 1
[ 15.841725] mt9m114_write to write register 0xc818: 1
[ 15.846805] mt9m114_read 1111
[ 15.846805]
[ 15.847617] mt9m114_read to read register 0xc834: 2
[ 15.858102] mt9m114_write to write register 0xc834: 1
[ 15.863858] mt9m114_write to write register 0xc854: 1
[ 15.869626] mt9m114_write to write register 0xc856: 1
[ 15.875388] mt9m114_write to write register 0xc858: 1
[ 15.881155] mt9m114_write to write register 0xc85a: 1
[ 15.886910] mt9m114_write to write register 0xc868: 1
[ 15.892668] mt9m114_write to write register 0xc86a: 1
[ 15.898426] mt9m114_write to write register 0xc914: 1
[ 15.904196] mt9m114_write to write register 0xc916: 1
[ 15.909950] mt9m114_write to write register 0xc918: 1
[ 15.915759] mt9m114_write to write register 0xc91a: 1
[ 15.921514] mt9m114_write to write register 0xc91c: 1
[ 15.927282] mt9m114_write to write register 0xc91e: 1
[ 15.933035] mt9m114_write to write register 0xc920: 1
[ 15.938810] mt9m114_write to write register 0xc922: 1
[ 15.944456] mt9m114_write to write register 0xc85c: 1
[ 15.949537] mt9m114_read 1111
[ 15.949537]
[ 15.950348] mt9m114_read to read register 0xc86c: 2
[ 15.960148] value =10
[ 15.962781] sensor->ifp.info->output_format =200
[ 15.967757] mt9m114_configure 333
[ 15.967757]
[ 15.968450] mt9m114_write to write register 0xc86c: 1
[ 15.978754] mt9m114_ifp_s_stream 444
[ 15.978754]
[ 15.978756] mt9m114_ifp_s_stream 555
[ 15.978756]
[ 15.984257] mt9m114_ifp_s_stream 666
[ 15.984257]
[ 15.990349] mt9m114_write to write register 0xdc00: 1
[ 16.001612] mt9m114_write to write register 0x0080: 1
[ 16.006690] mt9m114_read 1111
[ 16.006690]
[ 16.007502] mt9m114_read to read register 0x0080: 2
[ 16.022462] mt9m114_read 1111
[ 16.022462]
[ 16.023277] mt9m114_read to read register 0x0080: 2
[ 16.033138] mt9m114_ifp_s_stream 777
[ 16.033138]
[ 16.046478] mxc_isi_cap_streamon 222

 

root@imx8mnevk:~# v4l2-ctl --device=/dev/video0 --all
[ 178.903474] ryl test mt9m114 func:mt9m114_ifp_sensor_power line:2214 ret=0
Driver Info:
Driver name : mxc-isi-cap
Card type : mxc-isi[ 178.916250] ryl test mt9m114 func:mt9m114_ifp_sensor_power line:2214 ret=0
-cap
Bus info : platform:32e20000.isi:cap_devic
Driver version : 5.4.70
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mxc-md
Model : FSL Capture Media Device
Serial :
Bus info :
Media version : 5.4.70
Hardware revision: 0x00000000 (0)
Driver version : 5.4.70
Interface Info:
ID : 0x03000014
Type : V4L Video
Entity Info:
ID : 0x00000012 (18)
Name : mxc_isi.0.capture
Function : V4L2 I/O
Pad 0x01000013 : 0: Sink
Link 0x02000026: from remote pad 0x100000e of entity 'mxc_isi.0': Data, Enabled
Priority: 2
Format Video Capture Multiplanar:
Width/Height : 0/0
Pixel Format : 'BA10' (10-bit Bayer GRGR/BGBG)
Field : None
Number of planes : 1
Flags :
Colorspace : Raw
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Plane 0 :
Bytes per Line : 0
Size Image : 0
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0

User Controls

horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0
alpha_component 0x00980929 (int) : min=0 max=255 step=1 default=0 value=0
root@imx8mnevk:~# [ 185.642919] caam_jr 30901000.jr: 20000256: CCB: desc idx 2: RNG: Prediction resistance
[ 185.651156] hwrng: no data available
[ 195.883188] caam_jr 30901000.jr: 20000256: CCB: desc idx 2: RNG: Prediction resistance
[ 195.891171] hwrng: no data available
[ 206.122909] caam_jr 30901000.jr: 20000256: CCB: desc idx 2: RNG: Prediction resistance
[ 206.130855] hwrng: no data available
[ 216.362906] caam_jr 30901000.jr: 20000256: CCB: desc idx 2: RNG: Prediction resistance
[ 216.370853] hwrng: no data available
[ 226.602928] caam_jr 30901000.jr: 20000256: CCB: desc idx 2: RNG: Prediction resistance
[ 226.610876] hwrng: no data available

 

root@imx8mnevk:~# media-ctl -d /dev/media0 -p
[ 52.522886] caam_jr 30901000.jr: 20000256: CCB: desc idx 2: RNG: Prediction resistance
[ 52.531131] hwrng: no data available
Media controller API version 5.4.[ 52.535997] mt9m114_ifp_set_fmt
70

Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info
hw revision 0x0
driver version 5.4.70

Device topology
- entity 1: mxc_isi.0 (16 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
<- "mxc-mipi-csi2.0":4 [ENABLED]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Sink
pad5: Sink
pad6: Sink
pad7: Sink
pad8: Sink
pad9: Sink
pad10: Sink
pad11: Sink
pad12: Source
-> "mxc_isi.0.capture":0 [ENABLED]
pad13: Source
pad14: Source
pad15: Sink

- entity 18: mxc_isi.0.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "mxc_isi.0":12 [ENABLED]

- entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "mt9m114 ifp 2-0048":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
-> "mxc_isi.0":0 [ENABLED]
pad5: Source
pad6: Source
pad7: Source

- entity 31: mt9m114 ifp 2-0048 (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
pad0: Sink
[fmt:SGRBG10_1X10/40x40@1/30 field:none colorspace:unknown
crop.bounds:(4,4)/32x32
crop:(4,4)/1288x968
compose.bounds:(0,0)/1288x968
compose:(0,0)/1288x968]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]
<- "mt9m114 pixel array 2-0048":0 [ENABLED,IMMUTABLE]
pad1: Source
[fmt:SGRBG10_1X10/0x0@1/30 field:none colorspace:unknown]

- entity 34: mt9m114 pixel array 2-0048 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:SGRBG10_1X10/1296x976 field:none colorspace:unknown
crop.bounds:(0,0)/1296x976
crop:(0,0)/1296x976]
-> "mt9m114 ifp 2-0048":0 [ENABLED,IMMUTABLE]

0 Kudos
4 Replies

1,799 Views
刘国华
Contributor III

@weidong_sun @igorpadykov 

Any update about this ?

0 Kudos

1,816 Views
igorpadykov
NXP Employee
NXP Employee

Hi King

 

for that issue one can try to adjust clocks clocks and HSSETTLE parameter in imx8mn-evk.dts (hs-settle)

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Setting-i-MX8M-Mini-and-Nano-MIPI-DPHY-C...

 

MX8M Nano  HSSETTLE.jpg

For testing please use Chapter 6. Camera Examples below document

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8-GStreamer-User-Guide/ta-p/1098942

 

Best regards
igor

0 Kudos

1,811 Views
刘国华
Contributor III

@igorpadykov 

Thanks for your timely reply . For my understand , our camera module is 1 data lane with 384M MIPI CLK , so the mipi data rate is 384Mx 1 =384M ,then in device tree "mipi1_sensor_ep: endpoint", csis-hs-settle should be <8> and csis-clk-settle should be <0>.

But i do not know , how to adjust the MIPI clock ? Could you help explain more detail ? Thanks .

0 Kudos

1,823 Views
刘国华
Contributor III

@weidong_sun 

We @2802911181 have already porting the PIco DCAM20 camera to NXP I.MX8M nano with your support . 

https://community.nxp.com/t5/i-MX-Processors/Cannot-capture-video-or-image-for-SBGGR12-1X12-format-w...

 

Could you help to support this case also ? thanks .

0 Kudos