Commit 478893c4 authored by Jean-Paul Saman's avatar Jean-Paul Saman

VFPE capture driver support for Neuros OSD 2.

parent 08cfadd9
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/videodev2.h>
#include <media/tvp514x.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -178,6 +181,82 @@ static struct platform_device ntosd2_leds_dev = { ...@@ -178,6 +181,82 @@ static struct platform_device ntosd2_leds_dev = {
}, },
}; };
static struct tvp514x_platform_data tvp5146_pdata = {
.clk_polarity = 0,
.hs_polarity = 1,
.vs_polarity = 1
};
/* Inputs available at the TVP5146 */
static struct v4l2_input tvp5146_inputs[] = {
{
.index = 0,
.name = "Composite-rear",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 2,
.tuner = 0,
.std = V4L2_STD_ALL,
},
{
.index = 1,
.name = "Composite-front",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 2,
.tuner = 0,
.std = V4L2_STD_ALL,
},
{
.index = 2,
.name = "Component",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 2,
.tuner = 0,
.std = V4L2_STD_ALL,
},
};
/*
* this is the route info for connecting each input to decoder
* ouput that goes to vpfe. There is a one to one correspondence
* with ntosd2_vpfe_inputs
*/
static struct vpfe_route tvp5146_routes[] = {
{
.input = INPUT_CVBS_VI2B,
.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
},
{
.input = INPUT_SVIDEO_VI2C_VI1C,
.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
},
};
static struct vpfe_subdev_info ntosd2_vpfe_sub_devs[] = {
{
.name = "tvp5146",
.grp_id = 0,
.num_inputs = ARRAY_SIZE(tvp5146_inputs),
.inputs = tvp5146_inputs,
.routes = tvp5146_routes,
.can_route = 1,
.ccdc_if_params = {
.if_type = VPFE_BT656,
.hdpol = VPFE_PINPOL_POSITIVE,
.vdpol = VPFE_PINPOL_POSITIVE,
},
.board_info = {
I2C_BOARD_INFO("tvp5146", 0x5d),
.platform_data = &tvp5146_pdata,
},
},
};
static struct vpfe_config ntosd2_vpfe_cfg = {
.num_subdevs = ARRAY_SIZE(ntosd2_vpfe_sub_devs),
.sub_devs = ntosd2_vpfe_sub_devs,
.card_name = "DM6446 EVM",
.ccdc = "DM6446 CCDC",
};
static struct platform_device *davinci_ntosd2_devices[] __initdata = { static struct platform_device *davinci_ntosd2_devices[] __initdata = {
&davinci_fb_device, &davinci_fb_device,
...@@ -190,6 +269,7 @@ static struct davinci_uart_config uart_config __initdata = { ...@@ -190,6 +269,7 @@ static struct davinci_uart_config uart_config __initdata = {
static void __init davinci_ntosd2_map_io(void) static void __init davinci_ntosd2_map_io(void)
{ {
dm644x_set_vpfe_config(&ntosd2_vpfe_cfg);
dm644x_init(); dm644x_init();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment