mcc200.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. /*
  2. * (C) Copyright 2006
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __CONFIG_H
  24. #define __CONFIG_H
  25. /*
  26. * High Level Configuration Options
  27. * (easy to change)
  28. */
  29. #define CONFIG_MPC5200
  30. #define CONFIG_MPC5xxx 1 /* This is an MPC5xxx CPU */
  31. #define CONFIG_MCC200 1 /* ... on MCC200 board */
  32. #define CFG_MPC5XXX_CLKIN 33000000 /* ... running at 33MHz */
  33. #define CONFIG_MISC_INIT_R
  34. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  35. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  36. #define CFG_CACHELINE_SIZE 32 /* For MPC5xxx CPUs */
  37. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  38. # define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  39. #endif
  40. /*
  41. * Serial console configuration
  42. */
  43. #define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */
  44. #define CONFIG_BAUDRATE 115200
  45. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
  46. #define CONFIG_MII 1
  47. #define CONFIG_DOS_PARTITION
  48. /* USB */
  49. #define CONFIG_USB_OHCI
  50. #define ADD_USB_CMD CFG_CMD_USB | CFG_CMD_FAT
  51. #define CONFIG_USB_STORAGE
  52. /*
  53. * Supported commands
  54. */
  55. #define CONFIG_COMMANDS (CONFIG_CMD_DFL | \
  56. ADD_USB_CMD | \
  57. CFG_CMD_BEDBUG | \
  58. CFG_CMD_DATE | \
  59. CFG_CMD_DHCP | \
  60. CFG_CMD_EEPROM | \
  61. CFG_CMD_FAT | \
  62. CFG_CMD_I2C | \
  63. CFG_CMD_NFS | \
  64. CFG_CMD_SNTP )
  65. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  66. #include <cmd_confdefs.h>
  67. /*
  68. * Autobooting
  69. */
  70. #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
  71. #define CONFIG_PREBOOT "echo;" \
  72. "echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
  73. "echo"
  74. #undef CONFIG_BOOTARGS
  75. #define CONFIG_EXTRA_ENV_SETTINGS \
  76. "netdev=eth0\0" \
  77. "hostname=mcc200\0" \
  78. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  79. "nfsroot=${serverip}:${rootpath}\0" \
  80. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  81. "addip=setenv bootargs ${bootargs} " \
  82. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  83. ":${hostname}:${netdev}:off panic=1\0" \
  84. "flash_nfs=run nfsargs addip;" \
  85. "bootm ${kernel_addr}\0" \
  86. "flash_self=run ramargs addip;" \
  87. "bootm ${kernel_addr} ${ramdisk_addr}\0" \
  88. "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0" \
  89. "rootpath=/opt/eldk/ppc_6xx\0" \
  90. "bootfile=/tftpboot/mcc200/uImage\0" \
  91. "baudrate=115200\0" \
  92. "load=tftp 200000 /tftpboot/mcc200/u-boot.bin\0" \
  93. "update=protect off FFF00000 +${filesize};" \
  94. "era FFF00000 +${filesize};" \
  95. "cp.b 200000 FFF00000 ${filesize}\0" \
  96. "serverip=192.168.1.1\0" \
  97. "ipaddr=192.168.133.144\0" \
  98. "netmask=255.255.0.0\0" \
  99. "unlock=yes\0" \
  100. "ethaddr=00:02:44:7D:73:3B\0" \
  101. ""
  102. #define CONFIG_BOOTCOMMAND "run flash_self"
  103. #define CFG_HUSH_PARSER 1 /* use "hush" command parser */
  104. #define CFG_PROMPT_HUSH_PS2 "> "
  105. /*
  106. * IPB Bus clocking configuration.
  107. */
  108. #define CFG_IPBSPEED_133 /* define for 133MHz speed */
  109. /*
  110. * I2C configuration
  111. */
  112. #define CONFIG_HARD_I2C 1 /* I2C with hardware support */
  113. #define CFG_I2C_MODULE 2 /* Select I2C module #1 or #2 */
  114. #define CFG_I2C_SPEED 100000 /* 100 kHz */
  115. #define CFG_I2C_SLAVE 0x7F
  116. /*
  117. * EEPROM configuration
  118. */
  119. #define CFG_I2C_EEPROM_ADDR 0x58
  120. #define CFG_I2C_EEPROM_ADDR_LEN 1
  121. #define CFG_EEPROM_PAGE_WRITE_BITS 4
  122. #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10
  123. /*
  124. * RTC configuration
  125. */
  126. #define CONFIG_RTC_PCF8563
  127. #define CFG_I2C_RTC_ADDR 0x51
  128. /*
  129. * Flash configuration (8,16 or 32 MB)
  130. * TEXT base always at 0xFFF00000
  131. * ENV_ADDR always at 0xFFF40000
  132. * FLASH_BASE at 0xFC000000 for 64 MB (only 32MB are supported, not enough addr lines!!!)
  133. * 0xFE000000 for 32 MB
  134. * 0xFF000000 for 16 MB
  135. * 0xFF800000 for 8 MB
  136. */
  137. #define CFG_FLASH_BASE 0xfc000000
  138. #define CFG_FLASH_SIZE 0x04000000
  139. #define CFG_FLASH_CFI /* The flash is CFI compatible */
  140. #define CFG_FLASH_CFI_DRIVER /* Use common CFI driver */
  141. #define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE }
  142. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  143. #define CFG_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
  144. #define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
  145. #define CFG_FLASH_PROTECTION 1 /* hardware flash protection */
  146. #define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  147. #define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  148. #define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
  149. #define CFG_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */
  150. #define CFG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
  151. #define CFG_ENV_SECT_SIZE 0x40000 /* size of one complete sector */
  152. #define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
  153. #define CFG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */
  154. /* Address and size of Redundant Environment Sector */
  155. #define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR + CFG_ENV_SECT_SIZE)
  156. #define CFG_ENV_SIZE_REDUND (CFG_ENV_SIZE)
  157. #define CONFIG_ENV_OVERWRITE 1 /* allow modification of vendor params */
  158. /*
  159. * Memory map
  160. */
  161. #define CFG_MBAR 0xf0000000
  162. #define CFG_SDRAM_BASE 0x00000000
  163. #define CFG_DEFAULT_MBAR 0x80000000
  164. /* Use SRAM until RAM will be available */
  165. #define CFG_INIT_RAM_ADDR MPC5XXX_SRAM
  166. #define CFG_INIT_RAM_END MPC5XXX_SRAM_SIZE /* End of used area in DPRAM */
  167. #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
  168. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  169. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  170. #define CFG_MONITOR_BASE TEXT_BASE
  171. #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  172. # define CFG_RAMBOOT 1
  173. #endif
  174. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  175. #define CFG_MALLOC_LEN (512 << 10) /* Reserve 512 kB for malloc() */
  176. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  177. /*
  178. * Ethernet configuration
  179. */
  180. #define CONFIG_MPC5xxx_FEC 1
  181. /*
  182. * Define CONFIG_FEC_10MBIT to force FEC at 10Mb
  183. */
  184. /* #define CONFIG_FEC_10MBIT 1 */
  185. #define CONFIG_PHY_ADDR 1
  186. /*
  187. * GPIO configuration
  188. */
  189. //###CHD: MSB = 1 -> 64MB: funktioniert nicht: ERRATA - BUG?
  190. //###CHD: 0x10000004 = 32MB SDRAM
  191. //###CHD: 0x90000004 = 64MB SDRAM
  192. #define CFG_GPS_PORT_CONFIG 0x10000004
  193. /*
  194. * Miscellaneous configurable options
  195. */
  196. #define CFG_LONGHELP /* undef to save memory */
  197. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  198. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  199. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  200. #else
  201. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  202. #endif
  203. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  204. #define CFG_MAXARGS 16 /* max number of command args */
  205. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  206. #define CFG_MEMTEST_START 0x00100000 /* memtest works on */
  207. #define CFG_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */
  208. #define CFG_LOAD_ADDR 0x100000 /* default load address */
  209. #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
  210. /*
  211. * Various low-level settings
  212. */
  213. #define CFG_HID0_INIT HID0_ICE | HID0_ICFI
  214. #define CFG_HID0_FINAL HID0_ICE
  215. #define CFG_BOOTCS_START CFG_FLASH_BASE
  216. #define CFG_BOOTCS_SIZE CFG_FLASH_SIZE
  217. #define CFG_BOOTCS_CFG 0x0004fb00
  218. #define CFG_CS0_START CFG_FLASH_BASE
  219. #define CFG_CS0_SIZE CFG_FLASH_SIZE
  220. #define CFG_CS_BURST 0x00000000
  221. #define CFG_CS_DEADCYCLE 0x33333333
  222. #define CFG_RESET_ADDRESS 0xff000000
  223. /*-----------------------------------------------------------------------
  224. * USB stuff
  225. *-----------------------------------------------------------------------
  226. */
  227. #define CONFIG_USB_CLOCK 0x0001BBBB
  228. #define CONFIG_USB_CONFIG 0x00005000
  229. #endif /* __CONFIG_H */