[PATCH v5 2/2] ARM: davinci: dm355 EVM: add support for VPBE display
From: Lad, Prabhakar add support for V4L2 video display to DM355 EVM. Support for SD modes is provided, along with Composite output Signed-off-by: Lad, Prabhakar --- arch/arm/mach-davinci/board-dm355-evm.c | 69 ++- 1 files changed, 68 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 37d12cc..1043506 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -242,6 +242,73 @@ static struct vpfe_config vpfe_cfg = { .ccdc = "DM355 CCDC", }; +/* venc standards timings */ +static struct vpbe_enc_mode_info dm355evm_enc_preset_timing[] = { + { + .name = "ntsc", + .timings_type = VPBE_ENC_STD, + .std_id = V4L2_STD_525_60, + .interlaced = 1, + .xres = 720, + .yres = 480, + .aspect = {11, 10}, + .fps= {3, 1001}, + .left_margin= 0x79, + .upper_margin = 0x10, + }, + { + .name = "pal", + .timings_type = VPBE_ENC_STD, + .std_id = V4L2_STD_625_50, + .interlaced = 1, + .xres = 720, + .yres = 576, + .aspect = {54, 59}, + .fps= {25, 1}, + .left_margin= 0x7E, + .upper_margin = 0x16 + }, +}; + +#define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) + +/* + * The outputs available from VPBE + ecnoders. Keep the + * the order same as that of encoders. First those from venc followed by that + * from encoders. Index in the output refers to index on a particular encoder. + * Driver uses this index to pass it to encoder when it supports more than + * one output. Application uses index of the array to set an output. + */ +static struct vpbe_output dm355evm_vpbe_outputs[] = { + { + .output = { + .index = 0, + .name = "Composite", + .type = V4L2_OUTPUT_TYPE_ANALOG, + .std= VENC_STD_ALL, + .capabilities = V4L2_OUT_CAP_STD, + }, + .subdev_name= DM355_VPBE_VENC_SUBDEV_NAME, + .default_mode = "ntsc", + .num_modes = ARRAY_SIZE(dm355evm_enc_preset_timing), + .modes = dm355evm_enc_preset_timing, + .if_params = V4L2_MBUS_FMT_FIXED, + }, +}; + +static struct vpbe_config dm355evm_display_cfg = { + .module_name= "dm355-vpbe-display", + .i2c_adapter_id = 1, + .osd= { + .module_name= DM355_VPBE_OSD_SUBDEV_NAME, + }, + .venc = { + .module_name= DM355_VPBE_VENC_SUBDEV_NAME, + }, + .num_outputs= ARRAY_SIZE(dm355evm_vpbe_outputs), + .outputs= dm355evm_vpbe_outputs, +}; + static struct platform_device *davinci_evm_devices[] __initdata = { _dm9000, _nand_device, @@ -342,7 +409,7 @@ static __init void dm355_evm_init(void) davinci_setup_mmc(0, _mmc_config); davinci_setup_mmc(1, _mmc_config); - dm355_init_video(_cfg, NULL); + dm355_init_video(_cfg, _display_cfg); dm355_init_spi0(BIT(0), dm355_evm_spi_info, ARRAY_SIZE(dm355_evm_spi_info)); -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v5 2/2] ARM: davinci: dm355 EVM: add support for VPBE display
From: Lad, Prabhakar prabhakar.cse...@gmail.com add support for V4L2 video display to DM355 EVM. Support for SD modes is provided, along with Composite output Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- arch/arm/mach-davinci/board-dm355-evm.c | 69 ++- 1 files changed, 68 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 37d12cc..1043506 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -242,6 +242,73 @@ static struct vpfe_config vpfe_cfg = { .ccdc = DM355 CCDC, }; +/* venc standards timings */ +static struct vpbe_enc_mode_info dm355evm_enc_preset_timing[] = { + { + .name = ntsc, + .timings_type = VPBE_ENC_STD, + .std_id = V4L2_STD_525_60, + .interlaced = 1, + .xres = 720, + .yres = 480, + .aspect = {11, 10}, + .fps= {3, 1001}, + .left_margin= 0x79, + .upper_margin = 0x10, + }, + { + .name = pal, + .timings_type = VPBE_ENC_STD, + .std_id = V4L2_STD_625_50, + .interlaced = 1, + .xres = 720, + .yres = 576, + .aspect = {54, 59}, + .fps= {25, 1}, + .left_margin= 0x7E, + .upper_margin = 0x16 + }, +}; + +#define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) + +/* + * The outputs available from VPBE + ecnoders. Keep the + * the order same as that of encoders. First those from venc followed by that + * from encoders. Index in the output refers to index on a particular encoder. + * Driver uses this index to pass it to encoder when it supports more than + * one output. Application uses index of the array to set an output. + */ +static struct vpbe_output dm355evm_vpbe_outputs[] = { + { + .output = { + .index = 0, + .name = Composite, + .type = V4L2_OUTPUT_TYPE_ANALOG, + .std= VENC_STD_ALL, + .capabilities = V4L2_OUT_CAP_STD, + }, + .subdev_name= DM355_VPBE_VENC_SUBDEV_NAME, + .default_mode = ntsc, + .num_modes = ARRAY_SIZE(dm355evm_enc_preset_timing), + .modes = dm355evm_enc_preset_timing, + .if_params = V4L2_MBUS_FMT_FIXED, + }, +}; + +static struct vpbe_config dm355evm_display_cfg = { + .module_name= dm355-vpbe-display, + .i2c_adapter_id = 1, + .osd= { + .module_name= DM355_VPBE_OSD_SUBDEV_NAME, + }, + .venc = { + .module_name= DM355_VPBE_VENC_SUBDEV_NAME, + }, + .num_outputs= ARRAY_SIZE(dm355evm_vpbe_outputs), + .outputs= dm355evm_vpbe_outputs, +}; + static struct platform_device *davinci_evm_devices[] __initdata = { dm355evm_dm9000, davinci_nand_device, @@ -342,7 +409,7 @@ static __init void dm355_evm_init(void) davinci_setup_mmc(0, dm355evm_mmc_config); davinci_setup_mmc(1, dm355evm_mmc_config); - dm355_init_video(vpfe_cfg, NULL); + dm355_init_video(vpfe_cfg, dm355evm_display_cfg); dm355_init_spi0(BIT(0), dm355_evm_spi_info, ARRAY_SIZE(dm355_evm_spi_info)); -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/