ERIC.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. /*
  2. * (C) Copyright 2001
  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. /*
  24. * board/config.h - configuration options, board specific
  25. */
  26. #ifndef __CONFIG_H
  27. #define __CONFIG_H
  28. /*
  29. * High Level Configuration Options
  30. * (easy to change)
  31. */
  32. #define CONFIG_405GP 1 /* This is a PPC405 CPU */
  33. #define CONFIG_4xx 1 /* ...member of PPC4xx family */
  34. #define CONFIG_ERIC 1 /* ...on a ERIC board */
  35. #define CONFIG_BOARD_EARLY_INIT_F 1 /* run board_early_init_f() */
  36. #define CONFIG_SYS_CLK_FREQ 33333333 /* external frequency to pll */
  37. #if 1
  38. #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
  39. #endif
  40. #if 0
  41. #define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */
  42. #endif
  43. #if 0
  44. #define CONFIG_ENV_IS_IN_EEPROM 1 /* use I2C RTC X1240 for environment vars */
  45. #define CONFIG_ENV_OFFSET 0x000 /* environment starts at the beginning of the EEPROM */
  46. #define CONFIG_ENV_SIZE 0x800 /* 2048 bytes may be used for env vars */
  47. #endif /* total size of a X1240 is 2048 bytes */
  48. #define CONFIG_HARD_I2C 1 /* I2C with hardware support */
  49. #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */
  50. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  51. #define CONFIG_SYS_I2C_SLAVE 0x7F
  52. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* X1240 has two I2C slave addresses, one for EEPROM */
  53. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* address length for the eeprom */
  54. #define CONFIG_I2C_RTC 1 /* we have a Xicor X1240 RTC */
  55. #define CONFIG_SYS_I2C_RTC_ADDR 0x6F /* and one for RTC */
  56. #ifdef CONFIG_ENV_IS_IN_FLASH
  57. #undef CONFIG_ENV_IS_IN_NVRAM
  58. #undef CONFIG_ENV_IS_IN_EEPROM
  59. #else
  60. #ifdef CONFIG_ENV_IS_IN_NVRAM
  61. #undef CONFIG_ENV_IS_IN_FLASH
  62. #undef CONFIG_ENV_IS_IN_EEPROM
  63. #else
  64. #ifdef CONFIG_ENV_IS_IN_EEPROM
  65. #undef CONFIG_ENV_IS_IN_NVRAM
  66. #undef CONFIG_ENV_IS_IN_FLASH
  67. #endif
  68. #endif
  69. #endif
  70. #define CONFIG_BAUDRATE 115200
  71. #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */
  72. #if 1
  73. #define CONFIG_BOOTCOMMAND "bootm ffc00000" /* autoboot command */
  74. #else
  75. #define CONFIG_BOOTCOMMAND "bootp" /* autoboot command */
  76. #endif
  77. #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/nfs " \
  78. "nfsroot=192.168.1.2:/eric_root_devel " \
  79. "ip=192.168.1.22:192.168.1.2"
  80. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  81. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  82. #define CONFIG_PPC4xx_EMAC
  83. #define CONFIG_MII 1 /* MII PHY management */
  84. #define CONFIG_PHY_ADDR 1 /* PHY address */
  85. #define CONFIG_NET_MULTI
  86. /*
  87. * BOOTP options
  88. */
  89. #define CONFIG_BOOTP_BOOTFILESIZE
  90. #define CONFIG_BOOTP_BOOTPATH
  91. #define CONFIG_BOOTP_GATEWAY
  92. #define CONFIG_BOOTP_HOSTNAME
  93. /*
  94. * Command line configuration.
  95. */
  96. #include <config_cmd_default.h>
  97. #define CONFIG_CMD_PCI
  98. #define CONFIG_CMD_IRQ
  99. #define CONFIG_CMD_SAVEENV
  100. #define CONFIG_CMD_FLASH
  101. #undef CONFIG_WATCHDOG /* watchdog disabled */
  102. /*
  103. * Miscellaneous configurable options
  104. */
  105. #undef CONFIG_SYS_LONGHELP /* undef to save memory */
  106. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  107. #if defined(CONFIG_CMD_KGDB)
  108. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  109. #else
  110. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  111. #endif
  112. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  113. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  114. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  115. #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */
  116. #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
  117. #define CONFIG_CONS_INDEX 1
  118. #define CONFIG_SYS_NS16550
  119. #define CONFIG_SYS_NS16550_SERIAL
  120. #define CONFIG_SYS_NS16550_REG_SIZE 1
  121. #define CONFIG_SYS_NS16550_CLK get_serial_clock()
  122. #define CONFIG_SYS_EXT_SERIAL_CLOCK 14318180
  123. /* The following table includes the supported baudrates */
  124. #define CONFIG_SYS_BAUDRATE_TABLE \
  125. { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, \
  126. 57600, 115200, 230400, 460800, 921600 }
  127. #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */
  128. #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */
  129. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
  130. /*-----------------------------------------------------------------------
  131. * PCI stuff
  132. *-----------------------------------------------------------------------
  133. */
  134. #define PCI_HOST_ADAPTER 0 /* configure ar pci adapter */
  135. #define PCI_HOST_FORCE 1 /* configure as pci host */
  136. #define PCI_HOST_AUTO 2 /* detected via arbiter enable */
  137. #define CONFIG_PCI /* include pci support */
  138. #define CONFIG_PCI_HOST PCI_HOST_FORCE /* select pci host function */
  139. #undef CONFIG_PCI_PNP /* no pci plug-and-play */
  140. /* resource configuration */
  141. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1743 /* PCI Vendor ID: Peppercon AG */
  142. #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0x0405 /* PCI Device ID: 405GP */
  143. #define CONFIG_SYS_PCI_PTM1LA 0xFFFC0000 /* point to flash */
  144. #define CONFIG_SYS_PCI_PTM1MS 0xFFFFF001 /* 4kB, enable hard-wired to 1 */
  145. #define CONFIG_SYS_PCI_PTM1PCI 0x00000000 /* Host: use this pci address */
  146. #define CONFIG_SYS_PCI_PTM2LA 0x00000000 /* disabled */
  147. #define CONFIG_SYS_PCI_PTM2MS 0x00000000 /* disabled */
  148. #define CONFIG_SYS_PCI_PTM2PCI 0x04000000 /* Host: use this pci address */
  149. /*-----------------------------------------------------------------------
  150. * External peripheral base address
  151. *-----------------------------------------------------------------------
  152. */
  153. /* Bank 0 - Flash/SRAM 0xFF000000 16MB 16 Bit */
  154. /* Bank 1 - NVRAM/RTC 0xF0000000 1MB 8 Bit */
  155. /* Bank 2 - A/D converter 0xF0100000 1MB 8 Bit */
  156. /* Bank 3 - Ethernet PHY Reset 0xF0200000 1MB 8 Bit */
  157. /* Bank 4 - PC-MIP PRSNT1# 0xF0300000 1MB 8 Bit */
  158. /* Bank 5 - PC-MIP PRSNT2# 0xF0400000 1MB 8 Bit */
  159. /* Bank 6 - CPU LED0 0xF0500000 1MB 8 Bit */
  160. /* Bank 7 - CPU LED1 0xF0600000 1MB 8 Bit */
  161. /* ----------------------------------------------------------------------- */
  162. /* Memory Bank 0 (Flash) initialization */
  163. /* ----------------------------------------------------------------------- */
  164. #define CS0_AP 0x9B015480
  165. #define CS0_CR 0xFF87A000 /* BAS=0xFF8,BS=(8MB),BU=0x3(R/W), BW=(16 bits) */
  166. /* ----------------------------------------------------------------------- */
  167. /* Memory Bank 1 (NVRAM/RTC) initialization */
  168. /* ----------------------------------------------------------------------- */
  169. #define CS1_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  170. #define CS1_CR 0xF0018000 /* BAS=0xF00,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  171. /* ----------------------------------------------------------------------- */
  172. /* Memory Bank 2 (A/D converter) initialization */
  173. /* ----------------------------------------------------------------------- */
  174. #define CS2_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  175. #define CS2_CR 0xF0118000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  176. /* ----------------------------------------------------------------------- */
  177. /* Memory Bank 3 (Ethernet PHY Reset) initialization */
  178. /* ----------------------------------------------------------------------- */
  179. #define CS3_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  180. #define CS3_CR 0xF0218000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  181. /* ----------------------------------------------------------------------- */
  182. /* Memory Bank 4 (PC-MIP PRSNT1#) initialization */
  183. /* ----------------------------------------------------------------------- */
  184. #define CS4_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  185. #define CS4_CR 0xF0318000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  186. /* ----------------------------------------------------------------------- */
  187. /* Memory Bank 5 (PC-MIP PRSNT2#) initialization */
  188. /* ----------------------------------------------------------------------- */
  189. #define CS5_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  190. #define CS5_CR 0xF0418000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  191. /* ----------------------------------------------------------------------- */
  192. /* Memory Bank 6 (CPU LED0) initialization */
  193. /* ----------------------------------------------------------------------- */
  194. #define CS6_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  195. #define CS6_CR 0xF0518000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  196. /* ----------------------------------------------------------------------- */
  197. /* Memory Bank 7 (CPU LED1) initialization */
  198. /* ----------------------------------------------------------------------- */
  199. #define CS7_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */
  200. #define CS7_CR 0xF0618000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */
  201. #define CONFIG_SYS_NVRAM_REG_BASE_ADDR 0xF0000000
  202. #define CONFIG_SYS_RTC_REG_BASE_ADDR (0xF0000000 + 0x7F8)
  203. #define CONFIG_SYS_ADC_REG_BASE_ADDR 0xF0100000
  204. #define CONFIG_SYS_PHYRES_REG_BASE_ADDR 0xF0200000
  205. #define CONFIG_SYS_PRSNT1_REG_BASE_ADDR 0xF0300000
  206. #define CONFIG_SYS_PRSNT2_REG_BASE_ADDR 0xF0400000
  207. #define CONFIG_SYS_LED0_REG_BASE_ADDR 0xF0500000
  208. #define CONFIG_SYS_LED1_REG_BASE_ADDR 0xF0600000
  209. /* SDRAM CONFIG */
  210. #define CONFIG_SYS_SDRAM_MANUALLY 1
  211. #define CONFIG_SYS_SDRAM_SINGLE_BANK 1
  212. #ifdef CONFIG_SYS_SDRAM_MANUALLY
  213. /*-----------------------------------------------------------------------
  214. * Set MB0CF for bank 0. (0-32MB) Address Mode 4 since 12x8(2)
  215. *----------------------------------------------------------------------*/
  216. #define MB0CF 0x00062001 /* 32MB @ 0 */
  217. /*-----------------------------------------------------------------------
  218. * Set MB1CF for bank 1. (32MB-64MB) Address Mode 4 since 12x8(2)
  219. *----------------------------------------------------------------------*/
  220. #ifdef CONFIG_SYS_SDRAM_SINGLE_BANK
  221. #define MB1CF 0x0 /* 0MB @ 32MB */
  222. #else
  223. #define MB1CF 0x02062001 /* 32MB @ 32MB */
  224. #endif
  225. /*-----------------------------------------------------------------------
  226. * Set MB2CF for bank 2. off
  227. *----------------------------------------------------------------------*/
  228. #define MB2CF 0x0 /* 0MB */
  229. /*-----------------------------------------------------------------------
  230. * Set MB3CF for bank 3. off
  231. *----------------------------------------------------------------------*/
  232. #define MB3CF 0x0 /* 0MB */
  233. #define SDTR_100 0x0086400D
  234. #define RTR_100 0x05F0
  235. #define SDTR_66 0x00854006 /* orig U-Boot-wallnut says 0x00854006 */
  236. #define RTR_66 0x03f8
  237. #endif /* CONFIG_SYS_SDRAM_MANUALLY */
  238. /*-----------------------------------------------------------------------
  239. * Start addresses for the final memory configuration
  240. * (Set up by the startup code)
  241. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  242. */
  243. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  244. #define CONFIG_SYS_SDRAM_SIZE 32
  245. #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* 8 MByte Flash */
  246. #define CONFIG_SYS_MONITOR_BASE 0xFFFE0000 /* last 128kByte within Flash */
  247. /*#define CONFIG_SYS_MONITOR_LEN (192 * 1024)*/ /* Reserve 196 kB for Monitor */
  248. #define CONFIG_SYS_MONITOR_LEN (128 * 1024) /* Reserve 128 kB for Monitor */
  249. #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserve 128 kB for malloc() */
  250. /*
  251. * For booting Linux, the board info and command line data
  252. * have to be in the first 8 MB of memory, since this is
  253. * the maximum mapped by the Linux kernel during initialization.
  254. */
  255. #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  256. /*-----------------------------------------------------------------------
  257. * FLASH organization
  258. */
  259. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  260. #define CONFIG_SYS_MAX_FLASH_SECT 64 /* max number of sectors on one chip */
  261. #define CONFIG_SYS_FLASH_16BIT 1 /* Rom 16 bit data bus */
  262. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  263. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  264. /* BEG ENVIRONNEMENT FLASH */
  265. #ifdef CONFIG_ENV_IS_IN_FLASH
  266. #define CONFIG_ENV_SECT_SIZE (128*1024)
  267. #if 0 /* force ENV to be NOT embedded */
  268. #define CONFIG_ENV_ADDR 0xfffa0000
  269. #else /* force ENV to be embedded */
  270. #define CONFIG_ENV_SIZE (2 * 1024) /* Total Size of Environment Sector 2k */
  271. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SIZE - 0x10) /* let space for reset vector */
  272. /* #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE)*/
  273. #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
  274. #endif
  275. #endif
  276. /* END ENVIRONNEMENT FLASH */
  277. /*-----------------------------------------------------------------------
  278. * NVRAM organization
  279. */
  280. #define CONFIG_SYS_NVRAM_BASE_ADDR CONFIG_SYS_NVRAM_REG_BASE_ADDR /* NVRAM base address */
  281. #define CONFIG_SYS_NVRAM_SIZE 0x7F8 /* NVRAM size 2kByte - 8 Byte for RTC */
  282. #ifdef CONFIG_ENV_IS_IN_NVRAM
  283. #define CONFIG_ENV_SIZE 0x7F8 /* Size of Environment vars */
  284. #define CONFIG_ENV_ADDR \
  285. (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE) /* Env */
  286. #endif
  287. /*
  288. * Init Memory Controller:
  289. *
  290. * BR0/1 and OR0/1 (FLASH)
  291. */
  292. #define FLASH_BASE0_PRELIM 0xFF800000 /* FLASH bank #0 8MB */
  293. #define FLASH_BASE1_PRELIM 0 /* FLASH bank #1 */
  294. /* Configuration Port location */
  295. /* #define CONFIG_PORT_ADDR 0xF0000500 */
  296. /*-----------------------------------------------------------------------
  297. * Definitions for initial stack pointer and data area (in DPRAM)
  298. */
  299. #define CONFIG_SYS_INIT_RAM_ADDR 0x00df0000 /* inside of SDRAM */
  300. #define CONFIG_SYS_INIT_RAM_END 0x0f00 /* End of used area in RAM */
  301. #define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
  302. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  303. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  304. /*-----------------------------------------------------------------------
  305. * Definitions for Serial Presence Detect EEPROM address
  306. * (to get SDRAM settings)
  307. */
  308. #define SPD_EEPROM_ADDRESS 0x50
  309. /*
  310. * Internal Definitions
  311. *
  312. * Boot Flags
  313. */
  314. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  315. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  316. #if defined(CONFIG_CMD_KGDB)
  317. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  318. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  319. #endif
  320. #endif /* __CONFIG_H */