Tool/software: Linux
Hi,
I am using custom am5708 board and ti-processor-sdk-linux-rt-am57xx-evm-04.03.00.05.
the dts is base on am571x-idk.dts,here is my configuration. it create video0 node successfully, ov5640: camera@3c { compatible = "ovti,ov5640"; pinctrl-names = "default"; pinctrl-0 = <&ov5640_pins_default>; reg = <0x3c>; powerdown-gpios = <&gpio5 18 GPIO_ACTIVE_LOW>; clock-frequency = <24000000>; clocks = <&mclk 0>; clock-names = "mclk"; port { csi2_cam0: endpoint@0 { clock-lanes = <0>; data-lanes = <1 2>; remote-endpoint = <&csi2_phy0>; }; }; }; }; &cal { status = "okay"; }; &csi2_0 { status = "okay"; reg = <0>; csi2_phy0: endpoint@0 { slave-mode; remote-endpoint = <&csi2_cam0>; }; };
here is what i meet,
root@am57xx-evm:~# dmabuftest -s 31:1920x1080 -c 1920x1080@YUYV -d /dev/video1 Opening Display.. using 1 connectors, 1920x1080 display, multiplanar: 1 Setting mode 1920x1080 on connector 31, crtc 34 Opening V4L2.. [ 129.892645] vb2-core: __vb2_queue_alloc: allocated 6 buffers, 1 plane(s) each Exported buffer fd = 6[ 129.900163] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed Exported buffer fd = 8 Exported buffer fd = 10 Exported buffer fd = 12 Exported buffer fd = 14 Exported buffer f[ 129.918002] vb2-core: vb2_core_qbuf: qbuf of buffer 0 succeeded d = 16 [ 129.926169] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed [ 129.943411] vb2-core: vb2_core_qbuf: qbuf of buffer 1 succeeded [ 129.949373] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed [ 129.965899] vb2-core: vb2_core_qbuf: qbuf of buffer 2 succeeded [ 129.971864] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed [ 129.992238] vb2-core: vb2_core_qbuf: qbuf of buffer 3 succeeded [ 129.998205] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed [ 130.014506] vb2-core: vb2_core_qbuf: qbuf of buffer 4 succeeded [ 130.020470] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed [ 130.036833] vb2-core: vb2_core_qbuf: qbuf of buffer 5 succeeded [ 130.042802] func: cal_start_streaming, line: 1666 [ 130.047527] func: cal_start_streaming, line: 1673 [ 130.054363] func: cal_start_streaming, line: 1683 [ 130.059121] func: cal_start_streaming, line: 1686 [ 130.065188] func: cal_start_streaming, line: 1688 [ 130.069972] func: cal_start_streaming, line: 1695 [ 130.078449] func: cal_start_streaming, line: 1697 [ 130.089043] func: csi2_phy_config,line: 1128,ctx->external_rate: 192000000, num_lanes: 2, ctx->fmt->bpp: 16 [ 130.105119] func: cal_start_streaming, line: 1700 [ 130.109844] ov5640_s_stream is running !!! [ 130.121057] func: ov5640_s_stream,temp: 0x0 [ 130.129545] 0x3f0d-func: ov5640_s_stream,temp: 0x0 [ 130.136037] 0x3f0c-func: ov5640_s_stream,temp: 0x0 [ 130.142025] 0x3052-func: ov5640_s_stream,temp: 0x0 [ 130.147192] 0x3213-func: ov5640_s_stream,temp: 0x0 [ 130.153918] func: cal_start_streaming, line: 1708 [ 130.451973] func: cal_start_streaming, line: 1710 [ 130.456710] func: cal_start_streaming, line: 1714 [ 130.466228] func: cal_start_streaming, line: 1716 [ 130.473544] vb2-core: vb2_core_streamon: successful [ 130.478454] vb2-core: __vb2_wait_for_done_vb: will sleep waiting for buffers
[ 129.865746] cal-000: Fourcc format (0x56595559) not found.
[ 129.865761] cal-000: cal_calc_format_size: fourcc: UYVY size: 1920x1080 bpl:3840 img_size:4147200
[ 129.890439] cal-000: __subdev_set_format 1920x1080 code:2006
[ 129.890450] cal-000: cal_calc_format_size: fourcc: UYVY size: 1920x1080 bpl:3840 img_size:4147200
[ 129.892630] cal-000: nbuffers=6, size=4147200
[ 129.892645] vb2-core: __vb2_queue_alloc: allocated 6 buffers, 1 plane(s) each
[ 129.900163] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed
[ 129.918002] vb2-core: vb2_core_qbuf: qbuf of buffer 0 succeeded
[ 129.926169] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed
[ 129.943411] vb2-core: vb2_core_qbuf: qbuf of buffer 1 succeeded
[ 129.949373] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed
[ 129.965899] vb2-core: vb2_core_qbuf: qbuf of buffer 2 succeeded
[ 129.971864] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed
[ 129.992238] vb2-core: vb2_core_qbuf: qbuf of buffer 3 succeeded
[ 129.998205] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed
[ 130.014506] vb2-core: vb2_core_qbuf: qbuf of buffer 4 succeeded
[ 130.020470] vb2-core: __qbuf_dmabuf: buffer for plane 0 changed
[ 130.036833] vb2-core: vb2_core_qbuf: qbuf of buffer 5 succeeded
[ 130.042802] func: cal_start_streaming, line: 1666
[ 130.047527] func: cal_start_streaming, line: 1673
[ 130.054363] func: cal_start_streaming, line: 1683
[ 130.059121] func: cal_start_streaming, line: 1686
[ 130.065182] cal-000: CAL_CSI2_CTX0(1) = 0x00000101
[ 130.065188] func: cal_start_streaming, line: 1688
[ 130.069917] cal-000: CAL_PIX_PROC(1) = 0x000d0015
[ 130.069923] cal-000: CAL_WR_DMA_CTRL(1) = 0x10e04304
[ 130.069930] cal-000: CAL_WR_DMA_OFST(1) = 0x00000f00
[ 130.069935] cal-000: CAL_WR_DMA_XSIZE(1) = 0x0f000000
[ 130.069941] cal-000: CAL_CTRL = 0xff1fe07e
[ 130.069947] cal-000: cy-0x310-CAL_CSI2_COMPLEXIO_IRQENABLE(1) = 0x5fffffff
[ 130.069952] cal-000: cy-0x318-CAL_CSI2_VC_IRQENABLE(1) = 0x3f3f3f3f
[ 130.069957] cal-000: cy-before-lane_config 0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.069963] cal-000: cy-after-lane_config 0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.069967] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x00000321
[ 130.069972] func: cal_start_streaming, line: 1695
[ 130.078449] func: cal_start_streaming, line: 1697
[ 130.088988] cal-000: 757,cy-0x310-CAL_CSI2_COMPLEXIO_IRQENABLE(1) = 0x5fffffff
[ 130.088995] cal-000: 758,cy-0x318-CAL_CSI2_VC_IRQENABLE(1) = 0x3f3f3f3f
[ 130.089001] cal-000: 759,cy-before-phy_enable 0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.089018] cal-000: 762,cy-after-phy_enable 0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.089025] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x40000321 De-assert Complex IO Reset
[ 130.089031] cal-000: 776,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.089036] cal-000: 777,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.089043] func: csi2_phy_config,line: 1128,ctx->external_rate: 192000000, num_lanes: 2, ctx->fmt->bpp: 16
[ 130.103916] cal-000: csi2_ddrclk_khz: 768000
[ 130.103922] cal-000: ths_term: 15 (0x0f)
[ 130.103927] cal-000: ths_settle: 84 (0x54)
[ 130.103933] cal-000: CSI2_0_REG0 = 0x01000f54
[ 130.103940] cal-000: CSI2_0_REG1 = 0xe002e10e
[ 130.103947] cal-000: 789,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.103952] cal-000: 790,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.103957] cal-000: CAL_CSI2_TIMING(1) = 0x00004197 Stop States
[ 130.103964] cal-000: 800,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.103969] cal-000: 801,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.103974] cal-000: CAL_CSI2_TIMING(1) = 0x0000c197 Force RXMODE
[ 130.105103] cal-000: 821,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.105108] cal-000: 822,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.105114] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a000321 Powered UP
[ 130.105119] func: cal_start_streaming, line: 1700
[ 130.109844] ov5640_s_stream is running !!!
[ 130.121057] func: ov5640_s_stream,temp: 0x0
[ 130.129545] 0x3f0d-func: ov5640_s_stream,temp: 0x0
[ 130.136037] 0x3f0c-func: ov5640_s_stream,temp: 0x0
[ 130.142025] 0x3052-func: ov5640_s_stream,temp: 0x0
[ 130.147192] 0x3213-func: ov5640_s_stream,temp: 0x0
[ 130.153918] func: cal_start_streaming, line: 1708
[ 130.439419] cal-000: 851,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.439426] cal-000: 852,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.439433] cal-000: CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a000321 Complex IO Reset Done (250) (timeout)
[ 130.451936] cal-000: 867,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.451944] cal-000: 868,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.451951] cal-000: CAL_CSI2_TIMING(1) = 0x0000c197 Stop State Reached (timeout)
[ 130.451957] cal-000: 874,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.451962] cal-000: 875,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.451968] cal-000: CSI2_0_REG1 = 0xc002e10e (Bit(31,28) should be set!)
[ 130.451973] func: cal_start_streaming, line: 1710
[ 130.456700] cal-000: 1712,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.456705] cal-000: 1713,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.456710] func: cal_start_streaming, line: 1714
[ 130.466228] func: cal_start_streaming, line: 1716
[ 130.473420] cal-000: 1717,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.473426] cal-000: 1718,cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.473432] cal-000: cy-0x300-CAL_CSI2_PPI_CTRL(1) = 0x00000005
[ 130.473437] cal-000: cy-0x304-CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a000321
[ 130.473442] cal-000: cy-0x308-CAL_CSI2_COMPLEXIO_IRQSTATUS(1) = 0x00000000
[ 130.473448] cal-000: cy-0x30c-CAL_CSI2_SHORT_PACKET(1) = 0x00000000
[ 130.473453] cal-000: cy-0x310-CAL_CSI2_COMPLEXIO_IRQENABLE(1) = 0x5fffffff
[ 130.473458] cal-000: cy-0x314-CAL_CSI2_TIMING(1) = 0x0000c197
[ 130.473463] cal-000: cy-0x318-CAL_CSI2_VC_IRQENABLE(1) = 0x3f3f3f3f
[ 130.473467] cal-000: cy-0x328-CAL_CSI2_VC_IRQSTATUS(1) = 0x00000000
[ 130.473472] cal-000: cy-0x330-CAL_CSI2_CTX0(1) = 0x00000101
[ 130.473477] cal-000: cy-0x334-CAL_CSI2_CTX1(1) = 0x00000000
[ 130.473482] cal-000: cy-0x338-CAL_CSI2_CTX2(1) = 0x00000000
[ 130.473486] cal-000: cy-0x33c-CAL_CSI2_CTX3(1) = 0x00000000
[ 130.473491] cal-000: cy-0x340-CAL_CSI2_CTX4(1) = 0x00000000
[ 130.473495] cal-000: cy-0x344-CAL_CSI2_CTX5(1) = 0x00000000
[ 130.473500] cal-000: cy-0x348-CAL_CSI2_CTX6(1) = 0x00000000
[ 130.473504] cal-000: cy-0x34c-CAL_CSI2_CTX7(1) = 0x00000000
[ 130.473509] cal-000: cy-0x350-CAL_CSI2_STATUS0(1) = 0x00000000
[ 130.473513] cal-000: cy-0x354-CAL_CSI2_STATUS1(1) = 0x00000000
[ 130.473517] cal-000: cy-0x358-CAL_CSI2_STATUS2(1) = 0x00000000
[ 130.473521] cal-000: cy-0x35c-CAL_CSI2_STATUS3(1) = 0x00000000
[ 130.473526] cal-000: cy-0x360-CAL_CSI2_STATUS4(1) = 0x00000000
[ 130.473530] cal-000: cy-0x364-CAL_CSI2_STATUS5(1) = 0x00000000
[ 130.473534] cal-000: cy-0x368-CAL_CSI2_STATUS6(1) = 0x00000000
[ 130.473538] cal-000: cy-0x36c-CAL_CSI2_STATUS7(1) = 0x00000000
[ 130.473544] vb2-core: vb2_core_streamon: successful
[ 130.478454] vb2-core: __vb2_wait_for_done_vb: will sleep waiting for buffers
I was enable all the interrupts,but i can't see any wrong interrupt status,and the irq is always zero.
root@am57xx-evm:~# ./irq.sh
370: 0 CBAR 119 Level cal
IPI3: 0 Function call interrupts
Here is my questions:
1.from this log,can i assume handshake success between the CSI2 D-PHY and the actual sensor ?
2.anyway can i debug this?
Thanks
CY