aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVladimir Barinov <vladimir.barinov@cogentembedded.com>2013-08-22 16:38:50 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-24 03:58:38 -0400
commit9c43952d0f1e7da943cb697f902e5a0e62abfc63 (patch)
tree608bf34ad33960097b92995da9f86200e5ce7962 /arch
parent803c2df217525495fc440fc9b314b22427dc5db6 (diff)
[media] ARM: shmobile: BOCK-W: add VIN and ML86V7667 support
Add ML86V7667 platform devices on BOCK-W board, configure VIN0/1 pins, and register VIN0/1 devices with the ML86V7667 specific platform data. [Sergei: some macro/comment cleanup; updated the copyrights, removed duplicate 'sh_eth' driver being enabled before registering VIN1 due to a pin conflict, removed superfluous semicolon after iclink[01]_ml86v7667' initializer.] Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index d5554646916c..7d44f66ab004 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (C) 2013 Renesas Solutions Corp. 4 * Copyright (C) 2013 Renesas Solutions Corp.
5 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 5 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 * Copyright (C) 2013 Cogent Embedded, Inc.
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -28,6 +29,7 @@
28#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
29#include <linux/spi/spi.h> 30#include <linux/spi/spi.h>
30#include <linux/spi/flash.h> 31#include <linux/spi/flash.h>
32#include <media/soc_camera.h>
31#include <mach/common.h> 33#include <mach/common.h>
32#include <mach/irqs.h> 34#include <mach/irqs.h>
33#include <mach/r8a7778.h> 35#include <mach/r8a7778.h>
@@ -143,6 +145,25 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = {
143 MMC_CAP_NEEDS_POLL, 145 MMC_CAP_NEEDS_POLL,
144}; 146};
145 147
148static struct rcar_vin_platform_data vin_platform_data __initdata = {
149 .flags = RCAR_VIN_BT656,
150};
151
152/* In the default configuration both decoders reside on I2C bus 0 */
153#define BOCKW_CAMERA(idx) \
154static struct i2c_board_info camera##idx##_info = { \
155 I2C_BOARD_INFO("ml86v7667", 0x41 + 2 * (idx)), \
156}; \
157 \
158static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = { \
159 .bus_id = idx, \
160 .i2c_adapter_id = 0, \
161 .board_info = &camera##idx##_info, \
162}
163
164BOCKW_CAMERA(0);
165BOCKW_CAMERA(1);
166
146static const struct pinctrl_map bockw_pinctrl_map[] = { 167static const struct pinctrl_map bockw_pinctrl_map[] = {
147 /* Ether */ 168 /* Ether */
148 PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", 169 PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778",
@@ -168,6 +189,16 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
168 /* SDHI0 */ 189 /* SDHI0 */
169 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", 190 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
170 "sdhi0", "sdhi0"), 191 "sdhi0", "sdhi0"),
192 /* VIN0 */
193 PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778",
194 "vin0_clk", "vin0"),
195 PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778",
196 "vin0_data8", "vin0"),
197 /* VIN1 */
198 PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778",
199 "vin1_clk", "vin1"),
200 PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778",
201 "vin1_data8", "vin1"),
171}; 202};
172 203
173#define FPGA 0x18200000 204#define FPGA 0x18200000
@@ -186,6 +217,16 @@ static void __init bockw_init(void)
186 r8a7778_add_i2c_device(0); 217 r8a7778_add_i2c_device(0);
187 r8a7778_add_hspi_device(0); 218 r8a7778_add_hspi_device(0);
188 r8a7778_add_mmc_device(&sh_mmcif_plat); 219 r8a7778_add_mmc_device(&sh_mmcif_plat);
220 r8a7778_add_vin_device(0, &vin_platform_data);
221 /* VIN1 has a pin conflict with Ether */
222 if (!IS_ENABLED(CONFIG_SH_ETH))
223 r8a7778_add_vin_device(1, &vin_platform_data);
224 platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0,
225 &iclink0_ml86v7667,
226 sizeof(iclink0_ml86v7667));
227 platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1,
228 &iclink1_ml86v7667,
229 sizeof(iclink1_ml86v7667));
189 230
190 i2c_register_board_info(0, i2c0_devices, 231 i2c_register_board_info(0, i2c0_devices,
191 ARRAY_SIZE(i2c0_devices)); 232 ARRAY_SIZE(i2c0_devices));