misc_regs.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /*
  2. * arch/arm/mach-spear3xx/include/mach/misc_regs.h
  3. *
  4. * Miscellaneous registers definitions for SPEAr3xx machine family
  5. *
  6. * Copyright (C) 2009 ST Microelectronics
  7. * Viresh Kumar<viresh.kumar@st.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #ifndef __MACH_MISC_REGS_H
  14. #define __MACH_MISC_REGS_H
  15. #include <mach/spear.h>
  16. #define MISC_BASE VA_SPEAR3XX_ICM3_MISC_REG_BASE
  17. #define SOC_CFG_CTR ((unsigned int *)(MISC_BASE + 0x000))
  18. #define DIAG_CFG_CTR ((unsigned int *)(MISC_BASE + 0x004))
  19. #define PLL1_CTR ((unsigned int *)(MISC_BASE + 0x008))
  20. #define PLL1_FRQ ((unsigned int *)(MISC_BASE + 0x00C))
  21. #define PLL1_MOD ((unsigned int *)(MISC_BASE + 0x010))
  22. #define PLL2_CTR ((unsigned int *)(MISC_BASE + 0x014))
  23. /* PLL_CTR register masks */
  24. #define PLL_ENABLE 2
  25. #define PLL_MODE_SHIFT 4
  26. #define PLL_MODE_MASK 0x3
  27. #define PLL_MODE_NORMAL 0
  28. #define PLL_MODE_FRACTION 1
  29. #define PLL_MODE_DITH_DSB 2
  30. #define PLL_MODE_DITH_SSB 3
  31. #define PLL2_FRQ ((unsigned int *)(MISC_BASE + 0x018))
  32. /* PLL FRQ register masks */
  33. #define PLL_DIV_N_SHIFT 0
  34. #define PLL_DIV_N_MASK 0xFF
  35. #define PLL_DIV_P_SHIFT 8
  36. #define PLL_DIV_P_MASK 0x7
  37. #define PLL_NORM_FDBK_M_SHIFT 24
  38. #define PLL_NORM_FDBK_M_MASK 0xFF
  39. #define PLL_DITH_FDBK_M_SHIFT 16
  40. #define PLL_DITH_FDBK_M_MASK 0xFFFF
  41. #define PLL2_MOD ((unsigned int *)(MISC_BASE + 0x01C))
  42. #define PLL_CLK_CFG ((unsigned int *)(MISC_BASE + 0x020))
  43. #define CORE_CLK_CFG ((unsigned int *)(MISC_BASE + 0x024))
  44. /* CORE CLK CFG register masks */
  45. #define PLL_HCLK_RATIO_SHIFT 10
  46. #define PLL_HCLK_RATIO_MASK 0x3
  47. #define HCLK_PCLK_RATIO_SHIFT 8
  48. #define HCLK_PCLK_RATIO_MASK 0x3
  49. #define PERIP_CLK_CFG ((unsigned int *)(MISC_BASE + 0x028))
  50. /* PERIP_CLK_CFG register masks */
  51. #define UART_CLK_SHIFT 4
  52. #define UART_CLK_MASK 0x1
  53. #define FIRDA_CLK_SHIFT 5
  54. #define FIRDA_CLK_MASK 0x3
  55. #define GPT0_CLK_SHIFT 8
  56. #define GPT1_CLK_SHIFT 11
  57. #define GPT2_CLK_SHIFT 12
  58. #define GPT_CLK_MASK 0x1
  59. #define AUX_CLK_PLL3_MASK 0
  60. #define AUX_CLK_PLL1_MASK 1
  61. #define PERIP1_CLK_ENB ((unsigned int *)(MISC_BASE + 0x02C))
  62. /* PERIP1_CLK_ENB register masks */
  63. #define UART_CLK_ENB 3
  64. #define SSP_CLK_ENB 5
  65. #define I2C_CLK_ENB 7
  66. #define JPEG_CLK_ENB 8
  67. #define FIRDA_CLK_ENB 10
  68. #define GPT1_CLK_ENB 11
  69. #define GPT2_CLK_ENB 12
  70. #define ADC_CLK_ENB 15
  71. #define RTC_CLK_ENB 17
  72. #define GPIO_CLK_ENB 18
  73. #define DMA_CLK_ENB 19
  74. #define SMI_CLK_ENB 21
  75. #define GMAC_CLK_ENB 23
  76. #define USBD_CLK_ENB 24
  77. #define USBH_CLK_ENB 25
  78. #define C3_CLK_ENB 31
  79. #define SOC_CORE_ID ((unsigned int *)(MISC_BASE + 0x030))
  80. #define RAS_CLK_ENB ((unsigned int *)(MISC_BASE + 0x034))
  81. #define PERIP1_SOF_RST ((unsigned int *)(MISC_BASE + 0x038))
  82. /* PERIP1_SOF_RST register masks */
  83. #define JPEG_SOF_RST 8
  84. #define SOC_USER_ID ((unsigned int *)(MISC_BASE + 0x03C))
  85. #define RAS_SOF_RST ((unsigned int *)(MISC_BASE + 0x040))
  86. #define PRSC1_CLK_CFG ((unsigned int *)(MISC_BASE + 0x044))
  87. #define PRSC2_CLK_CFG ((unsigned int *)(MISC_BASE + 0x048))
  88. #define PRSC3_CLK_CFG ((unsigned int *)(MISC_BASE + 0x04C))
  89. /* gpt synthesizer register masks */
  90. #define GPT_MSCALE_SHIFT 0
  91. #define GPT_MSCALE_MASK 0xFFF
  92. #define GPT_NSCALE_SHIFT 12
  93. #define GPT_NSCALE_MASK 0xF
  94. #define AMEM_CLK_CFG ((unsigned int *)(MISC_BASE + 0x050))
  95. #define EXPI_CLK_CFG ((unsigned int *)(MISC_BASE + 0x054))
  96. #define CLCD_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x05C))
  97. #define FIRDA_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x060))
  98. #define UART_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x064))
  99. #define GMAC_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x068))
  100. #define RAS1_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x06C))
  101. #define RAS2_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x070))
  102. #define RAS3_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x074))
  103. #define RAS4_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x078))
  104. /* aux clk synthesiser register masks for irda to ras4 */
  105. #define AUX_EQ_SEL_SHIFT 30
  106. #define AUX_EQ_SEL_MASK 1
  107. #define AUX_EQ1_SEL 0
  108. #define AUX_EQ2_SEL 1
  109. #define AUX_XSCALE_SHIFT 16
  110. #define AUX_XSCALE_MASK 0xFFF
  111. #define AUX_YSCALE_SHIFT 0
  112. #define AUX_YSCALE_MASK 0xFFF
  113. #define ICM1_ARB_CFG ((unsigned int *)(MISC_BASE + 0x07C))
  114. #define ICM2_ARB_CFG ((unsigned int *)(MISC_BASE + 0x080))
  115. #define ICM3_ARB_CFG ((unsigned int *)(MISC_BASE + 0x084))
  116. #define ICM4_ARB_CFG ((unsigned int *)(MISC_BASE + 0x088))
  117. #define ICM5_ARB_CFG ((unsigned int *)(MISC_BASE + 0x08C))
  118. #define ICM6_ARB_CFG ((unsigned int *)(MISC_BASE + 0x090))
  119. #define ICM7_ARB_CFG ((unsigned int *)(MISC_BASE + 0x094))
  120. #define ICM8_ARB_CFG ((unsigned int *)(MISC_BASE + 0x098))
  121. #define ICM9_ARB_CFG ((unsigned int *)(MISC_BASE + 0x09C))
  122. #define DMA_CHN_CFG ((unsigned int *)(MISC_BASE + 0x0A0))
  123. #define USB2_PHY_CFG ((unsigned int *)(MISC_BASE + 0x0A4))
  124. #define GMAC_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0A8))
  125. #define EXPI_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0AC))
  126. #define PRC1_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C0))
  127. #define PRC2_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C4))
  128. #define PRC3_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C8))
  129. #define PRC4_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0CC))
  130. #define PRC1_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D0))
  131. #define PRC2_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D4))
  132. #define PRC3_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D8))
  133. #define PRC4_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0DC))
  134. #define PWRDOWN_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0E0))
  135. #define COMPSSTL_1V8_CFG ((unsigned int *)(MISC_BASE + 0x0E4))
  136. #define COMPSSTL_2V5_CFG ((unsigned int *)(MISC_BASE + 0x0E8))
  137. #define COMPCOR_3V3_CFG ((unsigned int *)(MISC_BASE + 0x0EC))
  138. #define SSTLPAD_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F0))
  139. #define BIST1_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F4))
  140. #define BIST2_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F8))
  141. #define BIST3_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0FC))
  142. #define BIST4_CFG_CTR ((unsigned int *)(MISC_BASE + 0x100))
  143. #define BIST5_CFG_CTR ((unsigned int *)(MISC_BASE + 0x104))
  144. #define BIST1_STS_RES ((unsigned int *)(MISC_BASE + 0x108))
  145. #define BIST2_STS_RES ((unsigned int *)(MISC_BASE + 0x10C))
  146. #define BIST3_STS_RES ((unsigned int *)(MISC_BASE + 0x110))
  147. #define BIST4_STS_RES ((unsigned int *)(MISC_BASE + 0x114))
  148. #define BIST5_STS_RES ((unsigned int *)(MISC_BASE + 0x118))
  149. #define SYSERR_CFG_CTR ((unsigned int *)(MISC_BASE + 0x11C))
  150. #endif /* __MACH_MISC_REGS_H */