Lautaro Carmona

Adding TVP5147 (Texas Instrument TV Decoder) Support to SBC-i.MX51

Discussion created by Lautaro Carmona on Oct 21, 2011

In order to add TVP5147 TV input support, we have made our own tvp5147 mxc v4l2 driver available to anyone at this site:

We also added the following instructions on how we managed to make it work with SBC-i.MX51.

Hope you found this useful.

Here are the instructions:


In order to include TVP5147 support to our board we needed to:

  • Create the driver: "drivers/media/video/mxc/capture/tvp5147.c"
  • Include the driver's registers header file: "drivers/media/video/mxc/capture/tvp514x_regs.h"
  • Modify the following files:
    • "arch/arm/mach-mx5/mx51_3stack.c"
    • "drivers/media/video/mxc/capture/Makefile"
    • "drivers/media/video/mxc/capture/KConfig"

All this files are uploaded in the SVN trunk of this project:

About the changes in "arch/arm/mach-mx5/mx51_3stack.c":

The modified version of "mx51_3stack.c" is also uploaded in the SVN trunk.
You should check the differences with your own version of "mx51_3stack.c" and then replace it with our version or manually add our changes.
Basically, we:

  • added our device to the "i2c_board_info" struct (with i2c address 0x5c), 
  • defined the powerup, powerdown, reset functions to dinamically control the device power when the driver module is loaded/unloaded, and
  • set the CSI master clock frequency (although we are not currently using it, as we use our own 14.31 MHz clock on board).

About the changes in "drivers/media/video/mxc/capture/Makefile":

To compile our driver and add it to the kernel we added this lines to the file: "drivers/media/video/mxc/capture/Makefile"

#Added to include TVP5147 support:
tvp5147_tvin-objs := tvp5147.o
obj-$(CONFIG_MXC_TVIN_TVP5147) += tvp5147_tvin.o

About the changes in "drivers/media/video/mxc/capture/KConfig":

To make it available at the kernel menuconfig we added this lines to the file: "drivers/media/video/mxc/capture/KConfig"

config MXC_TVIN_TVP5147
tristate "Texas Instrument tvp5147 TV Decoder Input support"
depends on (MACH_MX35_3DS || MACH_MX51_3DS)
If you plan to use the tvp5147 video decoder with your MXC system, say Y here.