ADV7281M driver

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

ADV7281M driver

1,474 Views
yurykocherov
Contributor II

Hello!

I am trying to get CSI video from ADV7281M on UDOO Quad board (iMX6Q). I found "adv7280_mipi_csi2_tvin.c" in the kernel sources and plug it in the config.

Then I found that the initial code for UDOO does not manage ADV7280, so I have added necessary code. Right now I see that ADV7280 driver registered by system (probe function called), but there is no /dev/videoX file for my ADV7280 instance. I guess the reason is "adv7280_mipi_csi2_tvin.c" provides only I2C registration... not V4L.

I found that another board (mx6q sabreauto ???) also uses ADV7280, but it is not clear how...

So there are questions:

- how to use ADV7280 without V4L?

- is anyone uses ADV7280 and have working driver?

/Regards, Yury.

Labels (4)
Tags (3)
0 Kudos
Reply
1 Reply

636 Views
yurykocherov
Contributor II

Update:

Well, I have updated "adv7280_mipi_csi2_tvin" (I have added V4L2 routines to it). But unfortunately I always have (even with free run mode):

- ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0

I think the issue with my MIPI CSI settings...

Does anybody have any suggestions what is wrong?

Regards, Yury.

P/s/

I have enabled debug output in the sources, and below some registers values:

[14733.494029] ADV7280: Dbg: mipi_csi2_dphy_status = 0x0200
[14733.518942] ADV7280: Dbg: mipi_csi2_dphy_status = 0x0210
[14733.524270] ADV7280: Dbg: mipi_csi2_get_error1 = 0x0000
[14733.529545] ADV7280: Dbg: mipi_csi2_get_error1 = 0x0000
[14733.534783] ADV7280: Dbg: mipi_csi2_get_error2 = 0x0000
[14733.540109] ADV7280: Dbg: mipi_csi2_get_error2 = 0x0000

[14733.549498]    clock_curr=mclk=0

[14733.558335]    g_fmt_cap returns widthxheight of input as 720 x 525

[14733.558366] imx-ipuv3 imx-ipuv3.0: CSI_SENS_CONF = 0x00000A20
[14733.558385] imx-ipuv3 imx-ipuv3.0: CSI_ACT_FRM_SIZE = 0x01DF02CF
[14733.558408] In MVC:mxc_v4l_ioctl
[14733.558423] In MVC: mxc_v4l_do_ioctl c0cc5605
[14733.558436]    case VIDIOC_S_FMT
[14733.558445] In MVC: mxc_v4l2_s_fmt
[14733.558456]    type=V4L2_BUF_TYPE_VIDEO_CAPTURE

[14733.562361] End of mxc_v4l2_s_fmt: v2f pix widthxheight 720 x 480

[14733.562381] End of mxc_v4l2_s_fmt: crop_bounds widthxheight 720 x 525
[14733.562400] End of mxc_v4l2_s_fmt: crop_defrect widthxheight 720 x 525
[14733.562417] End of mxc_v4l2_s_fmt: crop_current widthxheight 720 x 480
[14733.562437] In MVC:mxc_v4l_ioctl
[14733.562452] In MVC: mxc_v4l_do_ioctl c0cc5604
[14733.562465]    case VIDIOC_G_FMT
[14733.562477] In MVC: mxc_v4l2_g_fmt type=1
[14733.562489]    type is V4L2_BUF_TYPE_VIDEO_CAPTURE
[14733.562505] End of mxc_v4l2_g_fmt: v2f pix widthxheight 720 x 480
[14733.562522] End of mxc_v4l2_g_fmt: crop_bounds widthxheight 720 x 525
[14733.562540] End of mxc_v4l2_g_fmt: crop_defrect widthxheight 720 x 525
[14733.562557] End of mxc_v4l2_g_fmt: crop_current widthxheight 720 x 480
[14733.562575] In MVC:mxc_v4l_ioctl
[14733.562588] In MVC: mxc_v4l_do_ioctl c0145608
[14733.562601]    case VIDIOC_REQBUFS
[14733.562612] In MVC:mxc_streamoff
[14733.562624] MVC: In mxc_free_frame_buf
[14733.562639] In MVC:mxc_allocate_frame_buf - size=691200
[14733.610562] In MVC:mxc_v4l_ioctl
[14733.610574] In MVC: mxc_v4l_do_ioctl c0445609
[14733.610581]    case VIDIOC_QUERYBUF
[14733.610586] In MVC:mxc_v4l2_buffer_status
[14733.610599] In MVC:mxc_mmap
[14733.610606]    pgoff=0x18900, start=0x2b254000, end=0x2b2fd000
[14733.611286] In MVC:mxc_v4l_ioctl
[14733.611293] In MVC: mxc_v4l_do_ioctl c0445609
[14733.611299]    case VIDIOC_QUERYBUF
[14733.611303] In MVC:mxc_v4l2_buffer_status
[14733.611313] In MVC:mxc_mmap
[14733.611319]    pgoff=0x18000, start=0x2b32a000, end=0x2b3d3000
[14733.611989] In MVC:mxc_v4l_ioctl
[14733.611996] In MVC: mxc_v4l_do_ioctl c0445609
[14733.612001]    case VIDIOC_QUERYBUF
[14733.612005] In MVC:mxc_v4l2_buffer_status
[14733.612014] In MVC:mxc_mmap
[14733.612021]    pgoff=0x18100, start=0x2b496000, end=0x2b53f000
[14733.612695] In MVC:mxc_v4l_ioctl
[14733.612702] In MVC: mxc_v4l_do_ioctl c044560f
[14733.612707]    case VIDIOC_QBUF
[14733.612713] In MVC:mxc_v4l_ioctl
[14733.612718] In MVC: mxc_v4l_do_ioctl c044560f
[14733.612723]    case VIDIOC_QBUF
[14733.612728] In MVC:mxc_v4l_ioctl
[14733.612733] In MVC: mxc_v4l_do_ioctl c044560f
[14733.612737]    case VIDIOC_QBUF
[14733.612742] In MVC:mxc_v4l_ioctl
[14733.612747] In MVC: mxc_v4l_do_ioctl 40045612
[14733.612751]    case VIDIOC_STREAMON
[14733.612756] In MVC:mxc_streamon
[14733.615714] YUYV
[14733.615730] imx-ipuv3 imx-ipuv3.0: init channel = 19
[14733.615747] imx-ipuv3 imx-ipuv3.0: resizing from 480 -> 480 pixels, downsize=0, resize=1.0 (reg=8192)
[14733.615759] imx-ipuv3 imx-ipuv3.0: resizing from 720 -> 720 pixels, downsize=0, resize=1.0 (reg=8192)
[14733.615773] imx-ipuv3 imx-ipuv3.0: initializing idma ch 20 @ c08c0500
[14733.615794] imx-ipuv3 imx-ipuv3.0: ch 20 word 0 - 00000000 00000000 00000000 E0001800 00077C59
[14733.615806] imx-ipuv3 imx-ipuv3.0: ch 20 word 1 - 031C0000 00638000 2103C000 000167C0 00000000
[14733.615814] imx-ipuv3 imx-ipuv3.0: PFS 0x8,
[14733.615820] imx-ipuv3 imx-ipuv3.0: BPP 0x3,
[14733.615826] imx-ipuv3 imx-ipuv3.0: NPB 0xf
[14733.615833] imx-ipuv3 imx-ipuv3.0: FW 719,
[14733.615839] imx-ipuv3 imx-ipuv3.0: FH 479,
[14733.615846] imx-ipuv3 imx-ipuv3.0: EBA0 0x18e00000
[14733.615852] imx-ipuv3 imx-ipuv3.0: EBA1 0x18e00000
[14733.615859] imx-ipuv3 imx-ipuv3.0: Stride 1439
[14733.615865] imx-ipuv3 imx-ipuv3.0: scan_order 0
[14733.615871] imx-ipuv3 imx-ipuv3.0: uv_stride 0
[14733.615878] imx-ipuv3 imx-ipuv3.0: u_offset 0x0
[14733.615884] imx-ipuv3 imx-ipuv3.0: v_offset 0x0
[14733.615890] imx-ipuv3 imx-ipuv3.0: Width0 0+1,
[14733.615896] imx-ipuv3 imx-ipuv3.0: Width1 0+1,
[14733.615902] imx-ipuv3 imx-ipuv3.0: Width2 0+1,
[14733.615908] imx-ipuv3 imx-ipuv3.0: Width3 0+1,
[14733.615914] imx-ipuv3 imx-ipuv3.0: Offset0 0,
[14733.615920] imx-ipuv3 imx-ipuv3.0: Offset1 0,
[14733.615926] imx-ipuv3 imx-ipuv3.0: Offset2 0,
[14733.615932] imx-ipuv3 imx-ipuv3.0: Offset3 0
[14733.615944] eba 18900000
[14733.615951] eba 18000000
[14733.616268] In MVC:mxc_v4l_ioctl
[14733.616277] In MVC: mxc_v4l_do_ioctl 80085617
[14733.616283]    case VIDIOC_G_STD
[14733.616287] In mxc_v4l2_g_std

[14733.631804] In MVC:mxc_v4l_ioctl

[14733.631811] In MVC: mxc_v4l_do_ioctl c0445611
[14733.631816]    case VIDIOC_DQBUF
[14733.631821] In MVC:mxc_v4l_dqueue
[14733.631829] imx-ipuv3 imx-ipuv3.0: IPU_CONF =     0x10000665
[14733.631837] imx-ipuv3 imx-ipuv3.0: IDMAC_CONF =     0x0000002F
[14733.631845] imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_EN1 =     0x00900000
[14733.631852] imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_EN2 =     0x00000000
[14733.631860] imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_PRI1 =     0x18800001
[14733.631868] imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_PRI2 =     0x00000000
[14733.631875] imx-ipuv3 imx-ipuv3.0: IDMAC_BAND_EN1 =     0x00000000
[14733.631882] imx-ipuv3 imx-ipuv3.0: IDMAC_BAND_EN2 =     0x00000000
[14733.631890] imx-ipuv3 imx-ipuv3.0: IPU_CHA_DB_MODE_SEL0 =     0x00100000
[14733.631897] imx-ipuv3 imx-ipuv3.0: IPU_CHA_DB_MODE_SEL1 =     0x00000000
[14733.631905] imx-ipuv3 imx-ipuv3.0: IPU_CHA_TRB_MODE_SEL0 =     0x00800000
[14733.631913] imx-ipuv3 imx-ipuv3.0: IPU_CHA_TRB_MODE_SEL1 =     0x00000000
[14733.631921] imx-ipuv3 imx-ipuv3.0: DMFC_WR_CHAN =     0x00000090
[14733.631928] imx-ipuv3 imx-ipuv3.0: DMFC_WR_CHAN_DEF =     0x202020F6
[14733.631935] imx-ipuv3 imx-ipuv3.0: DMFC_DP_CHAN =     0x000096CA
[14733.631943] imx-ipuv3 imx-ipuv3.0: DMFC_DP_CHAN_DEF =     0x2020F6F6
[14733.631950] imx-ipuv3 imx-ipuv3.0: DMFC_IC_CTRL =     0x00000002

[14733.631958] imx-ipuv3 imx-ipuv3.0: IPU_FS_PROC_FLOW1 =     0x00000000

[14733.631965] imx-ipuv3 imx-ipuv3.0: IPU_FS_PROC_FLOW2 =     0x00000000

[14733.631972] imx-ipuv3 imx-ipuv3.0: IPU_FS_PROC_FLOW3 =     0x00000000

[14733.631981] imx-ipuv3 imx-ipuv3.0: IPU_FS_DISP_FLOW1 =     0x00000000

[14733.631988] imx-ipuv3 imx-ipuv3.0: IPU_VDIC_VDI_FSIZE =     0x00000000

[14733.631996] imx-ipuv3 imx-ipuv3.0: IPU_VDIC_VDI_C =     0x00000000

[14733.632003] imx-ipuv3 imx-ipuv3.0: IPU_IC_CONF =     0x00000001

[14733.632010] imx-ipuv3 imx-ipuv3.0: IPU1_INT_STAT_1 =     0x00800000

[14733.632018] imx-ipuv3 imx-ipuv3.0: CSI_SENS_CONF = 0x02000A20

[14733.632025] imx-ipuv3 imx-ipuv3.0: CSI_ACT_FRM_SIZE = 0x01DF02CF

[14733.632033] imx-ipuv3 imx-ipuv3.0: CSI_SENS_FRM_SIZE =     0x020C02CF

[14733.632040] imx-ipuv3 imx-ipuv3.0: CSI_MIPI_DI =     0xFFFFFF1E


... timeout here ...


[14743.629028] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0

[14743.635563] In MVC:mxc_v4l_ioctl

[14743.635580] In MVC: mxc_v4l_do_ioctl 40045613

[14743.635593]    case VIDIOC_STREAMOFF

[14743.635604] In MVC:mxc_streamoff

[14744.129050] imx-ipuv3 imx-ipuv3.0: CSI stop timeout - 5 * 10ms

[14744.129355] In MVC:mxc_free_frames

[14744.130914] In MVC:mxc_v4l_close

[14744.130930] In MVC:mxc_streamoff

[14744.135823] mxc_v4l_close: release resource

[14744.135842] MVC: In mxc_free_frame_buf

[14744.136607] In MVC:mxc_free_frames

0 Kudos
Reply