This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Attaching Micron camera sensor to the OMAP35xx EVM

Other Parts Discussed in Thread: TVP5146

hi,

We are planning to build our own board with a micron MT9T012 sensor and plan to connect it to P18 on the OMAP35xx EVM. I am trying to figure out how I would make the kernal recognise this new I2C device on the I2C3 bus?

And how I get my sensor driver to connect to this I2C device?

The docs with the EVM talk about the TVP5146 with is also a I2C device. So what i am trying to do is similar to this. I can't figure out how the kernel recognises the TVP5146 either.

Thanks!

 

  • One way to do this is to pass kernel configuration parameters via u-boot to choose among TVP5146 and CCD connector (e.g. P18); this approach is taken on our DM355 EVM and will likely be implemented in OMAP35x if a CCD sensor solution is implemented on this platform (assuming it has not been already).

    The u-boot configuration parameters are passed to V4L2 kernel driver which initializes to appropriate i2c device (TVP5146 or MT9012 via P8).

    Of course, in your final design, you probrably will not need to have a choice among two i2c capture devices and hence can do away with one of them as well as the need to pass u-boot configuration parameters; your capture driver (V4L2 is a standardized video capture interface in Linux) simply initializes the i2c capture device you choose for your final design.

  • Ok Thanks for the reply.

    Though I guess I am still a littel confused about the "new  style" I2C driver model. Specifically, there is a the mt9p012.c/.h files tha implement "new style" i2C driver in the OMAP35xx source code. When does the kernel call the probe() function for the registered mt9p012 i2c driver? The documentation says there must be a list somehwere in the kernal specifying the i2c devices present on the board or through u-boot. Is there an example of a "new style" device driver in the source code for the omap that I can use to undertand how this "linux driver model" works?

    I configured the kernal to include the OMAP3 camers support and the MT9P012 diriver hoping that these would link up as master and slave V4L2 drivers. But the probe function for the MT9012 driver never gets called. What do I have to do to make the kernel call the probe fucntion for MT9P012. Though the probe fucntion for the OMAP3 camera support driver gets called. What is the difference between these two drivers?

    Thanks!

  • mmm, I am not up to speed with our OMAP software quite yet and hence cannot comment on the "new style"; however, probe is a standard linux driver entry point that is normally colled during driver loading/initialization stage.  It is normally called by Linux core when a device of a paritcular type (handled by that driver) is detected.  For example, i2c probe function can be called whenever Linux core determines a new i2c device is present (sounds line the "new style" model you are referring to).  Of course, you can change software to do anything you want, so care must be taken.  For instance, you can have V4L2 driver (acting as Linux core) check to see if i2c device (mt9p012) is present and only calling corresponding probe function if device is present.  I am not familiar enough with OMAP software (do not have it installed) to say for sure, but hopefully the explanation above will help point you where to look.