MPC8349ITX.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. /*
  2. * Copyright (C) Freescale Semiconductor, Inc. 2006.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. /*
  7. MPC8349E-mITX and MPC8349E-mITX-GP board configuration file
  8. Memory map:
  9. 0x0000_0000-0x0FFF_FFFF DDR SDRAM (256 MB)
  10. 0x8000_0000-0x9FFF_FFFF PCI1 memory space (512 MB)
  11. 0xA000_0000-0xBFFF_FFFF PCI2 memory space (512 MB)
  12. 0xE000_0000-0xEFFF_FFFF IMMR (1 MB)
  13. 0xE200_0000-0xE2FF_FFFF PCI1 I/O space (16 MB)
  14. 0xE300_0000-0xE3FF_FFFF PCI2 I/O space (16 MB)
  15. 0xF000_0000-0xF000_FFFF Compact Flash (MPC8349E-mITX only)
  16. 0xF001_0000-0xF001_FFFF Local bus expansion slot
  17. 0xF800_0000-0xF801_FFFF Vitesse 7385 Parallel Interface (MPC8349E-mITX only)
  18. 0xFE00_0000-0xFE7F_FFFF First 8MB bank of Flash memory
  19. 0xFE80_0000-0xFEFF_FFFF Second 8MB bank of Flash memory (MPC8349E-mITX only)
  20. I2C address list:
  21. Align. Board
  22. Bus Addr Part No. Description Length Location
  23. ----------------------------------------------------------------
  24. I2C0 0x50 M24256-BWMN6P Board EEPROM 2 U64
  25. I2C1 0x20 PCF8574 I2C Expander 0 U8
  26. I2C1 0x21 PCF8574 I2C Expander 0 U10
  27. I2C1 0x38 PCF8574A I2C Expander 0 U8
  28. I2C1 0x39 PCF8574A I2C Expander 0 U10
  29. I2C1 0x51 (DDR) DDR EEPROM 1 U1
  30. I2C1 0x68 DS1339 RTC 1 U68
  31. Note that a given board has *either* a pair of 8574s or a pair of 8574As.
  32. */
  33. #ifndef __CONFIG_H
  34. #define __CONFIG_H
  35. #if (CONFIG_SYS_TEXT_BASE == 0xFE000000)
  36. #define CONFIG_SYS_LOWBOOT
  37. #endif
  38. /*
  39. * High Level Configuration Options
  40. */
  41. #define CONFIG_MPC834x /* MPC834x family (8343, 8347, 8349) */
  42. #define CONFIG_MPC8349 /* MPC8349 specific */
  43. #ifndef CONFIG_SYS_TEXT_BASE
  44. #define CONFIG_SYS_TEXT_BASE 0xFEF00000
  45. #endif
  46. #define CONFIG_SYS_IMMR 0xE0000000 /* The IMMR is relocated to here */
  47. #define CONFIG_MISC_INIT_F
  48. #define CONFIG_MISC_INIT_R
  49. /*
  50. * On-board devices
  51. */
  52. #ifdef CONFIG_MPC8349ITX
  53. /* The CF card interface on the back of the board */
  54. #define CONFIG_COMPACT_FLASH
  55. #define CONFIG_VSC7385_ENET /* VSC7385 ethernet support */
  56. #define CONFIG_SATA_SIL3114 /* SIL3114 SATA controller */
  57. #define CONFIG_SYS_USB_HOST /* use the EHCI USB controller */
  58. #endif
  59. #define CONFIG_RTC_DS1337
  60. #define CONFIG_SYS_I2C
  61. #define CONFIG_TSEC_ENET /* TSEC Ethernet support */
  62. /*
  63. * Device configurations
  64. */
  65. /* I2C */
  66. #ifdef CONFIG_SYS_I2C
  67. #define CONFIG_SYS_I2C_FSL
  68. #define CONFIG_SYS_FSL_I2C_SPEED 400000
  69. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  70. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  71. #define CONFIG_SYS_FSL_I2C2_SPEED 400000
  72. #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
  73. #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
  74. #define CONFIG_SYS_SPD_BUS_NUM 1 /* The I2C bus for SPD */
  75. #define CONFIG_SYS_RTC_BUS_NUM 1 /* The I2C bus for RTC */
  76. #define CONFIG_SYS_I2C_8574_ADDR1 0x20 /* I2C1, PCF8574 */
  77. #define CONFIG_SYS_I2C_8574_ADDR2 0x21 /* I2C1, PCF8574 */
  78. #define CONFIG_SYS_I2C_8574A_ADDR1 0x38 /* I2C1, PCF8574A */
  79. #define CONFIG_SYS_I2C_8574A_ADDR2 0x39 /* I2C1, PCF8574A */
  80. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* I2C0, Board EEPROM */
  81. #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* I2C1, DS1339 RTC*/
  82. #define SPD_EEPROM_ADDRESS 0x51 /* I2C1, DDR */
  83. /* Don't probe these addresses: */
  84. #define CONFIG_SYS_I2C_NOPROBES { {1, CONFIG_SYS_I2C_8574_ADDR1}, \
  85. {1, CONFIG_SYS_I2C_8574_ADDR2}, \
  86. {1, CONFIG_SYS_I2C_8574A_ADDR1}, \
  87. {1, CONFIG_SYS_I2C_8574A_ADDR2} }
  88. /* Bit definitions for the 8574[A] I2C expander */
  89. /* Board revision, 00=0.0, 01=0.1, 10=1.0 */
  90. #define I2C_8574_REVISION 0x03
  91. #define I2C_8574_CF 0x08 /* 1=Compact flash absent, 0=present */
  92. #define I2C_8574_MPCICLKRN 0x10 /* MiniPCI Clk Run */
  93. #define I2C_8574_PCI66 0x20 /* 0=33MHz PCI, 1=66MHz PCI */
  94. #define I2C_8574_FLASHSIDE 0x40 /* 0=Reset vector from U4, 1=from U7*/
  95. #endif
  96. /* Compact Flash */
  97. #ifdef CONFIG_COMPACT_FLASH
  98. #define CONFIG_SYS_IDE_MAXBUS 1
  99. #define CONFIG_SYS_IDE_MAXDEVICE 1
  100. #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
  101. #define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_CF_BASE
  102. #define CONFIG_SYS_ATA_DATA_OFFSET 0x0000
  103. #define CONFIG_SYS_ATA_REG_OFFSET 0
  104. #define CONFIG_SYS_ATA_ALT_OFFSET 0x0200
  105. #define CONFIG_SYS_ATA_STRIDE 2
  106. /* If a CF card is not inserted, time out quickly */
  107. #define ATA_RESET_TIME 1
  108. #endif
  109. /*
  110. * SATA
  111. */
  112. #ifdef CONFIG_SATA_SIL3114
  113. #define CONFIG_SYS_SATA_MAX_DEVICE 4
  114. #define CONFIG_LIBATA
  115. #define CONFIG_LBA48
  116. #endif
  117. #ifdef CONFIG_SYS_USB_HOST
  118. /*
  119. * Support USB
  120. */
  121. #define CONFIG_USB_EHCI
  122. #define CONFIG_USB_EHCI_FSL
  123. /* Current USB implementation supports the only USB controller,
  124. * so we have to choose between the MPH or the DR ones */
  125. #if 1
  126. #define CONFIG_HAS_FSL_MPH_USB
  127. #else
  128. #define CONFIG_HAS_FSL_DR_USB
  129. #endif
  130. #endif
  131. /*
  132. * DDR Setup
  133. */
  134. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/
  135. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  136. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  137. #define CONFIG_SYS_83XX_DDR_USES_CS0
  138. #define CONFIG_SYS_MEMTEST_START 0x1000 /* memtest region */
  139. #define CONFIG_SYS_MEMTEST_END 0x2000
  140. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN \
  141. | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075)
  142. #define CONFIG_VERY_BIG_RAM
  143. #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)256 << 20)
  144. #ifdef CONFIG_SYS_I2C
  145. #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/
  146. #endif
  147. /* No SPD? Then manually set up DDR parameters */
  148. #ifndef CONFIG_SPD_EEPROM
  149. #define CONFIG_SYS_DDR_SIZE 256 /* Mb */
  150. #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN \
  151. | CSCONFIG_ROW_BIT_13 \
  152. | CSCONFIG_COL_BIT_10)
  153. #define CONFIG_SYS_DDR_TIMING_1 0x26242321
  154. #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45, may need tuning */
  155. #endif
  156. /*
  157. *Flash on the Local Bus
  158. */
  159. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  160. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  161. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */
  162. #define CONFIG_SYS_FLASH_EMPTY_INFO
  163. /* 127 64KB sectors + 8 8KB sectors per device */
  164. #define CONFIG_SYS_MAX_FLASH_SECT 135
  165. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  166. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  167. #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  168. /* The ITX has two flash chips, but the ITX-GP has only one. To support both
  169. boards, we say we have two, but don't display a message if we find only one. */
  170. #define CONFIG_SYS_FLASH_QUIET_TEST
  171. #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */
  172. #define CONFIG_SYS_FLASH_BANKS_LIST \
  173. {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE + 0x800000}
  174. #define CONFIG_SYS_FLASH_SIZE 16 /* FLASH size in MB */
  175. #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */
  176. /* Vitesse 7385 */
  177. #ifdef CONFIG_VSC7385_ENET
  178. #define CONFIG_TSEC2
  179. /* The flash address and size of the VSC7385 firmware image */
  180. #define CONFIG_VSC7385_IMAGE 0xFEFFE000
  181. #define CONFIG_VSC7385_IMAGE_SIZE 8192
  182. #endif
  183. /*
  184. * BRx, ORx, LBLAWBARx, and LBLAWARx
  185. */
  186. /* Flash */
  187. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
  188. | BR_PS_16 \
  189. | BR_MS_GPCM \
  190. | BR_V)
  191. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
  192. | OR_UPM_XAM \
  193. | OR_GPCM_CSNT \
  194. | OR_GPCM_ACS_DIV2 \
  195. | OR_GPCM_XACS \
  196. | OR_GPCM_SCY_15 \
  197. | OR_GPCM_TRLX_SET \
  198. | OR_GPCM_EHTR_SET \
  199. | OR_GPCM_EAD)
  200. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  201. #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_16MB)
  202. /* Vitesse 7385 */
  203. #define CONFIG_SYS_VSC7385_BASE 0xF8000000
  204. #ifdef CONFIG_VSC7385_ENET
  205. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_VSC7385_BASE \
  206. | BR_PS_8 \
  207. | BR_MS_GPCM \
  208. | BR_V)
  209. #define CONFIG_SYS_OR1_PRELIM (OR_AM_128KB \
  210. | OR_GPCM_CSNT \
  211. | OR_GPCM_XACS \
  212. | OR_GPCM_SCY_15 \
  213. | OR_GPCM_SETA \
  214. | OR_GPCM_TRLX_SET \
  215. | OR_GPCM_EHTR_SET \
  216. | OR_GPCM_EAD)
  217. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_VSC7385_BASE
  218. #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_128KB)
  219. #endif
  220. /* LED */
  221. #define CONFIG_SYS_LED_BASE 0xF9000000
  222. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_LED_BASE \
  223. | BR_PS_8 \
  224. | BR_MS_GPCM \
  225. | BR_V)
  226. #define CONFIG_SYS_OR2_PRELIM (OR_AM_2MB \
  227. | OR_GPCM_CSNT \
  228. | OR_GPCM_ACS_DIV2 \
  229. | OR_GPCM_XACS \
  230. | OR_GPCM_SCY_9 \
  231. | OR_GPCM_TRLX_SET \
  232. | OR_GPCM_EHTR_SET \
  233. | OR_GPCM_EAD)
  234. /* Compact Flash */
  235. #ifdef CONFIG_COMPACT_FLASH
  236. #define CONFIG_SYS_CF_BASE 0xF0000000
  237. #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_CF_BASE \
  238. | BR_PS_16 \
  239. | BR_MS_UPMA \
  240. | BR_V)
  241. #define CONFIG_SYS_OR3_PRELIM (OR_UPM_AM | OR_UPM_BI)
  242. #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_CF_BASE
  243. #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_64KB)
  244. #endif
  245. /*
  246. * U-Boot memory configuration
  247. */
  248. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  249. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  250. #define CONFIG_SYS_RAMBOOT
  251. #else
  252. #undef CONFIG_SYS_RAMBOOT
  253. #endif
  254. #define CONFIG_SYS_INIT_RAM_LOCK
  255. #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM addr */
  256. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM*/
  257. #define CONFIG_SYS_GBL_DATA_OFFSET \
  258. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  259. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  260. /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
  261. #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon */
  262. #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserved for malloc */
  263. /*
  264. * Local Bus LCRR and LBCR regs
  265. * LCRR: DLL bypass, Clock divider is 4
  266. * External Local Bus rate is
  267. * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
  268. */
  269. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  270. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
  271. #define CONFIG_SYS_LBC_LBCR 0x00000000
  272. /* LB sdram refresh timer, about 6us */
  273. #define CONFIG_SYS_LBC_LSRT 0x32000000
  274. /* LB refresh timer prescal, 266MHz/32*/
  275. #define CONFIG_SYS_LBC_MRTPR 0x20000000
  276. /*
  277. * Serial Port
  278. */
  279. #define CONFIG_CONS_INDEX 1
  280. #define CONFIG_SYS_NS16550_SERIAL
  281. #define CONFIG_SYS_NS16550_REG_SIZE 1
  282. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  283. #define CONFIG_SYS_BAUDRATE_TABLE \
  284. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  285. #define CONSOLE ttyS0
  286. #define CONFIG_BAUDRATE 115200
  287. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
  288. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
  289. /*
  290. * PCI
  291. */
  292. #ifdef CONFIG_PCI
  293. #define CONFIG_PCI_INDIRECT_BRIDGE
  294. #define CONFIG_MPC83XX_PCI2
  295. /*
  296. * General PCI
  297. * Addresses are mapped 1-1.
  298. */
  299. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  300. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  301. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  302. #define CONFIG_SYS_PCI1_MMIO_BASE \
  303. (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE)
  304. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  305. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  306. #define CONFIG_SYS_PCI1_IO_BASE 0x00000000
  307. #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
  308. #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 /* 16M */
  309. #ifdef CONFIG_MPC83XX_PCI2
  310. #define CONFIG_SYS_PCI2_MEM_BASE \
  311. (CONFIG_SYS_PCI1_MMIO_BASE + CONFIG_SYS_PCI1_MMIO_SIZE)
  312. #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE
  313. #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */
  314. #define CONFIG_SYS_PCI2_MMIO_BASE \
  315. (CONFIG_SYS_PCI2_MEM_BASE + CONFIG_SYS_PCI2_MEM_SIZE)
  316. #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE
  317. #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */
  318. #define CONFIG_SYS_PCI2_IO_BASE 0x00000000
  319. #define CONFIG_SYS_PCI2_IO_PHYS \
  320. (CONFIG_SYS_PCI1_IO_PHYS + CONFIG_SYS_PCI1_IO_SIZE)
  321. #define CONFIG_SYS_PCI2_IO_SIZE 0x01000000 /* 16M */
  322. #endif
  323. #ifndef CONFIG_PCI_PNP
  324. #define PCI_ENET0_IOADDR 0x00000000
  325. #define PCI_ENET0_MEMADDR CONFIG_SYS_PCI2_MEM_BASE
  326. #define PCI_IDSEL_NUMBER 0x0f /* IDSEL = AD15 */
  327. #endif
  328. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  329. #endif
  330. #define CONFIG_PCI_66M
  331. #ifdef CONFIG_PCI_66M
  332. #define CONFIG_83XX_CLKIN 66666666 /* in Hz */
  333. #else
  334. #define CONFIG_83XX_CLKIN 33333333 /* in Hz */
  335. #endif
  336. /* TSEC */
  337. #ifdef CONFIG_TSEC_ENET
  338. #define CONFIG_MII
  339. #define CONFIG_PHY_GIGE /* In case CONFIG_CMD_MII is specified */
  340. #define CONFIG_TSEC1
  341. #ifdef CONFIG_TSEC1
  342. #define CONFIG_HAS_ETH0
  343. #define CONFIG_TSEC1_NAME "TSEC0"
  344. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  345. #define TSEC1_PHY_ADDR 0x1c /* VSC8201 uses address 0x1c */
  346. #define TSEC1_PHYIDX 0
  347. #define TSEC1_FLAGS TSEC_GIGABIT
  348. #endif
  349. #ifdef CONFIG_TSEC2
  350. #define CONFIG_HAS_ETH1
  351. #define CONFIG_TSEC2_NAME "TSEC1"
  352. #define CONFIG_SYS_TSEC2_OFFSET 0x25000
  353. #define TSEC2_PHY_ADDR 4
  354. #define TSEC2_PHYIDX 0
  355. #define TSEC2_FLAGS TSEC_GIGABIT
  356. #endif
  357. #define CONFIG_ETHPRIME "Freescale TSEC"
  358. #endif
  359. /*
  360. * Environment
  361. */
  362. #define CONFIG_ENV_OVERWRITE
  363. #ifndef CONFIG_SYS_RAMBOOT
  364. #define CONFIG_ENV_IS_IN_FLASH
  365. #define CONFIG_ENV_ADDR \
  366. (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
  367. #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K (one sector) for environment */
  368. #define CONFIG_ENV_SIZE 0x2000
  369. #else
  370. #define CONFIG_SYS_NO_FLASH /* Flash is not usable now */
  371. #undef CONFIG_FLASH_CFI_DRIVER
  372. #define CONFIG_ENV_IS_NOWHERE /* Store ENV in memory only */
  373. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  374. #define CONFIG_ENV_SIZE 0x2000
  375. #endif
  376. #define CONFIG_LOADS_ECHO /* echo on for serial download */
  377. #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
  378. /*
  379. * BOOTP options
  380. */
  381. #define CONFIG_BOOTP_BOOTFILESIZE
  382. #define CONFIG_BOOTP_BOOTPATH
  383. #define CONFIG_BOOTP_GATEWAY
  384. #define CONFIG_BOOTP_HOSTNAME
  385. /*
  386. * Command line configuration.
  387. */
  388. #define CONFIG_CMD_DATE
  389. #define CONFIG_CMD_IRQ
  390. #define CONFIG_CMD_SDRAM
  391. #if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) \
  392. || defined(CONFIG_USB_STORAGE)
  393. #define CONFIG_DOS_PARTITION
  394. #define CONFIG_SUPPORT_VFAT
  395. #endif
  396. #ifdef CONFIG_COMPACT_FLASH
  397. #define CONFIG_CMD_IDE
  398. #endif
  399. #ifdef CONFIG_SATA_SIL3114
  400. #define CONFIG_CMD_SATA
  401. #endif
  402. #if defined(CONFIG_SATA_SIL3114) || defined(CONFIG_USB_STORAGE)
  403. #endif
  404. #ifdef CONFIG_PCI
  405. #define CONFIG_CMD_PCI
  406. #endif
  407. /* Watchdog */
  408. #undef CONFIG_WATCHDOG /* watchdog disabled */
  409. /*
  410. * Miscellaneous configurable options
  411. */
  412. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  413. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  414. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  415. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  416. #define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */
  417. #if defined(CONFIG_CMD_KGDB)
  418. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  419. #else
  420. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  421. #endif
  422. /* Print Buffer Size */
  423. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  424. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  425. /* Boot Argument Buffer Size */
  426. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  427. /*
  428. * For booting Linux, the board info and command line data
  429. * have to be in the first 256 MB of memory, since this is
  430. * the maximum mapped by the Linux kernel during initialization.
  431. */
  432. /* Initial Memory map for Linux*/
  433. #define CONFIG_SYS_BOOTMAPSZ (256 << 20)
  434. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
  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_4X1 |\
  439. HRCWL_VCO_1X2 |\
  440. HRCWL_CORE_TO_CSB_2X1)
  441. #ifdef CONFIG_SYS_LOWBOOT
  442. #define CONFIG_SYS_HRCW_HIGH (\
  443. HRCWH_PCI_HOST |\
  444. HRCWH_32_BIT_PCI |\
  445. HRCWH_PCI1_ARBITER_ENABLE |\
  446. HRCWH_PCI2_ARBITER_ENABLE |\
  447. HRCWH_CORE_ENABLE |\
  448. HRCWH_FROM_0X00000100 |\
  449. HRCWH_BOOTSEQ_DISABLE |\
  450. HRCWH_SW_WATCHDOG_DISABLE |\
  451. HRCWH_ROM_LOC_LOCAL_16BIT |\
  452. HRCWH_TSEC1M_IN_GMII |\
  453. HRCWH_TSEC2M_IN_GMII)
  454. #else
  455. #define CONFIG_SYS_HRCW_HIGH (\
  456. HRCWH_PCI_HOST |\
  457. HRCWH_32_BIT_PCI |\
  458. HRCWH_PCI1_ARBITER_ENABLE |\
  459. HRCWH_PCI2_ARBITER_ENABLE |\
  460. HRCWH_CORE_ENABLE |\
  461. HRCWH_FROM_0XFFF00100 |\
  462. HRCWH_BOOTSEQ_DISABLE |\
  463. HRCWH_SW_WATCHDOG_DISABLE |\
  464. HRCWH_ROM_LOC_LOCAL_16BIT |\
  465. HRCWH_TSEC1M_IN_GMII |\
  466. HRCWH_TSEC2M_IN_GMII)
  467. #endif
  468. /*
  469. * System performance
  470. */
  471. #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */
  472. #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */
  473. #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */
  474. #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */
  475. #define CONFIG_SYS_SCCR_TSEC1CM 1 /* TSEC1 clock mode (0-3) */
  476. #define CONFIG_SYS_SCCR_TSEC2CM 1 /* TSEC2 & I2C0 clock mode (0-3) */
  477. #define CONFIG_SYS_SCCR_USBMPHCM 3 /* USB MPH controller's clock */
  478. #define CONFIG_SYS_SCCR_USBDRCM 0 /* USB DR controller's clock */
  479. /*
  480. * System IO Config
  481. */
  482. /* Needed for gigabit to work on TSEC 1 */
  483. #define CONFIG_SYS_SICRH SICRH_TSOBI1
  484. /* USB DR as device + USB MPH as host */
  485. #define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1)
  486. #define CONFIG_SYS_HID0_INIT 0x00000000
  487. #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_INSTRUCTION_CACHE
  488. #define CONFIG_SYS_HID2 HID2_HBE
  489. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  490. /* DDR */
  491. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
  492. | BATL_PP_RW \
  493. | BATL_MEMCOHERENCE)
  494. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
  495. | BATU_BL_256M \
  496. | BATU_VS \
  497. | BATU_VP)
  498. /* PCI */
  499. #ifdef CONFIG_PCI
  500. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE \
  501. | BATL_PP_RW \
  502. | BATL_MEMCOHERENCE)
  503. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE \
  504. | BATU_BL_256M \
  505. | BATU_VS \
  506. | BATU_VP)
  507. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE \
  508. | BATL_PP_RW \
  509. | BATL_CACHEINHIBIT \
  510. | BATL_GUARDEDSTORAGE)
  511. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE \
  512. | BATU_BL_256M \
  513. | BATU_VS \
  514. | BATU_VP)
  515. #else
  516. #define CONFIG_SYS_IBAT1L 0
  517. #define CONFIG_SYS_IBAT1U 0
  518. #define CONFIG_SYS_IBAT2L 0
  519. #define CONFIG_SYS_IBAT2U 0
  520. #endif
  521. #ifdef CONFIG_MPC83XX_PCI2
  522. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE \
  523. | BATL_PP_RW \
  524. | BATL_MEMCOHERENCE)
  525. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE \
  526. | BATU_BL_256M \
  527. | BATU_VS \
  528. | BATU_VP)
  529. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE \
  530. | BATL_PP_RW \
  531. | BATL_CACHEINHIBIT \
  532. | BATL_GUARDEDSTORAGE)
  533. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE \
  534. | BATU_BL_256M \
  535. | BATU_VS \
  536. | BATU_VP)
  537. #else
  538. #define CONFIG_SYS_IBAT3L 0
  539. #define CONFIG_SYS_IBAT3U 0
  540. #define CONFIG_SYS_IBAT4L 0
  541. #define CONFIG_SYS_IBAT4U 0
  542. #endif
  543. /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */
  544. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR \
  545. | BATL_PP_RW \
  546. | BATL_CACHEINHIBIT \
  547. | BATL_GUARDEDSTORAGE)
  548. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR \
  549. | BATU_BL_256M \
  550. | BATU_VS \
  551. | BATU_VP)
  552. /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
  553. #define CONFIG_SYS_IBAT6L (0xF0000000 \
  554. | BATL_PP_RW \
  555. | BATL_MEMCOHERENCE \
  556. | BATL_GUARDEDSTORAGE)
  557. #define CONFIG_SYS_IBAT6U (0xF0000000 \
  558. | BATU_BL_256M \
  559. | BATU_VS \
  560. | BATU_VP)
  561. #define CONFIG_SYS_IBAT7L 0
  562. #define CONFIG_SYS_IBAT7U 0
  563. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  564. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  565. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  566. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  567. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  568. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  569. #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
  570. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  571. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  572. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  573. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  574. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  575. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  576. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  577. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  578. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  579. #if defined(CONFIG_CMD_KGDB)
  580. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  581. #endif
  582. /*
  583. * Environment Configuration
  584. */
  585. #define CONFIG_ENV_OVERWRITE
  586. #define CONFIG_NETDEV "eth0"
  587. #ifdef CONFIG_MPC8349ITX
  588. #define CONFIG_HOSTNAME "mpc8349emitx"
  589. #else
  590. #define CONFIG_HOSTNAME "mpc8349emitxgp"
  591. #endif
  592. /* Default path and filenames */
  593. #define CONFIG_ROOTPATH "/nfsroot/rootfs"
  594. #define CONFIG_BOOTFILE "uImage"
  595. /* U-Boot image on TFTP server */
  596. #define CONFIG_UBOOTPATH "u-boot.bin"
  597. #ifdef CONFIG_MPC8349ITX
  598. #define CONFIG_FDTFILE "mpc8349emitx.dtb"
  599. #else
  600. #define CONFIG_FDTFILE "mpc8349emitxgp.dtb"
  601. #endif
  602. #define CONFIG_BOOTARGS \
  603. "root=/dev/nfs rw" \
  604. " nfsroot=" __stringify(CONFIG_SERVERIP) ":" CONFIG_ROOTPATH \
  605. " ip=" __stringify(CONFIG_IPADDR) ":" \
  606. __stringify(CONFIG_SERVERIP) ":" \
  607. __stringify(CONFIG_GATEWAYIP) ":" \
  608. __stringify(CONFIG_NETMASK) ":" \
  609. CONFIG_HOSTNAME ":" CONFIG_NETDEV ":off" \
  610. " console=" __stringify(CONSOLE) "," __stringify(CONFIG_BAUDRATE)
  611. #define CONFIG_EXTRA_ENV_SETTINGS \
  612. "console=" __stringify(CONSOLE) "\0" \
  613. "netdev=" CONFIG_NETDEV "\0" \
  614. "uboot=" CONFIG_UBOOTPATH "\0" \
  615. "tftpflash=tftpboot $loadaddr $uboot; " \
  616. "protect off " __stringify(CONFIG_SYS_TEXT_BASE) \
  617. " +$filesize; " \
  618. "erase " __stringify(CONFIG_SYS_TEXT_BASE) \
  619. " +$filesize; " \
  620. "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) \
  621. " $filesize; " \
  622. "protect on " __stringify(CONFIG_SYS_TEXT_BASE) \
  623. " +$filesize; " \
  624. "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) \
  625. " $filesize\0" \
  626. "fdtaddr=780000\0" \
  627. "fdtfile=" CONFIG_FDTFILE "\0"
  628. #define CONFIG_NFSBOOTCOMMAND \
  629. "setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath" \
  630. " ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off "\
  631. " console=$console,$baudrate $othbootargs; " \
  632. "tftp $loadaddr $bootfile;" \
  633. "tftp $fdtaddr $fdtfile;" \
  634. "bootm $loadaddr - $fdtaddr"
  635. #define CONFIG_RAMBOOTCOMMAND \
  636. "setenv bootargs root=/dev/ram rw" \
  637. " console=$console,$baudrate $othbootargs; " \
  638. "tftp $ramdiskaddr $ramdiskfile;" \
  639. "tftp $loadaddr $bootfile;" \
  640. "tftp $fdtaddr $fdtfile;" \
  641. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  642. #endif