From patchwork Fri Apr 19 22:33:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2467351 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 49B1EDFB79 for ; Fri, 19 Apr 2013 22:34:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964864Ab3DSWeZ (ORCPT ); Fri, 19 Apr 2013 18:34:25 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:57724 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964846Ab3DSWeZ (ORCPT ); Fri, 19 Apr 2013 18:34:25 -0400 Received: by mail-la0-f52.google.com with SMTP id fd20so136606lab.11 for ; Fri, 19 Apr 2013 15:34:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:cc:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=Ee8gfgaqnKKatofJEAHoFX2n+1bQhNAzJ5eJj60QRss=; b=MprhTT4sb2/PtvDXyUhNOuChAQ9bvfiQcCrDRwZz+yVSZaLgenuvr+B63ZH4Qzfhg5 +mbIVgQQiBszBEZQCRrRZZBcr9lb5x8Nymckd4OsBmD3O8/GGLL/2Algc0TG1MOwYQL1 eDe8GNXXD1oy9E6lOT6s+niQBy6K303rcDCZ/ukXTzD4fg389aUVGQrOx12Vn0qAcT5E 94GcmlFdV4a31BNRq13efRuRIUwj10nro+k7B1nJ1yxztU+OX2GYwBgheZ6rk5vgN5DR 0/++Xw3JGYiB2DrmlIXdAp5pJZrVbWEBBThKdxIswA83ft8nu6OAViBwkkD61feqavZZ wQFg== X-Received: by 10.152.29.102 with SMTP id j6mr9064495lah.47.1366410863136; Fri, 19 Apr 2013 15:34:23 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-86-130.pppoe.mtu-net.ru. [91.79.86.130]) by mx.google.com with ESMTPS id b2sm6547720lbv.4.2013.04.19.15.34.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 19 Apr 2013 15:34:22 -0700 (PDT) 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 v2 3/4] ARM: shmobile: Marzen: add VIN and ADV7180 support Cc: linux-media@vger.kernel.org, matsu@igel.co.jp, vladimir.barinov@cogentembedded.com From: Sergei Shtylyov Organization: Cogent Embedded Date: Sat, 20 Apr 2013 02:33:32 +0400 MIME-Version: 1.0 Message-Id: <201304200233.33555.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQl5pC8SpzEiikdclpzzWJZ2CLbBZFkCeGGFcxDCFAXda0jrW0AUY76weF8cFAXvMcvx0GiP 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 [Sergei: removed superfluous tabulation and inserted empty lines in the macro definition; updated the copyrights] Signed-off-by: Sergei Shtylyov --- 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-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 @@ -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 = { + .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("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) @@ -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)); }