From patchwork Thu May 16 21:30:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2580511 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 10E52E00E6 for ; Thu, 16 May 2013 21:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752830Ab3EPVak (ORCPT ); Thu, 16 May 2013 17:30:40 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:52359 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712Ab3EPVak (ORCPT ); Thu, 16 May 2013 17:30:40 -0400 Received: by mail-la0-f46.google.com with SMTP id fk20so3478021lab.5 for ; Thu, 16 May 2013 14:30:37 -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=YnehpX7J9wa8OzxHoMlWr+UkSVLgTvFdHr/dixWkMKw=; b=gb3f3lv/zdUNd5YOFBMpJNS2KOPImSLjl3raQVEyBLi8e74LUEHsUSBwl99c8jMLRk t3eT+3f4BOs7zS9cL42SXEg/PFPpqKGmCLm0nqPWmSN5do1uxeE0dD2zswFalDB1WoA/ 8NVQ3YieIGbERU+3GHWUMrY45z6vWnnVlGZpu3YtyOUC7DHiGG/xprKApAjbhlSAaUQf bwkw2kmh23kRNXMsIWCpwAfikGb9tAn/MTwUBm43fF/EZReeKmrbo7BDcbM6yUu3/iaj TRrfy5e5vPdugLd9TAj00GY+2c9XoWI1Kkwxa3iOOkCQnW2wUpoMeBRysrmXssq6pJLC vJyg== X-Received: by 10.112.157.129 with SMTP id wm1mr20841724lbb.69.1368739837410; Thu, 16 May 2013 14:30:37 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-154-107.pppoe.mtu-net.ru. [91.76.154.107]) by mx.google.com with ESMTPSA id z10sm3777870lbv.14.2013.05.16.14.30.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 16 May 2013 14:30:36 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH v4 2/3] ARM: shmobile: BOCK-W: add VIN and ML86V7667 support Date: Fri, 17 May 2013 01:30:40 +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: <201305170122.33996.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201305170122.33996.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201305170130.40830.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQnC9VaS8OVniEMubzyn4mICdc5SrsKrmCxJOOYkHMYt3jsI/9VViE0Y+oqr32hNvzM0tmvu 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 3: - changed the VIN platform device names to be R8A7778 specific; - resolved reject due to USB patch rework, refreshed the patch. 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", @@ -84,6 +105,16 @@ static const struct pinctrl_map bockw_pi "usb0", "usb0"), PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778", "usb1", "usb1"), + /* VIN0 */ + PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778", + "vin0_clk", "vin0"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778", + "vin0_data8", "vin0"), + /* VIN1 */ + PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778", + "vin1_clk", "vin1"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778", + "vin1_data8", "vin1"), }; #define FPGA 0x18200000 @@ -98,6 +129,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));