MPC8360EMDS.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /*
  2. * Copyright (C) 2006 Freescale Semiconductor, Inc.
  3. *
  4. * Dave Liu <daveliu@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_QE 1 /* Has QE */
  28. #define CONFIG_MPC83xx 1 /* MPC83xx family */
  29. #define CONFIG_MPC8360 1 /* MPC8360 CPU specific */
  30. #define CONFIG_MPC8360EMDS 1 /* MPC8360EMDS board specific */
  31. #define CONFIG_SYS_TEXT_BASE 0xFE000000
  32. #undef CONFIG_PQ_MDS_PIB /* POWERQUICC MDS Platform IO Board */
  33. #undef CONFIG_PQ_MDS_PIB_ATM /* QOC3 ATM card */
  34. /*
  35. * System Clock Setup
  36. */
  37. #ifdef CONFIG_PCISLAVE
  38. #define CONFIG_83XX_PCICLK 66000000 /* in HZ */
  39. #else
  40. #define CONFIG_83XX_CLKIN 66000000 /* in Hz */
  41. #endif
  42. #ifndef CONFIG_SYS_CLK_FREQ
  43. #define CONFIG_SYS_CLK_FREQ 66000000
  44. #endif
  45. /*
  46. * Hardware Reset Configuration Word
  47. */
  48. #define CONFIG_SYS_HRCW_LOW (\
  49. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  50. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  51. HRCWL_CSB_TO_CLKIN_4X1 |\
  52. HRCWL_VCO_1X2 |\
  53. HRCWL_CE_PLL_VCO_DIV_4 |\
  54. HRCWL_CE_PLL_DIV_1X1 |\
  55. HRCWL_CE_TO_PLL_1X6 |\
  56. HRCWL_CORE_TO_CSB_2X1)
  57. #ifdef CONFIG_PCISLAVE
  58. #define CONFIG_SYS_HRCW_HIGH (\
  59. HRCWH_PCI_AGENT |\
  60. HRCWH_PCI1_ARBITER_DISABLE |\
  61. HRCWH_PCICKDRV_DISABLE |\
  62. HRCWH_CORE_ENABLE |\
  63. HRCWH_FROM_0XFFF00100 |\
  64. HRCWH_BOOTSEQ_DISABLE |\
  65. HRCWH_SW_WATCHDOG_DISABLE |\
  66. HRCWH_ROM_LOC_LOCAL_16BIT)
  67. #else
  68. #define CONFIG_SYS_HRCW_HIGH (\
  69. HRCWH_PCI_HOST |\
  70. HRCWH_PCI1_ARBITER_ENABLE |\
  71. HRCWH_PCICKDRV_ENABLE |\
  72. HRCWH_CORE_ENABLE |\
  73. HRCWH_FROM_0X00000100 |\
  74. HRCWH_BOOTSEQ_DISABLE |\
  75. HRCWH_SW_WATCHDOG_DISABLE |\
  76. HRCWH_ROM_LOC_LOCAL_16BIT)
  77. #endif
  78. /*
  79. * System IO Config
  80. */
  81. #define CONFIG_SYS_SICRH 0x00000000
  82. #define CONFIG_SYS_SICRL 0x40000000
  83. #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  84. #define CONFIG_BOARD_EARLY_INIT_R
  85. /*
  86. * IMMR new address
  87. */
  88. #define CONFIG_SYS_IMMR 0xE0000000
  89. /*
  90. * DDR Setup
  91. */
  92. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */
  93. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  94. /* + 256M */
  95. #define CONFIG_SYS_SDRAM_BASE2 (CONFIG_SYS_SDRAM_BASE + 0x10000000)
  96. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  97. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN \
  98. | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
  99. #define CONFIG_SYS_83XX_DDR_USES_CS0
  100. #define CONFIG_DDR_ECC /* support DDR ECC function */
  101. #define CONFIG_DDR_ECC_CMD /* Use DDR ECC user commands */
  102. /*
  103. * DDRCDR - DDR Control Driver Register
  104. */
  105. #define CONFIG_SYS_DDRCDR_VALUE 0x80080001
  106. #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */
  107. #if defined(CONFIG_SPD_EEPROM)
  108. /*
  109. * Determine DDR configuration from I2C interface.
  110. */
  111. #define SPD_EEPROM_ADDRESS 0x52 /* DDR SODIMM */
  112. #else
  113. /*
  114. * Manually set up DDR parameters
  115. */
  116. #define CONFIG_SYS_DDR_SIZE 256 /* MB */
  117. #if defined(CONFIG_DDR_II)
  118. #define CONFIG_SYS_DDRCDR 0x80080001
  119. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f
  120. #define CONFIG_SYS_DDR_CS0_CONFIG 0x80330102
  121. #define CONFIG_SYS_DDR_TIMING_0 0x00220802
  122. #define CONFIG_SYS_DDR_TIMING_1 0x38357322
  123. #define CONFIG_SYS_DDR_TIMING_2 0x2f9048c8
  124. #define CONFIG_SYS_DDR_TIMING_3 0x00000000
  125. #define CONFIG_SYS_DDR_CLK_CNTL 0x02000000
  126. #define CONFIG_SYS_DDR_MODE 0x47d00432
  127. #define CONFIG_SYS_DDR_MODE2 0x8000c000
  128. #define CONFIG_SYS_DDR_INTERVAL 0x03cf0080
  129. #define CONFIG_SYS_DDR_SDRAM_CFG 0x43000000
  130. #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
  131. #else
  132. #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN \
  133. | CSCONFIG_ROW_BIT_13 \
  134. | CSCONFIG_COL_BIT_9)
  135. #define CONFIG_SYS_DDR_TIMING_1 0x37344321 /* tCL-tRCD-tRP-tRAS=2.5-3-3-7 */
  136. #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* may need tuning */
  137. #define CONFIG_SYS_DDR_CONTROL 0x42008000 /* Self refresh,2T timing */
  138. #define CONFIG_SYS_DDR_MODE 0x20000162 /* DLL,normal,seq,4/2.5 */
  139. #define CONFIG_SYS_DDR_INTERVAL 0x045b0100 /* page mode */
  140. #endif
  141. #endif
  142. /*
  143. * Memory test
  144. */
  145. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  146. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  147. #define CONFIG_SYS_MEMTEST_END 0x00100000
  148. /*
  149. * The reserved memory
  150. */
  151. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  152. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  153. #define CONFIG_SYS_RAMBOOT
  154. #else
  155. #undef CONFIG_SYS_RAMBOOT
  156. #endif
  157. /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
  158. #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon */
  159. #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
  160. /*
  161. * Initial RAM Base Address Setup
  162. */
  163. #define CONFIG_SYS_INIT_RAM_LOCK 1
  164. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  165. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */
  166. #define CONFIG_SYS_GBL_DATA_OFFSET \
  167. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  168. /*
  169. * Local Bus Configuration & Clock Setup
  170. */
  171. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  172. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
  173. #define CONFIG_SYS_LBC_LBCR 0x00000000
  174. /*
  175. * FLASH on the Local Bus
  176. */
  177. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  178. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  179. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */
  180. #define CONFIG_SYS_FLASH_SIZE 32 /* max FLASH size is 32M */
  181. #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */
  182. #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
  183. /* Window base at flash base */
  184. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  185. #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_32MB)
  186. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
  187. | BR_PS_16 /* 16 bit port */ \
  188. | BR_MS_GPCM /* MSEL = GPCM */ \
  189. | BR_V) /* valid */
  190. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
  191. | OR_GPCM_XAM \
  192. | OR_GPCM_CSNT \
  193. | OR_GPCM_ACS_DIV2 \
  194. | OR_GPCM_XACS \
  195. | OR_GPCM_SCY_15 \
  196. | OR_GPCM_TRLX_SET \
  197. | OR_GPCM_EHTR_SET \
  198. | OR_GPCM_EAD)
  199. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  200. #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */
  201. #undef CONFIG_SYS_FLASH_CHECKSUM
  202. /*
  203. * BCSR on the Local Bus
  204. */
  205. #define CONFIG_SYS_BCSR 0xF8000000
  206. /* Access window base at BCSR base */
  207. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_BCSR
  208. #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_64KB)
  209. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_BCSR \
  210. | BR_PS_8 \
  211. | BR_MS_GPCM \
  212. | BR_V)
  213. #define CONFIG_SYS_OR1_PRELIM (OR_AM_32KB \
  214. | OR_GPCM_XAM \
  215. | OR_GPCM_CSNT \
  216. | OR_GPCM_XACS \
  217. | OR_GPCM_SCY_15 \
  218. | OR_GPCM_TRLX_SET \
  219. | OR_GPCM_EHTR_SET \
  220. | OR_GPCM_EAD)
  221. /* 0xFFFFE9F7 */
  222. /*
  223. * SDRAM on the Local Bus
  224. */
  225. #define CONFIG_SYS_LBC_SDRAM_BASE 0xF0000000 /* SDRAM base address */
  226. #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */
  227. #define CONFIG_SYS_LB_SDRAM /* if board has SRDAM on local bus */
  228. #ifdef CONFIG_SYS_LB_SDRAM
  229. #define CONFIG_SYS_LBLAWBAR2 0
  230. #define CONFIG_SYS_LBLAWAR2 (LBLAWAR_EN | LBLAWAR_64MB)
  231. /*local bus BR2, OR2 definition for SDRAM if soldered on the EPB board */
  232. /*
  233. * Base Register 2 and Option Register 2 configure SDRAM.
  234. *
  235. * For BR2, need:
  236. * Base address = BR[0:16] = dynamic
  237. * port size = 32-bits = BR2[19:20] = 11
  238. * no parity checking = BR2[21:22] = 00
  239. * SDRAM for MSEL = BR2[24:26] = 011
  240. * Valid = BR[31] = 1
  241. *
  242. * 0 4 8 12 16 20 24 28
  243. * xxxx xxxx xxxx xxxx x001 1000 0110 0001 = 00001861
  244. */
  245. /* Port size=32bit, MSEL=DRAM */
  246. #define CONFIG_SYS_BR2 (BR_PS_32 | BR_MS_SDRAM | BR_V) /* 0xF0001861 */
  247. /*
  248. * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64.
  249. *
  250. * For OR2, need:
  251. * 64MB mask for AM, OR2[0:7] = 1111 1100
  252. * XAM, OR2[17:18] = 11
  253. * 9 columns OR2[19-21] = 010
  254. * 13 rows OR2[23-25] = 100
  255. * EAD set for extra time OR[31] = 1
  256. *
  257. * 0 4 8 12 16 20 24 28
  258. * 1111 1100 0000 0000 0110 1001 0000 0001 = fc006901
  259. */
  260. #define CONFIG_SYS_OR2 (MEG_TO_AM(CONFIG_SYS_LBC_SDRAM_SIZE) \
  261. | OR_SDRAM_XAM \
  262. | ((9 - OR_SDRAM_MIN_COLS) << OR_SDRAM_COLS_SHIFT) \
  263. | ((13 - OR_SDRAM_MIN_ROWS) << OR_SDRAM_ROWS_SHIFT) \
  264. | OR_SDRAM_EAD)
  265. /* 0xFC006901 */
  266. /* LB sdram refresh timer, about 6us */
  267. #define CONFIG_SYS_LBC_LSRT 0x32000000
  268. /* LB refresh timer prescal, 266MHz/32 */
  269. #define CONFIG_SYS_LBC_MRTPR 0x20000000
  270. #define CONFIG_SYS_LBC_LSDMR_COMMON 0x0063b723
  271. /*
  272. * SDRAM Controller configuration sequence.
  273. */
  274. #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL)
  275. #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  276. #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  277. #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW)
  278. #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL)
  279. #endif
  280. /*
  281. * Windows to access Platform I/O Boards (PIB) via local bus
  282. */
  283. #define CONFIG_SYS_PIB_BASE 0xF8008000
  284. #define CONFIG_SYS_PIB_WINDOW_SIZE (32 * 1024)
  285. /* [RFC] This LBLAW only covers the 2nd window (CS5) */
  286. #define CONFIG_SYS_LBLAWBAR3_PRELIM \
  287. CONFIG_SYS_PIB_BASE + CONFIG_SYS_PIB_WINDOW_SIZE
  288. #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_32KB)
  289. /*
  290. * CS4 on Local Bus, to PIB
  291. */
  292. /* CS4 base address at 0xf8008000 */
  293. #define CONFIG_SYS_BR4_PRELIM (CONFIG_SYS_PIB_BASE \
  294. | BR_PS_8 \
  295. | BR_MS_GPCM \
  296. | BR_V)
  297. /* 0xF8008801 */
  298. #define CONFIG_SYS_OR4_PRELIM (OR_AM_32KB \
  299. | OR_GPCM_XAM \
  300. | OR_GPCM_CSNT \
  301. | OR_GPCM_XACS \
  302. | OR_GPCM_SCY_15 \
  303. | OR_GPCM_TRLX_SET \
  304. | OR_GPCM_EHTR_SET \
  305. | OR_GPCM_EAD)
  306. /* 0xffffe9f7 */
  307. /*
  308. * CS5 on Local Bus, to PIB
  309. */
  310. /* CS5 base address at 0xf8010000 */
  311. #define CONFIG_SYS_BR5_PRELIM ((CONFIG_SYS_PIB_BASE + \
  312. CONFIG_SYS_PIB_WINDOW_SIZE) \
  313. | BR_PS_8 \
  314. | BR_MS_GPCM \
  315. | BR_V)
  316. /* 0xF8010801 */
  317. #define CONFIG_SYS_OR5_PRELIM (CONFIG_SYS_PIB_BASE \
  318. | OR_GPCM_XAM \
  319. | OR_GPCM_CSNT \
  320. | OR_GPCM_XACS \
  321. | OR_GPCM_SCY_15 \
  322. | OR_GPCM_TRLX_SET \
  323. | OR_GPCM_EHTR_SET \
  324. | OR_GPCM_EAD)
  325. /* 0xffffe9f7 */
  326. /*
  327. * Serial Port
  328. */
  329. #define CONFIG_CONS_INDEX 1
  330. #define CONFIG_SYS_NS16550
  331. #define CONFIG_SYS_NS16550_SERIAL
  332. #define CONFIG_SYS_NS16550_REG_SIZE 1
  333. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  334. #define CONFIG_SYS_BAUDRATE_TABLE \
  335. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  336. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  337. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  338. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  339. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  340. /* Use the HUSH parser */
  341. #define CONFIG_SYS_HUSH_PARSER
  342. #ifdef CONFIG_SYS_HUSH_PARSER
  343. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  344. #endif
  345. /* pass open firmware flat tree */
  346. #define CONFIG_OF_LIBFDT 1
  347. #define CONFIG_OF_BOARD_SETUP 1
  348. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  349. /* I2C */
  350. #define CONFIG_HARD_I2C /* I2C with hardware support */
  351. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  352. #define CONFIG_FSL_I2C
  353. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  354. #define CONFIG_SYS_I2C_SLAVE 0x7F
  355. #define CONFIG_SYS_I2C_NOPROBES {0x52} /* Don't probe these addrs */
  356. #define CONFIG_SYS_I2C_OFFSET 0x3000
  357. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  358. /*
  359. * Config on-board RTC
  360. */
  361. #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */
  362. #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */
  363. /*
  364. * General PCI
  365. * Addresses are mapped 1-1.
  366. */
  367. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  368. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  369. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  370. #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
  371. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  372. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  373. #define CONFIG_SYS_PCI1_IO_BASE 0x00000000
  374. #define CONFIG_SYS_PCI1_IO_PHYS 0xE0300000
  375. #define CONFIG_SYS_PCI1_IO_SIZE 0x100000 /* 1M */
  376. #define CONFIG_SYS_PCI_SLV_MEM_LOCAL CONFIG_SYS_SDRAM_BASE
  377. #define CONFIG_SYS_PCI_SLV_MEM_BUS 0x00000000
  378. #define CONFIG_SYS_PCI_SLV_MEM_SIZE 0x80000000
  379. #ifdef CONFIG_PCI
  380. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  381. #define CONFIG_83XX_PCI_STREAMING
  382. #undef CONFIG_EEPRO100
  383. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  384. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  385. #endif /* CONFIG_PCI */
  386. #define CONFIG_HWCONFIG 1
  387. /*
  388. * QE UEC ethernet configuration
  389. */
  390. #define CONFIG_UEC_ETH
  391. #define CONFIG_ETHPRIME "UEC0"
  392. #define CONFIG_PHY_MODE_NEED_CHANGE
  393. #define CONFIG_UEC_ETH1 /* GETH1 */
  394. #ifdef CONFIG_UEC_ETH1
  395. #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
  396. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE
  397. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9
  398. #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH
  399. #define CONFIG_SYS_UEC1_PHY_ADDR 0
  400. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_ID
  401. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 1000
  402. #endif
  403. #define CONFIG_UEC_ETH2 /* GETH2 */
  404. #ifdef CONFIG_UEC_ETH2
  405. #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */
  406. #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE
  407. #define CONFIG_SYS_UEC2_TX_CLK QE_CLK4
  408. #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH
  409. #define CONFIG_SYS_UEC2_PHY_ADDR 1
  410. #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_ID
  411. #define CONFIG_SYS_UEC2_INTERFACE_SPEED 1000
  412. #endif
  413. /*
  414. * Environment
  415. */
  416. #ifndef CONFIG_SYS_RAMBOOT
  417. #define CONFIG_ENV_IS_IN_FLASH 1
  418. #define CONFIG_ENV_ADDR \
  419. (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
  420. #define CONFIG_ENV_SECT_SIZE 0x20000
  421. #define CONFIG_ENV_SIZE 0x2000
  422. #else
  423. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  424. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  425. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  426. #define CONFIG_ENV_SIZE 0x2000
  427. #endif
  428. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  429. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  430. /*
  431. * BOOTP options
  432. */
  433. #define CONFIG_BOOTP_BOOTFILESIZE
  434. #define CONFIG_BOOTP_BOOTPATH
  435. #define CONFIG_BOOTP_GATEWAY
  436. #define CONFIG_BOOTP_HOSTNAME
  437. /*
  438. * Command line configuration.
  439. */
  440. #include <config_cmd_default.h>
  441. #define CONFIG_CMD_PING
  442. #define CONFIG_CMD_I2C
  443. #define CONFIG_CMD_ASKENV
  444. #define CONFIG_CMD_SDRAM
  445. #if defined(CONFIG_PCI)
  446. #define CONFIG_CMD_PCI
  447. #endif
  448. #if defined(CONFIG_SYS_RAMBOOT)
  449. #undef CONFIG_CMD_SAVEENV
  450. #undef CONFIG_CMD_LOADS
  451. #endif
  452. #undef CONFIG_WATCHDOG /* watchdog disabled */
  453. /*
  454. * Miscellaneous configurable options
  455. */
  456. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  457. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  458. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  459. #if defined(CONFIG_CMD_KGDB)
  460. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  461. #else
  462. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  463. #endif
  464. /* Print Buffer Size */
  465. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  466. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  467. /* Boot Argument Buffer Size */
  468. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  469. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */
  470. /*
  471. * For booting Linux, the board info and command line data
  472. * have to be in the first 256 MB of memory, since this is
  473. * the maximum mapped by the Linux kernel during initialization.
  474. */
  475. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */
  476. /*
  477. * Core HID Setup
  478. */
  479. #define CONFIG_SYS_HID0_INIT 0x000000000
  480. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \
  481. HID0_ENABLE_INSTRUCTION_CACHE)
  482. #define CONFIG_SYS_HID2 HID2_HBE
  483. /*
  484. * MMU Setup
  485. */
  486. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  487. /* DDR/LBC SDRAM: cacheable */
  488. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
  489. | BATL_PP_RW \
  490. | BATL_MEMCOHERENCE)
  491. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
  492. | BATU_BL_256M \
  493. | BATU_VS \
  494. | BATU_VP)
  495. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  496. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  497. /* IMMRBAR & PCI IO: cache-inhibit and guarded */
  498. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR \
  499. | BATL_PP_RW \
  500. | BATL_CACHEINHIBIT \
  501. | BATL_GUARDEDSTORAGE)
  502. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR \
  503. | BATU_BL_4M \
  504. | BATU_VS \
  505. | BATU_VP)
  506. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  507. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  508. /* BCSR: cache-inhibit and guarded */
  509. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_BCSR \
  510. | BATL_PP_RW \
  511. | BATL_CACHEINHIBIT \
  512. | BATL_GUARDEDSTORAGE)
  513. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_BCSR \
  514. | BATU_BL_128K \
  515. | BATU_VS \
  516. | BATU_VP)
  517. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  518. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  519. /* FLASH: icache cacheable, but dcache-inhibit and guarded */
  520. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE \
  521. | BATL_PP_RW \
  522. | BATL_MEMCOHERENCE)
  523. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE \
  524. | BATU_BL_32M \
  525. | BATU_VS \
  526. | BATU_VP)
  527. #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE \
  528. | BATL_PP_RW \
  529. | BATL_CACHEINHIBIT \
  530. | BATL_GUARDEDSTORAGE)
  531. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  532. /* DDR/LBC SDRAM next 256M: cacheable */
  533. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_SDRAM_BASE2 \
  534. | BATL_PP_RW \
  535. | BATL_MEMCOHERENCE)
  536. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_SDRAM_BASE2 \
  537. | BATU_BL_256M \
  538. | BATU_VS \
  539. | BATU_VP)
  540. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  541. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  542. /* Stack in dcache: cacheable, no memory coherence */
  543. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_RW)
  544. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_INIT_RAM_ADDR \
  545. | BATU_BL_128K \
  546. | BATU_VS \
  547. | BATU_VP)
  548. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  549. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  550. #ifdef CONFIG_PCI
  551. /* PCI MEM space: cacheable */
  552. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI1_MEM_PHYS \
  553. | BATL_PP_RW \
  554. | BATL_MEMCOHERENCE)
  555. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI1_MEM_PHYS \
  556. | BATU_BL_256M \
  557. | BATU_VS \
  558. | BATU_VP)
  559. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  560. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  561. /* PCI MMIO space: cache-inhibit and guarded */
  562. #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI1_MMIO_PHYS \
  563. | BATL_PP_RW \
  564. | BATL_CACHEINHIBIT \
  565. | BATL_GUARDEDSTORAGE)
  566. #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI1_MMIO_PHYS \
  567. | BATU_BL_256M \
  568. | BATU_VS \
  569. | BATU_VP)
  570. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  571. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  572. #else
  573. #define CONFIG_SYS_IBAT6L (0)
  574. #define CONFIG_SYS_IBAT6U (0)
  575. #define CONFIG_SYS_IBAT7L (0)
  576. #define CONFIG_SYS_IBAT7U (0)
  577. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  578. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  579. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  580. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  581. #endif
  582. #if defined(CONFIG_CMD_KGDB)
  583. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  584. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  585. #endif
  586. /*
  587. * Environment Configuration
  588. */
  589. #define CONFIG_ENV_OVERWRITE
  590. #if defined(CONFIG_UEC_ETH)
  591. #define CONFIG_HAS_ETH0
  592. #define CONFIG_HAS_ETH1
  593. #endif
  594. #define CONFIG_BAUDRATE 115200
  595. #define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */
  596. #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */
  597. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  598. #define CONFIG_EXTRA_ENV_SETTINGS \
  599. "netdev=eth0\0" \
  600. "consoledev=ttyS0\0" \
  601. "ramdiskaddr=1000000\0" \
  602. "ramdiskfile=ramfs.83xx\0" \
  603. "fdtaddr=780000\0" \
  604. "fdtfile=mpc836x_mds.dtb\0" \
  605. ""
  606. #define CONFIG_NFSBOOTCOMMAND \
  607. "setenv bootargs root=/dev/nfs rw " \
  608. "nfsroot=$serverip:$rootpath " \
  609. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:" \
  610. "$netdev:off " \
  611. "console=$consoledev,$baudrate $othbootargs;" \
  612. "tftp $loadaddr $bootfile;" \
  613. "tftp $fdtaddr $fdtfile;" \
  614. "bootm $loadaddr - $fdtaddr"
  615. #define CONFIG_RAMBOOTCOMMAND \
  616. "setenv bootargs root=/dev/ram rw " \
  617. "console=$consoledev,$baudrate $othbootargs;" \
  618. "tftp $ramdiskaddr $ramdiskfile;" \
  619. "tftp $loadaddr $bootfile;" \
  620. "tftp $fdtaddr $fdtfile;" \
  621. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  622. #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND
  623. #endif /* __CONFIG_H */