From patchwork Wed Apr 17 22:15:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2456801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id F222B3FD8C for ; Wed, 17 Apr 2013 22:15:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1USady-0001LW-Jj; Wed, 17 Apr 2013 22:15:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1USadv-0007xr-UL; Wed, 17 Apr 2013 22:15:55 +0000 Received: from mail-lb0-f171.google.com ([209.85.217.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1USads-0007xT-Ua for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2013 22:15:53 +0000 Received: by mail-lb0-f171.google.com with SMTP id v10so2115286lbd.16 for ; Wed, 17 Apr 2013 15:15:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id:x-gm-message-state; bh=ereiBi6/vlXdFz4QcBI5c4Ie24FWxbd1d05wDneOgzk=; b=iVBSMnq5LnrMm8qa37dw9FbKP4mu6XBWTI0q/5+w/Xas3eqTv1iyQQCk6NetGo6RdQ ajdbfHk7WKCKGVJ/XeGimyLCBZA6t5+f5INRlmrEtAKyxqHt+xOuVBmwwxpPA+O3S8nr vT+l1/K/grUYQWkCmL5qcyDvQvIMxKGxTOx8lXxSpfOt9wGopZMq13+UnvuepttQZYFr A7R0oqgB+1kbAoBQqvZrx98XrHl5DKaRclFXm6sOIP0ADbyUnVOo+Az+2fqtkJ1NLF2V bEoak3aWIH/88H8mM2Hf/Z/gTFSR+uaEqmVBsb7jELt1qivn9VX3vW8he8ajgxAWOlyc 2HoQ== X-Received: by 10.112.161.5 with SMTP id xo5mr4523166lbb.67.1366236950093; Wed, 17 Apr 2013 15:15:50 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-88-26.pppoe.mtu-net.ru. [91.79.88.26]) by mx.google.com with ESMTPS id t17sm3282752lbd.11.2013.04.17.15.15.48 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 17 Apr 2013 15:15:49 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] ARM: shmobile: Marzen: add VIN and ADV7180 support Date: Thu, 18 Apr 2013 02:15:00 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) References: <201304180206.39465.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201304180206.39465.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201304180215.01218.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQmivEXqrc2saKiKtfWZW2nvu/Pf34v6qn2GpBH038FmJFL250C5EUKUKTHxEh8pJheWC8PD X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130417_181553_141891_C9D9F5F3 X-CRM114-Status: GOOD ( 14.86 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: matsu@igel.co.jp, linux-media@vger.kernel.org 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/board-marzen.c | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) Index: renesas/arch/arm/mach-shmobile/board-marzen.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-marzen.c +++ renesas/arch/arm/mach-shmobile/board-marzen.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -178,12 +179,54 @@ static struct platform_device leds_devic }, }; +static struct rcar_vin_platform_data vin_platform_data = { + .flags = RCAR_VIN_BT656, +}; + +static struct i2c_board_info i2c_camera[] = { + { + I2C_BOARD_INFO("adv7180", 0x20), + }, { + I2C_BOARD_INFO("adv7180", 0x21), + }, +}; + +static struct soc_camera_link iclink_adv7180[] = { + { + .bus_id = 1, + .i2c_adapter_id = 0, + .board_info = &i2c_camera[0], + }, { + .bus_id = 3, + .i2c_adapter_id = 0, + .board_info = &i2c_camera[1], + } +}; + +static struct platform_device camera0_device = { + .name = "soc-camera-pdrv", + .id = 0, + .dev = { + .platform_data = &iclink_adv7180[0], + }, +}; + +static struct platform_device camera1_device = { + .name = "soc-camera-pdrv", + .id = 1, + .dev = { + .platform_data = &iclink_adv7180[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 +262,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("rcar_vin.1", "pfc-r8a7779", + "vin1_clk", "vin1"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.1", "pfc-r8a7779", + "vin1_data8", "vin1"), + /* VIN3 */ + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.3", "pfc-r8a7779", + "vin3_clk", "vin3"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.3", "pfc-r8a7779", + "vin3_data8", "vin3"), }; static void __init marzen_init(void) @@ -234,6 +287,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)); }