From patchwork Fri Mar 22 08:09:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2318551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1745B400E6 for ; Fri, 22 Mar 2013 08:18:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIx3Z-0008PB-UI; Fri, 22 Mar 2013 08:10:34 +0000 Received: from mail-pb0-f45.google.com ([209.85.160.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIx32-0008H2-09 for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2013 08:10:02 +0000 Received: by mail-pb0-f45.google.com with SMTP id ro8so2899744pbb.18 for ; Fri, 22 Mar 2013 01:09:56 -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=fm44wNR+X/ESlh6BRqg+8W2YUEGwI49uAlsT+ywOHEfdtscOb3VUI4EngfF6RTtvEC BWROJmlIDkOinSm2m0WhK3+J/rZ9I9H/tvxPujo4aBSP9LOnkBw280RgwkZZ2dzf4puv gpm+/T6kRJwnXZ0C4Gx3Trak6djUz3V0PJhVeQsVL5lOxWEf7fGz3SPd8/5xX/RChkns 4TmNQFLKDxUEU6Djpf0uZ6eCboN8pb04mBHbhwn/gPPyVmV4awZg3w8ijYRPhxx48+U2 ZrD9Zhg8TkXGuXalJ/QmpJTAhQbQL2JO+2ibBafGTdBpKc1KpTbCgwU7Zcx8uijh9Kkz 1M5A== X-Received: by 10.68.48.168 with SMTP id m8mr1202971pbn.138.1363939796633; Fri, 22 Mar 2013 01:09:56 -0700 (PDT) Received: from localhost.localdomain ([59.98.241.192]) by mx.google.com with ESMTPS id tm1sm1534025pbc.11.2013.03.22.01.09.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 22 Mar 2013 01:09:55 -0700 (PDT) From: Prabhakar lad To: DLOS , LAK , Sekhar Nori Subject: [PATCH v6 2/2] ARM: davinci: dm355 EVM: add support for VPBE display Date: Fri, 22 Mar 2013 13:39:29 +0530 Message-Id: <1363939769-22506-3-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1363939769-22506-1-git-send-email-prabhakar.csengg@gmail.com> References: <1363939769-22506-1-git-send-email-prabhakar.csengg@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130322_041000_158167_908B8D97 X-CRM114-Status: GOOD ( 14.19 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.45 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (prabhakar.csengg[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: "Lad, Prabhakar" , LKML X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 = {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));