Cannot capture video or image for SBGGR12_1X12 format with Pico DCAM20 Camera Module

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

Cannot capture video or image for SBGGR12_1X12 format with Pico DCAM20 Camera Module

6,316 Views
2802911181
Contributor II

Hi,

Currenty I am working on i.MX8M Nano with Camera module Pico DCAM20 (2 lanes). To add support for this driver, I added the driver file addi903x.c as attachment.

Mark , the addi903x need 2 lanes 135Mhz mipi clk RAW12bit 

In our Linux 5.4.3 MIPI driver added support for MEDIA_BUS_FMT_SBGGR12_1X12 like this:

======== drivers/staging/media/imx/imx8-isi-cap.c  =========

struct mxc_isi_fmt mxc_isi_out_formats[] = {
{
.name = "RGB565",
.fourcc = V4L2_PIX_FMT_RGB565,
.depth = { 16 },
.color = MXC_ISI_OUT_FMT_RGB565,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB565_1X16,
}, {
.name = "RGB24",
.fourcc = V4L2_PIX_FMT_RGB24,
.depth = { 24 },
.color = MXC_ISI_OUT_FMT_BGR32P,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
}, {
.name = "BGR24",
.fourcc = V4L2_PIX_FMT_BGR24,
.depth = { 24 },
.color = MXC_ISI_OUT_FMT_RGB32P,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_BGR888_1X24,
}, {
.name = "YUYV-16",
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = { 16 },
.color = MXC_ISI_OUT_FMT_YUV422_1P8P,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_YUYV8_1X16,
}, {
.name = "YUV32 (X-Y-U-V)",
.fourcc = V4L2_PIX_FMT_YUV32,
.depth = { 32 },
.color = MXC_ISI_OUT_FMT_YUV444_1P8,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_AYUV8_1X32,
}, {
.name = "NV12 (YUYV)",
.fourcc = V4L2_PIX_FMT_NV12,
.depth = { 8, 8 },
.color = MXC_ISI_OUT_FMT_YUV420_2P8P,
.memplanes = 2,
.colplanes = 2,
.mbus_code = MEDIA_BUS_FMT_YUYV8_1X16,
}, {
.name = "YUV444M (Y-U-V)",
.fourcc = V4L2_PIX_FMT_YUV444M,
.depth = { 8, 8, 8 },
.color = MXC_ISI_OUT_FMT_YUV444_3P8P,
.memplanes = 3,
.colplanes = 3,
.mbus_code = MEDIA_BUS_FMT_YUV8_1X24,
}, {
.name = "xBGR32",
.fourcc = V4L2_PIX_FMT_XBGR32,
.depth = { 32 },
.color = MXC_ISI_OUT_FMT_XRGB32,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
}, {
.name = "RAWRGB12",
//.name = "ABGR32", // modified by ryl
.fourcc = V4L2_PIX_FMT_SBGGR12,
//.fourcc = V4L2_PIX_FMT_ABGR32,
.depth = { 16 },
//.depth = { 32 },
.color = MXC_ISI_OUT_FMT_RAW12,
//.color = MXC_ISI_OUT_FMT_ARGB32,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
//.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
}
};

/*
* Pixel link input format
*/
struct mxc_isi_fmt mxc_isi_src_formats[] = {
{
.name = "RGB32",
.fourcc = V4L2_PIX_FMT_RGB32,
.depth = { 32 },
.memplanes = 1,
.colplanes = 1,
}, {
.name = "YUV32 (X-Y-U-V)",
.fourcc = V4L2_PIX_FMT_YUV32,
.depth = { 32 },
.memplanes = 1,
.colplanes = 1,
}, {
.name = "RAWRGB12 (SBGGR12)",
.fourcc = V4L2_PIX_FMT_SBGGR12,
.depth = { 16 },
.memplanes = 1,
.colplanes = 1,
}

};

static int mxc_isi_source_fmt_init(struct mxc_isi_cap_dev *isi_cap)
{

.....

src_fmt.format.code = MEDIA_BUS_FMT_SBGGR12_1X12;

...

========== drivers/staging/media/imx/imx8-mipi-csi2-sam.c ========

//#define DEFAULT_SCLK_CSIS_FREQ 166000000UL
#define DEFAULT_SCLK_CSIS_FREQ 135000000UL

static const struct csis_pix_format mipi_csis_formats[] = {
{
.code = MEDIA_BUS_FMT_YUYV8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_RGB888_1X24,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RGB888,
.data_alignment = 24,
}, {
.code = MEDIA_BUS_FMT_UYVY8_2X8,
.code = MEDIA_BUS_FMT_YUYV8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_VYUY8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}, {
.code = MEDIA_BUS_FMT_SBGGR8_1X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW8,
.data_alignment = 8,
}, {
.code = MEDIA_BUS_FMT_SBGGR12_1X12,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
.data_alignment = 16,
}
};

static void disp_mix_gasket_config(struct csi_state *state)
{...

case MEDIA_BUS_FMT_SBGGR12_1X12: 
case MEDIA_BUS_FMT_SGBRG12_1X12:
case MEDIA_BUS_FMT_SGRBG12_1X12:
case MEDIA_BUS_FMT_SRGGB12_1X12:
fmt_val = GASKET_0_CTRL_DATA_TYPE_RAW12;
printk(" disp_mix_gasket_config raw12 func:%s line:%d \n",__func__,__LINE__);
break;  

...

static int mipi_csis_subdev_init(struct v4l2_subdev *mipi_sd,
struct platform_device *pdev,
const struct v4l2_subdev_ops *ops)
{...

state->csis_fmt = &mipi_csis_formats[5];
state->format.code = mipi_csis_formats[5].code;

...

=============== Below is the content of dts file: ===============

---arch/arm64/boot/dts/freescale/imx8mn.dtsi

mipi_csi_1: csi@32e30000 {
compatible = "fsl,imx8mn-mipi-csi";
reg = <0x0 0x32e30000 0x0 0x10000>;
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
//clock-frequency = <333000000>;
clock-frequency = <135000000>;

.........

----------arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts

&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c3>;
pinctrl-1 = <&pinctrl_i2c3_gpio>;
scl-gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
sda-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
status = "okay";

addi903x_mipi_0: addi903x_mipi@64 {
compatible = "adi,addi903x";
reg = <0x64>;
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 = <135000000>; 
clock-frequency = <135000000>;
csi_id = <0>;
powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
mclk = <135000000>;
mclk_source = <0>;
mipi_csi;
status = "okay";
port {
addi903x_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
data-lanes = <1 2>;
clocks-lanes = <0>;
//clocks-lanes = <1>;
};
};
};

&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi1_sensor_ep: endpoint {
remote-endpoint = <&addi903x_ep>;
data-lanes = <2>;
csis-hs-settle = <13>; 
csis-clk-settle = <2>;
csis-wclk; 
};
};
};

=========================================================

After boot, driver is initialized and DCAM20  is detected, /dev/video0 and /dev/media0 nodes are also created.

root@imx8mnevk:~# v4l2-ctl --list-formats
[ 3092.996443] in s power func:addi903x_s_power line:503
[ 3093.001759] addi903x 2-0064: s_power 1
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar

[0]: 'RGBP' (16-bit RGB[ 3093.011318] in s power func:addi903x_s_power line:503
5-6-5)
[1]: 'RGB3' (24-bit RGB[ 3093.018534] addi903x 2-0064: s_power 0
8-8-8)
[2]: 'BGR3' (24-bit BGR 8-8-8)
[3]: 'YUYV' (YUYV 4:2:2)
[4]: 'YUV4' (32-bit A/XYUV 8-8-8-8)
[5]: 'NV12' (Y/CbCr 4:2:0)
[6]: 'YM24' (Planar YUV 4:4:4 (N-C))
[7]: 'XR24' (32-bit BGRX 8-8-8-8)
[8]: 'BG12' (12-bit Bayer BGBG/GRGR)

root@imx8mnevk:~# v4l2-ctl --device /dev/video0 --list-formats-ext
[ 3169.480848] in s power func:addi903x_s_power line:503
[ 3169.486013] addi903x 2-0064: s_power 1
ioctl: VIDIOC_ENUM_FMT
Type: Vi[ 3169.490068] addi903x 2-0064: Mbus fs code 4119 index 0
[ 3169.498158] addi903x 2-0064: Mbus fs code 4106 index 0
[ 3169.503349] addi903x 2-0064: Mbus fs code 4115 index 0
[ 3169.508590] addi903x 2-0064: Mbus fs code 8209 index 0
deo Capture Multiplanar

[0]: [ 3169.513795] addi903x 2-0064: Mbus fs code 8215 index 0
'RGBP' (16-bit RGB 5-6-5)
[1]: [ 3169.521812] addi903x 2-0064: Mbus fs code 8209 index 0
'RGB3' (24-bit RGB 8-8-8)
[2]: [ 3169.529816] addi903x 2-0064: Mbus fs code 8229 index 0
'BGR3' (24-bit BGR 8-8-8)
[3]: [ 3169.537789] addi903x 2-0064: Mbus fs code 4106 index 0
'YUYV' (YUYV 4:2:2)
[4]: 'YUV4'[ 3169.545812] addi903x 2-0064: Mbus fs code 12296 index 0
(32-bit A/XYUV 8-8-8-8)
[5]: '[ 3169.553900] addi903x 2-0064: Mbus fs code 12296 index 1
NV12' (Y/CbCr 4:2:0)
[6]: 'YM24[ 3169.561982] addi903x 2-0064: Mbus fs code 12296 index 2
' (Planar YUV 4:4:4 (N-C))
[7]: 'XR24' (32-bit BGRX 8-8-8-8)
[ 3169.575055] in s power func:addi903x_s_power line:503
[8]: 'BG12' (12-bit Bayer BGBG/G[ 3169.580713] addi903x 2-0064: s_power 0
RGR)
Size: Discrete 640x480
Size: Discrete 668x750

root@imx8mnevk:~# v4l2-ctl -d /dev/video0 --all
[ 4260.569505] in s power func:addi903x_s_power line:503
[ 4260.574667] addi903x 2-0064: s_power 1
Driver Info:
Driver name : mxc-isi-cap
Card type : mxc-isi-cap[ 4260.584309] in s power func:addi903x_s_power line:503

Bus info : platform:32[ 4260.590847] addi903x 2-0064: s_power 0
e20000.isi:cap_devic
Driver version : 5.4.3
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.3
Hardware revision: 0x00000000 (0)
Driver version : 5.4.3
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 0x02000021: from remote pad 0x100000e of entity 'mxc_isi.0': Data, Enabled
Priority: 2
Format Video Capture Multiplanar:
Width/Height : 640/480
Pixel Format : 'BG12' (12-bit Bayer BGBG/GRGR)
Field : None
Number of planes : 1
Flags :
Colorspace : JPEG
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Plane 0 :
Bytes per Line : 1280
Size Image : 614400

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:~#

root@imx8mnevk:~# media-ctl -d /dev/media0 -p
Media controller API version 5.4.[ 4313.850366] mxc_isi.0: mxc_isi_subdev_get_fmt, Pad is not support now!
[ 4313.858993] addi903x 2-0064: addi903x_open: Enter
[ 4313.863880] entity_init_cfg fun:addi903x_entity_init_cfg line:786
3

Media device information
--[ 4313.870142] addi903x 2-0064: addi903x_entity_init_cfg: Enter
----------------------
driver [ 4313.878614] addi903x 2-0064: set_fmt: 0 640x480
[ 4313.885996] after entity init cfg ret=0, func:addi903x_open, line:846
mxc-md
model FS[ 4313.892558] addi903x 2-0064: get_fmt which 1
L Capture Media Device
serial [ 4313.899695] addi903x 2-0064: get_fmt: 3008 640x480

bus info
hw rev[ 4313.907402] addi903x 2-0064: get_selection 2
ision 0x0
driver version 5.[ 4313.914494] addi903x 2-0064: get_selection 0
4.3

Device topology
- entity [ 4313.921617] addi903x 2-0064: get_selection 258
1: mxc_isi.0 (16 pads, 2 links)
[ 4313.928897] addi903x 2-0064: get_selection 256
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
<- "mxc-mipi-csi2.0":4 [ENABLED]
pad1: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad2: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad3: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad4: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad5: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad6: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad7: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad8: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad9: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad10: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad11: Sink
[fmt:unknown/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad12: Source
[fmt:SBGGR12_1X12/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
-> "mxc_isi.0.capture":0 [ENABLED]
pad13: Source
[fmt:SBGGR12_1X12/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
pad14: Source
[fmt:SBGGR12_1X12/640x480 colorspace:jpeg
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480
compose.bounds:(0,0)/640x480
compose:(0,0)/640x480]
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-subdev1
pad0: Sink
<- "addi903x 2-0064":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
-> "mxc_isi.0":0 [ENABLED]
pad5: Source
pad6: Source
pad7: Source

- entity 31: addi903x 2-0064 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:SBGGR12_1X12/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
crop:(0,0)/640x480]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]

root@imx8mnevk:~#

It is stuck after I try to capture one frame and create raw file as below:

root@imx8mnevk:~# v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=640,height=480,pixelformat=BG12 --stream-mmap --stream-count=1 --stream-to=raw12_640x480.raw
[ 3337.077267] in s power func:addi903x_s_power line:503
[ 3337.082444] addi903x 2-0064: s_power 1
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT[ 3337.089132] addi903x 2-0064: set_fmt: 3008 640x480
[ 3337.094290] King mipi_csis_set_fmt MEDIA_BUS_FMT_SBGGR12_1X12 mipi_csis_set_fmt 992
[ 3337.102180] addi903x 2-0064: get_fmt which 1
[ 3337.106495] addi903x 2-0064: get_fmt: 3008 640x480
: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
Widt[ 3337.116327] bypass csc
h/Height : 640/480
Pixel F[ 3337.119209] input fmt BG12
ormat : 'BG12' (12-bit Bayer[ 3337.124791] output fmt BG12
BGBG/GRGR)
Field : None
Number of planes : 1
Flags :
Colorspace : JPEG
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Plane 0 :
Bytes per Line : 1280
Size Image : 614400
[ 3337.458148] addi903x 2-0064: stream 1
[ 3337.461830] mipi_csis start stream began func;mipi_csis_start_stream line:857
[ 3337.469032] disp_mix_gasket_config raw12 func:disp_mix_gasket_config line:820
[ 3337.476489] mipi_csis start stream before sleep func;mipi_csis_start_stream line:866
[ 3337.497463] mipi_csis start stream end sleep func;mipi_csis_start_stream line:869

-----------  drivers/staging/media/imx/imx8-mipi-csi2-sam.c -----

static void mipi_csis_start_stream(struct csi_state *state)
856 {
857 printk("mipi_csis start stream began func;%s line:%d\n",__func__,__LINE__);
858 mipi_csis_sw_reset(state);
859
860 disp_mix_gasket_config(state);
861 mipi_csis_set_params(state);
862
863 mipi_csis_system_enable(state, true);
864 disp_mix_gasket_enable(state, true);
865 mipi_csis_enable_interrupts(state, true);
866 printk("mipi_csis start stream before sleep func;%s line:%d\n",__func__,__LINE__);
867
868 msleep(5);
869 printk("mipi_csis start stream end sleep func;%s line:%d\n",__func__,__LINE__);
870
871 }

-------------------

Anything I missed or configured wrong? Can somebody give me some advice? 

Should I modify the mipi csi clk in the i.mx8mn.dtsi file? 

Why it hang ? 

Thanks & Best Regards,

Michael

25 Replies

4,931 Views
刘国华
Contributor III

Hi weidong.sun

Many thanks for your continuouns support .

As I know , I.MX8M nano can not support the virtual channel , we have just set  csi_id = <0> in the device tree ,is this mean the channel your mentioned .

We can read more register value ,and follow the i.mx8m nano reference manual to find out any incorrect setting .But we have no any detail information APN about the MIPI CSI setting .  

In mearn while , can you point out what are the key register we should check.

0 Kudos

4,931 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi King,

>>csi_id=0, OK

>>MIPI_CSI_INTERRUPT_SOURCE_0 register

dump the value of register, you will have to change source code to get the value, because memtool can't access it.

>>About MIPI signals

After the MIPI signal is amplified, check whether there is a short packet in the data.

【注】Here let me write it in Chinese.

现在面临的问题是,CPU收到的数据包中,没有帧头和帧尾,那么数据会被丢弃。因此可以看到有数据进来,但是没有被处理。

weidong

0 Kudos

4,932 Views
刘国华
Contributor III

Hi weidong.sun

So what can I do it? 000000F0 mean the I.MX8 can not detect any mipi data signal ? But we can measure the mipi data signal with the oscilloscope.微信图片_20200720153001.jpg

0 Kudos

4,932 Views
weidong_sun
NXP TechSupport
NXP TechSupport

0x32E30020: 000000C0, mean data is received.

so expert suggests you can read more registers' value, and check them.

From registers' value you got,  on CPU side, no Frame Start and Line Start were found.

so you can check if Virtual Channel is set to 0 in camera driver.

weidong

0 Kudos

4,931 Views
2802911181
Contributor II

Hi Wigros,

 I compared DCAM20 and OV5640, ISI CSC is bypassed in DCAM20 but not in OV5640 and   current virtual channel both are 0.

Regieter values are listed as below

-------------------------------------DCAM20 ---------------------------

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000C0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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


0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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

./memtool -32 0x32E20000 0x28

0x32E20000: E0000000 0E000001 0000C000 01E00280
0x32E20010: 3DFB0000 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: 80600000 00000000 00000000 00000500
0x32E20080: 00000000 00000000 00000000 80200000
0x32E20090: 00000000 00000000 01E00280 00000000

-------------------------------------------------------------------------

------------------------------------------ ov5640---------------------------------------------

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000C0 0D800007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 00001078 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 00001078 01E00280 00000000 DEADCAFE
0x32E30090: 00000000 00000000 00000000 DEADCAFE
0x32E300A0: 00000000 00000000 00000000 DEADCAFE
0x32E300B0: 00000000 00000000 00000000 DEADCAFE
0x32E300C0: 00000000 00000000 0C011011 000000E4
0x32E300D0: 00000000 00000000 00000000 DEADCAFE
0x32E300E0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E300F0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E30100: 000002D5 00000000 00000000 00000000
0x32E30110: 00000000 00000000 00000000 00000000
0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F1 0D800007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 00001078 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 00001078 01E00280 00000000 DEADCAFE
0x32E30090: 00000000 00000000 00000000 DEADCAFE
0x32E300A0: 00000000 00000000 00000000 DEADCAFE
0x32E300B0: 00000000 00000000 00000000 DEADCAFE
0x32E300C0: 00000000 00000000 0C011011 000000E4
0x32E300D0: 00000000 00000000 00000000 DEADCAFE
0x32E300E0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E300F0: DEADCAFE DEADCAFE DEADCAFE DEADCAFE
0x32E30100: 000002EE 00000000 00000000 00000000
0x32E30110: 00000000 00000000 00000000 00000000
./memtool -32 0x32E20000 0x28

0x32E20000: C0000000 0A00000A 00000000 01E00280
0x32E20010: 3DFB0000 40000200 10001000 00000000
0x32E20020: 00000000 00000000 0000012A 012A0198
0x32E20030: 0730079C 0204012A 01F00000 01800180
0x32E20040: 00000000 00000000 00000000 00000000
0x32E20050: 00000000 00000000 00000000 00000000
0x32E20060: 00000000 00000000 00000000 00000000
0x32E20070: 80600000 00000000 00000000 00000500
0x32E20080: 00000000 00000000 00000000 80600000
0x32E20090: 00000000 00000000 01E00280 00000000

---------------------------------------------------------------------------------------

0 Kudos

4,951 Views
刘国华
Contributor III

weidong.sun‌ Dear Wigros Any update about it ? Please help to follow it .Many thanks 

0 Kudos

4,951 Views
weidong_sun
NXP TechSupport
NXP TechSupport

See attachment, please!

0 Kudos

4,950 Views
2802911181
Contributor II

Hi Wigros,

  I have modified dts files accroding to your attachment as below:

======================================

---- arch/arm64/boot/dts/freescale/imx8mn.dtsi
mipi_csi_1: csi@32e30000 {
compatible = "fsl,imx8mn-mipi-csi";
reg = <0x0 0x32e30000 0x0 0x10000>;
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <333000000>;
//clock-frequency = <135000000>;
clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>,
<&clk IMX8MN_CLK_CSI1_PHY_REF>,
<&clk IMX8MN_CLK_DISP_AXI_ROOT>,
<&clk IMX8MN_CLK_DISP_APB_ROOT>;
clock-names = "mipi_clk", "phy_clk", "disp_axi", "disp_apb";
assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>,
<&clk IMX8MN_CLK_CSI1_PHY_REF>;
assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>,
<&clk IMX8MN_SYS_PLL2_1000M>;
assigned-clock-rates = <333000000>, <125000000>;
//assigned-clock-rates = <135000000>, <125000000>;
bus-width = <2>;
//bus-width = <4>; // ryl
csi-gpr = <&mipi2csi_gasket>;
power-domains = <&mipi_pd>;
resets = <&mipi_csi_resets>;
status = "disabled";
};

----arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
addi903x_mipi_0: addi903x_mipi@64 {
compatible = "adi,addi903x";
reg = <0x64>;
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 = "disabled";
status = "okay";
port {
addi903x_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
data-lanes = <1 2>;
clocks-lanes = <0>;
//clocks-lanes = <1>;
};
};
};
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi1_sensor_ep: endpoint {
remote-endpoint = <&addi903x_ep>;
data-lanes = <2>;
csis-hs-settle = <5>; //modified by ryl
//csis-hs-settle = <13>; //modified by ryl
csis-clk-settle = <0>; // modified by ryl
//csis-clk-settle = <2>; // modified by ryl
csis-wclk; //modified by ryl
};
};
};

===============================================

It still stuck as below:

--------------

root@imx8mnevk:~# v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=640,height=480,pixelformat=BG12 --stream-mmap --stream-count=1 --stream-to=raw12_640x480.raw
[ 17.723271] in s power func:addi903x_s_power line:503
[ 17.728437] addi903x 2-0064: s_power 1
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT:[ 17.735559] addi903x 2-0064: set_fmt: 3008 640x480
ok
Format Video Capture Multipl[ 17.741660] King mipi_csis_set_fmt MEDIA_BUS_FMT_SBGGR12_1X12 mipi_csis_set_fmt 997
anar:
Width/Height : 640/4[ 17.752361] addi903x 2-0064: get_fmt which 1
80
Pixel Format : 'BG12' ([ 17.759480] addi903x 2-0064: get_fmt: 3008 640x480
12-bit Bayer BGBG/GRGR)
Field : None
Number of p[ 17.772139] bypass csc
lanes : 1
Flags : [ 17.775015] input fmt BG12

Colorspace : JPEG
Tra[ 17.780597] output fmt BG12
nsfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Plane 0 :
Bytes per Line : 1280
Size Image : 614400
[ 18.097741] addi903x 2-0064: stream 1
[ 18.101429] s_stream enable,in func:mipi_csis_s_stream line:944
[ 18.107730] mipi_csis start stream began func;mipi_csis_start_stream line:857
[ 18.114915] disp_mix_gasket_config raw12 func:disp_mix_gasket_config line:820
[ 18.122351] mipi_csis start stream before sleep func;mipi_csis_start_stream line:866
[ 18.145649] mipi_csis start stream end sleep func;mipi_csis_start_stream line:869
[ 18.153143] after start stream before dump regs,in func:mipi_csis_s_stream line:948
[ 18.160998] after dump regs,in func:mipi_csis_s_stream line:951
[ 18.167106] endd s_stream,in func:mipi_csis_s_stream line:959

-----------------------------------------------------------------------------------

The registers I dumped as below  :

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

0x32E20000: E0000000 0E000001 0000C000 01E00280
0x32E20010: 3DFB0000 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: 82E00000 00000000 00000000 00000500
0x32E20080: 00000000 00000000 00000000 82A00000
0x32E20090: 00000000 00000000 01E00280 00000000

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

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F1 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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

-------------------------------------------------------------------------------------

Is there anything else I should correct? 

0 Kudos

4,951 Views
weidong_sun
NXP TechSupport
NXP TechSupport

OK, got it.

Wait for my feedback, please!

weidong

0 Kudos

4,951 Views
刘国华
Contributor III

Dear Weidong

Any update about it? Thanks

获取 Outlook for iOS<https://aka.ms/o0ukef>

0 Kudos

4,951 Views
weidong_sun
NXP TechSupport
NXP TechSupport

See below, please!

-------------------------

Since register MIPI_CSI_DPHY_STATUS (0x32E30020), keeps value "000000F1", please make sure Camera module Pico DCAM20 had output MIPI CSI2 signals correctly.

-------------------------

Have  a nice day!

B.R,

weidong

0 Kudos

4,951 Views
2802911181
Contributor II

Hi Wigros,

  By the way, I got the registers as below:

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

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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 0E000001 0000C000 01E00280
0x32E20010: 3DFB0000 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: 80600000 00000000 00000000 00000500
0x32E20080: 00000000 00000000 00000000 80200000
0x32E20090: 00000000 00000000 01E00280 00000000

root@imx8mnevk:/unit_tests#

0 Kudos

4,951 Views
weidong_sun
NXP TechSupport
NXP TechSupport

OK, got it.

In progress, wait for me, please!

weidong

0 Kudos

4,952 Views
刘国华
Contributor III

Dear WeiDong

Please follow it . Our project is pending for the critical issue. Many thanks for your great support.

获取 Outlook for iOS<https://aka.ms/o0ukef>

0 Kudos

4,952 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi King,

See feedback from expert team:

--------------------------------------

0x32E30020 is changed from "000000F1" to "000000F0", clock lane is not in stop state now, but all data lanes are still in STOP state.

-------------------------------------

Have a nice day!

B.R,

Weidong

0 Kudos

4,946 Views
2802911181
Contributor II

Hi Wigros,

  0x32E30020 could be 000000C0 if I run the command "./memtool -32 0x32E30000 0x48" many times as below:

---------------------------------------------------------------------------------------------------------------------------------------------------------------

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

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000C0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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 0E000001 0000C000 01E00280
0x32E20010: 3DFB0000 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: 80600000 00000000 00000000 00000500
0x32E20080: 00000000 00000000 00000000 80200000
0x32E20090: 00000000 00000000 01E00280 00000000


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

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000C0 05000007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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

0 Kudos

4,952 Views
2802911181
Contributor II

Hi Wigros,

  MIPI CSI2 clock as below:

mipi_clk.jpg The clock is OK but it still stuck.

0 Kudos

4,952 Views
刘国华
Contributor III

weidong.sun‌ Pleae help to submit this issue to I.MX expert,we are debugging this for about two months,Please help .Many thanks .

0 Kudos

4,952 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello king Liu,

Below is feedback from i.MX Expert team:

-----------------------------

Please dump ISI and MIPI CSI2 registers after run capture command.

The customer run capture command with "&" in background, then use memtool to dump the registers.

-----------------------------

Have a  nice day!

B.R,

Weidong

0 Kudos

4,952 Views
2802911181
Contributor II

After I run the command "v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=640,height=480,pixelformat=BG12 --stream-mmap --stream-count=1 --stream-to=raw12_640x480.raw&" tjem dump the registers as below:

------------------- 1)  ISI -----------------

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

0x32E20000: E0000000 0E000001 0000C000 01E00280
0x32E20010: 3DFB0000 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: 82E00000 00000000 00000000 00000500
0x32E20080: 00000000 00000000 00000000 82A00000
0x32E20090: 00000000 00000000 01E00280 00000000

root@imx8mnevk:/unit_tests#

------------------ 2) MIPI CSI2 ------------------

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

0x32E30000: 03060301 00004105 000F0000 DEADCAFE
0x32E30010: 0FFFFF1F 00000000 00000000 00000000
0x32E30020: 000000F1 0D800007 DEADCAFE DEADCAFE
0x32E30030: 000001F4 00000000 00000000 00000000
0x32E30040: 000000B0 01E00280 00000000 DEADCAFE
0x32E30050: 000008FD 80008000 00000000 DEADCAFE
0x32E30060: 000008FE 80008000 00000000 DEADCAFE
0x32E30070: 000008FF 80008000 00000000 DEADCAFE
0x32E30080: 000000B0 01E00280 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#

0 Kudos