aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/board-dm365-evm.c
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2010-02-01 17:38:53 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-02-04 16:28:46 -0500
commitf2a4c59df62f4493c7cf7dfd349ec66bdd4b9fec (patch)
tree179a5d04ef3034d82da2299ef2478e05bd5247f2 /arch/arm/mach-davinci/board-dm365-evm.c
parentabe94c756c08d50566c09a65b9c7fe72f83071c5 (diff)
DaVinci - Adding platform & board changes for vpfe capture on DM365
This patch adds following changes:- 1) add sub device configuration data for TVP5146 used by vpfe capture 2) registers platform devices for vpfe_capture, isif and vpss 3) defines hardware resources for the devices listed under 2) 4) defines clock aliase for isif driver 5) adding setup_pinmux() for isif Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-dm365-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index b476395d2cd4..38e9033d2e86 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -37,6 +37,8 @@
37#include <mach/nand.h> 37#include <mach/nand.h>
38#include <mach/keyscan.h> 38#include <mach/keyscan.h>
39 39
40#include <media/tvp514x.h>
41
40static inline int have_imager(void) 42static inline int have_imager(void)
41{ 43{
42 /* REVISIT when it's supported, trigger via Kconfig */ 44 /* REVISIT when it's supported, trigger via Kconfig */
@@ -306,6 +308,73 @@ static void dm365evm_mmc_configure(void)
306 davinci_cfg_reg(DM365_SD1_DATA0); 308 davinci_cfg_reg(DM365_SD1_DATA0);
307} 309}
308 310
311static struct tvp514x_platform_data tvp5146_pdata = {
312 .clk_polarity = 0,
313 .hs_polarity = 1,
314 .vs_polarity = 1
315};
316
317#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
318/* Inputs available at the TVP5146 */
319static struct v4l2_input tvp5146_inputs[] = {
320 {
321 .index = 0,
322 .name = "Composite",
323 .type = V4L2_INPUT_TYPE_CAMERA,
324 .std = TVP514X_STD_ALL,
325 },
326 {
327 .index = 1,
328 .name = "S-Video",
329 .type = V4L2_INPUT_TYPE_CAMERA,
330 .std = TVP514X_STD_ALL,
331 },
332};
333
334/*
335 * this is the route info for connecting each input to decoder
336 * ouput that goes to vpfe. There is a one to one correspondence
337 * with tvp5146_inputs
338 */
339static struct vpfe_route tvp5146_routes[] = {
340 {
341 .input = INPUT_CVBS_VI2B,
342 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
343 },
344{
345 .input = INPUT_SVIDEO_VI2C_VI1C,
346 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
347 },
348};
349
350static struct vpfe_subdev_info vpfe_sub_devs[] = {
351 {
352 .name = "tvp5146",
353 .grp_id = 0,
354 .num_inputs = ARRAY_SIZE(tvp5146_inputs),
355 .inputs = tvp5146_inputs,
356 .routes = tvp5146_routes,
357 .can_route = 1,
358 .ccdc_if_params = {
359 .if_type = VPFE_BT656,
360 .hdpol = VPFE_PINPOL_POSITIVE,
361 .vdpol = VPFE_PINPOL_POSITIVE,
362 },
363 .board_info = {
364 I2C_BOARD_INFO("tvp5146", 0x5d),
365 .platform_data = &tvp5146_pdata,
366 },
367 },
368};
369
370static struct vpfe_config vpfe_cfg = {
371 .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
372 .sub_devs = vpfe_sub_devs,
373 .i2c_adapter_id = 1,
374 .card_name = "DM365 EVM",
375 .ccdc = "ISIF",
376};
377
309static void __init evm_init_i2c(void) 378static void __init evm_init_i2c(void)
310{ 379{
311 davinci_init_i2c(&i2c_pdata); 380 davinci_init_i2c(&i2c_pdata);
@@ -497,6 +566,8 @@ static struct davinci_uart_config uart_config __initdata = {
497 566
498static void __init dm365_evm_map_io(void) 567static void __init dm365_evm_map_io(void)
499{ 568{
569 /* setup input configuration for VPFE input devices */
570 dm365_set_vpfe_config(&vpfe_cfg);
500 dm365_init(); 571 dm365_init();
501} 572}
502 573