MPC837XERDB.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. /*
  2. * Copyright (C) 2007 Freescale Semiconductor, Inc.
  3. * Kevin Lam <kevin.lam@freescale.com>
  4. * Joe D'Abbraccio <joe.d'abbraccio@freescale.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef __CONFIG_H
  22. #define __CONFIG_H
  23. /*
  24. * High Level Configuration Options
  25. */
  26. #define CONFIG_E300 1 /* E300 family */
  27. #define CONFIG_MPC83xx 1 /* MPC83xx family */
  28. #define CONFIG_MPC837x 1 /* MPC837x CPU specific */
  29. #define CONFIG_MPC837XERDB 1
  30. #define CONFIG_SYS_TEXT_BASE 0xFE000000
  31. #define CONFIG_PCI 1
  32. #define CONFIG_BOARD_EARLY_INIT_F
  33. #define CONFIG_MISC_INIT_R
  34. #define CONFIG_HWCONFIG
  35. /*
  36. * On-board devices
  37. */
  38. #define CONFIG_TSEC_ENET /* TSEC Ethernet support */
  39. #define CONFIG_VSC7385_ENET
  40. /*
  41. * System Clock Setup
  42. */
  43. #ifdef CONFIG_PCISLAVE
  44. #define CONFIG_83XX_PCICLK 66666667 /* in HZ */
  45. #else
  46. #define CONFIG_83XX_CLKIN 66666667 /* in Hz */
  47. #define CONFIG_PCIE
  48. #endif
  49. #ifndef CONFIG_SYS_CLK_FREQ
  50. #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN
  51. #endif
  52. /*
  53. * Hardware Reset Configuration Word
  54. */
  55. #define CONFIG_SYS_HRCW_LOW (\
  56. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  57. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  58. HRCWL_SVCOD_DIV_2 |\
  59. HRCWL_CSB_TO_CLKIN_5X1 |\
  60. HRCWL_CORE_TO_CSB_2X1)
  61. #ifdef CONFIG_PCISLAVE
  62. #define CONFIG_SYS_HRCW_HIGH (\
  63. HRCWH_PCI_AGENT |\
  64. HRCWH_PCI1_ARBITER_DISABLE |\
  65. HRCWH_CORE_ENABLE |\
  66. HRCWH_FROM_0XFFF00100 |\
  67. HRCWH_BOOTSEQ_DISABLE |\
  68. HRCWH_SW_WATCHDOG_DISABLE |\
  69. HRCWH_ROM_LOC_LOCAL_16BIT |\
  70. HRCWH_RL_EXT_LEGACY |\
  71. HRCWH_TSEC1M_IN_RGMII |\
  72. HRCWH_TSEC2M_IN_RGMII |\
  73. HRCWH_BIG_ENDIAN |\
  74. HRCWH_LDP_CLEAR)
  75. #else
  76. #define CONFIG_SYS_HRCW_HIGH (\
  77. HRCWH_PCI_HOST |\
  78. HRCWH_PCI1_ARBITER_ENABLE |\
  79. HRCWH_CORE_ENABLE |\
  80. HRCWH_FROM_0X00000100 |\
  81. HRCWH_BOOTSEQ_DISABLE |\
  82. HRCWH_SW_WATCHDOG_DISABLE |\
  83. HRCWH_ROM_LOC_LOCAL_16BIT |\
  84. HRCWH_RL_EXT_LEGACY |\
  85. HRCWH_TSEC1M_IN_RGMII |\
  86. HRCWH_TSEC2M_IN_RGMII |\
  87. HRCWH_BIG_ENDIAN |\
  88. HRCWH_LDP_CLEAR)
  89. #endif
  90. /* System performance - define the value i.e. CONFIG_SYS_XXX
  91. */
  92. /* Arbiter Configuration Register */
  93. #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
  94. #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
  95. /* System Priority Control Regsiter */
  96. #define CONFIG_SYS_SPCR_TSECEP 3 /* eTSEC1&2 emergency priority (0-3) */
  97. /* System Clock Configuration Register */
  98. #define CONFIG_SYS_SCCR_TSEC1CM 1 /* eTSEC1 clock mode (0-3) */
  99. #define CONFIG_SYS_SCCR_TSEC2CM 1 /* eTSEC2 clock mode (0-3) */
  100. #define CONFIG_SYS_SCCR_SATACM SCCR_SATACM_2 /* SATA1-4 clock mode (0-3) */
  101. /*
  102. * System IO Config
  103. */
  104. #define CONFIG_SYS_SICRH 0x08200000
  105. #define CONFIG_SYS_SICRL 0x00000000
  106. /*
  107. * Output Buffer Impedance
  108. */
  109. #define CONFIG_SYS_OBIR 0x30100000
  110. /*
  111. * IMMR new address
  112. */
  113. #define CONFIG_SYS_IMMR 0xE0000000
  114. /*
  115. * Device configurations
  116. */
  117. /* Vitesse 7385 */
  118. #ifdef CONFIG_VSC7385_ENET
  119. #define CONFIG_TSEC2
  120. /* The flash address and size of the VSC7385 firmware image */
  121. #define CONFIG_VSC7385_IMAGE 0xFE7FE000
  122. #define CONFIG_VSC7385_IMAGE_SIZE 8192
  123. #endif
  124. /*
  125. * DDR Setup
  126. */
  127. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */
  128. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  129. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  130. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL 0x03000000
  131. #define CONFIG_SYS_83XX_DDR_USES_CS0
  132. #define CONFIG_SYS_DDRCDR_VALUE (DDRCDR_DHC_EN | DDRCDR_ODT | DDRCDR_Q_DRN)
  133. #undef CONFIG_DDR_ECC /* support DDR ECC function */
  134. #undef CONFIG_DDR_ECC_CMD /* Use DDR ECC user commands */
  135. #undef CONFIG_NEVER_ASSERT_ODT_TO_CPU /* Never assert ODT to internal IOs */
  136. /*
  137. * Manually set up DDR parameters
  138. */
  139. #define CONFIG_SYS_DDR_SIZE 256 /* MB */
  140. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f
  141. #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN \
  142. | CSCONFIG_ODT_WR_ONLY_CURRENT \
  143. | CSCONFIG_ROW_BIT_13 \
  144. | CSCONFIG_COL_BIT_10)
  145. #define CONFIG_SYS_DDR_TIMING_3 0x00000000
  146. #define CONFIG_SYS_DDR_TIMING_0 ((0 << TIMING_CFG0_RWT_SHIFT) \
  147. | (0 << TIMING_CFG0_WRT_SHIFT) \
  148. | (0 << TIMING_CFG0_RRT_SHIFT) \
  149. | (0 << TIMING_CFG0_WWT_SHIFT) \
  150. | (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) \
  151. | (6 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) \
  152. | (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) \
  153. | (2 << TIMING_CFG0_MRS_CYC_SHIFT))
  154. /* 0x00260802 */ /* DDR400 */
  155. #define CONFIG_SYS_DDR_TIMING_1 ((3 << TIMING_CFG1_PRETOACT_SHIFT) \
  156. | (9 << TIMING_CFG1_ACTTOPRE_SHIFT) \
  157. | (3 << TIMING_CFG1_ACTTORW_SHIFT) \
  158. | (7 << TIMING_CFG1_CASLAT_SHIFT) \
  159. | (13 << TIMING_CFG1_REFREC_SHIFT) \
  160. | (3 << TIMING_CFG1_WRREC_SHIFT) \
  161. | (2 << TIMING_CFG1_ACTTOACT_SHIFT) \
  162. | (2 << TIMING_CFG1_WRTORD_SHIFT))
  163. /* 0x3937d322 */
  164. #define CONFIG_SYS_DDR_TIMING_2 ((0 << TIMING_CFG2_ADD_LAT_SHIFT) \
  165. | (5 << TIMING_CFG2_CPO_SHIFT) \
  166. | (3 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) \
  167. | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) \
  168. | (3 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) \
  169. | (3 << TIMING_CFG2_CKE_PLS_SHIFT) \
  170. | (8 << TIMING_CFG2_FOUR_ACT_SHIFT))
  171. /* 0x02984cc8 */
  172. #define CONFIG_SYS_DDR_INTERVAL ((1024 << SDRAM_INTERVAL_REFINT_SHIFT) \
  173. | (0 << SDRAM_INTERVAL_BSTOPRE_SHIFT))
  174. /* 0x06090100 */
  175. #if defined(CONFIG_DDR_2T_TIMING)
  176. #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SREN \
  177. | SDRAM_CFG_SDRAM_TYPE_DDR2 \
  178. | SDRAM_CFG_32_BE \
  179. | SDRAM_CFG_2T_EN)
  180. /* 0x43088000 */
  181. #else
  182. #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SREN \
  183. | SDRAM_CFG_SDRAM_TYPE_DDR2)
  184. /* 0x43000000 */
  185. #endif
  186. #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00001000 /* 1 posted refresh */
  187. #define CONFIG_SYS_DDR_MODE ((0x0406 << SDRAM_MODE_ESD_SHIFT) \
  188. | (0x0442 << SDRAM_MODE_SD_SHIFT))
  189. /* 0x04400442 */ /* DDR400 */
  190. #define CONFIG_SYS_DDR_MODE2 0x00000000
  191. /*
  192. * Memory test
  193. */
  194. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  195. #define CONFIG_SYS_MEMTEST_START 0x00040000 /* memtest region */
  196. #define CONFIG_SYS_MEMTEST_END 0x0ef70010
  197. /*
  198. * The reserved memory
  199. */
  200. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  201. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  202. #define CONFIG_SYS_RAMBOOT
  203. #else
  204. #undef CONFIG_SYS_RAMBOOT
  205. #endif
  206. #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon */
  207. #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */
  208. /*
  209. * Initial RAM Base Address Setup
  210. */
  211. #define CONFIG_SYS_INIT_RAM_LOCK 1
  212. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  213. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */
  214. #define CONFIG_SYS_GBL_DATA_OFFSET \
  215. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  216. /*
  217. * Local Bus Configuration & Clock Setup
  218. */
  219. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  220. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_8
  221. #define CONFIG_SYS_LBC_LBCR 0x00000000
  222. #define CONFIG_FSL_ELBC 1
  223. /*
  224. * FLASH on the Local Bus
  225. */
  226. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  227. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  228. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */
  229. #define CONFIG_SYS_FLASH_SIZE 8 /* max FLASH size is 32M */
  230. #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */
  231. #define CONFIG_SYS_FLASH_EMPTY_INFO /* display empty sectors */
  232. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* buffer up multiple bytes */
  233. /* Window base at flash base */
  234. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  235. #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000016 /* 8 MB window size */
  236. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
  237. | BR_PS_16 /* 16 bit port */ \
  238. | BR_MS_GPCM /* MSEL = GPCM */ \
  239. | BR_V) /* valid */
  240. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
  241. | OR_GPCM_XACS \
  242. | OR_GPCM_SCY_9 \
  243. | OR_GPCM_EHTR_SET \
  244. | OR_GPCM_EAD)
  245. /* 0xFF800191 */
  246. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  247. #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */
  248. #undef CONFIG_SYS_FLASH_CHECKSUM
  249. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  250. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  251. /*
  252. * NAND Flash on the Local Bus
  253. */
  254. #define CONFIG_SYS_NAND_BASE 0xE0600000
  255. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE \
  256. | BR_DECC_CHK_GEN /* Use HW ECC */ \
  257. | BR_PS_8 /* 8 bit port */ \
  258. | BR_MS_FCM /* MSEL = FCM */ \
  259. | BR_V) /* valid */
  260. #define CONFIG_SYS_OR1_PRELIM (OR_AM_32KB \
  261. | OR_FCM_CSCT \
  262. | OR_FCM_CST \
  263. | OR_FCM_CHT \
  264. | OR_FCM_SCY_1 \
  265. | OR_FCM_TRLX \
  266. | OR_FCM_EHTR)
  267. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE
  268. #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_32KB)
  269. /* Vitesse 7385 */
  270. #define CONFIG_SYS_VSC7385_BASE 0xF0000000
  271. #ifdef CONFIG_VSC7385_ENET
  272. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_VSC7385_BASE \
  273. | BR_PS_8 \
  274. | BR_MS_GPCM \
  275. | BR_V)
  276. /* 0xF0000801 */
  277. #define CONFIG_SYS_OR2_PRELIM (OR_AM_128KB \
  278. | OR_GPCM_CSNT \
  279. | OR_GPCM_XACS \
  280. | OR_GPCM_SCY_15 \
  281. | OR_GPCM_SETA \
  282. | OR_GPCM_TRLX_SET \
  283. | OR_GPCM_EHTR_SET \
  284. | OR_GPCM_EAD)
  285. /* 0xfffe09ff */
  286. /* Access Base */
  287. #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_VSC7385_BASE
  288. #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_128KB)
  289. #endif
  290. /*
  291. * Serial Port
  292. */
  293. #define CONFIG_CONS_INDEX 1
  294. #define CONFIG_SYS_NS16550
  295. #define CONFIG_SYS_NS16550_SERIAL
  296. #define CONFIG_SYS_NS16550_REG_SIZE 1
  297. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  298. #define CONFIG_SYS_BAUDRATE_TABLE \
  299. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  300. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  301. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  302. /* SERDES */
  303. #define CONFIG_FSL_SERDES
  304. #define CONFIG_FSL_SERDES1 0xe3000
  305. #define CONFIG_FSL_SERDES2 0xe3100
  306. /* Use the HUSH parser */
  307. #define CONFIG_SYS_HUSH_PARSER
  308. /* Pass open firmware flat tree */
  309. #define CONFIG_OF_LIBFDT 1
  310. #define CONFIG_OF_BOARD_SETUP 1
  311. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  312. /* I2C */
  313. #define CONFIG_HARD_I2C /* I2C with hardware support */
  314. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  315. #define CONFIG_FSL_I2C
  316. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  317. #define CONFIG_SYS_I2C_SLAVE 0x7F
  318. #define CONFIG_SYS_I2C_NOPROBES {0x51} /* Don't probe these addrs */
  319. #define CONFIG_SYS_I2C_OFFSET 0x3000
  320. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  321. /*
  322. * Config on-board RTC
  323. */
  324. #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */
  325. #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */
  326. /*
  327. * General PCI
  328. * Addresses are mapped 1-1.
  329. */
  330. #define CONFIG_SYS_PCI_MEM_BASE 0x80000000
  331. #define CONFIG_SYS_PCI_MEM_PHYS CONFIG_SYS_PCI_MEM_BASE
  332. #define CONFIG_SYS_PCI_MEM_SIZE 0x10000000 /* 256M */
  333. #define CONFIG_SYS_PCI_MMIO_BASE 0x90000000
  334. #define CONFIG_SYS_PCI_MMIO_PHYS CONFIG_SYS_PCI_MMIO_BASE
  335. #define CONFIG_SYS_PCI_MMIO_SIZE 0x10000000 /* 256M */
  336. #define CONFIG_SYS_PCI_IO_BASE 0x00000000
  337. #define CONFIG_SYS_PCI_IO_PHYS 0xE0300000
  338. #define CONFIG_SYS_PCI_IO_SIZE 0x100000 /* 1M */
  339. #define CONFIG_SYS_PCI_SLV_MEM_LOCAL CONFIG_SYS_SDRAM_BASE
  340. #define CONFIG_SYS_PCI_SLV_MEM_BUS 0x00000000
  341. #define CONFIG_SYS_PCI_SLV_MEM_SIZE 0x80000000
  342. #define CONFIG_SYS_PCIE1_BASE 0xA0000000
  343. #define CONFIG_SYS_PCIE1_CFG_BASE 0xA0000000
  344. #define CONFIG_SYS_PCIE1_CFG_SIZE 0x08000000
  345. #define CONFIG_SYS_PCIE1_MEM_BASE 0xA8000000
  346. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xA8000000
  347. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x10000000
  348. #define CONFIG_SYS_PCIE1_IO_BASE 0x00000000
  349. #define CONFIG_SYS_PCIE1_IO_PHYS 0xB8000000
  350. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000
  351. #define CONFIG_SYS_PCIE2_BASE 0xC0000000
  352. #define CONFIG_SYS_PCIE2_CFG_BASE 0xC0000000
  353. #define CONFIG_SYS_PCIE2_CFG_SIZE 0x08000000
  354. #define CONFIG_SYS_PCIE2_MEM_BASE 0xC8000000
  355. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xC8000000
  356. #define CONFIG_SYS_PCIE2_MEM_SIZE 0x10000000
  357. #define CONFIG_SYS_PCIE2_IO_BASE 0x00000000
  358. #define CONFIG_SYS_PCIE2_IO_PHYS 0xD8000000
  359. #define CONFIG_SYS_PCIE2_IO_SIZE 0x00800000
  360. #ifdef CONFIG_PCI
  361. #define CONFIG_PCI_INDIRECT_BRIDGE
  362. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  363. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  364. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  365. #endif /* CONFIG_PCI */
  366. /*
  367. * TSEC
  368. */
  369. #ifdef CONFIG_TSEC_ENET
  370. #define CONFIG_GMII /* MII PHY management */
  371. #define CONFIG_TSEC1
  372. #ifdef CONFIG_TSEC1
  373. #define CONFIG_HAS_ETH0
  374. #define CONFIG_TSEC1_NAME "TSEC0"
  375. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  376. #define TSEC1_PHY_ADDR 2
  377. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  378. #define TSEC1_PHYIDX 0
  379. #endif
  380. #ifdef CONFIG_TSEC2
  381. #define CONFIG_HAS_ETH1
  382. #define CONFIG_TSEC2_NAME "TSEC1"
  383. #define CONFIG_SYS_TSEC2_OFFSET 0x25000
  384. #define TSEC2_PHY_ADDR 0x1c
  385. #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  386. #define TSEC2_PHYIDX 0
  387. #endif
  388. /* Options are: TSEC[0-1] */
  389. #define CONFIG_ETHPRIME "TSEC0"
  390. #endif
  391. /*
  392. * SATA
  393. */
  394. #define CONFIG_LIBATA
  395. #define CONFIG_FSL_SATA
  396. #define CONFIG_SYS_SATA_MAX_DEVICE 2
  397. #define CONFIG_SATA1
  398. #define CONFIG_SYS_SATA1_OFFSET 0x18000
  399. #define CONFIG_SYS_SATA1 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA1_OFFSET)
  400. #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
  401. #define CONFIG_SATA2
  402. #define CONFIG_SYS_SATA2_OFFSET 0x19000
  403. #define CONFIG_SYS_SATA2 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA2_OFFSET)
  404. #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
  405. #ifdef CONFIG_FSL_SATA
  406. #define CONFIG_LBA48
  407. #define CONFIG_CMD_SATA
  408. #define CONFIG_DOS_PARTITION
  409. #define CONFIG_CMD_EXT2
  410. #endif
  411. /*
  412. * Environment
  413. */
  414. #ifndef CONFIG_SYS_RAMBOOT
  415. #define CONFIG_ENV_IS_IN_FLASH 1
  416. #define CONFIG_ENV_ADDR \
  417. (CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN)
  418. #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K (one sector) for env */
  419. #define CONFIG_ENV_SIZE 0x4000
  420. #else
  421. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  422. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  423. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-0x1000)
  424. #define CONFIG_ENV_SIZE 0x2000
  425. #endif
  426. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  427. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  428. /*
  429. * BOOTP options
  430. */
  431. #define CONFIG_BOOTP_BOOTFILESIZE
  432. #define CONFIG_BOOTP_BOOTPATH
  433. #define CONFIG_BOOTP_GATEWAY
  434. #define CONFIG_BOOTP_HOSTNAME
  435. /*
  436. * Command line configuration.
  437. */
  438. #include <config_cmd_default.h>
  439. #define CONFIG_CMD_PING
  440. #define CONFIG_CMD_I2C
  441. #define CONFIG_CMD_MII
  442. #define CONFIG_CMD_DATE
  443. #if defined(CONFIG_PCI)
  444. #define CONFIG_CMD_PCI
  445. #endif
  446. #if defined(CONFIG_SYS_RAMBOOT)
  447. #undef CONFIG_CMD_SAVEENV
  448. #undef CONFIG_CMD_LOADS
  449. #endif
  450. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  451. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  452. #undef CONFIG_WATCHDOG /* watchdog disabled */
  453. #define CONFIG_MMC 1
  454. #ifdef CONFIG_MMC
  455. #define CONFIG_FSL_ESDHC
  456. #define CONFIG_FSL_ESDHC_PIN_MUX
  457. #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC83xx_ESDHC_ADDR
  458. #define CONFIG_CMD_MMC
  459. #define CONFIG_GENERIC_MMC
  460. #define CONFIG_CMD_EXT2
  461. #define CONFIG_CMD_FAT
  462. #define CONFIG_DOS_PARTITION
  463. #endif
  464. /*
  465. * Miscellaneous configurable options
  466. */
  467. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  468. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  469. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  470. #if defined(CONFIG_CMD_KGDB)
  471. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  472. #else
  473. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  474. #endif
  475. /* Print Buffer Size */
  476. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  477. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  478. /* Boot Argument Buffer Size */
  479. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  480. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */
  481. /*
  482. * For booting Linux, the board info and command line data
  483. * have to be in the first 256 MB of memory, since this is
  484. * the maximum mapped by the Linux kernel during initialization.
  485. */
  486. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */
  487. /*
  488. * Core HID Setup
  489. */
  490. #define CONFIG_SYS_HID0_INIT 0x000000000
  491. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK \
  492. | HID0_ENABLE_INSTRUCTION_CACHE)
  493. #define CONFIG_SYS_HID2 HID2_HBE
  494. /*
  495. * MMU Setup
  496. */
  497. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  498. /* DDR: cache cacheable */
  499. #define CONFIG_SYS_SDRAM_LOWER CONFIG_SYS_SDRAM_BASE
  500. #define CONFIG_SYS_SDRAM_UPPER (CONFIG_SYS_SDRAM_BASE + 0x10000000)
  501. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_LOWER \
  502. | BATL_PP_RW \
  503. | BATL_MEMCOHERENCE)
  504. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_LOWER \
  505. | BATU_BL_256M \
  506. | BATU_VS \
  507. | BATU_VP)
  508. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  509. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  510. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_SDRAM_UPPER \
  511. | BATL_PP_RW \
  512. | BATL_MEMCOHERENCE)
  513. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_SDRAM_UPPER \
  514. | BATU_BL_256M \
  515. | BATU_VS \
  516. | BATU_VP)
  517. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  518. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  519. /* IMMRBAR, PCI IO and NAND: cache-inhibit and guarded */
  520. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_IMMR \
  521. | BATL_PP_RW \
  522. | BATL_CACHEINHIBIT \
  523. | BATL_GUARDEDSTORAGE)
  524. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_IMMR \
  525. | BATU_BL_8M \
  526. | BATU_VS \
  527. | BATU_VP)
  528. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  529. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  530. /* L2 Switch: cache-inhibit and guarded */
  531. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_VSC7385_BASE \
  532. | BATL_PP_RW \
  533. | BATL_CACHEINHIBIT \
  534. | BATL_GUARDEDSTORAGE)
  535. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_VSC7385_BASE \
  536. | BATU_BL_128K \
  537. | BATU_VS \
  538. | BATU_VP)
  539. #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
  540. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  541. /* FLASH: icache cacheable, but dcache-inhibit and guarded */
  542. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_FLASH_BASE \
  543. | BATL_PP_RW \
  544. | BATL_MEMCOHERENCE)
  545. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_FLASH_BASE \
  546. | BATU_BL_32M \
  547. | BATU_VS \
  548. | BATU_VP)
  549. #define CONFIG_SYS_DBAT4L (CONFIG_SYS_FLASH_BASE \
  550. | BATL_PP_RW \
  551. | BATL_CACHEINHIBIT \
  552. | BATL_GUARDEDSTORAGE)
  553. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  554. /* Stack in dcache: cacheable, no memory coherence */
  555. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_RW)
  556. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_INIT_RAM_ADDR \
  557. | BATU_BL_128K \
  558. | BATU_VS \
  559. | BATU_VP)
  560. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  561. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  562. #ifdef CONFIG_PCI
  563. /* PCI MEM space: cacheable */
  564. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI_MEM_PHYS \
  565. | BATL_PP_RW \
  566. | BATL_MEMCOHERENCE)
  567. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI_MEM_PHYS \
  568. | BATU_BL_256M \
  569. | BATU_VS \
  570. | BATU_VP)
  571. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  572. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  573. /* PCI MMIO space: cache-inhibit and guarded */
  574. #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI_MMIO_PHYS \
  575. | BATL_PP_RW \
  576. | BATL_CACHEINHIBIT \
  577. | BATL_GUARDEDSTORAGE)
  578. #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI_MMIO_PHYS \
  579. | BATU_BL_256M \
  580. | BATU_VS \
  581. | BATU_VP)
  582. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  583. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  584. #else
  585. #define CONFIG_SYS_IBAT6L (0)
  586. #define CONFIG_SYS_IBAT6U (0)
  587. #define CONFIG_SYS_IBAT7L (0)
  588. #define CONFIG_SYS_IBAT7U (0)
  589. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  590. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  591. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  592. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  593. #endif
  594. #if defined(CONFIG_CMD_KGDB)
  595. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  596. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  597. #endif
  598. /*
  599. * Environment Configuration
  600. */
  601. #define CONFIG_ENV_OVERWRITE
  602. #define CONFIG_HAS_FSL_DR_USB
  603. #define CONFIG_NETDEV "eth1"
  604. #define CONFIG_HOSTNAME mpc837x_rdb
  605. #define CONFIG_ROOTPATH "/nfsroot"
  606. #define CONFIG_RAMDISKFILE "rootfs.ext2.gz.uboot"
  607. #define CONFIG_BOOTFILE "uImage"
  608. /* U-Boot image on TFTP server */
  609. #define CONFIG_UBOOTPATH "u-boot.bin"
  610. #define CONFIG_FDTFILE "mpc8379_rdb.dtb"
  611. /* default location for tftp and bootm */
  612. #define CONFIG_LOADADDR 800000
  613. #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */
  614. #define CONFIG_BAUDRATE 115200
  615. #define CONFIG_EXTRA_ENV_SETTINGS \
  616. "netdev=" CONFIG_NETDEV "\0" \
  617. "uboot=" CONFIG_UBOOTPATH "\0" \
  618. "tftpflash=tftp $loadaddr $uboot;" \
  619. "protect off " __stringify(CONFIG_SYS_TEXT_BASE) \
  620. " +$filesize; " \
  621. "erase " __stringify(CONFIG_SYS_TEXT_BASE) \
  622. " +$filesize; " \
  623. "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) \
  624. " $filesize; " \
  625. "protect on " __stringify(CONFIG_SYS_TEXT_BASE) \
  626. " +$filesize; " \
  627. "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) \
  628. " $filesize\0" \
  629. "fdtaddr=780000\0" \
  630. "fdtfile=" CONFIG_FDTFILE "\0" \
  631. "ramdiskaddr=1000000\0" \
  632. "ramdiskfile=" CONFIG_RAMDISKFILE "\0" \
  633. "console=ttyS0\0" \
  634. "setbootargs=setenv bootargs " \
  635. "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
  636. "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \
  637. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:" \
  638. "$netdev:off " \
  639. "root=$rootdev rw console=$console,$baudrate $othbootargs\0"
  640. #define CONFIG_NFSBOOTCOMMAND \
  641. "setenv rootdev /dev/nfs;" \
  642. "run setbootargs;" \
  643. "run setipargs;" \
  644. "tftp $loadaddr $bootfile;" \
  645. "tftp $fdtaddr $fdtfile;" \
  646. "bootm $loadaddr - $fdtaddr"
  647. #define CONFIG_RAMBOOTCOMMAND \
  648. "setenv rootdev /dev/ram;" \
  649. "run setbootargs;" \
  650. "tftp $ramdiskaddr $ramdiskfile;" \
  651. "tftp $loadaddr $bootfile;" \
  652. "tftp $fdtaddr $fdtfile;" \
  653. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  654. #endif /* __CONFIG_H */