From patchwork Sat Apr 20 20:36:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2468581 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 D901B3FD40 for ; Sat, 20 Apr 2013 20:37:02 +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 1UTeWr-0001xY-1F; Sat, 20 Apr 2013 20:37:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTeWo-0002T2-IE; Sat, 20 Apr 2013 20:36:58 +0000 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTeWl-0002Sj-E6 for linux-arm-kernel@lists.infradead.org; Sat, 20 Apr 2013 20:36:56 +0000 Received: by mail-la0-f53.google.com with SMTP id eg20so593279lab.26 for ; Sat, 20 Apr 2013 13:36:52 -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=BcV9ZR9Xwq1Ngy0p77MCxu71fhsErHJP388/+h4DyGo=; b=CoaBR77jVkafhr6H/Tsz58jlw5/uFv/fv/O4o73Af2SxZ5iHfFRJ1AGYXYdVSF3XwM q9CJL/HMtcd2aEBTwjFmlIriWKY2PIHKleWdLhEbFFziz2tycGYYk0a6bLy8i8pQ1Bpp 3bcO4Pr23b8KOpdq+JV7H+R/CVbg/d36K7oPY2Hsie3/OmCyo/Q5y0rGDIfWKob0Odcp yoretyHjG6XxdktNKNYWfQIy3FKTB46Ldo8BicbeRVKsR0MR+r3PMmbbL1JvVbhCGFNs x6vWvc35J9nCQJ4CFQFhsEDZx0MOljqnzVZf1cxqQjz4/FOIKScSbYlIj9DdCIE5XPhZ nl/w== X-Received: by 10.152.4.131 with SMTP id k3mr10555230lak.26.1366490212724; Sat, 20 Apr 2013 13:36:52 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-89-87.pppoe.mtu-net.ru. [91.79.89.87]) by mx.google.com with ESMTPS id a9sm8230461laf.2.2013.04.20.13.36.50 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 20 Apr 2013 13:36:51 -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 4/5] ARM: shmobile: BOCK-W: add VIN and ML86V7667 support Date: Sun, 21 Apr 2013 00:36:01 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) References: <201304210013.46110.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201304210013.46110.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201304210036.02003.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQl5vbr83ec0/zZReDcJfeG+0EV6UTmNIfE8FHaa9zIjFGnLXAToyITNS3tz/iTCqyNKxi7i X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130420_163655_631735_A51E1DCC X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -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, vladimir.barinov@cogentembedded.com, 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 ML86V7667 platform devices on BOCK-W board, configure VIN0/1 pins, and register VIN0/1 devices with the ML86V7667 specific platform data. Signed-off-by: Vladimir Barinov [Sergei: some macro/comment cleanup; updated the copyrights.] Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/board-bockw.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) Index: renesas/arch/arm/mach-shmobile/board-bockw.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-bockw.c +++ renesas/arch/arm/mach-shmobile/board-bockw.c @@ -3,6 +3,7 @@ * * Copyright (C) 2013 Renesas Solutions Corp. * Copyright (C) 2013 Kuninori Morimoto + * 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 @@ -23,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -56,12 +59,41 @@ static struct resource smsc911x_resource static struct rcar_phy_platform_data usb_phy_platform_data; +static struct rcar_vin_platform_data vin_platform_data = { + .flags = RCAR_VIN_BT656, +}; + +/* In the default configuration both decoders reside on I2C bus 0 */ +#define BOCKW_CAMERA(idx) \ +static struct i2c_board_info camera##idx##_info = { \ + I2C_BOARD_INFO("ml86v7667", 0x41 + 2 * (idx)), \ +}; \ + \ +static struct soc_camera_link iclink##idx##_ml86v7667 = { \ + .bus_id = idx, \ + .i2c_adapter_id = 0, \ + .board_info = &camera##idx##_info, \ +}; + +BOCKW_CAMERA(0); +BOCKW_CAMERA(1); + static const struct pinctrl_map bockw_pinctrl_map[] = { /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_ctrl", "scif0"), + /* VIN0 */ + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.0", "pfc-r8a7778", + "vin0_clk", "vin0"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.0", "pfc-r8a7778", + "vin0_data8", "vin0"), + /* VIN1 */ + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.1", "pfc-r8a7778", + "vin1_clk", "vin1"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_vin.1", "pfc-r8a7778", + "vin1_data8", "vin1"), }; #define FPGA 0x18200000 @@ -74,6 +106,14 @@ static void __init bockw_init(void) r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); r8a7778_add_usb_phy_device(&usb_phy_platform_data); + r8a7778_add_vin_device(0, &vin_platform_data); + r8a7778_add_vin_device(1, &vin_platform_data); + platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0, + &iclink0_ml86v7667, + sizeof(iclink0_ml86v7667)); + platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1, + &iclink1_ml86v7667, + sizeof(iclink1_ml86v7667)); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map));