From patchwork Tue Feb 21 15:49:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9584963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25501600C1 for ; Tue, 21 Feb 2017 15:54:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1243128304 for ; Tue, 21 Feb 2017 15:54:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0709A28613; Tue, 21 Feb 2017 15:54:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B04CD28304 for ; Tue, 21 Feb 2017 15:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2T5eg3/ySNLwhqW/cjJ++ElwlqsXKbFmqD9Y4nt6PTo=; b=hZp5tbhrwe1ytwLF/4TLNnrLjs AYWjo+7xm5aTpWXCobVPOpt/GeR/Byru9KbzTSCF1sHbyP15l5n8i2g2bSionDDWeHjPQSFo6MZz9 r6yur+yHrGyPhSmb39yLHtrN7jUDBKZPoE91oBIgenkY7yGmZg0WsjPGYA+LBvU9ff5EnR+Piq0xH 9wqlKpD7UyttqhWFyPa3FM5bJI28gcFppOm0oUZoVU/UFX0mX2JT6XSxy6oohBhbEX9PqiCak497S EeaQZT9wOgoFJVEDR7t+mih26aFl6jkIRR/dfghPT/et1AOTADppsFhkRI33kAbz36J1VDmk04PJ9 l5dTQh2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cgClm-0002gF-E5; Tue, 21 Feb 2017 15:54:26 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgChx-0008ID-R1 for linux-arm-kernel@lists.infradead.org; Tue, 21 Feb 2017 15:50:41 +0000 Received: by mail-wm0-x232.google.com with SMTP id v77so79056341wmv.0 for ; Tue, 21 Feb 2017 07:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sZeJnvh3Jjxj1MUIAU/lwT4PZuDucSvK9zeNkvv3x7k=; b=W6nuq3hYlijFyBjK71ebxbIH3BSeCQ/kZ1AXIX5lczJRL36ZfFrpzmi4PFn9cepAY2 BaNnKA4KeqrglARCNVA1IxNJZ1kfrmtWG+bmfiK0NSwzKMmUfBOrqKFN8p9S7NkQYIhB CVFl1sgW8lLVwg4F5E1aHkTGoYUX6QA6j2yz3/Y15s4h4In/KBPUmXn2ymr/Np4E8lXi 9pjEiDZvbRajvZrwykOpI4Vg+MwM1hYcJPELAZpWoOMvd4SOOJVSjtQEypoQelGCb+xc CUdloWlThZjzOpEJPNacGBJGS5CJ1NyeRZMDryaavrwBA1wRBuOjeJUWB2D0oSlMzIRW PDmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sZeJnvh3Jjxj1MUIAU/lwT4PZuDucSvK9zeNkvv3x7k=; b=I2M4iPskz3ljMp4HMHqy2KXboaoRJasMT/FNSCEgVUXXS43s3YfSgTDrl+JiiGgsyk bA7Dwp2e/6aE0OmAQwNGsl3a2SzVl/omXR0uCSJGyXEXPY3CPq4vaEIn41AD75XQYXTf eDe5QQKJM8n40rzWNCWSyCGJss9xrLHAF2PHgt+89wyOQTLJEwumCaco7ZRZa+N+3cyt ZWT+kd04Q4dHJEDyeaEqe9TrFchVSbcR0FpRk87zPzZFmIwHsw9tXdekL408zR/18JIb G94cGMTdIaBqUJpXPZcLYl3Pq6CTaV3Bv10EdLmXgDiDlifYYGbRXo1ntV0cgA9GEAAw 4zNg== X-Gm-Message-State: AMke39mdiTJDUU5Wm69NqkPkuaEykYLpG/44iwqxxzFfvVU9GaFi2GF1oEKordPzNeAXKGEJ X-Received: by 10.28.234.66 with SMTP id i63mr26388081wmh.43.1487692208119; Tue, 21 Feb 2017 07:50:08 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 8sm19246179wmg.1.2017.02.21.07.50.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Feb 2017 07:50:07 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , David Lechner , Kevin Hilman , Michael Turquette , Patrick Titiano , Laurent Pinchart , Russell King Subject: [PATCH v2 5/5] ARM: davinci: add pdata-quirks for da850-evm vpif display Date: Tue, 21 Feb 2017 16:49:32 +0100 Message-Id: <1487692172-11772-6-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1487692172-11772-1-git-send-email-bgolaszewski@baylibre.com> References: <1487692172-11772-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170221_075030_395639_DAD86798 X-CRM114-Status: GOOD ( 16.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Similarly to vpif capture: we need to register the vpif display driver and the corresponding adv7343 encoder in pdata-quirks as the DT support is not complete - there isn't currently a way to define the output_routing in the V4L2 drivers (c.f. s_routing) via DT. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/pdata-quirks.c | 72 ++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c index cf88195..e2160ce 100644 --- a/arch/arm/mach-davinci/pdata-quirks.c +++ b/arch/arm/mach-davinci/pdata-quirks.c @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -105,7 +106,7 @@ static struct vpif_capture_config da850_vpif_capture_config = { .card_name = "DA850/OMAP-L138 Video Capture", }; -static void __init da850_vpif_legacy_init(void) +static void __init da850_vpif_capture_legacy_init(void) { int ret; @@ -119,6 +120,70 @@ static void __init da850_vpif_legacy_init(void) __func__, ret); } +static struct adv7343_platform_data adv7343_pdata = { + .mode_config = { + .dac = { 1, 1, 1 }, + }, + .sd_config = { + .sd_dac_out = { 1 }, + }, +}; + +static struct vpif_subdev_info da850_vpif_subdev[] = { + { + .name = "adv7343", + .board_info = { + I2C_BOARD_INFO("adv7343", 0x2a), + .platform_data = &adv7343_pdata, + }, + }, +}; + +static const struct vpif_output da850_ch0_outputs[] = { + { + .output = { + .index = 0, + .name = "Composite", + .type = V4L2_OUTPUT_TYPE_ANALOG, + .capabilities = V4L2_OUT_CAP_STD, + .std = V4L2_STD_ALL, + }, + .subdev_name = "adv7343", + .output_route = ADV7343_COMPOSITE_ID, + }, + { + .output = { + .index = 1, + .name = "S-Video", + .type = V4L2_OUTPUT_TYPE_ANALOG, + .capabilities = V4L2_OUT_CAP_STD, + .std = V4L2_STD_ALL, + }, + .subdev_name = "adv7343", + .output_route = ADV7343_SVIDEO_ID, + }, +}; + +static struct vpif_display_config da850_vpif_display_config = { + .subdevinfo = da850_vpif_subdev, + .subdev_count = ARRAY_SIZE(da850_vpif_subdev), + .chan_config[0] = { + .outputs = da850_ch0_outputs, + .output_count = ARRAY_SIZE(da850_ch0_outputs), + }, + .card_name = "DA850/OMAP-L138 Video Display", +}; + +static void __init da850_vpif_display_legacy_init(void) +{ + int ret; + + ret = da850_register_vpif_display(&da850_vpif_display_config); + if (ret) + pr_warn("%s: VPIF display setup failed: %d\n", + __func__, ret); +} + static void pdata_quirks_check(struct pdata_init *quirks) { while (quirks->compatible) { @@ -131,8 +196,9 @@ static void pdata_quirks_check(struct pdata_init *quirks) } static struct pdata_init pdata_quirks[] __initdata = { - { "ti,da850-lcdk", da850_vpif_legacy_init, }, - { "ti,da850-evm", da850_vpif_legacy_init, }, + { "ti,da850-lcdk", da850_vpif_capture_legacy_init, }, + { "ti,da850-evm", da850_vpif_display_legacy_init, }, + { "ti,da850-evm", da850_vpif_capture_legacy_init, }, { /* sentinel */ }, };