diff options
Diffstat (limited to 'arch/arm/mach-davinci/board-dm644x-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 81 |
1 files changed, 77 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 56c8cd01de9a..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, |
@@ -225,6 +294,8 @@ static struct platform_device ide_dev = { | |||
225 | }, | 294 | }, |
226 | }; | 295 | }; |
227 | 296 | ||
297 | static struct snd_platform_data dm644x_evm_snd_data; | ||
298 | |||
228 | /*----------------------------------------------------------------------*/ | 299 | /*----------------------------------------------------------------------*/ |
229 | 300 | ||
230 | /* | 301 | /* |
@@ -557,10 +628,9 @@ static struct i2c_board_info __initdata i2c_info[] = { | |||
557 | I2C_BOARD_INFO("24c256", 0x50), | 628 | I2C_BOARD_INFO("24c256", 0x50), |
558 | .platform_data = &eeprom_info, | 629 | .platform_data = &eeprom_info, |
559 | }, | 630 | }, |
560 | /* ALSO: | 631 | { |
561 | * - tvl320aic33 audio codec (0x1b) | 632 | I2C_BOARD_INFO("tlv320aic33", 0x1b), |
562 | * - tvp5146 video decoder (0x5d) | 633 | }, |
563 | */ | ||
564 | }; | 634 | }; |
565 | 635 | ||
566 | /* The msp430 uses a slow bitbanged I2C implementation (ergo 20 KHz), | 636 | /* The msp430 uses a slow bitbanged I2C implementation (ergo 20 KHz), |
@@ -590,6 +660,8 @@ static struct davinci_uart_config uart_config __initdata = { | |||
590 | static void __init | 660 | static void __init |
591 | davinci_evm_map_io(void) | 661 | davinci_evm_map_io(void) |
592 | { | 662 | { |
663 | /* setup input configuration for VPFE input devices */ | ||
664 | dm644x_set_vpfe_config(&vpfe_cfg); | ||
593 | dm644x_init(); | 665 | dm644x_init(); |
594 | } | 666 | } |
595 | 667 | ||
@@ -666,6 +738,7 @@ static __init void davinci_evm_init(void) | |||
666 | davinci_setup_mmc(0, &dm6446evm_mmc_config); | 738 | davinci_setup_mmc(0, &dm6446evm_mmc_config); |
667 | 739 | ||
668 | davinci_serial_init(&uart_config); | 740 | davinci_serial_init(&uart_config); |
741 | dm644x_init_asp(&dm644x_evm_snd_data); | ||
669 | 742 | ||
670 | soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK; | 743 | soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK; |
671 | soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY; | 744 | soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY; |