MPC8313ERDB.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. /*
  2. * Copyright (C) Freescale Semiconductor, Inc. 2006.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. *
  22. * History
  23. * 20061201: Wilson Lo (Wilson.Lo@freescale.com)
  24. * Initialized
  25. * 20061210: Tanya Jiang (tanya.jiang@freescale.com)
  26. * Code Cleanup
  27. * 20070410: Scott Wood <scottwood@freescale.com>
  28. * More cleanup
  29. */
  30. /*
  31. * mpc8313epb board configuration file
  32. */
  33. #ifndef __CONFIG_H
  34. #define __CONFIG_H
  35. /*
  36. * High Level Configuration Options
  37. */
  38. #define CONFIG_E300 1
  39. #define CONFIG_MPC83XX 1
  40. #define CONFIG_MPC831X 1
  41. #define CONFIG_MPC8313 1
  42. #define CONFIG_MPC8313ERDB 1
  43. #define CONFIG_PCI
  44. #define CONFIG_83XX_GENERIC_PCI
  45. #ifdef CFG_66MHZ
  46. #define CONFIG_83XX_CLKIN 66666667 /* in Hz */
  47. #elif defined(CFG_33MHZ)
  48. #define CONFIG_83XX_CLKIN 33333333 /* in Hz */
  49. #else
  50. #error Unknown oscillator frequency.
  51. #endif
  52. #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN
  53. #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  54. #define CFG_IMMR 0xE0000000
  55. #define CFG_MEMTEST_START 0x00001000
  56. #define CFG_MEMTEST_END 0x07f00000
  57. /* Early revs of this board will lock up hard when attempting
  58. * to access the PMC registers, unless a JTAG debugger is
  59. * connected, or some resistor modifications are made.
  60. */
  61. #define CFG_8313ERDB_BROKEN_PMC 1
  62. #define CFG_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
  63. #define CFG_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
  64. /*
  65. * DDR Setup
  66. */
  67. #define CFG_DDR_BASE 0x00000000 /* DDR is system memory*/
  68. #define CFG_SDRAM_BASE CFG_DDR_BASE
  69. #define CFG_DDR_SDRAM_BASE CFG_DDR_BASE
  70. /*
  71. * Manually set up DDR parameters, as this board does not
  72. * seem to have the SPD connected to I2C.
  73. */
  74. #define CFG_DDR_SIZE 128 /* MB */
  75. #define CFG_DDR_CONFIG ( CSCONFIG_EN | CSCONFIG_AP \
  76. | 0x00040000 /* TODO */ \
  77. | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10 )
  78. /* 0x80840102 */
  79. #define CFG_DDR_TIMING_3 0x00000000
  80. #define CFG_DDR_TIMING_0 ( ( 0 << TIMING_CFG0_RWT_SHIFT ) \
  81. | ( 0 << TIMING_CFG0_WRT_SHIFT ) \
  82. | ( 0 << TIMING_CFG0_RRT_SHIFT ) \
  83. | ( 0 << TIMING_CFG0_WWT_SHIFT ) \
  84. | ( 2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT ) \
  85. | ( 2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT ) \
  86. | ( 8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT ) \
  87. | ( 2 << TIMING_CFG0_MRS_CYC_SHIFT ) )
  88. /* 0x00220802 */
  89. #define CFG_DDR_TIMING_1 ( ( 3 << TIMING_CFG1_PRETOACT_SHIFT ) \
  90. | ( 9 << TIMING_CFG1_ACTTOPRE_SHIFT ) \
  91. | ( 3 << TIMING_CFG1_ACTTORW_SHIFT ) \
  92. | ( 5 << TIMING_CFG1_CASLAT_SHIFT ) \
  93. | (13 << TIMING_CFG1_REFREC_SHIFT ) \
  94. | ( 3 << TIMING_CFG1_WRREC_SHIFT ) \
  95. | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT ) \
  96. | ( 2 << TIMING_CFG1_WRTORD_SHIFT ) )
  97. /* 0x3935d322 */
  98. #define CFG_DDR_TIMING_2 ( ( 0 << TIMING_CFG2_ADD_LAT_SHIFT ) \
  99. | (31 << TIMING_CFG2_CPO_SHIFT ) \
  100. | ( 2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT ) \
  101. | ( 2 << TIMING_CFG2_RD_TO_PRE_SHIFT ) \
  102. | ( 2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT ) \
  103. | ( 3 << TIMING_CFG2_CKE_PLS_SHIFT ) \
  104. | (10 << TIMING_CFG2_FOUR_ACT_SHIFT) )
  105. /* 0x0f9048ca */ /* P9-45,may need tuning */
  106. #define CFG_DDR_INTERVAL ( ( 800 << SDRAM_INTERVAL_REFINT_SHIFT ) \
  107. | ( 100 << SDRAM_INTERVAL_BSTOPRE_SHIFT ) )
  108. /* 0x03200064 */
  109. #if defined(CONFIG_DDR_2T_TIMING)
  110. #define CFG_SDRAM_CFG ( SDRAM_CFG_SREN \
  111. | 3 << SDRAM_CFG_SDRAM_TYPE_SHIFT \
  112. | SDRAM_CFG_2T_EN \
  113. | SDRAM_CFG_DBW_32 )
  114. #else
  115. #define CFG_SDRAM_CFG ( SDRAM_CFG_SREN \
  116. | 3 << SDRAM_CFG_SDRAM_TYPE_SHIFT \
  117. | SDRAM_CFG_32_BE )
  118. /* 0x43080000 */
  119. #endif
  120. #define CFG_SDRAM_CFG2 0x00401000;
  121. /* set burst length to 8 for 32-bit data path */
  122. #define CFG_DDR_MODE ( ( 0x4440 << SDRAM_MODE_ESD_SHIFT ) \
  123. | ( 0x0232 << SDRAM_MODE_SD_SHIFT ) )
  124. /* 0x44400232 */
  125. #define CFG_DDR_MODE_2 0x8000C000;
  126. #define CFG_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
  127. /*0x02000000*/
  128. #define CFG_DDRCDR_VALUE ( DDRCDR_EN \
  129. | DDRCDR_PZ_NOMZ \
  130. | DDRCDR_NZ_NOMZ \
  131. | DDRCDR_M_ODR )
  132. /*
  133. * FLASH on the Local Bus
  134. */
  135. #define CFG_FLASH_CFI /* use the Common Flash Interface */
  136. #define CFG_FLASH_CFI_DRIVER /* use the CFI driver */
  137. #define CFG_FLASH_BASE 0xFE000000 /* start of FLASH */
  138. #define CFG_FLASH_SIZE 8 /* flash size in MB */
  139. #define CFG_FLASH_EMPTY_INFO /* display empty sectors */
  140. #define CFG_FLASH_USE_BUFFER_WRITE /* buffer up multiple bytes */
  141. #define CFG_BR0_PRELIM (CFG_FLASH_BASE | /* flash Base address */ \
  142. (2 << BR_PS_SHIFT) | /* 16 bit port size */ \
  143. BR_V) /* valid */
  144. #define CFG_OR0_PRELIM ( 0xFF000000 /* 16 MByte */ \
  145. | OR_GPCM_XACS \
  146. | OR_GPCM_SCY_9 \
  147. | OR_GPCM_EHTR \
  148. | OR_GPCM_EAD )
  149. /* 0xFF006FF7 TODO SLOW 16 MB flash size */
  150. #define CFG_LBLAWBAR0_PRELIM CFG_FLASH_BASE /* window base at flash base */
  151. #define CFG_LBLAWAR0_PRELIM 0x80000017 /* 16 MB window size */
  152. #define CFG_MAX_FLASH_BANKS 1 /* number of banks */
  153. #define CFG_MAX_FLASH_SECT 135 /* sectors per device */
  154. #define CFG_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  155. #define CFG_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  156. #define CFG_MONITOR_BASE TEXT_BASE /* start of monitor */
  157. #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  158. #define CFG_RAMBOOT
  159. #endif
  160. #define CFG_INIT_RAM_LOCK 1
  161. #define CFG_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */
  162. #define CFG_INIT_RAM_END 0x1000 /* End of used area in RAM*/
  163. #define CFG_GBL_DATA_SIZE 0x100 /* num bytes initial data */
  164. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  165. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  166. #define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
  167. #define CFG_MALLOC_LEN (512 * 1024) /* Reserved for malloc */
  168. /*
  169. * Local Bus LCRR and LBCR regs
  170. */
  171. #define CFG_LCRR LCRR_EADC_1 | LCRR_CLKDIV_2 /* 0x00010002 */
  172. #define CFG_LBC_LBCR ( 0x00040000 /* TODO */ \
  173. | (0xFF << LBCR_BMT_SHIFT) \
  174. | 0xF ) /* 0x0004ff0f */
  175. #define CFG_LBC_MRTPR 0x20000000 /*TODO */ /* LB refresh timer prescal, 266MHz/32 */
  176. /* drivers/nand/nand.c */
  177. #define CFG_NAND_BASE 0xE2800000 /* 0xF0000000 */
  178. #define CFG_MAX_NAND_DEVICE 1
  179. #define NAND_MAX_CHIPS 1
  180. #define CONFIG_MTD_NAND_VERIFY_WRITE
  181. #define CFG_BR1_PRELIM ( CFG_NAND_BASE \
  182. | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \
  183. | BR_PS_8 /* Port Size = 8 bit */ \
  184. | BR_MS_FCM /* MSEL = FCM */ \
  185. | BR_V ) /* valid */
  186. #define CFG_OR1_PRELIM ( 0xFFFF8000 /* length 32K */ \
  187. | OR_FCM_CSCT \
  188. | OR_FCM_CST \
  189. | OR_FCM_CHT \
  190. | OR_FCM_SCY_1 \
  191. | OR_FCM_TRLX \
  192. | OR_FCM_EHTR )
  193. /* 0xFFFF8396 */
  194. #define CFG_LBLAWBAR1_PRELIM CFG_NAND_BASE
  195. #define CFG_LBLAWAR1_PRELIM 0x8000000E /* 32KB */
  196. #define CFG_VSC7385_BASE 0xF0000000
  197. #define CONFIG_VSC7385_ENET /* VSC7385 ethernet support */
  198. #define CFG_BR2_PRELIM 0xf0000801 /* VSC7385 Base address */
  199. #define CFG_OR2_PRELIM 0xfffe09ff /* VSC7385, 128K bytes*/
  200. #define CFG_LBLAWBAR2_PRELIM CFG_VSC7385_BASE/* Access window base at VSC7385 base */
  201. #define CFG_LBLAWAR2_PRELIM 0x80000010 /* Access window size 128K */
  202. /* local bus read write buffer mapping */
  203. #define CFG_BR3_PRELIM 0xFA000801 /* map at 0xFA000000 */
  204. #define CFG_OR3_PRELIM 0xFFFF8FF7 /* 32kB */
  205. #define CFG_LBLAWBAR3_PRELIM 0xFA000000
  206. #define CFG_LBLAWAR3_PRELIM 0x8000000E /* 32KB */
  207. /* pass open firmware flat tree */
  208. #define CONFIG_OF_FLAT_TREE 1
  209. #define CONFIG_OF_BOARD_SETUP 1
  210. /* maximum size of the flat tree (8K) */
  211. #define OF_FLAT_TREE_MAX_SIZE 8192
  212. #define OF_CPU "PowerPC,8313@0"
  213. #define OF_SOC "soc8313@e0000000"
  214. #define OF_TBCLK (bd->bi_busfreq / 4)
  215. #define OF_STDOUT_PATH "/soc8313@e0000000/serial@4500"
  216. /*
  217. * Serial Port
  218. */
  219. #define CONFIG_CONS_INDEX 1
  220. #define CFG_NS16550
  221. #define CFG_NS16550_SERIAL
  222. #define CFG_NS16550_REG_SIZE 1
  223. #define CFG_NS16550_CLK get_bus_freq(0)
  224. #define CFG_BAUDRATE_TABLE \
  225. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  226. #define CFG_NS16550_COM1 (CFG_IMMR+0x4500)
  227. #define CFG_NS16550_COM2 (CFG_IMMR+0x4600)
  228. /* Use the HUSH parser */
  229. #define CFG_HUSH_PARSER
  230. #define CFG_PROMPT_HUSH_PS2 "> "
  231. /* I2C */
  232. #define CONFIG_HARD_I2C /* I2C with hardware support*/
  233. #define CONFIG_FSL_I2C
  234. #define CONFIG_I2C_MULTI_BUS
  235. #define CONFIG_I2C_CMD_TREE
  236. #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
  237. #define CFG_I2C_SLAVE 0x7F
  238. #define CFG_I2C_NOPROBES {0x69} /* Don't probe these addrs */
  239. #define CFG_I2C_OFFSET 0x3000
  240. #define CFG_I2C2_OFFSET 0x3100
  241. /* TSEC */
  242. #define CFG_TSEC1_OFFSET 0x24000
  243. #define CFG_TSEC1 (CFG_IMMR+CFG_TSEC1_OFFSET)
  244. #define CFG_TSEC2_OFFSET 0x25000
  245. #define CFG_TSEC2 (CFG_IMMR+CFG_TSEC2_OFFSET)
  246. #define CONFIG_NET_MULTI
  247. /*
  248. * General PCI
  249. * Addresses are mapped 1-1.
  250. */
  251. #define CFG_PCI1_MEM_BASE 0x80000000
  252. #define CFG_PCI1_MEM_PHYS CFG_PCI1_MEM_BASE
  253. #define CFG_PCI1_MEM_SIZE 0x10000000 /* 256M */
  254. #define CFG_PCI1_MMIO_BASE 0x90000000
  255. #define CFG_PCI1_MMIO_PHYS CFG_PCI1_MMIO_BASE
  256. #define CFG_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  257. #define CFG_PCI1_IO_BASE 0x00000000
  258. #define CFG_PCI1_IO_PHYS 0xE2000000
  259. #define CFG_PCI1_IO_SIZE 0x00100000 /* 1M */
  260. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  261. #define CFG_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */
  262. /*
  263. * TSEC configuration
  264. */
  265. #define CONFIG_TSEC_ENET /* TSEC ethernet support */
  266. #ifndef CONFIG_NET_MULTI
  267. #define CONFIG_NET_MULTI 1
  268. #endif
  269. #define CONFIG_GMII 1 /* MII PHY management */
  270. #define CONFIG_MPC83XX_TSEC1 1
  271. #define CONFIG_MPC83XX_TSEC1_NAME "TSEC0"
  272. #define CONFIG_MPC83XX_TSEC2 1
  273. #define CONFIG_MPC83XX_TSEC2_NAME "TSEC1"
  274. #define TSEC1_PHY_ADDR 0x1c
  275. #define TSEC2_PHY_ADDR 4
  276. #define TSEC1_PHYIDX 0
  277. #define TSEC2_PHYIDX 0
  278. /* Options are: TSEC[0-1] */
  279. #define CONFIG_ETHPRIME "TSEC1"
  280. /*
  281. * Configure on-board RTC
  282. */
  283. #define CONFIG_RTC_DS1337
  284. #define CFG_I2C_RTC_ADDR 0x68
  285. /*
  286. * Environment
  287. */
  288. #ifndef CFG_RAMBOOT
  289. #define CFG_ENV_IS_IN_FLASH 1
  290. #define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000)
  291. #define CFG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */
  292. #define CFG_ENV_SIZE 0x2000
  293. /* Address and size of Redundant Environment Sector */
  294. #else
  295. #define CFG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  296. #define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000)
  297. #define CFG_ENV_SIZE 0x2000
  298. #endif
  299. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  300. #define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  301. #define CFG_BASE_COMMANDS ( CONFIG_CMD_DFL \
  302. | CFG_CMD_PING \
  303. | CFG_CMD_DHCP \
  304. | CFG_CMD_I2C \
  305. | CFG_CMD_MII \
  306. | CFG_CMD_DATE \
  307. | CFG_CMD_PCI)
  308. #define CONFIG_CMDLINE_EDITING 1
  309. #define CFG_RAMBOOT_COMMANDS (CFG_BASE_COMMANDS & \
  310. ~(CFG_CMD_ENV | CFG_CMD_LOADS))
  311. #if defined(CFG_RAMBOOT)
  312. #define CONFIG_COMMANDS CFG_RAMBOOT_COMMANDS
  313. #else
  314. #define CONFIG_COMMANDS CFG_BASE_COMMANDS
  315. #endif
  316. #include <cmd_confdefs.h>
  317. /*
  318. * Miscellaneous configurable options
  319. */
  320. #define CFG_LONGHELP /* undef to save memory */
  321. #define CFG_LOAD_ADDR 0x2000000 /* default load address */
  322. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  323. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  324. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  325. #define CFG_MAXARGS 16 /* max number of command args */
  326. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  327. #define CFG_HZ 1000 /* decrementer freq: 1ms ticks */
  328. /*
  329. * For booting Linux, the board info and command line data
  330. * have to be in the first 8 MB of memory, since this is
  331. * the maximum mapped by the Linux kernel during initialization.
  332. */
  333. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/
  334. /* Cache Configuration */
  335. #define CFG_DCACHE_SIZE 16384
  336. #define CFG_CACHELINE_SIZE 32
  337. #define CFG_CACHELINE_SHIFT 5 /*log base 2 of the above value*/
  338. #define CFG_RCWH_PCIHOST 0x80000000 /* PCIHOST */
  339. #ifdef CFG_66MHZ
  340. /* 66MHz IN, 133MHz CSB, 266 DDR, 266 CORE */
  341. /* 0x62040000 */
  342. #define CFG_HRCW_LOW (\
  343. 0x20000000 /* reserved, must be set */ |\
  344. HRCWL_DDRCM |\
  345. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  346. HRCWL_DDR_TO_SCB_CLK_2X1 |\
  347. HRCWL_CSB_TO_CLKIN_2X1 |\
  348. HRCWL_CORE_TO_CSB_2X1)
  349. #elif defined(CFG_33MHZ)
  350. /* 33MHz IN, 165MHz CSB, 330 DDR, 330 CORE */
  351. /* 0x65040000 */
  352. #define CFG_HRCW_LOW (\
  353. 0x20000000 /* reserved, must be set */ |\
  354. HRCWL_DDRCM |\
  355. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  356. HRCWL_DDR_TO_SCB_CLK_2X1 |\
  357. HRCWL_CSB_TO_CLKIN_5X1 |\
  358. HRCWL_CORE_TO_CSB_2X1)
  359. #endif
  360. /* 0xa0606c00 */
  361. #define CFG_HRCW_HIGH (\
  362. HRCWH_PCI_HOST |\
  363. HRCWH_PCI1_ARBITER_ENABLE |\
  364. HRCWH_CORE_ENABLE |\
  365. HRCWH_FROM_0X00000100 |\
  366. HRCWH_BOOTSEQ_DISABLE |\
  367. HRCWH_SW_WATCHDOG_DISABLE |\
  368. HRCWH_ROM_LOC_LOCAL_16BIT |\
  369. HRCWH_RL_EXT_LEGACY |\
  370. HRCWH_TSEC1M_IN_RGMII |\
  371. HRCWH_TSEC2M_IN_RGMII |\
  372. HRCWH_BIG_ENDIAN |\
  373. HRCWH_LALE_NORMAL)
  374. /* System IO Config */
  375. #define CFG_SICRH (SICRH_TSOBI1 | SICRH_TSOBI2) /* RGMII */
  376. #define CFG_SICRL SICRL_USBDR /* Enable Internal USB Phy */
  377. #define CFG_HID0_INIT 0x000000000
  378. #define CFG_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \
  379. HID0_ENABLE_DYNAMIC_POWER_MANAGMENT)
  380. #define CFG_HID2 HID2_HBE
  381. /* DDR @ 0x00000000 */
  382. #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10)
  383. #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  384. /* PCI @ 0x80000000 */
  385. #define CFG_IBAT1L (CFG_PCI1_MEM_BASE | BATL_PP_10)
  386. #define CFG_IBAT1U (CFG_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  387. #define CFG_IBAT2L (CFG_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  388. #define CFG_IBAT2U (CFG_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  389. /* PCI2 not supported on 8313 */
  390. #define CFG_IBAT3L (0)
  391. #define CFG_IBAT3U (0)
  392. #define CFG_IBAT4L (0)
  393. #define CFG_IBAT4U (0)
  394. /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
  395. #define CFG_IBAT5L (CFG_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  396. #define CFG_IBAT5U (CFG_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
  397. /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
  398. #define CFG_IBAT6L (0xF0000000 | BATL_PP_10)
  399. #define CFG_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  400. #define CFG_IBAT7L (0)
  401. #define CFG_IBAT7U (0)
  402. #define CFG_DBAT0L CFG_IBAT0L
  403. #define CFG_DBAT0U CFG_IBAT0U
  404. #define CFG_DBAT1L CFG_IBAT1L
  405. #define CFG_DBAT1U CFG_IBAT1U
  406. #define CFG_DBAT2L CFG_IBAT2L
  407. #define CFG_DBAT2U CFG_IBAT2U
  408. #define CFG_DBAT3L CFG_IBAT3L
  409. #define CFG_DBAT3U CFG_IBAT3U
  410. #define CFG_DBAT4L CFG_IBAT4L
  411. #define CFG_DBAT4U CFG_IBAT4U
  412. #define CFG_DBAT5L CFG_IBAT5L
  413. #define CFG_DBAT5U CFG_IBAT5U
  414. #define CFG_DBAT6L CFG_IBAT6L
  415. #define CFG_DBAT6U CFG_IBAT6U
  416. #define CFG_DBAT7L CFG_IBAT7L
  417. #define CFG_DBAT7U CFG_IBAT7U
  418. /*
  419. * Internal Definitions
  420. *
  421. * Boot Flags
  422. */
  423. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  424. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  425. /*
  426. * Environment Configuration
  427. */
  428. #define CONFIG_ENV_OVERWRITE
  429. #define CONFIG_ETHADDR 00:E0:0C:00:95:01
  430. #define CONFIG_HAS_ETH1
  431. #define CONFIG_ETH1ADDR 00:E0:0C:00:95:02
  432. #define CONFIG_IPADDR 10.0.0.2
  433. #define CONFIG_SERVERIP 10.0.0.1
  434. #define CONFIG_GATEWAYIP 10.0.0.1
  435. #define CONFIG_NETMASK 255.0.0.0
  436. #define CONFIG_NETDEV eth1
  437. #define CONFIG_HOSTNAME mpc8313erdb
  438. #define CONFIG_ROOTPATH /nfs/root/path
  439. #define CONFIG_BOOTFILE uImage
  440. #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
  441. #define CONFIG_FDTFILE mpc8313erdb.dtb
  442. #define CONFIG_LOADADDR 200000 /* default location for tftp and bootm */
  443. #define CONFIG_BOOTDELAY -1 /* -1 disables auto-boot */
  444. #define CONFIG_BAUDRATE 115200
  445. #define XMK_STR(x) #x
  446. #define MK_STR(x) XMK_STR(x)
  447. #define CONFIG_EXTRA_ENV_SETTINGS \
  448. "netdev=" MK_STR(CONFIG_NETDEV) "\0" \
  449. "ethprime=TSEC1\0" \
  450. "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \
  451. "tftpflash=tftpboot $loadaddr $uboot; " \
  452. "protect off " MK_STR(TEXT_BASE) " +$filesize; " \
  453. "erase " MK_STR(TEXT_BASE) " +$filesize; " \
  454. "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \
  455. "protect on " MK_STR(TEXT_BASE) " +$filesize; " \
  456. "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \
  457. "fdtaddr=400000\0" \
  458. "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" \
  459. "console=ttyS0\0" \
  460. "setbootargs=setenv bootargs " \
  461. "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
  462. "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \
  463. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  464. "root=$rootdev rw console=$console,$baudrate $othbootargs\0"
  465. #define CONFIG_NFSBOOTCOMMAND \
  466. "setenv rootdev /dev/nfs;" \
  467. "run setbootargs;" \
  468. "run setipargs;" \
  469. "tftp $loadaddr $bootfile;" \
  470. "tftp $fdtaddr $fdtfile;" \
  471. "bootm $loadaddr - $fdtaddr"
  472. #define CONFIG_RAMBOOTCOMMAND \
  473. "setenv rootdev /dev/ram;" \
  474. "run setbootargs;" \
  475. "tftp $ramdiskaddr $ramdiskfile;" \
  476. "tftp $loadaddr $bootfile;" \
  477. "tftp $fdtaddr $fdtfile;" \
  478. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  479. #undef MK_STR
  480. #undef XMK_STR
  481. #endif /* __CONFIG_H */