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: 2456781 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CCCA3DF23A for ; Wed, 17 Apr 2013 22:15:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966900Ab3DQWPw (ORCPT ); Wed, 17 Apr 2013 18:15:52 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:59622 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965558Ab3DQWPv (ORCPT ); Wed, 17 Apr 2013 18:15:51 -0400 Received: by mail-lb0-f180.google.com with SMTP id t11so2074101lbi.25 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=aeFqI8JpcxRrD5EQvRGyV4+GgQtn2yQsrFfPGKwRMMp3pf6cXXhIrxsYg25/5FB349 LTq3b+Gj3/2SKezJgzwD3v3Ww7U716QG+W+gQ3shYRtY87pwGnsTrWIsi8Z5QwS0vlLo WQQEoVPwF0ACUjyGZ8l0soQY9bN3eszb9lg4AlAvmIXYoX45ZuRO8wraTwsBqK8LwFjm pAE1C9Ji9sg0S4mgJp4E6/PAFs9EzKG24efr7dX2rRTzR0wnp7jwAl0mD97+KJbw6goK OPhI7q76UNP5vcP0XoPnZxfIfmomqIMQtoSPpMeSBLQbD5ogyHJPODkPQ+zuEXpXO0fk cx/g== 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: ALoCoQkXtxc6oiHm5N/S/ng6W/bP3uuVGTbP7aWY/B1RXNtgbxNnKATXCq0gi9R5U3sPjSn94OwV Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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-sh" 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)); }