suvd3.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. /* This needs to be set prior to including km/km83xx-common.h */
  25. #define CONFIG_SYS_TEXT_BASE 0xF0000000
  26. #if defined(CONFIG_SUVD3) /* SUVD3 board specific */
  27. #define CONFIG_HOSTNAME suvd3
  28. #define CONFIG_KM_BOARD_NAME "suvd3"
  29. /* include common defines/options for all 8321 Keymile boards */
  30. #include "km/km8321-common.h"
  31. #elif defined(CONFIG_KMVECT1) /* VECT1 board specific */
  32. #define CONFIG_HOSTNAME kmvect1
  33. #define CONFIG_KM_BOARD_NAME "kmvect1"
  34. /* include common defines/options for all 8309 Keymile boards */
  35. #include "km/km8309-common.h"
  36. #else
  37. #error Supported boards are: SUVD3, KMVECT1
  38. #endif
  39. #define CONFIG_SYS_APP1_BASE 0xA0000000
  40. #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
  41. #define CONFIG_SYS_APP2_BASE 0xB0000000
  42. #define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */
  43. /* EEprom support */
  44. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  45. /*
  46. * Init Local Bus Memory Controller:
  47. *
  48. * Bank Bus Machine PortSz Size Device
  49. * ---- --- ------- ------ ----- ------
  50. * 2 Local UPMA 16 bit 256MB APP1
  51. * 3 Local GPCM 16 bit 256MB APP2
  52. *
  53. */
  54. /*
  55. * APP1 on the local bus CS2
  56. */
  57. #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE
  58. #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
  59. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \
  60. BR_PS_16 | \
  61. BR_MS_UPMA | \
  62. BR_V)
  63. #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE))
  64. #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \
  65. BR_PS_16 | \
  66. BR_V)
  67. #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
  68. OR_GPCM_CSNT | \
  69. OR_GPCM_ACS_DIV4 | \
  70. OR_GPCM_SCY_3 | \
  71. OR_GPCM_TRLX_SET)
  72. #define CONFIG_SYS_MAMR (MxMR_GPL_x4DIS | \
  73. 0x0000c000 | \
  74. MxMR_WLFx_2X)
  75. #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE
  76. #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
  77. /*
  78. * MMU Setup
  79. */
  80. /* APP1: icache cacheable, but dcache-inhibit and guarded */
  81. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_APP1_BASE | BATL_PP_RW | \
  82. BATL_MEMCOHERENCE)
  83. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_APP1_BASE | BATU_BL_256M | \
  84. BATU_VS | BATU_VP)
  85. #define CONFIG_SYS_DBAT5L (CONFIG_SYS_APP1_BASE | BATL_PP_RW | \
  86. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  87. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  88. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_RW | \
  89. BATL_MEMCOHERENCE)
  90. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_APP2_BASE | BATU_BL_256M | \
  91. BATU_VS | BATU_VP)
  92. #define CONFIG_SYS_DBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_RW | \
  93. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  94. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  95. /*
  96. * QE UEC ethernet configuration
  97. */
  98. #if defined(CONFIG_KMVECT1)
  99. #define CONFIG_MV88E6352_SWITCH
  100. #define CONFIG_KM_MVEXTSW_ADDR 0x10
  101. /* ethernet port connected to simple switch 88e6122 (UEC0) */
  102. #define CONFIG_UEC_ETH1
  103. #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
  104. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK9
  105. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK10
  106. #define CONFIG_FIXED_PHY 0xFFFFFFFF
  107. #define CONFIG_SYS_FIXED_PHY_ADDR 0x1E /* unused address */
  108. #define CONFIG_SYS_FIXED_PHY_PORT(devnum, speed, duplex) \
  109. {devnum, speed, duplex}
  110. #define CONFIG_SYS_FIXED_PHY_PORTS \
  111. CONFIG_SYS_FIXED_PHY_PORT("UEC0", SPEED_100, DUPLEX_FULL)
  112. #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH
  113. #define CONFIG_SYS_UEC1_PHY_ADDR CONFIG_SYS_FIXED_PHY_ADDR
  114. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII
  115. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 100
  116. /* ethernet port connected to piggy (UEC2) */
  117. #define CONFIG_HAS_ETH1
  118. #define CONFIG_UEC_ETH2
  119. #define CONFIG_SYS_UEC2_UCC_NUM 2 /* UCC3 */
  120. #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE /* not used in RMII Mode */
  121. #define CONFIG_SYS_UEC2_TX_CLK QE_CLK12
  122. #define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH
  123. #define CONFIG_SYS_UEC2_PHY_ADDR 0
  124. #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
  125. #define CONFIG_SYS_UEC2_INTERFACE_SPEED 100
  126. #endif /* CONFIG_KMVECT1 */
  127. #endif /* __CONFIG_H */