MPC8349EMDS.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  1. /*
  2. * (C) Copyright 2006-2010
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /*
  24. * mpc8349emds board configuration file
  25. *
  26. */
  27. #ifndef __CONFIG_H
  28. #define __CONFIG_H
  29. /*
  30. * High Level Configuration Options
  31. */
  32. #define CONFIG_E300 1 /* E300 Family */
  33. #define CONFIG_MPC83xx 1 /* MPC83xx family */
  34. #define CONFIG_MPC834x 1 /* MPC834x family */
  35. #define CONFIG_MPC8349 1 /* MPC8349 specific */
  36. #define CONFIG_MPC8349EMDS 1 /* MPC8349EMDS board specific */
  37. #define CONFIG_SYS_TEXT_BASE 0xFE000000
  38. #define CONFIG_PCI_66M
  39. #ifdef CONFIG_PCI_66M
  40. #define CONFIG_83XX_CLKIN 66000000 /* in Hz */
  41. #else
  42. #define CONFIG_83XX_CLKIN 33000000 /* in Hz */
  43. #endif
  44. #ifdef CONFIG_PCISLAVE
  45. #define CONFIG_PCI
  46. #define CONFIG_83XX_PCICLK 66666666 /* in Hz */
  47. #endif /* CONFIG_PCISLAVE */
  48. #ifndef CONFIG_SYS_CLK_FREQ
  49. #ifdef CONFIG_PCI_66M
  50. #define CONFIG_SYS_CLK_FREQ 66000000
  51. #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1
  52. #else
  53. #define CONFIG_SYS_CLK_FREQ 33000000
  54. #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1
  55. #endif
  56. #endif
  57. #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  58. #define CONFIG_SYS_IMMR 0xE0000000
  59. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  60. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  61. #define CONFIG_SYS_MEMTEST_END 0x00100000
  62. /*
  63. * DDR Setup
  64. */
  65. #define CONFIG_DDR_ECC /* support DDR ECC function */
  66. #define CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */
  67. #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/
  68. /*
  69. * 32-bit data path mode.
  70. *
  71. * Please note that using this mode for devices with the real density of 64-bit
  72. * effectively reduces the amount of available memory due to the effect of
  73. * wrapping around while translating address to row/columns, for example in the
  74. * 256MB module the upper 128MB get aliased with contents of the lower
  75. * 128MB); normally this define should be used for devices with real 32-bit
  76. * data path.
  77. */
  78. #undef CONFIG_DDR_32BIT
  79. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/
  80. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  81. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  82. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
  83. DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
  84. #undef CONFIG_DDR_2T_TIMING
  85. /*
  86. * DDRCDR - DDR Control Driver Register
  87. */
  88. #define CONFIG_SYS_DDRCDR_VALUE 0x80080001
  89. #if defined(CONFIG_SPD_EEPROM)
  90. /*
  91. * Determine DDR configuration from I2C interface.
  92. */
  93. #define SPD_EEPROM_ADDRESS 0x51 /* DDR DIMM */
  94. #else
  95. /*
  96. * Manually set up DDR parameters
  97. */
  98. #define CONFIG_SYS_DDR_SIZE 256 /* MB */
  99. #if defined(CONFIG_DDR_II)
  100. #define CONFIG_SYS_DDRCDR 0x80080001
  101. #define CONFIG_SYS_DDR_CS2_BNDS 0x0000000f
  102. #define CONFIG_SYS_DDR_CS2_CONFIG 0x80330102
  103. #define CONFIG_SYS_DDR_TIMING_0 0x00220802
  104. #define CONFIG_SYS_DDR_TIMING_1 0x38357322
  105. #define CONFIG_SYS_DDR_TIMING_2 0x2f9048c8
  106. #define CONFIG_SYS_DDR_TIMING_3 0x00000000
  107. #define CONFIG_SYS_DDR_CLK_CNTL 0x02000000
  108. #define CONFIG_SYS_DDR_MODE 0x47d00432
  109. #define CONFIG_SYS_DDR_MODE2 0x8000c000
  110. #define CONFIG_SYS_DDR_INTERVAL 0x03cf0080
  111. #define CONFIG_SYS_DDR_SDRAM_CFG 0x43000000
  112. #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
  113. #else
  114. #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10)
  115. #define CONFIG_SYS_DDR_TIMING_1 0x36332321
  116. #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */
  117. #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */
  118. #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */
  119. #if defined(CONFIG_DDR_32BIT)
  120. /* set burst length to 8 for 32-bit data path */
  121. #define CONFIG_SYS_DDR_MODE 0x00000023 /* DLL,normal,seq,4/2.5, 8 burst len */
  122. #else
  123. /* the default burst length is 4 - for 64-bit data path */
  124. #define CONFIG_SYS_DDR_MODE 0x00000022 /* DLL,normal,seq,4/2.5, 4 burst len */
  125. #endif
  126. #endif
  127. #endif
  128. /*
  129. * SDRAM on the Local Bus
  130. */
  131. #define CONFIG_SYS_LBC_SDRAM_BASE 0xF0000000 /* Localbus SDRAM */
  132. #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */
  133. /*
  134. * FLASH on the Local Bus
  135. */
  136. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  137. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  138. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */
  139. #define CONFIG_SYS_FLASH_SIZE 32 /* max flash size in MB */
  140. #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */
  141. /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
  142. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \
  143. (2 << BR_PS_SHIFT) | /* 16 bit port size */ \
  144. BR_V) /* valid */
  145. #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \
  146. OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \
  147. OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD)
  148. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */
  149. #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000018 /* 32 MB window size */
  150. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  151. #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */
  152. #undef CONFIG_SYS_FLASH_CHECKSUM
  153. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  154. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  155. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  156. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  157. #define CONFIG_SYS_RAMBOOT
  158. #else
  159. #undef CONFIG_SYS_RAMBOOT
  160. #endif
  161. /*
  162. * BCSR register on local bus 32KB, 8-bit wide for MDS config reg
  163. */
  164. #define CONFIG_SYS_BCSR 0xE2400000
  165. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_BCSR /* Access window base at BCSR base */
  166. #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E /* Access window size 32K */
  167. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_BCSR|0x00000801) /* Port-size=8bit, MSEL=GPCM */
  168. #define CONFIG_SYS_OR1_PRELIM 0xFFFFE8F0 /* length 32K */
  169. #define CONFIG_SYS_INIT_RAM_LOCK 1
  170. #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */
  171. #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/
  172. #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */
  173. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  174. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  175. #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon */
  176. #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
  177. /*
  178. * Local Bus LCRR and LBCR regs
  179. * LCRR: DLL bypass, Clock divider is 4
  180. * External Local Bus rate is
  181. * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
  182. */
  183. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  184. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
  185. #define CONFIG_SYS_LBC_LBCR 0x00000000
  186. /*
  187. * The MPC834xEA MDS for 834xE rev3.1 may not be assembled SDRAM memory.
  188. * if board has SRDAM on local bus, you can define CONFIG_SYS_LB_SDRAM
  189. */
  190. #undef CONFIG_SYS_LB_SDRAM
  191. #ifdef CONFIG_SYS_LB_SDRAM
  192. /* Local bus BR2, OR2 definition for SDRAM if soldered on the MDS board */
  193. /*
  194. * Base Register 2 and Option Register 2 configure SDRAM.
  195. * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000.
  196. *
  197. * For BR2, need:
  198. * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0
  199. * port-size = 32-bits = BR2[19:20] = 11
  200. * no parity checking = BR2[21:22] = 00
  201. * SDRAM for MSEL = BR2[24:26] = 011
  202. * Valid = BR[31] = 1
  203. *
  204. * 0 4 8 12 16 20 24 28
  205. * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861
  206. *
  207. * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into
  208. * FIXME: the top 17 bits of BR2.
  209. */
  210. #define CONFIG_SYS_BR2_PRELIM 0xF0001861 /* Port-size=32bit, MSEL=SDRAM */
  211. #define CONFIG_SYS_LBLAWBAR2_PRELIM 0xF0000000
  212. #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* 64M */
  213. /*
  214. * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64.
  215. *
  216. * For OR2, need:
  217. * 64MB mask for AM, OR2[0:7] = 1111 1100
  218. * XAM, OR2[17:18] = 11
  219. * 9 columns OR2[19-21] = 010
  220. * 13 rows OR2[23-25] = 100
  221. * EAD set for extra time OR[31] = 1
  222. *
  223. * 0 4 8 12 16 20 24 28
  224. * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901
  225. */
  226. #define CONFIG_SYS_OR2_PRELIM 0xFC006901
  227. #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */
  228. #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */
  229. #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFEN \
  230. | LSDMR_BSMA1516 \
  231. | LSDMR_RFCR8 \
  232. | LSDMR_PRETOACT6 \
  233. | LSDMR_ACTTORW3 \
  234. | LSDMR_BL8 \
  235. | LSDMR_WRC3 \
  236. | LSDMR_CL3 \
  237. )
  238. /*
  239. * SDRAM Controller configuration sequence.
  240. */
  241. #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL)
  242. #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  243. #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  244. #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW)
  245. #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL)
  246. #endif
  247. /*
  248. * Serial Port
  249. */
  250. #define CONFIG_CONS_INDEX 1
  251. #define CONFIG_SYS_NS16550
  252. #define CONFIG_SYS_NS16550_SERIAL
  253. #define CONFIG_SYS_NS16550_REG_SIZE 1
  254. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  255. #define CONFIG_SYS_BAUDRATE_TABLE \
  256. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
  257. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  258. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  259. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  260. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  261. /* Use the HUSH parser */
  262. #define CONFIG_SYS_HUSH_PARSER
  263. #ifdef CONFIG_SYS_HUSH_PARSER
  264. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  265. #endif
  266. /* pass open firmware flat tree */
  267. #define CONFIG_OF_LIBFDT 1
  268. #define CONFIG_OF_BOARD_SETUP 1
  269. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  270. /* I2C */
  271. #define CONFIG_HARD_I2C /* I2C with hardware support*/
  272. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  273. #define CONFIG_FSL_I2C
  274. #define CONFIG_I2C_MULTI_BUS
  275. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  276. #define CONFIG_SYS_I2C_SLAVE 0x7F
  277. #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */
  278. #define CONFIG_SYS_I2C_OFFSET 0x3000
  279. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  280. /* SPI */
  281. #define CONFIG_MPC8XXX_SPI
  282. #undef CONFIG_SOFT_SPI /* SPI bit-banged */
  283. /* GPIOs. Used as SPI chip selects */
  284. #define CONFIG_SYS_GPIO1_PRELIM
  285. #define CONFIG_SYS_GPIO1_DIR 0xC0000000 /* SPI CS on 0, LED on 1 */
  286. #define CONFIG_SYS_GPIO1_DAT 0xC0000000 /* Both are active LOW */
  287. /* TSEC */
  288. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  289. #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
  290. #define CONFIG_SYS_TSEC2_OFFSET 0x25000
  291. #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
  292. /* USB */
  293. #define CONFIG_SYS_USE_MPC834XSYS_USB_PHY 1 /* Use SYS board PHY */
  294. /*
  295. * General PCI
  296. * Addresses are mapped 1-1.
  297. */
  298. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  299. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  300. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  301. #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
  302. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  303. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  304. #define CONFIG_SYS_PCI1_IO_BASE 0x00000000
  305. #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
  306. #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */
  307. #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000
  308. #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE
  309. #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */
  310. #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000
  311. #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE
  312. #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */
  313. #define CONFIG_SYS_PCI2_IO_BASE 0x00000000
  314. #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000
  315. #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */
  316. #if defined(CONFIG_PCI)
  317. #define PCI_ONE_PCI1
  318. #if defined(PCI_64BIT)
  319. #undef PCI_ALL_PCI1
  320. #undef PCI_TWO_PCI1
  321. #undef PCI_ONE_PCI1
  322. #endif
  323. #define CONFIG_NET_MULTI
  324. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  325. #define CONFIG_83XX_PCI_STREAMING
  326. #undef CONFIG_EEPRO100
  327. #undef CONFIG_TULIP
  328. #if !defined(CONFIG_PCI_PNP)
  329. #define PCI_ENET0_IOADDR 0xFIXME
  330. #define PCI_ENET0_MEMADDR 0xFIXME
  331. #define PCI_IDSEL_NUMBER 0x0c /* slot0->3(IDSEL)=12->15 */
  332. #endif
  333. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  334. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  335. #endif /* CONFIG_PCI */
  336. /*
  337. * TSEC configuration
  338. */
  339. #define CONFIG_TSEC_ENET /* TSEC ethernet support */
  340. #if defined(CONFIG_TSEC_ENET)
  341. #ifndef CONFIG_NET_MULTI
  342. #define CONFIG_NET_MULTI 1
  343. #endif
  344. #define CONFIG_GMII 1 /* MII PHY management */
  345. #define CONFIG_TSEC1 1
  346. #define CONFIG_TSEC1_NAME "TSEC0"
  347. #define CONFIG_TSEC2 1
  348. #define CONFIG_TSEC2_NAME "TSEC1"
  349. #define TSEC1_PHY_ADDR 0
  350. #define TSEC2_PHY_ADDR 1
  351. #define TSEC1_PHYIDX 0
  352. #define TSEC2_PHYIDX 0
  353. #define TSEC1_FLAGS TSEC_GIGABIT
  354. #define TSEC2_FLAGS TSEC_GIGABIT
  355. /* Options are: TSEC[0-1] */
  356. #define CONFIG_ETHPRIME "TSEC0"
  357. #endif /* CONFIG_TSEC_ENET */
  358. /*
  359. * Configure 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. * Environment
  365. */
  366. #ifndef CONFIG_SYS_RAMBOOT
  367. #define CONFIG_ENV_IS_IN_FLASH 1
  368. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
  369. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
  370. #define CONFIG_ENV_SIZE 0x2000
  371. /* Address and size of Redundant Environment Sector */
  372. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
  373. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  374. #else
  375. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  376. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  377. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  378. #define CONFIG_ENV_SIZE 0x2000
  379. #endif
  380. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  381. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  382. /*
  383. * BOOTP options
  384. */
  385. #define CONFIG_BOOTP_BOOTFILESIZE
  386. #define CONFIG_BOOTP_BOOTPATH
  387. #define CONFIG_BOOTP_GATEWAY
  388. #define CONFIG_BOOTP_HOSTNAME
  389. /*
  390. * Command line configuration.
  391. */
  392. #include <config_cmd_default.h>
  393. #define CONFIG_CMD_PING
  394. #define CONFIG_CMD_I2C
  395. #define CONFIG_CMD_DATE
  396. #define CONFIG_CMD_MII
  397. #if defined(CONFIG_PCI)
  398. #define CONFIG_CMD_PCI
  399. #endif
  400. #if defined(CONFIG_SYS_RAMBOOT)
  401. #undef CONFIG_CMD_SAVEENV
  402. #undef CONFIG_CMD_LOADS
  403. #endif
  404. #undef CONFIG_WATCHDOG /* watchdog disabled */
  405. /*
  406. * Miscellaneous configurable options
  407. */
  408. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  409. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  410. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  411. #if defined(CONFIG_CMD_KGDB)
  412. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  413. #else
  414. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  415. #endif
  416. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  417. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  418. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  419. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */
  420. /*
  421. * For booting Linux, the board info and command line data
  422. * have to be in the first 256 MB of memory, since this is
  423. * the maximum mapped by the Linux kernel during initialization.
  424. */
  425. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux*/
  426. #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */
  427. #if 1 /*528/264*/
  428. #define CONFIG_SYS_HRCW_LOW (\
  429. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  430. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  431. HRCWL_CSB_TO_CLKIN |\
  432. HRCWL_VCO_1X2 |\
  433. HRCWL_CORE_TO_CSB_2X1)
  434. #elif 0 /*396/132*/
  435. #define CONFIG_SYS_HRCW_LOW (\
  436. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  437. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  438. HRCWL_CSB_TO_CLKIN |\
  439. HRCWL_VCO_1X4 |\
  440. HRCWL_CORE_TO_CSB_3X1)
  441. #elif 0 /*264/132*/
  442. #define CONFIG_SYS_HRCW_LOW (\
  443. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  444. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  445. HRCWL_CSB_TO_CLKIN |\
  446. HRCWL_VCO_1X4 |\
  447. HRCWL_CORE_TO_CSB_2X1)
  448. #elif 0 /*132/132*/
  449. #define CONFIG_SYS_HRCW_LOW (\
  450. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  451. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  452. HRCWL_CSB_TO_CLKIN |\
  453. HRCWL_VCO_1X4 |\
  454. HRCWL_CORE_TO_CSB_1X1)
  455. #elif 0 /*264/264 */
  456. #define CONFIG_SYS_HRCW_LOW (\
  457. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  458. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  459. HRCWL_CSB_TO_CLKIN |\
  460. HRCWL_VCO_1X4 |\
  461. HRCWL_CORE_TO_CSB_1X1)
  462. #endif
  463. #ifdef CONFIG_PCISLAVE
  464. #define CONFIG_SYS_HRCW_HIGH (\
  465. HRCWH_PCI_AGENT |\
  466. HRCWH_64_BIT_PCI |\
  467. HRCWH_PCI1_ARBITER_DISABLE |\
  468. HRCWH_PCI2_ARBITER_DISABLE |\
  469. HRCWH_CORE_ENABLE |\
  470. HRCWH_FROM_0X00000100 |\
  471. HRCWH_BOOTSEQ_DISABLE |\
  472. HRCWH_SW_WATCHDOG_DISABLE |\
  473. HRCWH_ROM_LOC_LOCAL_16BIT |\
  474. HRCWH_TSEC1M_IN_GMII |\
  475. HRCWH_TSEC2M_IN_GMII )
  476. #else
  477. #if defined(PCI_64BIT)
  478. #define CONFIG_SYS_HRCW_HIGH (\
  479. HRCWH_PCI_HOST |\
  480. HRCWH_64_BIT_PCI |\
  481. HRCWH_PCI1_ARBITER_ENABLE |\
  482. HRCWH_PCI2_ARBITER_DISABLE |\
  483. HRCWH_CORE_ENABLE |\
  484. HRCWH_FROM_0X00000100 |\
  485. HRCWH_BOOTSEQ_DISABLE |\
  486. HRCWH_SW_WATCHDOG_DISABLE |\
  487. HRCWH_ROM_LOC_LOCAL_16BIT |\
  488. HRCWH_TSEC1M_IN_GMII |\
  489. HRCWH_TSEC2M_IN_GMII )
  490. #else
  491. #define CONFIG_SYS_HRCW_HIGH (\
  492. HRCWH_PCI_HOST |\
  493. HRCWH_32_BIT_PCI |\
  494. HRCWH_PCI1_ARBITER_ENABLE |\
  495. HRCWH_PCI2_ARBITER_ENABLE |\
  496. HRCWH_CORE_ENABLE |\
  497. HRCWH_FROM_0X00000100 |\
  498. HRCWH_BOOTSEQ_DISABLE |\
  499. HRCWH_SW_WATCHDOG_DISABLE |\
  500. HRCWH_ROM_LOC_LOCAL_16BIT |\
  501. HRCWH_TSEC1M_IN_GMII |\
  502. HRCWH_TSEC2M_IN_GMII )
  503. #endif /* PCI_64BIT */
  504. #endif /* CONFIG_PCISLAVE */
  505. /*
  506. * System performance
  507. */
  508. #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
  509. #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
  510. #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */
  511. #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */
  512. #define CONFIG_SYS_SCCR_TSEC1CM 1 /* TSEC1 clock mode (0-3) */
  513. #define CONFIG_SYS_SCCR_TSEC2CM 1 /* TSEC2 & I2C0 clock mode (0-3) */
  514. /* System IO Config */
  515. #define CONFIG_SYS_SICRH 0
  516. #define CONFIG_SYS_SICRL SICRL_LDP_A
  517. #define CONFIG_SYS_HID0_INIT 0x000000000
  518. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \
  519. HID0_ENABLE_INSTRUCTION_CACHE)
  520. /* #define CONFIG_SYS_HID0_FINAL (\
  521. HID0_ENABLE_INSTRUCTION_CACHE |\
  522. HID0_ENABLE_M_BIT |\
  523. HID0_ENABLE_ADDRESS_BROADCAST ) */
  524. #define CONFIG_SYS_HID2 HID2_HBE
  525. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  526. /* DDR @ 0x00000000 */
  527. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  528. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  529. /* PCI @ 0x80000000 */
  530. #ifdef CONFIG_PCI
  531. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  532. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  533. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  534. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  535. #else
  536. #define CONFIG_SYS_IBAT1L (0)
  537. #define CONFIG_SYS_IBAT1U (0)
  538. #define CONFIG_SYS_IBAT2L (0)
  539. #define CONFIG_SYS_IBAT2U (0)
  540. #endif
  541. #ifdef CONFIG_MPC83XX_PCI2
  542. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  543. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  544. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  545. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  546. #else
  547. #define CONFIG_SYS_IBAT3L (0)
  548. #define CONFIG_SYS_IBAT3U (0)
  549. #define CONFIG_SYS_IBAT4L (0)
  550. #define CONFIG_SYS_IBAT4U (0)
  551. #endif
  552. /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
  553. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  554. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
  555. /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
  556. #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \
  557. BATL_GUARDEDSTORAGE)
  558. #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  559. #define CONFIG_SYS_IBAT7L (0)
  560. #define CONFIG_SYS_IBAT7U (0)
  561. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  562. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  563. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  564. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  565. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  566. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  567. #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
  568. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  569. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  570. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  571. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  572. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  573. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  574. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  575. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  576. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  577. #if defined(CONFIG_CMD_KGDB)
  578. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  579. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  580. #endif
  581. /*
  582. * Environment Configuration
  583. */
  584. #define CONFIG_ENV_OVERWRITE
  585. #if defined(CONFIG_TSEC_ENET)
  586. #define CONFIG_HAS_ETH1
  587. #define CONFIG_HAS_ETH0
  588. #endif
  589. #define CONFIG_HOSTNAME mpc8349emds
  590. #define CONFIG_ROOTPATH /nfsroot/rootfs
  591. #define CONFIG_BOOTFILE uImage
  592. #define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */
  593. #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */
  594. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  595. #define CONFIG_BAUDRATE 115200
  596. #define CONFIG_PREBOOT "echo;" \
  597. "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
  598. "echo"
  599. #define CONFIG_EXTRA_ENV_SETTINGS \
  600. "netdev=eth0\0" \
  601. "hostname=mpc8349emds\0" \
  602. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  603. "nfsroot=${serverip}:${rootpath}\0" \
  604. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  605. "addip=setenv bootargs ${bootargs} " \
  606. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  607. ":${hostname}:${netdev}:off panic=1\0" \
  608. "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
  609. "flash_nfs=run nfsargs addip addtty;" \
  610. "bootm ${kernel_addr}\0" \
  611. "flash_self=run ramargs addip addtty;" \
  612. "bootm ${kernel_addr} ${ramdisk_addr}\0" \
  613. "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \
  614. "bootm\0" \
  615. "load=tftp 100000 /tftpboot/mpc8349emds/u-boot.bin\0" \
  616. "update=protect off fe000000 fe03ffff; " \
  617. "era fe000000 fe03ffff; cp.b 100000 fe000000 ${filesize}\0" \
  618. "upd=run load update\0" \
  619. "fdtaddr=780000\0" \
  620. "fdtfile=mpc834x_mds.dtb\0" \
  621. ""
  622. #define CONFIG_NFSBOOTCOMMAND \
  623. "setenv bootargs root=/dev/nfs rw " \
  624. "nfsroot=$serverip:$rootpath " \
  625. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  626. "console=$consoledev,$baudrate $othbootargs;" \
  627. "tftp $loadaddr $bootfile;" \
  628. "tftp $fdtaddr $fdtfile;" \
  629. "bootm $loadaddr - $fdtaddr"
  630. #define CONFIG_RAMBOOTCOMMAND \
  631. "setenv bootargs root=/dev/ram rw " \
  632. "console=$consoledev,$baudrate $othbootargs;" \
  633. "tftp $ramdiskaddr $ramdiskfile;" \
  634. "tftp $loadaddr $bootfile;" \
  635. "tftp $fdtaddr $fdtfile;" \
  636. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  637. #define CONFIG_BOOTCOMMAND "run flash_self"
  638. #endif /* __CONFIG_H */