M5275EVB.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. /*
  2. * Configuation settings for the Motorola MC5275EVB board.
  3. *
  4. * By Arthur Shipkowski <art@videon-central.com>
  5. * Copyright (C) 2005 Videon Central, Inc.
  6. *
  7. * Based off of M5272C3 board code by Josef Baumgartner
  8. * <josef.baumgartner@telex.de>
  9. *
  10. * See file CREDITS for list of people who contributed to this
  11. * project.
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License as
  15. * published by the Free Software Foundation; either version 2 of
  16. * the License, or (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  26. * MA 02111-1307 USA
  27. */
  28. /*
  29. * board/config.h - configuration options, board specific
  30. */
  31. #ifndef _M5275EVB_H
  32. #define _M5275EVB_H
  33. /*
  34. * High Level Configuration Options
  35. * (easy to change)
  36. */
  37. #define CONFIG_MCF52x2 /* define processor family */
  38. #define CONFIG_M5275 /* define processor type */
  39. #define CONFIG_M5275EVB /* define board type */
  40. #define CONFIG_MCFTMR
  41. #define CONFIG_MCFUART
  42. #define CONFIG_SYS_UART_PORT (0)
  43. #define CONFIG_BAUDRATE 115200
  44. #define CONFIG_SYS_BAUDRATE_TABLE { 9600 , 19200 , 38400 , 57600, 115200 }
  45. /* Configuration for environment
  46. * Environment is embedded in u-boot in the second sector of the flash
  47. */
  48. #ifndef CONFIG_MONITOR_IS_IN_RAM
  49. #define CONFIG_ENV_OFFSET 0x4000
  50. #define CONFIG_ENV_SECT_SIZE 0x2000
  51. #define CONFIG_ENV_IS_IN_FLASH 1
  52. #else
  53. #define CONFIG_ENV_ADDR 0xffe04000
  54. #define CONFIG_ENV_SECT_SIZE 0x2000
  55. #define CONFIG_ENV_IS_IN_FLASH 1
  56. #endif
  57. /*
  58. * BOOTP options
  59. */
  60. #define CONFIG_BOOTP_BOOTFILESIZE
  61. #define CONFIG_BOOTP_BOOTPATH
  62. #define CONFIG_BOOTP_GATEWAY
  63. #define CONFIG_BOOTP_HOSTNAME
  64. /* Available command configuration */
  65. #include <config_cmd_default.h>
  66. #define CONFIG_CMD_CACHE
  67. #define CONFIG_CMD_PING
  68. #define CONFIG_CMD_MII
  69. #define CONFIG_CMD_NET
  70. #define CONFIG_CMD_ELF
  71. #define CONFIG_CMD_FLASH
  72. #define CONFIG_CMD_I2C
  73. #define CONFIG_CMD_MEMORY
  74. #define CONFIG_CMD_DHCP
  75. #undef CONFIG_CMD_LOADS
  76. #undef CONFIG_CMD_LOADB
  77. #define CONFIG_MCFFEC
  78. #ifdef CONFIG_MCFFEC
  79. #define CONFIG_MII 1
  80. #define CONFIG_MII_INIT 1
  81. #define CONFIG_SYS_DISCOVER_PHY
  82. #define CONFIG_SYS_RX_ETH_BUFFER 8
  83. #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  84. #define CONFIG_SYS_FEC0_PINMUX 0
  85. #define CONFIG_SYS_FEC0_MIIBASE CONFIG_SYS_FEC0_IOBASE
  86. #define CONFIG_SYS_FEC1_PINMUX 0
  87. #define CONFIG_SYS_FEC1_MIIBASE CONFIG_SYS_FEC1_IOBASE
  88. #define MCFFEC_TOUT_LOOP 50000
  89. #define CONFIG_HAS_ETH1
  90. /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
  91. #ifndef CONFIG_SYS_DISCOVER_PHY
  92. #define FECDUPLEX FULL
  93. #define FECSPEED _100BASET
  94. #else
  95. #ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  96. #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  97. #endif
  98. #endif
  99. #endif
  100. /* I2C */
  101. #define CONFIG_FSL_I2C
  102. #define CONFIG_HARD_I2C /* I2C with hw support */
  103. #undef CONFIG_SOFT_I2C
  104. #define CONFIG_SYS_I2C_SPEED 80000
  105. #define CONFIG_SYS_I2C_SLAVE 0x7F
  106. #define CONFIG_SYS_I2C_OFFSET 0x00000300
  107. #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
  108. #define CONFIG_SYS_I2C_PINMUX_REG (gpio_reg->par_feci2c)
  109. #define CONFIG_SYS_I2C_PINMUX_CLR (0xFFF0)
  110. #define CONFIG_SYS_I2C_PINMUX_SET (0x000F)
  111. #define CONFIG_SYS_PROMPT "-> "
  112. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  113. #if (CONFIG_CMD_KGDB)
  114. # define CONFIG_SYS_CBSIZE 1024
  115. #else
  116. # define CONFIG_SYS_CBSIZE 256
  117. #endif
  118. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  119. #define CONFIG_SYS_MAXARGS 16
  120. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  121. #define CONFIG_SYS_LOAD_ADDR 0x800000
  122. #define CONFIG_BOOTDELAY 5
  123. #define CONFIG_BOOTCOMMAND "bootm ffe40000"
  124. #define CONFIG_SYS_MEMTEST_START 0x400
  125. #define CONFIG_SYS_MEMTEST_END 0x380000
  126. #ifdef CONFIG_MCFFEC
  127. # define CONFIG_NET_RETRY_COUNT 5
  128. # define CONFIG_OVERWRITE_ETHADDR_ONCE
  129. #endif /* FEC_ENET */
  130. #define CONFIG_EXTRA_ENV_SETTINGS \
  131. "netdev=eth0\0" \
  132. "loadaddr=10000\0" \
  133. "uboot=u-boot.bin\0" \
  134. "load=tftp ${loadaddr} ${uboot}\0" \
  135. "upd=run load; run prog\0" \
  136. "prog=prot off ffe00000 ffe3ffff;" \
  137. "era ffe00000 ffe3ffff;" \
  138. "cp.b ${loadaddr} ffe00000 ${filesize};"\
  139. "save\0" \
  140. ""
  141. #define CONFIG_SYS_HZ 1000
  142. #define CONFIG_SYS_CLK 150000000
  143. /*
  144. * Low Level Configuration Settings
  145. * (address mappings, register initial values, etc.)
  146. * You should know what you are doing if you make changes here.
  147. */
  148. #define CONFIG_SYS_MBAR 0x40000000
  149. /*-----------------------------------------------------------------------
  150. * Definitions for initial stack pointer and data area (in DPRAM)
  151. */
  152. #define CONFIG_SYS_INIT_RAM_ADDR 0x20000000
  153. #define CONFIG_SYS_INIT_RAM_SIZE 0x10000 /* Size of used area in internal SRAM */
  154. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  155. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  156. /*-----------------------------------------------------------------------
  157. * Start addresses for the final memory configuration
  158. * (Set up by the startup code)
  159. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  160. */
  161. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  162. #define CONFIG_SYS_SDRAM_SIZE 16 /* SDRAM size in MB */
  163. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE
  164. #ifdef CONFIG_MONITOR_IS_IN_RAM
  165. #define CONFIG_SYS_MONITOR_BASE 0x20000
  166. #else
  167. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE + 0x400)
  168. #endif
  169. #define CONFIG_SYS_MONITOR_LEN 0x20000
  170. #define CONFIG_SYS_MALLOC_LEN (256 << 10)
  171. #define CONFIG_SYS_BOOTPARAMS_LEN 64*1024
  172. /*
  173. * For booting Linux, the board info and command line data
  174. * have to be in the first 8 MB of memory, since this is
  175. * the maximum mapped by the Linux kernel during initialization ??
  176. */
  177. #define CONFIG_SYS_BOOTMAPSZ (CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
  178. #define CONFIG_SYS_BOOTM_LEN (CONFIG_SYS_SDRAM_SIZE << 20)
  179. /*-----------------------------------------------------------------------
  180. * FLASH organization
  181. */
  182. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  183. #define CONFIG_SYS_MAX_FLASH_SECT 11 /* max number of sectors on one chip */
  184. #define CONFIG_SYS_FLASH_ERASE_TOUT 1000
  185. #define CONFIG_SYS_FLASH_CFI 1
  186. #define CONFIG_FLASH_CFI_DRIVER 1
  187. #define CONFIG_SYS_FLASH_SIZE 0x200000
  188. /*-----------------------------------------------------------------------
  189. * Cache Configuration
  190. */
  191. #define CONFIG_SYS_CACHELINE_SIZE 16
  192. #define ICACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \
  193. CONFIG_SYS_INIT_RAM_SIZE - 8)
  194. #define DCACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \
  195. CONFIG_SYS_INIT_RAM_SIZE - 4)
  196. #define CONFIG_SYS_ICACHE_INV (CF_CACR_CINV | CF_CACR_INVI)
  197. #define CONFIG_SYS_CACHE_ACR0 (CONFIG_SYS_SDRAM_BASE | \
  198. CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
  199. CF_ACR_EN | CF_ACR_SM_ALL)
  200. #define CONFIG_SYS_CACHE_ICACR (CF_CACR_CENB | CF_CACR_CINV | \
  201. CF_CACR_DISD | CF_CACR_INVI | \
  202. CF_CACR_CEIB | CF_CACR_DCM | \
  203. CF_CACR_EUSP)
  204. /*-----------------------------------------------------------------------
  205. * Memory bank definitions
  206. */
  207. #define CONFIG_SYS_CS0_BASE 0xffe00000
  208. #define CONFIG_SYS_CS0_CTRL 0x00001980
  209. #define CONFIG_SYS_CS0_MASK 0x001F0001
  210. #define CONFIG_SYS_CS1_BASE 0x30000000
  211. #define CONFIG_SYS_CS1_CTRL 0x00001900
  212. #define CONFIG_SYS_CS1_MASK 0x00070001
  213. /*-----------------------------------------------------------------------
  214. * Port configuration
  215. */
  216. #define CONFIG_SYS_FECI2C 0x0FA0
  217. #endif /* _M5275EVB_H */