From patchwork Wed Feb 22 14:13:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9586909 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 3BC4C602A7 for ; Wed, 22 Feb 2017 14:18:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30F562864C for ; Wed, 22 Feb 2017 14:18:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2594028645; Wed, 22 Feb 2017 14:18:26 +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 2F7DB2864C for ; Wed, 22 Feb 2017 14:18:24 +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=MOPE8dbnhpkpyYnRTHNNIMfUCm 4iXR67eGCtehkmQCd9FKBH8tABAQNFT3ir0q58O0sk3I9iGO9uJCRNpWBCSbKC3j/QX9xk7mGMAo2 u0AwM34a1qMC8aqHPE7kKM1tAeofs+/3ad/VYJa8bdMr4iZHaPnfEfEYsz8vM3I9mrFNYNSodRL96 xP70U3hNbZ/NY5mOoqLVAONEKjFTcePh3g1PgnGHe4f52aMe7A1Nc6RDbcBuBnh8grEymyQ4I6Zpk OpAWOIAQVaa8sjv8/zVCeaoFnpqZsZywoUxQru7hFPuwugCgnIepSfq7N+9wVQmzLpw7FCkXCeDpg xWcXu1zg==; 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 1cgXkM-0004z6-RQ; Wed, 22 Feb 2017 14:18:22 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgXg8-0000pa-P4 for linux-arm-kernel@lists.infradead.org; Wed, 22 Feb 2017 14:14:06 +0000 Received: by mail-wm0-x230.google.com with SMTP id i186so11589665wmf.1 for ; Wed, 22 Feb 2017 06:13:40 -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=ejo9LzIy9+1PISwqiZLcMWoKUrmcH8C3tjbc04z+lwYJDi+di4xEep+pkmf1cUxxGC wetSdk4WJ7l2hl5j0GfArw1wHJWnx9uGg2piMuGlu9y0zu6IlS5b7aHD6ZPqPf0JQckJ 7+cLRS4S7GqVeOExipe1/93GEc4zblTFUYJGRASF6fILFP3e7SroaRj7375D5idmP0Rh qMNJP+ThKI1BCjP7g0DXflEkD7c4Y/kLNApevo8vDsUSAC/8WiQu6NjE7fnB51WP9AZI FZCNP4jKE4cIT+25KwPS2YT3BCz5GoXtAeP32P8pzXTLT5nBGad9mchimAyLzGeQIuB8 2q3Q== 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=WA6zQAjM0MxAgV6wvkN7g1rYaZUvUQl+c2s/kMdG6M11moaN23dn3h77RmZ2MR/ymr x/H74S6nUlcgwmjCcbTsMg3/lh0E0fDG7h7MhijhXNYvBDshw3rEPJ2HU1lpf3110Hzu /1grbjDLP28BvZv9sATYuM6MN9unQqaDchRWiQBDuH79dwhKlcy5u8Xq54tPlsUiEIFZ peaYZys1zXc4DmzByhYhOnfm/bXFgRKWu5gxUe1328bYBRTjSB2jUkDcaSKgC7CUJzR+ Ga3qazReCuqsIh1tbOLfWJnl+ucRThPNwETOaZ1NqGU7Bjnm+s+MjGJ8Pa0v0E7jxIWP bpOA== X-Gm-Message-State: AMke39kyhxZyZ9UK339P6XN5/6HsyR3U0c50bXqTXbjhb9gVjKbcNLnGMGn9O3HdHoTySWZd X-Received: by 10.28.198.65 with SMTP id w62mr2756768wmf.123.1487772818975; Wed, 22 Feb 2017 06:13:38 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id f50sm1889573wrf.69.2017.02.22.06.13.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Feb 2017 06:13:38 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , David Lechner , Kevin Hilman , Michael Turquette , Patrick Titiano , Laurent Pinchart , Russell King Subject: [PATCH v3 5/6] ARM: davinci: add pdata-quirks for da850-evm vpif display Date: Wed, 22 Feb 2017 15:13:24 +0100 Message-Id: <1487772805-19021-6-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1487772805-19021-1-git-send-email-bgolaszewski@baylibre.com> References: <1487772805-19021-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170222_061401_239353_25C2E655 X-CRM114-Status: GOOD ( 15.61 ) 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 */ }, };