mipi camera driver

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

mipi camera driver

Jump to solution
2,673 Views
ludovicleau-mer
Contributor III

Hi freescale community.

I try to create a new mipi driver for a custom mipi camera.

some informations :

I use the sabrelite platform

the sensor not use i2c, all configuration are static in camera.

I use the ov5640 driver to create my driver.

I fix IPU=1 CSI=0 and VC=2

i set 4 lanes

First i fix the sensor clock to 999MHz or 198MHz for testing several frequence values.

and i change the reset function in mxc_mipi_csi2.c file :

I have found in this community the registry value :

by exemple 0x44 => 198MHz or 0x74 => 999MHz also i modify :

in mipi_csi2_reset() function the line :

mipi_csi2_write(info, value, MIPI_CSI2_PHY_TST_CTRL1); with value is 0x44 (is the defautl value in original code) or 0x74

i load driver and start gstreamer for testing :

the debug show :

// information from mipi_csi2_info

cfg clock rate: 27000000

dphy clock rate: 198000000

pixel clock rate: 396000000

mipi_reset() Now Using 4 lanes // i set 4 lane

mipi_csi2_reset_clock() clock = 0044 (hex) // here i force the dphy clock, this function replace the original mipi_csi2_reset() for changing dphy clock

mipi_reset() after reset clock

// after the reset i get the mipi info struct, (here there are no change when i use 0x74, dphy clock must be 999000000 MHz)

// Also i continue my test with only 198MHz. (0x44)

cfg clock rate: 27000000

dphy clock rate: 198000000

pixel clock rate: 396000000

// here i check the mipi_csi2_dphy_status

mipi_wait()

mipi_wait() 0 mipi csi2 dphy status 200

mipi_wait() 1 mipi csi2 dphy status 2f0

mipi_wait() 0 mipi csi2 err1 0

mipi_wait() 0 mipi csi2 err2 0

I need help for understand why my dphy status is 2F0 and there are 0 for CSI_ERR1 and CSI_ERR2 ?

Normally i will found dphy status = 0x300 or 0x330

thanks for your help.

Tags (3)
0 Kudos
Reply
1 Solution
1,371 Views
ludovicleau-mer
Contributor III

Hi community,

i have read in thread : Re: imx6q sabre AI board MIPI camera. that the GaoJianzhong said :

You must initialize the i.mx6’s MIPI module firstly,

And then turn on the camera to output the mipi signal.

Is it still true ? because the message is posted in 2013. It is a feature of mipi ?

For information i use the kernel boundary-imx_3.10.17_1.0.2_ga

In my case camera is autonomous and it is started before i load module.

Regards

View solution in original post

0 Kudos
Reply
3 Replies
1,372 Views
ludovicleau-mer
Contributor III

Hi community,

i have read in thread : Re: imx6q sabre AI board MIPI camera. that the GaoJianzhong said :

You must initialize the i.mx6’s MIPI module firstly,

And then turn on the camera to output the mipi signal.

Is it still true ? because the message is posted in 2013. It is a feature of mipi ?

For information i use the kernel boundary-imx_3.10.17_1.0.2_ga

In my case camera is autonomous and it is started before i load module.

Regards

0 Kudos
Reply
1,371 Views
ludovicleau-mer
Contributor III

Ok for this probleme : "You must initialize the i.mx6’s MIPI module firstly," is true. After many change in my code i retriee the dphy stauts 3F0 or 300.

0 Kudos
Reply
1,371 Views
dehuanxin
Contributor III

Hi, ludovic

What clock and data pin output do you configure the camera to output before you initialize mipi dphy?

Do you set the camera output (data and clock) to HI-Z, or 0 (0V), or 1(1.2V)?

0 Kudos
Reply