clocks.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * (C) Copyright 2004
  3. * Texas Instruments, <www.ti.com>
  4. * Richard Woodruff <r-woodruff2@ti.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef _OMAP24XX_CLOCKS_H_
  22. #define _OMAP24XX_CLOCKS_H_
  23. #define COMMIT_DIVIDERS 0x1
  24. #define MODE_BYPASS_FAST 0x2
  25. #define APLL_LOCK 0xc
  26. #ifdef CONFIG_APTIX
  27. #define DPLL_LOCK 0x1 /* stay in bypass mode */
  28. #else
  29. #define DPLL_LOCK 0x3 /* DPLL lock */
  30. #endif
  31. /****************************************************************************;
  32. ; PRCM Scheme II
  33. ;
  34. ; Enable clocks and DPLL for:
  35. ; DPLL=300, DPLLout=600 M=1,N=50 CM_CLKSEL1_PLL[21:8] 12/2*50
  36. ; Core=600 (core domain) DPLLx2 CM_CLKSEL2_PLL[1:0]
  37. ; MPUF=300 (mpu domain) 2 CM_CLKSEL_MPU[4:0]
  38. ; DSPF=200 (dsp domain) 3 CM_CLKSEL_DSP[4:0]
  39. ; DSPI=100 6 CM_CLKSEL_DSP[6:5]
  40. ; DSP_S bypass CM_CLKSEL_DSP[7]
  41. ; IVAF=200 (dsp domain) 3 CM_CLKSEL_DSP[12:8]
  42. ; IVAF=100 auto
  43. ; IVAI auto
  44. ; IVA_MPU auto
  45. ; IVA_S bypass CM_CLKSEL_DSP[13]
  46. ; GFXF=50 (gfx domain) 12 CM_CLKSEL_FGX[2:0]
  47. ; SSI_SSRF=200 3 CM_CLKSEL1_CORE[24:20]
  48. ; SSI_SSTF=100 auto
  49. ; L3=100Mhz (sdram) 6 CM_CLKSEL1_CORE[4:0]
  50. ; L4=100Mhz 6
  51. ; C_L4_USB=50 12 CM_CLKSEL1_CORE[6:5]
  52. ***************************************************************************/
  53. #define II_DPLL_OUT_X2 0x2 /* x2 core out */
  54. #define II_MPU_DIV 0x2 /* mpu = core/2 */
  55. #define II_DSP_DIV 0x343 /* dsp & iva divider */
  56. #define II_GFX_DIV 0x2
  57. #define II_BUS_DIV 0x04600C26
  58. #define II_BUS_DIV_ES1 0x04601026
  59. #define II_DPLL_300 0x01832100
  60. /****************************************************************************;
  61. ; PRCM Scheme III
  62. ;
  63. ; Enable clocks and DPLL for:
  64. ; DPLL=266, DPLLout=532 M=5+1,N=133 CM_CLKSEL1_PLL[21:8] 12/6*133=266
  65. ; Core=532 (core domain) DPLLx2 CM_CLKSEL2_PLL[1:0]
  66. ; MPUF=266 (mpu domain) /2 CM_CLKSEL_MPU[4:0]
  67. ; DSPF=177.3 (dsp domain) /3 CM_CLKSEL_DSP[4:0]
  68. ; DSPI=88.67 /6 CM_CLKSEL_DSP[6:5]
  69. ; DSP_S ACTIVATED CM_CLKSEL_DSP[7]
  70. ; IVAF=88.67 (dsp domain) /3 CM_CLKSEL_DSP[12:8]
  71. ; IVAF=88.67 auto
  72. ; IVAI auto
  73. ; IVA_MPU auto
  74. ; IVA_S ACTIVATED CM_CLKSEL_DSP[13]
  75. ; GFXF=66.5 (gfx domain) /8 CM_CLKSEL_FGX[2:0]:
  76. ; SSI_SSRF=177.3 /3 CM_CLKSEL1_CORE[24:20]
  77. ; SSI_SSTF=88.67 auto
  78. ; L3=133Mhz (sdram) /4 CM_CLKSEL1_CORE[4:0]
  79. ; L4=66.5Mhz /8
  80. ; C_L4_USB=33.25 /16 CM_CLKSEL1_CORE[6:5]
  81. ***************************************************************************/
  82. #define III_DPLL_OUT_X2 0x2 /* x2 core out */
  83. #define III_MPU_DIV 0x2 /* mpu = core/2 */
  84. #define III_DSP_DIV 0x23C3 /* dsp & iva divider sych enabled*/
  85. #define III_GFX_DIV 0x2
  86. #define III_BUS_DIV 0x08300c44
  87. #define III_BUS_DIV_ES1 0x08301044
  88. #define III_DPLL_266 0x01885500
  89. /* set defaults for boot up */
  90. #ifdef PRCM_CONFIG_II
  91. # define DPLL_OUT II_DPLL_OUT_X2
  92. # define MPU_DIV II_MPU_DIV
  93. # define DSP_DIV II_DSP_DIV
  94. # define GFX_DIV II_GFX_DIV
  95. # define BUS_DIV II_BUS_DIV
  96. # define BUS_DIV_ES1 II_BUS_DIV_ES1
  97. # define DPLL_VAL II_DPLL_300
  98. #elif PRCM_CONFIG_III
  99. # define DPLL_OUT III_DPLL_OUT_X2
  100. # define MPU_DIV III_MPU_DIV
  101. # define DSP_DIV III_DSP_DIV
  102. # define GFX_DIV III_GFX_DIV
  103. # define BUS_DIV III_BUS_DIV
  104. # define BUS_DIV_ES1 III_BUS_DIV_ES1
  105. # define DPLL_VAL III_DPLL_266
  106. #endif
  107. /* lock delay time out */
  108. #define LDELAY 12000000
  109. #endif