From patchwork Thu Aug 22 21:25:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2848411 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 989089F2F6 for ; Thu, 22 Aug 2013 21:25:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C464202AE for ; Thu, 22 Aug 2013 21:25:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99383201FF for ; Thu, 22 Aug 2013 21:25:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753979Ab3HVVZX (ORCPT ); Thu, 22 Aug 2013 17:25:23 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:59754 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754471Ab3HVVZV (ORCPT ); Thu, 22 Aug 2013 17:25:21 -0400 Received: by mail-lb0-f181.google.com with SMTP id u12so1910343lbd.40 for ; Thu, 22 Aug 2013 14:25:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=pMHCWMumRjvNVO8422qZh1wDfwk7wgZAi85Uk1q9OyQ=; b=F/KWqEkCHoXAhuWD8Ok7DuiWx0F857i7YrtVCnvZ8gBFqoN8YnRAmLLh9nnoz25WJS nGLeNYkgn8leWoR7slX0C6rrZZdZ0+1sn/bL4fG2r6z1D1UW93M6CPaC443FGYmZYho5 fZ0F8OlRZI3Pv/QTZcHic9LEHeBekLYRLSDjb9n3C3u0rOwpL4Usf7OIvGU60d7WkU3t cpmRybLdu4ttjx04q1YetWoSs/OWz2y/XiRvx/tprpXy3HslNbB296n5P7UbJFv0Vkob zWeZ8TWmNipOl1CZ0Prv1HOCzohZK/u0xCZ9yJERKoiepgMaKNvdmBrU5cJ9wP8S0P1h PClw== X-Gm-Message-State: ALoCoQmWxjbAxvCEgpdUeZ7hW/2OvasXSkZr/A1fQCPwuF/SllbnivmyL2yHtWi6O9r4XAsY26HT X-Received: by 10.112.14.102 with SMTP id o6mr13041262lbc.28.1377206719976; Thu, 22 Aug 2013 14:25:19 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-84-46.pppoe.mtu-net.ru. [91.76.84.46]) by mx.google.com with ESMTPSA id xr1sm5657510lbb.14.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 22 Aug 2013 14:25:19 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, m.chehab@samsung.com Subject: [PATCH v5 2/3] ARM: shmobile: Marzen: add VIN and ADV7180 support Date: Fri, 23 Aug 2013 01:25:25 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, vladimir.barinov@cogentembedded.com References: <201308230119.13783.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201308230119.13783.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201308230125.26064.sergei.shtylyov@cogentembedded.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Barinov Add ADV7180 platform devices on the Marzen board, configure VIN1/3 pins, and register VIN1/3 devices with the ADV7180 specific platform data. Signed-off-by: Vladimir Barinov [Sergei: removed superfluous tabulation and inserted empty lines in the macro definition, updated the copyrights, annotated VIN platform data as '__initdata'] Signed-off-by: Sergei Shtylyov --- Changes since version 3: - changed the VIN platform device names to be R8A7779 specific. Changes since version 2: - annotated 'vin_platform_data' as '__initdata' since they're kmemdup()'ed while registering the platform devices anyway. Changes since the original posting: - used a macro to define the camera platform devices; - updated the copyrights; - refreshed the patch. arch/arm/mach-shmobile/board-marzen.c | 44 +++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: media_tree/arch/arm/mach-shmobile/board-marzen.c =================================================================== --- media_tree.orig/arch/arm/mach-shmobile/board-marzen.c +++ media_tree/arch/arm/mach-shmobile/board-marzen.c @@ -1,8 +1,9 @@ /* * marzen board support * - * Copyright (C) 2011 Renesas Solutions Corp. + * Copyright (C) 2011, 2013 Renesas Solutions Corp. * Copyright (C) 2011 Magnus Damm + * Copyright (C) 2013 Cogent Embedded, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -178,12 +180,40 @@ static struct platform_device leds_devic }, }; +static struct rcar_vin_platform_data vin_platform_data __initdata = { + .flags = RCAR_VIN_BT656, +}; + +#define MARZEN_CAMERA(idx) \ +static struct i2c_board_info camera##idx##_info = { \ + I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ +}; \ + \ +static struct soc_camera_link iclink##idx##_adv7180 = { \ + .bus_id = 1 + 2 * (idx), \ + .i2c_adapter_id = 0, \ + .board_info = &camera##idx##_info, \ +}; \ + \ +static struct platform_device camera##idx##_device = { \ + .name = "soc-camera-pdrv", \ + .id = idx, \ + .dev = { \ + .platform_data = &iclink##idx##_adv7180, \ + }, \ +}; + +MARZEN_CAMERA(0); +MARZEN_CAMERA(1); + static struct platform_device *marzen_devices[] __initdata = { ð_device, &sdhi0_device, &thermal_device, &hspi_device, &leds_device, + &camera0_device, + &camera1_device, }; static const struct pinctrl_map marzen_pinctrl_map[] = { @@ -219,6 +249,16 @@ static const struct pinctrl_map marzen_p /* USB2 */ PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.1", "pfc-r8a7779", "usb2", "usb2"), + /* VIN1 */ + PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.1", "pfc-r8a7779", + "vin1_clk", "vin1"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.1", "pfc-r8a7779", + "vin1_data8", "vin1"), + /* VIN3 */ + PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.3", "pfc-r8a7779", + "vin3_clk", "vin3"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.3", "pfc-r8a7779", + "vin3_data8", "vin3"), }; static void __init marzen_init(void) @@ -235,6 +275,8 @@ static void __init marzen_init(void) r8a7779_add_standard_devices(); r8a7779_add_usb_phy_device(&usb_phy_platform_data); + r8a7779_add_vin_device(1, &vin_platform_data); + r8a7779_add_vin_device(3, &vin_platform_data); platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); }