From patchwork Tue Apr 23 17:32:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2479431 Return-Path: X-Original-To: patchwork-linux-media@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 846F6DF2E5 for ; Tue, 23 Apr 2013 17:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756508Ab3DWRdi (ORCPT ); Tue, 23 Apr 2013 13:33:38 -0400 Received: from mail-la0-f48.google.com ([209.85.215.48]:59977 "EHLO mail-la0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756769Ab3DWRdg (ORCPT ); Tue, 23 Apr 2013 13:33:36 -0400 Received: by mail-la0-f48.google.com with SMTP id eo20so785544lab.21 for ; Tue, 23 Apr 2013 10:33:35 -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=Y5cJKvFgJws1MFYEFyXhgGAkabmn/0Z70Svm08vuQ80=; b=LwzuP/Y2cO43pntor6f5D5fcEpjbjS81aB54HtjNGV9sOdR8Wg1dDOqHE5+l+XLo1m gptuHUPURNyTneeGqlC7NJkZ/qiqtz4v6Rlg8el8I9ypwPz/5bEdRFdUtSkOk1g9TqWj 3euqtUYZyLn70rHAeag6MMAI91MsNaIKu3fg/aPvhIzV/5QL3ypx0nEhZwQOtYDy6YDI SqAAxhYaOpdu95yvbBjGZC9vgmCMo3tfhfLq0ljmTtjNzzj4HLn3GQJI0JvNW2/ghV7C nV1efEY5wj0rIHXgW2KWb2nZxIy648NbznD8xT8MzKWhF4ZePTLd+3zEqAsO4KMv/t1q CRyA== X-Received: by 10.112.135.133 with SMTP id ps5mr2318332lbb.42.1366738415050; Tue, 23 Apr 2013 10:33:35 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-92-135.pppoe.mtu-net.ru. [91.79.92.135]) by mx.google.com with ESMTPS id rn10sm12564697lbb.16.2013.04.23.10.33.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Apr 2013 10:33:33 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH v3 4/5] ARM: shmobile: BOCK-W: add VIN and ML86V7667 support Date: Tue, 23 Apr 2013 21:32:52 +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, magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, matsu@igel.co.jp, vladimir.barinov@cogentembedded.com References: <201304232118.43686.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201304232118.43686.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201304232132.52741.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQm+CQ4UZQyIIFe3TRut4lX7IpIYLbP8iWWtirDidFlE7eJ+dnA6p0TgAheJVgYK0JNjpihZ Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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, removed duplicate #include, annotated all platform data as '__initdata'.] Signed-off-by: Sergei Shtylyov --- Changes since version 2: - removed duplicate #include ; - annotated all platform data as '__initdata' since they're kmemdup()'ed while registering the platform devices anyway; - resolved rejects, refreshed the patch. arch/arm/mach-shmobile/board-bockw.c | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 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-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 @@ -25,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -65,6 +67,25 @@ static struct sh_mobile_sdhi_info sdhi0_ static struct rcar_phy_platform_data usb_phy_platform_data __initdata; +static struct rcar_vin_platform_data vin_platform_data __initdata = { + .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 __initdata = { \ + .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", @@ -80,6 +101,16 @@ static const struct pinctrl_map bockw_pi "sdhi0_data4", "sdhi0"), PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", "sdhi0_wp", "sdhi0"), + /* 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 @@ -94,6 +125,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));