pll_cfg.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * PLL register values for Cirrus edb93xx boards
  3. *
  4. * Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #include <config.h>
  25. #include <asm/arch/ep93xx.h>
  26. #if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302) || \
  27. defined(CONFIG_EDB9302A)
  28. /*
  29. * fclk_div: 2, nbyp1: 1, hclk_div: 5, pclk_div: 2
  30. * pll1_x1: 294912000.000000, pll1_x2ip: 36864000.000000,
  31. * pll1_x2: 331776000.000000, pll1_out: 331776000.000000
  32. */
  33. #define CLKSET1_VAL (7 << SYSCON_CLKSET_PLL_X2IPD_SHIFT | \
  34. 8 << SYSCON_CLKSET_PLL_X2FBD2_SHIFT | \
  35. 19 << SYSCON_CLKSET_PLL_X1FBD1_SHIFT | \
  36. 1 << SYSCON_CLKSET1_PCLK_DIV_SHIFT | \
  37. 3 << SYSCON_CLKSET1_HCLK_DIV_SHIFT | \
  38. SYSCON_CLKSET1_NBYP1 | \
  39. 1 << SYSCON_CLKSET1_FCLK_DIV_SHIFT)
  40. #elif defined(CONFIG_EDB9307) || defined(CONFIG_EDB9307A) || \
  41. defined CONFIG_EDB9312 || defined(CONFIG_EDB9315) || \
  42. defined(CONFIG_EDB9315A)
  43. /*
  44. * fclk_div: 2, nbyp1: 1, hclk_div: 4, pclk_div: 2
  45. * pll1_x1: 3096576000.000000, pll1_x2ip: 129024000.000000,
  46. * pll1_x2: 3999744000.000000, pll1_out: 1999872000.000000
  47. */
  48. #define CLKSET1_VAL (23 << SYSCON_CLKSET_PLL_X2IPD_SHIFT | \
  49. 30 << SYSCON_CLKSET_PLL_X2FBD2_SHIFT | \
  50. 20 << SYSCON_CLKSET_PLL_X1FBD1_SHIFT | \
  51. 1 << SYSCON_CLKSET1_PCLK_DIV_SHIFT | \
  52. 2 << SYSCON_CLKSET1_HCLK_DIV_SHIFT | \
  53. SYSCON_CLKSET1_NBYP1 | \
  54. 1 << SYSCON_CLKSET1_FCLK_DIV_SHIFT)
  55. #else
  56. #error "Undefined board"
  57. #endif
  58. /*
  59. * usb_div: 4, nbyp2: 1, pll2_en: 1
  60. * pll2_x1: 368640000.000000, pll2_x2ip: 15360000.000000,
  61. * pll2_x2: 384000000.000000, pll2_out: 192000000.000000
  62. */
  63. #define CLKSET2_VAL (23 << SYSCON_CLKSET_PLL_X2IPD_SHIFT | \
  64. 24 << SYSCON_CLKSET_PLL_X2FBD2_SHIFT | \
  65. 24 << SYSCON_CLKSET_PLL_X1FBD1_SHIFT | \
  66. 1 << SYSCON_CLKSET_PLL_PS_SHIFT | \
  67. SYSCON_CLKSET2_PLL2_EN | \
  68. SYSCON_CLKSET2_NBYP2 | \
  69. 3 << SYSCON_CLKSET2_USB_DIV_SHIFT)