diff options
author | Muralidharan Karicheri <m-karicheri2@ti.com> | 2009-09-16 11:53:18 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-09-16 13:25:26 -0400 |
commit | ab8e8df87421574fe053bf1770353af5b24a2bbb (patch) | |
tree | 656f02746d36f06f34b88c3354b3c44f3102daf7 /arch/arm/mach-davinci/board-dm644x-evm.c | |
parent | 1a7ff8ff6eebfa732ca2abe00a0878136bfb2d01 (diff) |
davinci: DM644x platform changes for vpfe capture
DM644x platform and board setup
This adds platform and board setup changes required to support
vpfe capture driver on DM644x
Tested video capture on DM6446 with tvp514x driver
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-dm644x-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 74 |
1 files changed, 71 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 31cf84fbb01a..1213a0087ad4 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -28,6 +28,9 @@ | |||
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/phy.h> | 29 | #include <linux/phy.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/videodev2.h> | ||
32 | |||
33 | #include <media/tvp514x.h> | ||
31 | 34 | ||
32 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
33 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
@@ -194,6 +197,72 @@ static struct platform_device davinci_fb_device = { | |||
194 | .num_resources = 0, | 197 | .num_resources = 0, |
195 | }; | 198 | }; |
196 | 199 | ||
200 | static struct tvp514x_platform_data tvp5146_pdata = { | ||
201 | .clk_polarity = 0, | ||
202 | .hs_polarity = 1, | ||
203 | .vs_polarity = 1 | ||
204 | }; | ||
205 | |||
206 | #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) | ||
207 | /* Inputs available at the TVP5146 */ | ||
208 | static struct v4l2_input tvp5146_inputs[] = { | ||
209 | { | ||
210 | .index = 0, | ||
211 | .name = "Composite", | ||
212 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
213 | .std = TVP514X_STD_ALL, | ||
214 | }, | ||
215 | { | ||
216 | .index = 1, | ||
217 | .name = "S-Video", | ||
218 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
219 | .std = TVP514X_STD_ALL, | ||
220 | }, | ||
221 | }; | ||
222 | |||
223 | /* | ||
224 | * this is the route info for connecting each input to decoder | ||
225 | * ouput that goes to vpfe. There is a one to one correspondence | ||
226 | * with tvp5146_inputs | ||
227 | */ | ||
228 | static struct vpfe_route tvp5146_routes[] = { | ||
229 | { | ||
230 | .input = INPUT_CVBS_VI2B, | ||
231 | .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
232 | }, | ||
233 | { | ||
234 | .input = INPUT_SVIDEO_VI2C_VI1C, | ||
235 | .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
236 | }, | ||
237 | }; | ||
238 | |||
239 | static struct vpfe_subdev_info vpfe_sub_devs[] = { | ||
240 | { | ||
241 | .name = "tvp5146", | ||
242 | .grp_id = 0, | ||
243 | .num_inputs = ARRAY_SIZE(tvp5146_inputs), | ||
244 | .inputs = tvp5146_inputs, | ||
245 | .routes = tvp5146_routes, | ||
246 | .can_route = 1, | ||
247 | .ccdc_if_params = { | ||
248 | .if_type = VPFE_BT656, | ||
249 | .hdpol = VPFE_PINPOL_POSITIVE, | ||
250 | .vdpol = VPFE_PINPOL_POSITIVE, | ||
251 | }, | ||
252 | .board_info = { | ||
253 | I2C_BOARD_INFO("tvp5146", 0x5d), | ||
254 | .platform_data = &tvp5146_pdata, | ||
255 | }, | ||
256 | }, | ||
257 | }; | ||
258 | |||
259 | static struct vpfe_config vpfe_cfg = { | ||
260 | .num_subdevs = ARRAY_SIZE(vpfe_sub_devs), | ||
261 | .sub_devs = vpfe_sub_devs, | ||
262 | .card_name = "DM6446 EVM", | ||
263 | .ccdc = "DM6446 CCDC", | ||
264 | }; | ||
265 | |||
197 | static struct platform_device rtc_dev = { | 266 | static struct platform_device rtc_dev = { |
198 | .name = "rtc_davinci_evm", | 267 | .name = "rtc_davinci_evm", |
199 | .id = -1, | 268 | .id = -1, |
@@ -562,9 +631,6 @@ static struct i2c_board_info __initdata i2c_info[] = { | |||
562 | { | 631 | { |
563 | I2C_BOARD_INFO("tlv320aic33", 0x1b), | 632 | I2C_BOARD_INFO("tlv320aic33", 0x1b), |
564 | }, | 633 | }, |
565 | /* ALSO: | ||
566 | * - tvp5146 video decoder (0x5d) | ||
567 | */ | ||
568 | }; | 634 | }; |
569 | 635 | ||
570 | /* The msp430 uses a slow bitbanged I2C implementation (ergo 20 KHz), | 636 | /* The msp430 uses a slow bitbanged I2C implementation (ergo 20 KHz), |
@@ -594,6 +660,8 @@ static struct davinci_uart_config uart_config __initdata = { | |||
594 | static void __init | 660 | static void __init |
595 | davinci_evm_map_io(void) | 661 | davinci_evm_map_io(void) |
596 | { | 662 | { |
663 | /* setup input configuration for VPFE input devices */ | ||
664 | dm644x_set_vpfe_config(&vpfe_cfg); | ||
597 | dm644x_init(); | 665 | dm644x_init(); |
598 | } | 666 | } |
599 | 667 | ||