From patchwork Tue Feb 28 16:02:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 9596153 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 C5CA760453 for ; Tue, 28 Feb 2017 16:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B804A284A5 for ; Tue, 28 Feb 2017 16:18:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACA25284EF; Tue, 28 Feb 2017 16:18:22 +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=ham 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 378E2284A5 for ; Tue, 28 Feb 2017 16:18:22 +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=I71pAITSVvJw1fqy+tikNu8D2Wapq27l6IRKT6AxSx4=; b=PLx+HfUcBc4dfyzsUPClUgNhUT dcOZ3v1eUEUHHuj9omNwJa3JRyz+grZB7DmVUQoTLFCeWtz4p/nuF1H3O76Uz52Cft9sdGmmLqdJ3 EHgYxuKdVG3gcrUFZ1ncPenO2rBMJiXF4macDmPICcthWN4x2QstCyvzyc4b4CikPppQQUjW4Xugr MxU98vHAhvWRFcMZfg3ZyyoikasOadAEHBejNREIy+zwA7fTNE8jP0ZNifCTG9WAkx5MJd+8O8pI2 pdirbCx+rcOTRk8kg5eOOSXldc1XYAG7moccsMScF5JWKM1f09LGr5V/AFTLaZXOE/p2XvOflPJGz C7yhJGQg==; 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 1cikTk-0005qJ-BM; Tue, 28 Feb 2017 16:18:20 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cikES-0004Fn-J4 for linux-arm-kernel@lists.infradead.org; Tue, 28 Feb 2017 16:02:36 +0000 Received: by mail-wm0-x22e.google.com with SMTP id v77so15406321wmv.0 for ; Tue, 28 Feb 2017 08:02:13 -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=1iJShOg0CzkeTbIjNJHNJSir3oxnOIfzFALx3Bc76gQ=; b=17f+amk/Nz8YlxeDnrw/EZTCG6FISVopgxD0YP4T1IYV8iGdXHfPisARtodq+RUieH qxYvSBuRu54Cy/dellc9tYi5XSuRe8B1Cb//ZJ3Wiazjd662pCJ9Jh2bToql31uA1mfn Ijr9vEBsOcwykxhCoHi2N2FXDIOROmL5sAhtDi5GWa6DaS3fCyRsx6uBnShL0tvWR4qU Y3oXckmixukozXR8tCJfCl1dk4GYYSuKLb+MqO7HWZWrAzxtrovlQolsFYBzmR6tAlUp 7VvQKReUSxRB/vfMjXromMLUHfXS8sN48+Vdq2uNCXYHB6P4JafO7BQn8hRdKkpou1RS gWag== 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=1iJShOg0CzkeTbIjNJHNJSir3oxnOIfzFALx3Bc76gQ=; b=J6SUG6T+u1/vTjuc/lZ2boH6ei+XGH2DikC9uACQ5D7B8d2FmH8hCGSERv1Cb5y/2E 5JcfFnE2xS9JFoxjmzY4OSYoz1OoiKlmlfLwZRbSsnm24C7hZllgiImWglq2KOD245NK EyfYmCaeBMZ5BFi3F+ZMF6HGobUjaY8uh+TzSSxoHsulT/8YwkvZLI5juP11oiVhLcFD Bfh0T1iur1HCWwTBpFRRqvmrpxpvzMJbFvUzzDLCBsY7j24JRVrihoigyJJmQpHJY4Ln jDqbQnWTDqdpaxGsaFYWfQ9pypetcRrr0K+obtlbzB4eWQ34xxK30EbyPXgF/+tHiSkF DrAQ== X-Gm-Message-State: AMke39k8JVNejodadDChv1lbx0kkYcR13e1rrYr24H55j30bJpK6vUkGtrzsODiyoPan3IdN X-Received: by 10.28.135.82 with SMTP id j79mr18278199wmd.19.1488297731723; Tue, 28 Feb 2017 08:02:11 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id k8sm2887327wre.19.2017.02.28.08.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Feb 2017 08:02:11 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , David Lechner , Kevin Hilman , Michael Turquette , Patrick Titiano , Laurent Pinchart , Russell King Subject: [PATCH v4 6/6] ARM: davinci: add pdata-quirks for da850-evm vpif display Date: Tue, 28 Feb 2017 17:02:00 +0100 Message-Id: <1488297720-4558-7-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1488297720-4558-1-git-send-email-bgolaszewski@baylibre.com> References: <1488297720-4558-1-git-send-email-bgolaszewski@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170228_080232_857360_21AC5117 X-CRM114-Status: GOOD ( 14.54 ) 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 | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c index 4a9603d..329f540 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 @@ -126,6 +127,70 @@ static void __init da850_vpif_capture_legacy_init_evm(void) da850_vpif_legacy_register_capture(); } +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_evm(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) { @@ -139,6 +204,7 @@ static void pdata_quirks_check(struct pdata_init *quirks) static struct pdata_init pdata_quirks[] __initdata = { { "ti,da850-lcdk", da850_vpif_capture_legacy_init_lcdk, }, + { "ti,da850-evm", da850_vpif_display_legacy_init_evm, }, { "ti,da850-evm", da850_vpif_capture_legacy_init_evm, }, { /* sentinel */ }, };