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: 2456791 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8CA123FD8C for ; Wed, 17 Apr 2013 22:15:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966905Ab3DQWPw (ORCPT ); Wed, 17 Apr 2013 18:15:52 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:49022 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966892Ab3DQWPv (ORCPT ); Wed, 17 Apr 2013 18:15:51 -0400 Received: by mail-lb0-f178.google.com with SMTP id q13so2120617lbi.9 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=la0y/eTez68bKPbeism5kn+MWl6OUxiUPckAWzFaLjsZbCfacYMKWzJVY/Gm82Xo6Z gPsZF5nEQFF6mocYQ5mx8YOtHdIDxu/DbFfY8cpL56FP+2nXQDBOrqfmNPZpEw5uPlkM uFxoDpNapkhwCkPdTpLzJKY83xHqJP3tc/RalwXevBkuKc/+GgI9L8x0FIvmfKBSpQ9W vgNaXzFAUSpyblef+19NeU+FbhF4godTwvefqghgYol1L4IAmJQP8koreeyKYHDakabu ugxFIc9Gyak2z+ehiAVXyHTJrBOgNkUMWKsCFQyWZ3nQIPKWzZENScfPGbGvMN7LJvu2 7rCQ== 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; ; ) Cc: linux-media@vger.kernel.org, matsu@igel.co.jp 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: ALoCoQkXA41X06baLCvOYJW+NzFzhkz+8Y+MRmAFdU9BNo+kuPK+ob+lYHJU3+AJhm493gC7tBnI Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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(+) -- 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: 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)); }