Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Chip specific defines for DM646x SoC |
| 3 | * |
| 4 | * Author: Kevin Hilman, Deep Root Systems, LLC |
| 5 | * |
| 6 | * 2007 (c) Deep Root Systems, LLC. This file is licensed under |
| 7 | * the terms of the GNU General Public License version 2. This program |
| 8 | * is licensed "as is" without any warranty of any kind, whether express |
| 9 | * or implied. |
| 10 | */ |
| 11 | #ifndef __ASM_ARCH_DM646X_H |
| 12 | #define __ASM_ARCH_DM646X_H |
| 13 | |
| 14 | #include <mach/hardware.h> |
Chaithrika U S | 25acf55 | 2009-06-05 06:28:08 -0400 | [diff] [blame] | 15 | #include <mach/asp.h> |
Muralidharan Karicheri | 85609c1 | 2009-09-16 13:15:30 -0400 | [diff] [blame] | 16 | #include <linux/i2c.h> |
| 17 | #include <linux/videodev2.h> |
Sekhar Nori | c1978e1 | 2009-11-24 18:25:15 +0530 | [diff] [blame] | 18 | #include <linux/clk.h> |
Sriramakrishnan | 8ee2bf9 | 2009-11-19 15:58:25 +0530 | [diff] [blame] | 19 | #include <linux/davinci_emac.h> |
Kevin Hilman | ac7b75b | 2009-05-07 06:19:40 -0700 | [diff] [blame] | 20 | |
| 21 | #define DM646X_EMAC_BASE (0x01C80000) |
Cyril Chemparathy | d22960c | 2010-09-15 10:11:22 -0400 | [diff] [blame] | 22 | #define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) |
Kevin Hilman | ac7b75b | 2009-05-07 06:19:40 -0700 | [diff] [blame] | 23 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) |
| 24 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) |
| 25 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) |
Kevin Hilman | ac7b75b | 2009-05-07 06:19:40 -0700 | [diff] [blame] | 26 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 27 | |
Sergei Shtylyov | 7034217 | 2010-04-16 21:29:11 +0400 | [diff] [blame] | 28 | #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 |
| 29 | #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000 |
| 30 | |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 31 | void __init dm646x_init(void); |
Chaithrika U S | 25acf55 | 2009-06-05 06:28:08 -0400 | [diff] [blame] | 32 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); |
| 33 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); |
Sekhar Nori | c1978e1 | 2009-11-24 18:25:15 +0530 | [diff] [blame] | 34 | void __init dm646x_board_setup_refclk(struct clk *clk); |
Rajashekhara, Sudhakar | cce3ddd | 2010-06-29 11:35:15 +0530 | [diff] [blame] | 35 | int __init dm646x_init_edma(struct edma_rsv_info *rsv); |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 36 | |
Muralidharan Karicheri | 85609c1 | 2009-09-16 13:15:30 -0400 | [diff] [blame] | 37 | void dm646x_video_init(void); |
| 38 | |
| 39 | enum vpif_if_type { |
| 40 | VPIF_IF_BT656, |
| 41 | VPIF_IF_BT1120, |
| 42 | VPIF_IF_RAW_BAYER |
| 43 | }; |
| 44 | |
| 45 | struct vpif_interface { |
| 46 | enum vpif_if_type if_type; |
| 47 | unsigned hd_pol:1; |
| 48 | unsigned vd_pol:1; |
| 49 | unsigned fid_pol:1; |
| 50 | }; |
| 51 | |
| 52 | struct vpif_subdev_info { |
| 53 | const char *name; |
| 54 | struct i2c_board_info board_info; |
| 55 | u32 input; |
| 56 | u32 output; |
| 57 | unsigned can_route:1; |
| 58 | struct vpif_interface vpif_if; |
| 59 | }; |
| 60 | |
| 61 | struct vpif_display_config { |
| 62 | int (*set_clock)(int, int); |
| 63 | struct vpif_subdev_info *subdevinfo; |
| 64 | int subdev_count; |
| 65 | const char **output; |
| 66 | int output_count; |
| 67 | const char *card_name; |
| 68 | }; |
| 69 | |
| 70 | struct vpif_input { |
| 71 | struct v4l2_input input; |
| 72 | const char *subdev_name; |
| 73 | }; |
| 74 | |
| 75 | #define VPIF_CAPTURE_MAX_CHANNELS 2 |
| 76 | |
| 77 | struct vpif_capture_chan_config { |
| 78 | const struct vpif_input *inputs; |
| 79 | int input_count; |
| 80 | }; |
| 81 | |
| 82 | struct vpif_capture_config { |
| 83 | int (*setup_input_channel_mode)(int); |
| 84 | int (*setup_input_path)(int, const char *); |
| 85 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; |
| 86 | struct vpif_subdev_info *subdev_info; |
| 87 | int subdev_count; |
| 88 | const char *card_name; |
| 89 | }; |
| 90 | |
| 91 | void dm646x_setup_vpif(struct vpif_display_config *, |
| 92 | struct vpif_capture_config *); |
| 93 | |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 94 | #endif /* __ASM_ARCH_DM646X_H */ |