M54451EVB.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /*
  2. * Configuation settings for the Freescale MCF54451 EVB board.
  3. *
  4. * Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. /*
  26. * board/config.h - configuration options, board specific
  27. */
  28. #ifndef _M54451EVB_H
  29. #define _M54451EVB_H
  30. /*
  31. * High Level Configuration Options
  32. * (easy to change)
  33. */
  34. #define CONFIG_MCF5445x /* define processor family */
  35. #define CONFIG_M54451 /* define processor type */
  36. #define CONFIG_M54451EVB /* M54451EVB board */
  37. #define CONFIG_MCFUART
  38. #define CONFIG_SYS_UART_PORT (0)
  39. #define CONFIG_BAUDRATE 115200
  40. #undef CONFIG_WATCHDOG
  41. #define CONFIG_TIMESTAMP /* Print image info with timestamp */
  42. /*
  43. * BOOTP options
  44. */
  45. #define CONFIG_BOOTP_BOOTFILESIZE
  46. #define CONFIG_BOOTP_BOOTPATH
  47. #define CONFIG_BOOTP_GATEWAY
  48. #define CONFIG_BOOTP_HOSTNAME
  49. /* Command line configuration */
  50. #include <config_cmd_default.h>
  51. #define CONFIG_CMD_BOOTD
  52. #define CONFIG_CMD_CACHE
  53. #define CONFIG_CMD_DATE
  54. #define CONFIG_CMD_DHCP
  55. #define CONFIG_CMD_ELF
  56. #define CONFIG_CMD_FLASH
  57. #define CONFIG_CMD_I2C
  58. #undef CONFIG_CMD_JFFS2
  59. #define CONFIG_CMD_MEMORY
  60. #define CONFIG_CMD_MISC
  61. #define CONFIG_CMD_MII
  62. #define CONFIG_CMD_NET
  63. #define CONFIG_CMD_NFS
  64. #define CONFIG_CMD_PING
  65. #define CONFIG_CMD_REGINFO
  66. #define CONFIG_CMD_SPI
  67. #define CONFIG_CMD_SF
  68. #undef CONFIG_CMD_LOADB
  69. #undef CONFIG_CMD_LOADS
  70. /* Network configuration */
  71. #define CONFIG_MCFFEC
  72. #ifdef CONFIG_MCFFEC
  73. # define CONFIG_MII 1
  74. # define CONFIG_MII_INIT 1
  75. # define CONFIG_SYS_DISCOVER_PHY
  76. # define CONFIG_SYS_RX_ETH_BUFFER 8
  77. # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  78. # define CONFIG_SYS_FEC0_PINMUX 0
  79. # define CONFIG_SYS_FEC0_MIIBASE CONFIG_SYS_FEC0_IOBASE
  80. # define MCFFEC_TOUT_LOOP 50000
  81. # define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */
  82. # define CONFIG_BOOTARGS "root=/dev/mtdblock1 rw rootfstype=jffs2 ip=none mtdparts=physmap-flash.0:2M(kernel)ro,-(jffs2)"
  83. # define CONFIG_ETHADDR 00:e0:0c:bc:e5:60
  84. # define CONFIG_ETHPRIME "FEC0"
  85. # define CONFIG_IPADDR 192.162.1.2
  86. # define CONFIG_NETMASK 255.255.255.0
  87. # define CONFIG_SERVERIP 192.162.1.1
  88. # define CONFIG_GATEWAYIP 192.162.1.1
  89. # define CONFIG_OVERWRITE_ETHADDR_ONCE
  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 /* CONFIG_SYS_DISCOVER_PHY */
  99. #endif
  100. #define CONFIG_HOSTNAME M54451EVB
  101. #ifdef CONFIG_SYS_STMICRO_BOOT
  102. /* ST Micro serial flash */
  103. #define CONFIG_SYS_LOAD_ADDR2 0x40010007
  104. #define CONFIG_EXTRA_ENV_SETTINGS \
  105. "netdev=eth0\0" \
  106. "inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0" \
  107. "loadaddr=0x40010000\0" \
  108. "sbfhdr=sbfhdr.bin\0" \
  109. "uboot=u-boot.bin\0" \
  110. "load=tftp ${loadaddr} ${sbfhdr};" \
  111. "tftp " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0" \
  112. "upd=run load; run prog\0" \
  113. "prog=sf probe 0:1 1000000 3;" \
  114. "sf erase 0 30000;" \
  115. "sf write ${loadaddr} 0 30000;" \
  116. "save\0" \
  117. ""
  118. #else
  119. #define CONFIG_SYS_UBOOT_END 0x3FFFF
  120. #define CONFIG_EXTRA_ENV_SETTINGS \
  121. "netdev=eth0\0" \
  122. "inpclk=" MK_STR(CONFIG_SYS_INPUT_CLKSRC) "\0" \
  123. "loadaddr=40010000\0" \
  124. "u-boot=u-boot.bin\0" \
  125. "load=tftp ${loadaddr) ${u-boot}\0" \
  126. "upd=run load; run prog\0" \
  127. "prog=prot off 0 " MK_STR(CONFIG_SYS_UBOOT_END) \
  128. "; era 0 " MK_STR(CONFIG_SYS_UBOOT_END) " ;" \
  129. "cp.b ${loadaddr} 0 ${filesize};" \
  130. "save\0" \
  131. ""
  132. #endif
  133. /* Realtime clock */
  134. #define CONFIG_MCFRTC
  135. #undef RTC_DEBUG
  136. #define CONFIG_SYS_RTC_OSCILLATOR (32 * CONFIG_SYS_HZ)
  137. /* Timer */
  138. #define CONFIG_MCFTMR
  139. #undef CONFIG_MCFPIT
  140. /* I2c */
  141. #define CONFIG_FSL_I2C
  142. #define CONFIG_HARD_I2C /* I2C with hardware support */
  143. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  144. #define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */
  145. #define CONFIG_SYS_I2C_SLAVE 0x7F
  146. #define CONFIG_SYS_I2C_OFFSET 0x58000
  147. #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
  148. /* DSPI and Serial Flash */
  149. #define CONFIG_CF_SPI
  150. #define CONFIG_CF_DSPI
  151. #define CONFIG_SERIAL_FLASH
  152. #define CONFIG_HARD_SPI
  153. #define CONFIG_SYS_SBFHDR_SIZE 0x7
  154. #ifdef CONFIG_CMD_SPI
  155. # define CONFIG_SPI_FLASH
  156. # define CONFIG_SPI_FLASH_STMICRO
  157. # define CONFIG_SYS_DSPI_CTAR0 (DSPI_CTAR_TRSZ(7) | \
  158. DSPI_CTAR_PCSSCK_1CLK | \
  159. DSPI_CTAR_PASC(0) | \
  160. DSPI_CTAR_PDT(0) | \
  161. DSPI_CTAR_CSSCK(0) | \
  162. DSPI_CTAR_ASC(0) | \
  163. DSPI_CTAR_DT(1))
  164. # define CONFIG_SYS_DSPI_CTAR1 (CONFIG_SYS_DSPI_CTAR0)
  165. # define CONFIG_SYS_DSPI_CTAR2 (CONFIG_SYS_DSPI_CTAR0)
  166. #endif
  167. /* Input, PCI, Flexbus, and VCO */
  168. #define CONFIG_EXTRA_CLOCK
  169. #define CONFIG_PRAM 2048 /* 2048 KB */
  170. #define CONFIG_SYS_PROMPT "-> "
  171. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  172. #if defined(CONFIG_CMD_KGDB)
  173. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  174. #else
  175. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  176. #endif
  177. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  178. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  179. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  180. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x10000)
  181. #define CONFIG_SYS_HZ 1000
  182. #define CONFIG_SYS_MBAR 0xFC000000
  183. /*
  184. * Low Level Configuration Settings
  185. * (address mappings, register initial values, etc.)
  186. * You should know what you are doing if you make changes here.
  187. */
  188. /*-----------------------------------------------------------------------
  189. * Definitions for initial stack pointer and data area (in DPRAM)
  190. */
  191. #define CONFIG_SYS_INIT_RAM_ADDR 0x80000000
  192. #define CONFIG_SYS_INIT_RAM_SIZE 0x8000 /* Size of used area in internal SRAM */
  193. #define CONFIG_SYS_INIT_RAM_CTRL 0x221
  194. #define CONFIG_SYS_GBL_DATA_OFFSET ((CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) - 32)
  195. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  196. #define CONFIG_SYS_SBFHDR_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - 32)
  197. /*-----------------------------------------------------------------------
  198. * Start addresses for the final memory configuration
  199. * (Set up by the startup code)
  200. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  201. */
  202. #define CONFIG_SYS_SDRAM_BASE 0x40000000
  203. #define CONFIG_SYS_SDRAM_SIZE 128 /* SDRAM size in MB */
  204. #define CONFIG_SYS_SDRAM_CFG1 0x33633F30
  205. #define CONFIG_SYS_SDRAM_CFG2 0x57670000
  206. #define CONFIG_SYS_SDRAM_CTRL 0xE20D2C00
  207. #define CONFIG_SYS_SDRAM_EMOD 0x80810000
  208. #define CONFIG_SYS_SDRAM_MODE 0x008D0000
  209. #define CONFIG_SYS_SDRAM_DRV_STRENGTH 0x44
  210. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE + 0x400
  211. #define CONFIG_SYS_MEMTEST_END ((CONFIG_SYS_SDRAM_SIZE - 3) << 20)
  212. #ifdef CONFIG_CF_SBF
  213. # define CONFIG_SERIAL_BOOT
  214. # define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_TEXT_BASE + 0x400)
  215. #else
  216. # define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE + 0x400)
  217. #endif
  218. #define CONFIG_SYS_BOOTPARAMS_LEN 64*1024
  219. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  220. /* Reserve 256 kB for malloc() */
  221. #define CONFIG_SYS_MALLOC_LEN (256 << 10)
  222. /*
  223. * For booting Linux, the board info and command line data
  224. * have to be in the first 8 MB of memory, since this is
  225. * the maximum mapped by the Linux kernel during initialization ??
  226. */
  227. /* Initial Memory map for Linux */
  228. #define CONFIG_SYS_BOOTMAPSZ (CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
  229. /* Configuration for environment
  230. * Environment is not embedded in u-boot. First time runing may have env
  231. * crc error warning if there is no correct environment on the flash.
  232. */
  233. #if defined(CONFIG_SYS_STMICRO_BOOT)
  234. # define CONFIG_ENV_IS_IN_SPI_FLASH 1
  235. # define CONFIG_ENV_SPI_CS 1
  236. # define CONFIG_ENV_OFFSET 0x20000
  237. # define CONFIG_ENV_SIZE 0x2000
  238. # define CONFIG_ENV_SECT_SIZE 0x10000
  239. #else
  240. # define CONFIG_ENV_IS_IN_FLASH 1
  241. # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
  242. # define CONFIG_ENV_SIZE 0x2000
  243. # define CONFIG_ENV_SECT_SIZE 0x20000
  244. #endif
  245. #undef CONFIG_ENV_OVERWRITE
  246. /* FLASH organization */
  247. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE
  248. #define CONFIG_SYS_FLASH_CFI
  249. #ifdef CONFIG_SYS_FLASH_CFI
  250. # define CONFIG_FLASH_CFI_DRIVER 1
  251. # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
  252. # define CONFIG_SYS_FLASH_SIZE 0x1000000 /* Max size that the board might have */
  253. # define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  254. # define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  255. # define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */
  256. # define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */
  257. # define CONFIG_SYS_FLASH_CHECKSUM
  258. # define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_CS0_BASE }
  259. #endif
  260. /*
  261. * This is setting for JFFS2 support in u-boot.
  262. * NOTE: Enable CONFIG_CMD_JFFS2 for JFFS2 support.
  263. */
  264. #ifdef CONFIG_CMD_JFFS2
  265. # define CONFIG_JFFS2_DEV "nor0"
  266. # define CONFIG_JFFS2_PART_SIZE 0x01000000
  267. # define CONFIG_JFFS2_PART_OFFSET (CONFIG_SYS_FLASH0_BASE + 0x500000)
  268. #endif
  269. /* Cache Configuration */
  270. #define CONFIG_SYS_CACHELINE_SIZE 16
  271. #define ICACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \
  272. CONFIG_SYS_INIT_RAM_SIZE - 8)
  273. #define DCACHE_STATUS (CONFIG_SYS_INIT_RAM_ADDR + \
  274. CONFIG_SYS_INIT_RAM_SIZE - 4)
  275. #define CONFIG_SYS_ICACHE_INV (CF_CACR_BCINVA + CF_CACR_ICINVA)
  276. #define CONFIG_SYS_DCACHE_INV (CF_CACR_DCINVA)
  277. #define CONFIG_SYS_CACHE_ACR2 (CONFIG_SYS_SDRAM_BASE | \
  278. CF_ADDRMASK(CONFIG_SYS_SDRAM_SIZE) | \
  279. CF_ACR_EN | CF_ACR_SM_ALL)
  280. #define CONFIG_SYS_CACHE_ICACR (CF_CACR_BEC | CF_CACR_IEC | \
  281. CF_CACR_ICINVA | CF_CACR_EUSP)
  282. #define CONFIG_SYS_CACHE_DCACR ((CONFIG_SYS_CACHE_ICACR | \
  283. CF_CACR_DEC | CF_CACR_DDCM_P | \
  284. CF_CACR_DCINVA) & ~CF_CACR_ICINVA)
  285. /*-----------------------------------------------------------------------
  286. * Memory bank definitions
  287. */
  288. /*
  289. * CS0 - NOR Flash 16MB
  290. * CS1 - Available
  291. * CS2 - Available
  292. * CS3 - Available
  293. * CS4 - Available
  294. * CS5 - Available
  295. */
  296. /* Flash */
  297. #define CONFIG_SYS_CS0_BASE 0x00000000
  298. #define CONFIG_SYS_CS0_MASK 0x00FF0001
  299. #define CONFIG_SYS_CS0_CTRL 0x00004D80
  300. #define CONFIG_SYS_SPANSION_BASE CONFIG_SYS_CS0_BASE
  301. #endif /* _M54451EVB_H */