davinci.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * This file contains the processor specific definitions
  3. * of the TI DM644x, DM355, DM365, and DM646x.
  4. *
  5. * Copyright (C) 2011 Texas Instruments Incorporated
  6. * Copyright (c) 2007 Deep Root Systems, LLC
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation version 2.
  11. *
  12. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  13. * kind, whether express or implied; without even the implied warranty
  14. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #ifndef __DAVINCI_H
  18. #define __DAVINCI_H
  19. #include <linux/clk.h>
  20. #include <linux/videodev2.h>
  21. #include <linux/davinci_emac.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/spi/spi.h>
  24. #include <linux/platform_data/davinci_asp.h>
  25. #include <linux/platform_data/edma.h>
  26. #include <linux/platform_data/keyscan-davinci.h>
  27. #include <mach/hardware.h>
  28. #include <media/davinci/vpfe_capture.h>
  29. #include <media/davinci/vpif_types.h>
  30. #include <media/davinci/vpss.h>
  31. #include <media/davinci/vpbe_types.h>
  32. #include <media/davinci/vpbe_venc.h>
  33. #include <media/davinci/vpbe.h>
  34. #include <media/davinci/vpbe_osd.h>
  35. #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
  36. #define SYSMOD_VDAC_CONFIG 0x2c
  37. #define SYSMOD_VIDCLKCTL 0x38
  38. #define SYSMOD_VPSS_CLKCTL 0x44
  39. #define SYSMOD_VDD3P3VPWDN 0x48
  40. #define SYSMOD_VSCLKDIS 0x6c
  41. #define SYSMOD_PUPDCTL1 0x7c
  42. /* VPSS CLKCTL bit definitions */
  43. #define VPSS_MUXSEL_EXTCLK_ENABLE BIT(1)
  44. #define VPSS_VENCCLKEN_ENABLE BIT(3)
  45. #define VPSS_DACCLKEN_ENABLE BIT(4)
  46. #define VPSS_PLLC2SYSCLK5_ENABLE BIT(5)
  47. extern void __iomem *davinci_sysmod_base;
  48. #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
  49. void davinci_map_sysmod(void);
  50. #define DAVINCI_GPIO_BASE 0x01C67000
  51. int davinci_gpio_register(struct resource *res, int size, void *pdata);
  52. /* DM355 base addresses */
  53. #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000
  54. #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
  55. #define ASP1_TX_EVT_EN 1
  56. #define ASP1_RX_EVT_EN 2
  57. /* DM365 base addresses */
  58. #define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
  59. #define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
  60. #define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
  61. /* DM644x base addresses */
  62. #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000
  63. #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
  64. #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
  65. #define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
  66. #define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
  67. /* DM646x base addresses */
  68. #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
  69. #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
  70. int davinci_init_wdt(void);
  71. /* DM355 function declarations */
  72. void dm355_init(void);
  73. void dm355_init_spi0(unsigned chipselect_mask,
  74. const struct spi_board_info *info, unsigned len);
  75. void dm355_init_asp1(u32 evt_enable);
  76. int dm355_init_video(struct vpfe_config *, struct vpbe_config *);
  77. int dm355_gpio_register(void);
  78. /* DM365 function declarations */
  79. void dm365_init(void);
  80. void dm365_init_asp(void);
  81. void dm365_init_vc(void);
  82. void dm365_init_ks(struct davinci_ks_platform_data *pdata);
  83. void dm365_init_rtc(void);
  84. void dm365_init_spi0(unsigned chipselect_mask,
  85. const struct spi_board_info *info, unsigned len);
  86. int dm365_init_video(struct vpfe_config *, struct vpbe_config *);
  87. int dm365_gpio_register(void);
  88. /* DM644x function declarations */
  89. void dm644x_init(void);
  90. void dm644x_init_asp(void);
  91. int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
  92. int dm644x_gpio_register(void);
  93. /* DM646x function declarations */
  94. void dm646x_init(void);
  95. void dm646x_init_mcasp0(struct snd_platform_data *pdata);
  96. void dm646x_init_mcasp1(struct snd_platform_data *pdata);
  97. int dm646x_init_edma(struct edma_rsv_info *rsv);
  98. void dm646x_video_init(void);
  99. void dm646x_setup_vpif(struct vpif_display_config *,
  100. struct vpif_capture_config *);
  101. int dm646x_gpio_register(void);
  102. extern struct platform_device dm365_serial_device[];
  103. extern struct platform_device dm355_serial_device[];
  104. extern struct platform_device dm644x_serial_device[];
  105. extern struct platform_device dm646x_serial_device[];
  106. #endif /*__DAVINCI_H */