MPC8360EMDS.h 21 KB

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