From patchwork Mon Apr 8 09:26:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2405911 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id 951303FC71 for ; Mon, 8 Apr 2013 09:32:11 +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 r389S5lw001411; Mon, 8 Apr 2013 04:28:05 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r389S5XV004172; Mon, 8 Apr 2013 04:28:05 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Mon, 8 Apr 2013 04:28:04 -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 r389S4F2029297; Mon, 8 Apr 2013 04:28:04 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 7A01180628; Mon, 8 Apr 2013 04:28:04 -0500 (CDT) 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 B133080626 for ; Mon, 8 Apr 2013 04:28:02 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id r389S2Xm012742 for ; Mon, 8 Apr 2013 04:28:02 -0500 (CDT) Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id r389S1OY001859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Apr 2013 04:28:02 -0500 Received: from [216.82.242.131:36249] by server-1.bemta-8.messagelabs.com id E0/A8-20746-1AD82615; Mon, 08 Apr 2013 09:28:01 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-14.tower-76.messagelabs.com!1365413235!28351546!1 X-Originating-IP: [209.85.210.46] 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 10562 invoked from network); 8 Apr 2013 09:27:16 -0000 Received: from mail-da0-f46.google.com (HELO mail-da0-f46.google.com) (209.85.210.46) by server-14.tower-76.messagelabs.com with RC4-SHA encrypted SMTP; 8 Apr 2013 09:27:16 -0000 Received: by mail-da0-f46.google.com with SMTP id y19so2535912dan.5 for ; Mon, 08 Apr 2013 02:27:14 -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=UGu5aD4cbedkZLfk8C/rss2AexJMW2lLZnYW7OASZ38=; b=tw55g2b3V/ykS4/Tw4UWHv6L/k+Vh6ZKSOQeb9RsrwnaZ60evBmxK2yoIWidpYh6v3 7B0zL2gcO1tksP3aIdQTvigQsoxmEq1+MC/vAHJtX+J9DUbQtZtsdCfhh0QhveHmVO74 eMyAPAKjZjRme43o62bsnY4Ib+oTeiCoIAN7IuGCi3Av7rcw1EY0TLCA8KyM0L90OHO3 qP+O2LlDTaGwCoU0EJlIpuU59Javbnzp1X7gyvm5o8s+BodPXSacROHOrHCP5rAYxZS8 HzHMLvqCCTzCDo6OIyog/GH7pl2rKvdeoWFLMVE4oteu+xOmFk1ViKT4WuE3jMPJrIE+ MlfA== X-Received: by 10.66.154.33 with SMTP id vl1mr35029555pab.60.1365413234669; Mon, 08 Apr 2013 02:27:14 -0700 (PDT) Received: from localhost.localdomain ([59.98.240.77]) by mx.google.com with ESMTPS id qh4sm38051141pac.8.2013.04.08.02.27.11 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 08 Apr 2013 02:27:13 -0700 (PDT) From: Prabhakar lad To: DLOS , LAK Subject: [PATCH v8 2/2] ARM: davinci: dm355 EVM: add support for VPBE display Date: Mon, 8 Apr 2013 14:56:55 +0530 Message-ID: <1365413215-3632-3-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1365413215-3632-1-git-send-email-prabhakar.csengg@gmail.com> References: <1365413215-3632-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));