opp2xxx.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. /*
  2. * opp2xxx.h - macros for old-style OMAP2xxx "OPP" definitions
  3. *
  4. * Copyright (C) 2005-2009 Texas Instruments, Inc.
  5. * Copyright (C) 2004-2009 Nokia Corporation
  6. *
  7. * Richard Woodruff <r-woodruff2@ti.com>
  8. *
  9. * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
  10. * These configurations are characterized by voltage and speed for clocks.
  11. * The device is only validated for certain combinations. One way to express
  12. * these combinations is via the 'ratio's' which the clocks operate with
  13. * respect to each other. These ratio sets are for a given voltage/DPLL
  14. * setting. All configurations can be described by a DPLL setting and a ratio
  15. * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
  16. *
  17. * 2430 differs from 2420 in that there are no more phase synchronizers used.
  18. * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
  19. * 2430 (iva2.1, NOdsp, mdm)
  20. *
  21. * XXX Missing voltage data.
  22. *
  23. * THe format described in this file is deprecated. Once a reasonable
  24. * OPP API exists, the data in this file should be converted to use it.
  25. *
  26. * This is technically part of the OMAP2xxx clock code.
  27. */
  28. #ifndef __ARCH_ARM_MACH_OMAP2_OPP2XXX_H
  29. #define __ARCH_ARM_MACH_OMAP2_OPP2XXX_H
  30. /**
  31. * struct prcm_config - define clock rates on a per-OPP basis (24xx)
  32. *
  33. * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
  34. * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
  35. * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
  36. *
  37. * This is deprecated. As soon as we have a decent OPP API, we should
  38. * move all this stuff to it.
  39. */
  40. struct prcm_config {
  41. unsigned long xtal_speed; /* crystal rate */
  42. unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
  43. unsigned long mpu_speed; /* speed of MPU */
  44. unsigned long cm_clksel_mpu; /* mpu divider */
  45. unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
  46. unsigned long cm_clksel_gfx; /* gfx dividers */
  47. unsigned long cm_clksel1_core; /* major subsystem dividers */
  48. unsigned long cm_clksel1_pll; /* m,n */
  49. unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
  50. unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
  51. unsigned long base_sdrc_rfr; /* base refresh timing for a set */
  52. unsigned short flags;
  53. };
  54. /* Core fields for cm_clksel, not ratio governed */
  55. #define RX_CLKSEL_DSS1 (0x10 << 8)
  56. #define RX_CLKSEL_DSS2 (0x0 << 13)
  57. #define RX_CLKSEL_SSI (0x5 << 20)
  58. /*-------------------------------------------------------------------------
  59. * Voltage/DPLL ratios
  60. *-------------------------------------------------------------------------*/
  61. /* 2430 Ratio's, 2430-Ratio Config 1 */
  62. #define R1_CLKSEL_L3 (4 << 0)
  63. #define R1_CLKSEL_L4 (2 << 5)
  64. #define R1_CLKSEL_USB (4 << 25)
  65. #define R1_CM_CLKSEL1_CORE_VAL (R1_CLKSEL_USB | RX_CLKSEL_SSI | \
  66. RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
  67. R1_CLKSEL_L4 | R1_CLKSEL_L3)
  68. #define R1_CLKSEL_MPU (2 << 0)
  69. #define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
  70. #define R1_CLKSEL_DSP (2 << 0)
  71. #define R1_CLKSEL_DSP_IF (2 << 5)
  72. #define R1_CM_CLKSEL_DSP_VAL (R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF)
  73. #define R1_CLKSEL_GFX (2 << 0)
  74. #define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
  75. #define R1_CLKSEL_MDM (4 << 0)
  76. #define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
  77. /* 2430-Ratio Config 2 */
  78. #define R2_CLKSEL_L3 (6 << 0)
  79. #define R2_CLKSEL_L4 (2 << 5)
  80. #define R2_CLKSEL_USB (2 << 25)
  81. #define R2_CM_CLKSEL1_CORE_VAL (R2_CLKSEL_USB | RX_CLKSEL_SSI | \
  82. RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
  83. R2_CLKSEL_L4 | R2_CLKSEL_L3)
  84. #define R2_CLKSEL_MPU (2 << 0)
  85. #define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
  86. #define R2_CLKSEL_DSP (2 << 0)
  87. #define R2_CLKSEL_DSP_IF (3 << 5)
  88. #define R2_CM_CLKSEL_DSP_VAL (R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF)
  89. #define R2_CLKSEL_GFX (2 << 0)
  90. #define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
  91. #define R2_CLKSEL_MDM (6 << 0)
  92. #define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
  93. /* 2430-Ratio Bootm (BYPASS) */
  94. #define RB_CLKSEL_L3 (1 << 0)
  95. #define RB_CLKSEL_L4 (1 << 5)
  96. #define RB_CLKSEL_USB (1 << 25)
  97. #define RB_CM_CLKSEL1_CORE_VAL (RB_CLKSEL_USB | RX_CLKSEL_SSI | \
  98. RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
  99. RB_CLKSEL_L4 | RB_CLKSEL_L3)
  100. #define RB_CLKSEL_MPU (1 << 0)
  101. #define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
  102. #define RB_CLKSEL_DSP (1 << 0)
  103. #define RB_CLKSEL_DSP_IF (1 << 5)
  104. #define RB_CM_CLKSEL_DSP_VAL (RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF)
  105. #define RB_CLKSEL_GFX (1 << 0)
  106. #define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
  107. #define RB_CLKSEL_MDM (1 << 0)
  108. #define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
  109. /* 2420 Ratio Equivalents */
  110. #define RXX_CLKSEL_VLYNQ (0x12 << 15)
  111. #define RXX_CLKSEL_SSI (0x8 << 20)
  112. /* 2420-PRCM III 532MHz core */
  113. #define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
  114. #define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
  115. #define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
  116. #define RIII_CM_CLKSEL1_CORE_VAL (RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
  117. RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
  118. RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
  119. RIII_CLKSEL_L3)
  120. #define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
  121. #define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
  122. #define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
  123. #define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
  124. #define RIII_SYNC_DSP (1 << 7) /* Enable sync */
  125. #define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
  126. #define RIII_SYNC_IVA (1 << 13) /* Enable sync */
  127. #define RIII_CM_CLKSEL_DSP_VAL (RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
  128. RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
  129. RIII_CLKSEL_DSP)
  130. #define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
  131. #define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
  132. /* 2420-PRCM II 600MHz core */
  133. #define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
  134. #define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
  135. #define RII_CLKSEL_USB (2 << 25) /* 50MHz */
  136. #define RII_CM_CLKSEL1_CORE_VAL (RII_CLKSEL_USB | RXX_CLKSEL_SSI | \
  137. RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
  138. RX_CLKSEL_DSS1 | RII_CLKSEL_L4 | \
  139. RII_CLKSEL_L3)
  140. #define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
  141. #define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
  142. #define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
  143. #define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
  144. #define RII_SYNC_DSP (0 << 7) /* Bypass sync */
  145. #define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */
  146. #define RII_SYNC_IVA (0 << 13) /* Bypass sync */
  147. #define RII_CM_CLKSEL_DSP_VAL (RII_SYNC_IVA | RII_CLKSEL_IVA | \
  148. RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
  149. RII_CLKSEL_DSP)
  150. #define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
  151. #define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX
  152. /* 2420-PRCM I 660MHz core */
  153. #define RI_CLKSEL_L3 (4 << 0) /* 165MHz */
  154. #define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */
  155. #define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */
  156. #define RI_CM_CLKSEL1_CORE_VAL (RI_CLKSEL_USB | \
  157. RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
  158. RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
  159. RI_CLKSEL_L4 | RI_CLKSEL_L3)
  160. #define RI_CLKSEL_MPU (2 << 0) /* 330MHz */
  161. #define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU
  162. #define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */
  163. #define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */
  164. #define RI_SYNC_DSP (1 << 7) /* Activate sync */
  165. #define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */
  166. #define RI_SYNC_IVA (0 << 13) /* Bypass sync */
  167. #define RI_CM_CLKSEL_DSP_VAL (RI_SYNC_IVA | RI_CLKSEL_IVA | \
  168. RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \
  169. RI_CLKSEL_DSP)
  170. #define RI_CLKSEL_GFX (1 << 0) /* 165MHz */
  171. #define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX
  172. /* 2420-PRCM VII (boot) */
  173. #define RVII_CLKSEL_L3 (1 << 0)
  174. #define RVII_CLKSEL_L4 (1 << 5)
  175. #define RVII_CLKSEL_DSS1 (1 << 8)
  176. #define RVII_CLKSEL_DSS2 (0 << 13)
  177. #define RVII_CLKSEL_VLYNQ (1 << 15)
  178. #define RVII_CLKSEL_SSI (1 << 20)
  179. #define RVII_CLKSEL_USB (1 << 25)
  180. #define RVII_CM_CLKSEL1_CORE_VAL (RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \
  181. RVII_CLKSEL_VLYNQ | \
  182. RVII_CLKSEL_DSS2 | RVII_CLKSEL_DSS1 | \
  183. RVII_CLKSEL_L4 | RVII_CLKSEL_L3)
  184. #define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
  185. #define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
  186. #define RVII_CLKSEL_DSP (1 << 0)
  187. #define RVII_CLKSEL_DSP_IF (1 << 5)
  188. #define RVII_SYNC_DSP (0 << 7)
  189. #define RVII_CLKSEL_IVA (1 << 8)
  190. #define RVII_SYNC_IVA (0 << 13)
  191. #define RVII_CM_CLKSEL_DSP_VAL (RVII_SYNC_IVA | RVII_CLKSEL_IVA | \
  192. RVII_SYNC_DSP | RVII_CLKSEL_DSP_IF | \
  193. RVII_CLKSEL_DSP)
  194. #define RVII_CLKSEL_GFX (1 << 0)
  195. #define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
  196. /*-------------------------------------------------------------------------
  197. * 2430 Target modes: Along with each configuration the CPU has several
  198. * modes which goes along with them. Modes mainly are the addition of
  199. * describe DPLL combinations to go along with a ratio.
  200. *-------------------------------------------------------------------------*/
  201. /* Hardware governed */
  202. #define MX_48M_SRC (0 << 3)
  203. #define MX_54M_SRC (0 << 5)
  204. #define MX_APLLS_CLIKIN_12 (3 << 23)
  205. #define MX_APLLS_CLIKIN_13 (2 << 23)
  206. #define MX_APLLS_CLIKIN_19_2 (0 << 23)
  207. /*
  208. * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
  209. * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
  210. */
  211. #define M5A_DPLL_MULT_12 (133 << 12)
  212. #define M5A_DPLL_DIV_12 (5 << 8)
  213. #define M5A_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  214. M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
  215. MX_APLLS_CLIKIN_12)
  216. #define M5A_DPLL_MULT_13 (61 << 12)
  217. #define M5A_DPLL_DIV_13 (2 << 8)
  218. #define M5A_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  219. M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
  220. MX_APLLS_CLIKIN_13)
  221. #define M5A_DPLL_MULT_19 (55 << 12)
  222. #define M5A_DPLL_DIV_19 (3 << 8)
  223. #define M5A_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
  224. M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
  225. MX_APLLS_CLIKIN_19_2)
  226. /* #5b (ratio1) target DPLL = 200*2 = 400MHz */
  227. #define M5B_DPLL_MULT_12 (50 << 12)
  228. #define M5B_DPLL_DIV_12 (2 << 8)
  229. #define M5B_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  230. M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
  231. MX_APLLS_CLIKIN_12)
  232. #define M5B_DPLL_MULT_13 (200 << 12)
  233. #define M5B_DPLL_DIV_13 (12 << 8)
  234. #define M5B_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  235. M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
  236. MX_APLLS_CLIKIN_13)
  237. #define M5B_DPLL_MULT_19 (125 << 12)
  238. #define M5B_DPLL_DIV_19 (31 << 8)
  239. #define M5B_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
  240. M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
  241. MX_APLLS_CLIKIN_19_2)
  242. /*
  243. * #4 (ratio2), DPLL = 399*2 = 798MHz, L3=133MHz
  244. */
  245. #define M4_DPLL_MULT_12 (133 << 12)
  246. #define M4_DPLL_DIV_12 (3 << 8)
  247. #define M4_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  248. M4_DPLL_DIV_12 | M4_DPLL_MULT_12 | \
  249. MX_APLLS_CLIKIN_12)
  250. #define M4_DPLL_MULT_13 (399 << 12)
  251. #define M4_DPLL_DIV_13 (12 << 8)
  252. #define M4_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  253. M4_DPLL_DIV_13 | M4_DPLL_MULT_13 | \
  254. MX_APLLS_CLIKIN_13)
  255. #define M4_DPLL_MULT_19 (145 << 12)
  256. #define M4_DPLL_DIV_19 (6 << 8)
  257. #define M4_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
  258. M4_DPLL_DIV_19 | M4_DPLL_MULT_19 | \
  259. MX_APLLS_CLIKIN_19_2)
  260. /*
  261. * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
  262. */
  263. #define M3_DPLL_MULT_12 (55 << 12)
  264. #define M3_DPLL_DIV_12 (1 << 8)
  265. #define M3_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  266. M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
  267. MX_APLLS_CLIKIN_12)
  268. #define M3_DPLL_MULT_13 (76 << 12)
  269. #define M3_DPLL_DIV_13 (2 << 8)
  270. #define M3_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  271. M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
  272. MX_APLLS_CLIKIN_13)
  273. #define M3_DPLL_MULT_19 (17 << 12)
  274. #define M3_DPLL_DIV_19 (0 << 8)
  275. #define M3_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
  276. M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
  277. MX_APLLS_CLIKIN_19_2)
  278. /*
  279. * #2 (ratio1) DPLL = 330*2 = 660MHz, L3=165MHz
  280. */
  281. #define M2_DPLL_MULT_12 (55 << 12)
  282. #define M2_DPLL_DIV_12 (1 << 8)
  283. #define M2_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  284. M2_DPLL_DIV_12 | M2_DPLL_MULT_12 | \
  285. MX_APLLS_CLIKIN_12)
  286. /* Speed changes - Used 658.7MHz instead of 660MHz for LP-Refresh M=76 N=2,
  287. * relock time issue */
  288. /* Core frequency changed from 330/165 to 329/164 MHz*/
  289. #define M2_DPLL_MULT_13 (76 << 12)
  290. #define M2_DPLL_DIV_13 (2 << 8)
  291. #define M2_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  292. M2_DPLL_DIV_13 | M2_DPLL_MULT_13 | \
  293. MX_APLLS_CLIKIN_13)
  294. #define M2_DPLL_MULT_19 (17 << 12)
  295. #define M2_DPLL_DIV_19 (0 << 8)
  296. #define M2_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
  297. M2_DPLL_DIV_19 | M2_DPLL_MULT_19 | \
  298. MX_APLLS_CLIKIN_19_2)
  299. /* boot (boot) */
  300. #define MB_DPLL_MULT (1 << 12)
  301. #define MB_DPLL_DIV (0 << 8)
  302. #define MB_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  303. MB_DPLL_DIV | MB_DPLL_MULT | \
  304. MX_APLLS_CLIKIN_12)
  305. #define MB_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  306. MB_DPLL_DIV | MB_DPLL_MULT | \
  307. MX_APLLS_CLIKIN_13)
  308. #define MB_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
  309. MB_DPLL_DIV | MB_DPLL_MULT | \
  310. MX_APLLS_CLIKIN_19)
  311. /*
  312. * 2430 - chassis (sedna)
  313. * 165 (ratio1) same as above #2
  314. * 150 (ratio1)
  315. * 133 (ratio2) same as above #4
  316. * 110 (ratio2) same as above #3
  317. * 104 (ratio2)
  318. * boot (boot)
  319. */
  320. /* PRCM I target DPLL = 2*330MHz = 660MHz */
  321. #define MI_DPLL_MULT_12 (55 << 12)
  322. #define MI_DPLL_DIV_12 (1 << 8)
  323. #define MI_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  324. MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \
  325. MX_APLLS_CLIKIN_12)
  326. /*
  327. * 2420 Equivalent - mode registers
  328. * PRCM II , target DPLL = 2*300MHz = 600MHz
  329. */
  330. #define MII_DPLL_MULT_12 (50 << 12)
  331. #define MII_DPLL_DIV_12 (1 << 8)
  332. #define MII_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  333. MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
  334. MX_APLLS_CLIKIN_12)
  335. #define MII_DPLL_MULT_13 (300 << 12)
  336. #define MII_DPLL_DIV_13 (12 << 8)
  337. #define MII_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  338. MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
  339. MX_APLLS_CLIKIN_13)
  340. /* PRCM III target DPLL = 2*266 = 532MHz*/
  341. #define MIII_DPLL_MULT_12 (133 << 12)
  342. #define MIII_DPLL_DIV_12 (5 << 8)
  343. #define MIII_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
  344. MIII_DPLL_DIV_12 | \
  345. MIII_DPLL_MULT_12 | MX_APLLS_CLIKIN_12)
  346. #define MIII_DPLL_MULT_13 (266 << 12)
  347. #define MIII_DPLL_DIV_13 (12 << 8)
  348. #define MIII_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
  349. MIII_DPLL_DIV_13 | \
  350. MIII_DPLL_MULT_13 | MX_APLLS_CLIKIN_13)
  351. /* PRCM VII (boot bypass) */
  352. #define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
  353. #define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
  354. /* High and low operation value */
  355. #define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
  356. #define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
  357. /* MPU speed defines */
  358. #define S12M 12000000
  359. #define S13M 13000000
  360. #define S19M 19200000
  361. #define S26M 26000000
  362. #define S100M 100000000
  363. #define S133M 133000000
  364. #define S150M 150000000
  365. #define S164M 164000000
  366. #define S165M 165000000
  367. #define S199M 199000000
  368. #define S200M 200000000
  369. #define S266M 266000000
  370. #define S300M 300000000
  371. #define S329M 329000000
  372. #define S330M 330000000
  373. #define S399M 399000000
  374. #define S400M 400000000
  375. #define S532M 532000000
  376. #define S600M 600000000
  377. #define S658M 658000000
  378. #define S660M 660000000
  379. #define S798M 798000000
  380. extern const struct prcm_config omap2420_rate_table[];
  381. #ifdef CONFIG_SOC_OMAP2430
  382. extern const struct prcm_config omap2430_rate_table[];
  383. #else
  384. #define omap2430_rate_table NULL
  385. #endif
  386. extern const struct prcm_config *rate_table;
  387. extern const struct prcm_config *curr_prcm_set;
  388. #endif