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: 2468601 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 667FB3FD40 for ; Sat, 20 Apr 2013 20:37:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754980Ab3DTUgz (ORCPT ); Sat, 20 Apr 2013 16:36:55 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:55483 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754792Ab3DTUgy (ORCPT ); Sat, 20 Apr 2013 16:36:54 -0400 Received: by mail-la0-f54.google.com with SMTP id es20so622190lab.13 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=iAllQdf5YcJ/U1I1DKkkxtUoHXyiqHPFj9zOxow3IJDgJtosXnl9Iww2tc+Ka/tu6/ fVyGJbL5xmR2f54aYCVa0Vrz1dS8FUJYR8yZvdOm5bUjOmmtSzwn/S5aqbxCbjopWLaV uvrPYl6zYNKeuTsfYsnxJ/jO0ZLnRfNt27122Ykg54Vw4wrG59ZNRdFQkl0qz4JHYG8V W2TF6uXFsKCcZKp9oN7s/uw/mE21Zxhh/q+mpiZmAGWf2rj4+V4kX+TtoPzArWupZimS H130hYADwXCzvewpTddc/xEugpA4LCxob7yEcOZh9K+1hTt33IfVddVczRXKPgGA/aQT B1CA== 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; ; ) Cc: linux-media@vger.kernel.org, matsu@igel.co.jp, vladimir.barinov@cogentembedded.com 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: ALoCoQmPwHEKnuCy4XZdoFJCtOp2tiemG0gbfyN/bwafjYy/TqQDGdzk9KfDePgZ97x5GAC+HQOG 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.] Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/board-bockw.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 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 @@ -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));