suvd3.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. * Copyright (C) 2006 Freescale Semiconductor, Inc.
  3. * Dave Liu <daveliu@freescale.com>
  4. *
  5. * Copyright (C) 2007 Logic Product Development, Inc.
  6. * Peter Barada <peterb@logicpd.com>
  7. *
  8. * Copyright (C) 2007 MontaVista Software, Inc.
  9. * Anton Vorontsov <avorontsov@ru.mvista.com>
  10. *
  11. * (C) Copyright 2010
  12. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License as
  16. * published by the Free Software Foundation; either version 2 of
  17. * the License, or (at your option) any later version.
  18. */
  19. #ifndef __CONFIG_H
  20. #define __CONFIG_H
  21. /*
  22. * High Level Configuration Options
  23. */
  24. #define CONFIG_QE /* Has QE */
  25. #define CONFIG_MPC832x /* MPC832x CPU specific */
  26. #define CONFIG_SUVD3 /* SUVD3 board specific */
  27. #define CONFIG_HOSTNAME suvd3
  28. #define CONFIG_KM_BOARD_NAME "suvd3"
  29. #define CONFIG_SYS_TEXT_BASE 0xF0000000
  30. #define CONFIG_KM_DEF_NETDEV \
  31. "netdev=eth0\0"
  32. #define CONFIG_KM_DEF_ROOTPATH \
  33. "rootpath=/opt/eldk/ppc_8xx\0"
  34. /* include common defines/options for all 83xx Keymile boards */
  35. #include "km83xx-common.h"
  36. #define CONFIG_MISC_INIT_R 1
  37. /*
  38. * System IO Config
  39. */
  40. #define CONFIG_SYS_SICRL SICRL_IRQ_CKS
  41. /*
  42. * Hardware Reset Configuration Word
  43. */
  44. #define CONFIG_SYS_HRCW_LOW (\
  45. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \
  46. HRCWL_DDR_TO_SCB_CLK_2X1 | \
  47. HRCWL_CSB_TO_CLKIN_2X1 | \
  48. HRCWL_CORE_TO_CSB_2_5X1 | \
  49. HRCWL_CE_PLL_VCO_DIV_2 | \
  50. HRCWL_CE_TO_PLL_1X3)
  51. #define CONFIG_SYS_HRCW_HIGH (\
  52. HRCWH_PCI_AGENT | \
  53. HRCWH_PCI_ARBITER_DISABLE | \
  54. HRCWH_CORE_ENABLE | \
  55. HRCWH_FROM_0X00000100 | \
  56. HRCWH_BOOTSEQ_DISABLE | \
  57. HRCWH_SW_WATCHDOG_DISABLE | \
  58. HRCWH_ROM_LOC_LOCAL_16BIT | \
  59. HRCWH_BIG_ENDIAN | \
  60. HRCWH_LALE_NORMAL)
  61. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
  62. #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
  63. SDRAM_CFG_32_BE | \
  64. SDRAM_CFG_SREN)
  65. #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
  66. #define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
  67. #define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
  68. (0x200 << SDRAM_INTERVAL_REFINT_SHIFT))
  69. #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
  70. CSCONFIG_ODT_WR_CFG | \
  71. CSCONFIG_ROW_BIT_13 | \
  72. CSCONFIG_COL_BIT_10)
  73. #define CONFIG_SYS_DDR_MODE 0x47860252
  74. #define CONFIG_SYS_DDR_MODE2 0x8080c000
  75. #define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
  76. (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
  77. (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
  78. (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
  79. (0 << TIMING_CFG0_WWT_SHIFT) | \
  80. (0 << TIMING_CFG0_RRT_SHIFT) | \
  81. (0 << TIMING_CFG0_WRT_SHIFT) | \
  82. (0 << TIMING_CFG0_RWT_SHIFT))
  83. #define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \
  84. (2 << TIMING_CFG1_WRTORD_SHIFT) | \
  85. (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
  86. (2 << TIMING_CFG1_WRREC_SHIFT) | \
  87. (6 << TIMING_CFG1_REFREC_SHIFT) | \
  88. (2 << TIMING_CFG1_ACTTORW_SHIFT) | \
  89. (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
  90. (2 << TIMING_CFG1_PRETOACT_SHIFT))
  91. #define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
  92. (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
  93. (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
  94. (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
  95. (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
  96. (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
  97. (5 << TIMING_CFG2_CPO_SHIFT))
  98. #define CONFIG_SYS_DDR_TIMING_3 0x00000000
  99. #define CONFIG_SYS_PIGGY_BASE 0xE8000000
  100. #define CONFIG_SYS_PIGGY_SIZE 128
  101. #define CONFIG_SYS_APP1_BASE 0xA0000000
  102. #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
  103. #define CONFIG_SYS_APP2_BASE 0xB0000000
  104. #define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */
  105. /* EEprom support */
  106. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  107. /*
  108. * Local Bus Configuration & Clock Setup
  109. */
  110. #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2)
  111. #define CONFIG_SYS_LBC_LBCR 0x00000000
  112. /*
  113. * Init Local Bus Memory Controller:
  114. *
  115. * Bank Bus Machine PortSz Size Device
  116. * ---- --- ------- ------ ----- ------
  117. * 2 Local UPMA 16 bit 256MB APP1
  118. * 3 Local GPCM 16 bit 256MB APP2
  119. *
  120. */
  121. /*
  122. * APP1 on the local bus CS2
  123. */
  124. #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE
  125. #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
  126. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \
  127. BR_PS_16 | \
  128. BR_MS_UPMA | \
  129. BR_V)
  130. #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE))
  131. #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \
  132. BR_PS_16 | \
  133. BR_V)
  134. #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
  135. OR_GPCM_CSNT | \
  136. OR_GPCM_ACS_DIV4 | \
  137. OR_GPCM_SCY_3 | \
  138. OR_GPCM_TRLX)
  139. #define CONFIG_SYS_MAMR (MxMR_GPL_x4DIS | \
  140. 0x0000c000 | \
  141. MxMR_WLFx_2X)
  142. #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE
  143. #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
  144. /*
  145. * MMU Setup
  146. */
  147. /* APP1: icache cacheable, but dcache-inhibit and guarded */
  148. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_APP1_BASE | BATL_PP_10 | \
  149. BATL_MEMCOHERENCE)
  150. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_APP1_BASE | BATU_BL_256M | \
  151. BATU_VS | BATU_VP)
  152. #define CONFIG_SYS_DBAT5L (CONFIG_SYS_APP1_BASE | BATL_PP_10 | \
  153. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  154. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  155. #ifdef CONFIG_PCI
  156. /* PCI MEM space: cacheable */
  157. #define CFG_IBAT6L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE)
  158. #define CFG_IBAT6U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
  159. #define CFG_DBAT6L CFG_IBAT6L
  160. #define CFG_DBAT6U CFG_IBAT6U
  161. /* PCI MMIO space: cache-inhibit and guarded */
  162. #define CFG_IBAT7L (CFG_PCI1_MMIO_PHYS | BATL_PP_10 | \
  163. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  164. #define CFG_IBAT7U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
  165. #define CFG_DBAT7L CFG_IBAT7L
  166. #define CFG_DBAT7U CFG_IBAT7U
  167. #else /* CONFIG_PCI */
  168. /* APP2: icache cacheable, but dcache-inhibit and guarded */
  169. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_10 | \
  170. BATL_MEMCOHERENCE)
  171. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_APP2_BASE | BATU_BL_256M | \
  172. BATU_VS | BATU_VP)
  173. #define CONFIG_SYS_DBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_10 | \
  174. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  175. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  176. #define CONFIG_SYS_IBAT7L (0)
  177. #define CONFIG_SYS_IBAT7U (0)
  178. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  179. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  180. #endif /* CONFIG_PCI */
  181. #endif /* __CONFIG_H */