MPC837XERDB.h 20 KB

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