dm646x.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. #include <mach/hardware.h>
  14. #include <mach/asp.h>
  15. #include <linux/i2c.h>
  16. #include <linux/videodev2.h>
  17. #include <linux/clk.h>
  18. #include <linux/davinci_emac.h>
  19. #define DM646X_EMAC_BASE (0x01C80000)
  20. #define DM646X_EMAC_CNTRL_OFFSET (0x0000)
  21. #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000)
  22. #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000)
  23. #define DM646X_EMAC_MDIO_OFFSET (0x4000)
  24. #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000)
  25. #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
  26. #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
  27. void __init dm646x_init(void);
  28. void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
  29. void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
  30. void __init dm646x_board_setup_refclk(struct clk *clk);
  31. void dm646x_video_init(void);
  32. enum vpif_if_type {
  33. VPIF_IF_BT656,
  34. VPIF_IF_BT1120,
  35. VPIF_IF_RAW_BAYER
  36. };
  37. struct vpif_interface {
  38. enum vpif_if_type if_type;
  39. unsigned hd_pol:1;
  40. unsigned vd_pol:1;
  41. unsigned fid_pol:1;
  42. };
  43. struct vpif_subdev_info {
  44. const char *name;
  45. struct i2c_board_info board_info;
  46. u32 input;
  47. u32 output;
  48. unsigned can_route:1;
  49. struct vpif_interface vpif_if;
  50. };
  51. struct vpif_display_config {
  52. int (*set_clock)(int, int);
  53. struct vpif_subdev_info *subdevinfo;
  54. int subdev_count;
  55. const char **output;
  56. int output_count;
  57. const char *card_name;
  58. };
  59. struct vpif_input {
  60. struct v4l2_input input;
  61. const char *subdev_name;
  62. };
  63. #define VPIF_CAPTURE_MAX_CHANNELS 2
  64. struct vpif_capture_chan_config {
  65. const struct vpif_input *inputs;
  66. int input_count;
  67. };
  68. struct vpif_capture_config {
  69. int (*setup_input_channel_mode)(int);
  70. int (*setup_input_path)(int, const char *);
  71. struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
  72. struct vpif_subdev_info *subdev_info;
  73. int subdev_count;
  74. const char *card_name;
  75. };
  76. void dm646x_setup_vpif(struct vpif_display_config *,
  77. struct vpif_capture_config *);
  78. #endif /* __ASM_ARCH_DM646X_H */