From patchwork Tue Apr 2 13:15:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2378101 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork2.kernel.org (Postfix) with ESMTP id 6B500DF2A1 for ; Tue, 2 Apr 2013 13:19:32 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r32DFakU005832; Tue, 2 Apr 2013 08:15:36 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r32DFaE6011155; Tue, 2 Apr 2013 08:15:36 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Tue, 2 Apr 2013 08:15:36 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r32DFa2Z012132; Tue, 2 Apr 2013 08:15:36 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 1728D80627; Tue, 2 Apr 2013 07:15:36 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id D4BBD80626 for ; Tue, 2 Apr 2013 07:15:33 -0600 (CST) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id r32DFXis014430 for ; Tue, 2 Apr 2013 08:15:33 -0500 (CDT) Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id r32DFXHA019200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Apr 2013 08:15:33 -0500 Received: from [216.82.242.147:28617] by server-12.bemta-8.messagelabs.com id 05/4D-01647-4F9DA515; Tue, 02 Apr 2013 13:15:32 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-13.tower-95.messagelabs.com!1364908526!18244509!1 X-Originating-IP: [209.85.210.45] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.8.6.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10122 invoked from network); 2 Apr 2013 13:15:27 -0000 Received: from mail-da0-f45.google.com (HELO mail-da0-f45.google.com) (209.85.210.45) by server-13.tower-95.messagelabs.com with RC4-SHA encrypted SMTP; 2 Apr 2013 13:15:27 -0000 Received: by mail-da0-f45.google.com with SMTP id v40so187216dad.18 for ; Tue, 02 Apr 2013 06:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=xzu8teKOWx2xzCtathpumd8r1c/SKu7CGLMACdBjLyo=; b=vY5RaMVAY/cE12hhezOqPae5+7FQ31bLIDaeRXLcTGtzU+49Bscn5DSdJ9AQRgjFdo fQ6h1Er+ReHjEnmcm8WPJvV5TbXHOYTjzK38XoPd4pVN70uhDfGmXdwepizNF3qGAQt7 4qBbNqUevMOHbGHEX3RlgBiK/5pc5/6BvhczDj+xyczL6WylAS2lcD+bHuuXRoH1no63 olrcaaJ0VldRT0veMrYs9nnWMzcPOWzYPY2rwg7Wn68MYECc/YSwxiFEQuXNgLu42qcz rENAjBmykxeafRqwYbIgVaj2GUmh0dLiV43cSVpgrLBV0Y2GI4/30+N8aWN0GgdbLKN9 Feqw== X-Received: by 10.68.198.34 with SMTP id iz2mr23974164pbc.148.1364908526089; Tue, 02 Apr 2013 06:15:26 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id hp1sm2405700pac.3.2013.04.02.06.15.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Apr 2013 06:15:24 -0700 (PDT) From: Prabhakar lad To: DLOS , LAK , Sekhar Nori Subject: [PATCH v7 2/2] ARM: davinci: dm355 EVM: add support for VPBE display Date: Tue, 2 Apr 2013 18:45:04 +0530 Message-ID: <1364908504-14232-3-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1364908504-14232-1-git-send-email-prabhakar.csengg@gmail.com> References: <1364908504-14232-1-git-send-email-prabhakar.csengg@gmail.com> CC: LKML X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com 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 Acked-by: Sekhar Nori --- 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 = {30000, 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));