sbc8349.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. /*
  2. * WindRiver SBC8349 U-Boot configuration file.
  3. * Copyright (c) 2006, 2007 Wind River Systems, Inc.
  4. *
  5. * Paul Gortmaker <paul.gortmaker@windriver.com>
  6. * Based on the MPC8349EMDS config.
  7. *
  8. * SPDX-License-Identifier: GPL-2.0+
  9. */
  10. /*
  11. * sbc8349 board configuration file.
  12. */
  13. #ifndef __CONFIG_H
  14. #define __CONFIG_H
  15. /*
  16. * High Level Configuration Options
  17. */
  18. #define CONFIG_E300 1 /* E300 Family */
  19. #define CONFIG_MPC834x 1 /* MPC834x family */
  20. #define CONFIG_MPC8349 1 /* MPC8349 specific */
  21. #define CONFIG_SBC8349 1 /* WRS SBC8349 board specific */
  22. #define CONFIG_SYS_TEXT_BASE 0xFF800000
  23. /* Don't enable PCI2 on sbc834x - it doesn't exist physically. */
  24. #undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */
  25. /*
  26. * The default if PCI isn't enabled, or if no PCI clk setting is given
  27. * is 66MHz; this is what the board defaults to when the PCI slot is
  28. * physically empty. The board will automatically (i.e w/o jumpers)
  29. * clock down to 33MHz if you insert a 33MHz PCI card.
  30. */
  31. #ifdef CONFIG_PCI_33M
  32. #define CONFIG_83XX_CLKIN 33000000 /* in Hz */
  33. #else /* 66M */
  34. #define CONFIG_83XX_CLKIN 66000000 /* in Hz */
  35. #endif
  36. #ifndef CONFIG_SYS_CLK_FREQ
  37. #ifdef CONFIG_PCI_33M
  38. #define CONFIG_SYS_CLK_FREQ 33000000
  39. #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1
  40. #else /* 66M */
  41. #define CONFIG_SYS_CLK_FREQ 66000000
  42. #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1
  43. #endif
  44. #endif
  45. #undef CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  46. #define CONFIG_SYS_IMMR 0xE0000000
  47. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  48. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  49. #define CONFIG_SYS_MEMTEST_END 0x00100000
  50. /*
  51. * DDR Setup
  52. */
  53. #undef CONFIG_DDR_ECC /* only for ECC DDR module */
  54. #undef CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */
  55. #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/
  56. #define CONFIG_SYS_83XX_DDR_USES_CS0 /* WRS; Fsl board uses CS2/CS3 */
  57. /*
  58. * 32-bit data path mode.
  59. *
  60. * Please note that using this mode for devices with the real density of 64-bit
  61. * effectively reduces the amount of available memory due to the effect of
  62. * wrapping around while translating address to row/columns, for example in the
  63. * 256MB module the upper 128MB get aliased with contents of the lower
  64. * 128MB); normally this define should be used for devices with real 32-bit
  65. * data path.
  66. */
  67. #undef CONFIG_DDR_32BIT
  68. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/
  69. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  70. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  71. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
  72. DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075)
  73. #define CONFIG_DDR_2T_TIMING
  74. #if defined(CONFIG_SPD_EEPROM)
  75. /*
  76. * Determine DDR configuration from I2C interface.
  77. */
  78. #define SPD_EEPROM_ADDRESS 0x52 /* DDR DIMM */
  79. #else
  80. /*
  81. * Manually set up DDR parameters
  82. * NB: manual DDR setup untested on sbc834x
  83. */
  84. #define CONFIG_SYS_DDR_SIZE 256 /* MB */
  85. #define CONFIG_SYS_DDR_CS2_CONFIG (CSCONFIG_EN \
  86. | CSCONFIG_ROW_BIT_13 \
  87. | CSCONFIG_COL_BIT_10)
  88. #define CONFIG_SYS_DDR_TIMING_1 0x36332321
  89. #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */
  90. #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */
  91. #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */
  92. #if defined(CONFIG_DDR_32BIT)
  93. /* set burst length to 8 for 32-bit data path */
  94. /* DLL,normal,seq,4/2.5, 8 burst len */
  95. #define CONFIG_SYS_DDR_MODE 0x00000023
  96. #else
  97. /* the default burst length is 4 - for 64-bit data path */
  98. /* DLL,normal,seq,4/2.5, 4 burst len */
  99. #define CONFIG_SYS_DDR_MODE 0x00000022
  100. #endif
  101. #endif
  102. /*
  103. * SDRAM on the Local Bus
  104. */
  105. #define CONFIG_SYS_LBC_SDRAM_BASE 0xF0000000 /* Localbus SDRAM */
  106. #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */
  107. /*
  108. * FLASH on the Local Bus
  109. */
  110. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  111. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  112. #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */
  113. #define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */
  114. /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
  115. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
  116. | BR_PS_16 /* 16 bit port */ \
  117. | BR_MS_GPCM /* MSEL = GPCM */ \
  118. | BR_V) /* valid */
  119. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
  120. | OR_GPCM_XAM \
  121. | OR_GPCM_CSNT \
  122. | OR_GPCM_ACS_DIV2 \
  123. | OR_GPCM_XACS \
  124. | OR_GPCM_SCY_15 \
  125. | OR_GPCM_TRLX_SET \
  126. | OR_GPCM_EHTR_SET \
  127. | OR_GPCM_EAD)
  128. /* 0xFF806FF7 */
  129. /* window base at flash base */
  130. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  131. #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_8MB)
  132. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  133. #define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */
  134. #undef CONFIG_SYS_FLASH_CHECKSUM
  135. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  136. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  137. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  138. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  139. #define CONFIG_SYS_RAMBOOT
  140. #else
  141. #undef CONFIG_SYS_RAMBOOT
  142. #endif
  143. #define CONFIG_SYS_INIT_RAM_LOCK 1
  144. /* Initial RAM address */
  145. #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000
  146. /* Size of used area in RAM*/
  147. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000
  148. #define CONFIG_SYS_GBL_DATA_OFFSET \
  149. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  150. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  151. #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
  152. #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserved for malloc */
  153. /*
  154. * Local Bus LCRR and LBCR regs
  155. * LCRR: DLL bypass, Clock divider is 4
  156. * External Local Bus rate is
  157. * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
  158. */
  159. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  160. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
  161. #define CONFIG_SYS_LBC_LBCR 0x00000000
  162. #undef CONFIG_SYS_LB_SDRAM /* if board has SDRAM on local bus */
  163. #ifdef CONFIG_SYS_LB_SDRAM
  164. /* Local bus BR2, OR2 definition for SDRAM if soldered on the board*/
  165. /*
  166. * Base Register 2 and Option Register 2 configure SDRAM.
  167. * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000.
  168. *
  169. * For BR2, need:
  170. * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0
  171. * port-size = 32-bits = BR2[19:20] = 11
  172. * no parity checking = BR2[21:22] = 00
  173. * SDRAM for MSEL = BR2[24:26] = 011
  174. * Valid = BR[31] = 1
  175. *
  176. * 0 4 8 12 16 20 24 28
  177. * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861
  178. */
  179. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_LBC_SDRAM_BASE \
  180. | BR_PS_32 \
  181. | BR_MS_SDRAM \
  182. | BR_V)
  183. /* 0xF0001861 */
  184. #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_LBC_SDRAM_BASE
  185. #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_64MB)
  186. /*
  187. * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64.
  188. *
  189. * For OR2, need:
  190. * 64MB mask for AM, OR2[0:7] = 1111 1100
  191. * XAM, OR2[17:18] = 11
  192. * 9 columns OR2[19-21] = 010
  193. * 13 rows OR2[23-25] = 100
  194. * EAD set for extra time OR[31] = 1
  195. *
  196. * 0 4 8 12 16 20 24 28
  197. * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901
  198. */
  199. #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_LBC_SDRAM_SIZE) \
  200. | OR_SDRAM_XAM \
  201. | ((9 - OR_SDRAM_MIN_COLS) << OR_SDRAM_COLS_SHIFT) \
  202. | ((13 - OR_SDRAM_MIN_ROWS) << OR_SDRAM_ROWS_SHIFT) \
  203. | OR_SDRAM_EAD)
  204. /* 0xFC006901 */
  205. /* LB sdram refresh timer, about 6us */
  206. #define CONFIG_SYS_LBC_LSRT 0x32000000
  207. /* LB refresh timer prescal, 266MHz/32 */
  208. #define CONFIG_SYS_LBC_MRTPR 0x20000000
  209. #define CONFIG_SYS_LBC_LSDMR_COMMON (LSDMR_RFEN \
  210. | LSDMR_BSMA1516 \
  211. | LSDMR_RFCR8 \
  212. | LSDMR_PRETOACT6 \
  213. | LSDMR_ACTTORW3 \
  214. | LSDMR_BL8 \
  215. | LSDMR_WRC3 \
  216. | LSDMR_CL3)
  217. /*
  218. * SDRAM Controller configuration sequence.
  219. */
  220. #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL)
  221. #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  222. #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  223. #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW)
  224. #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL)
  225. #endif
  226. /*
  227. * Serial Port
  228. */
  229. #define CONFIG_CONS_INDEX 1
  230. #define CONFIG_SYS_NS16550_SERIAL
  231. #define CONFIG_SYS_NS16550_REG_SIZE 1
  232. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  233. #define CONFIG_SYS_BAUDRATE_TABLE \
  234. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  235. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  236. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  237. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  238. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  239. /* I2C */
  240. #define CONFIG_SYS_I2C
  241. #define CONFIG_SYS_I2C_FSL
  242. #define CONFIG_SYS_FSL_I2C_SPEED 400000
  243. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  244. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  245. #define CONFIG_SYS_FSL_I2C2_SPEED 400000
  246. #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
  247. #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
  248. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x69}, {1, 0x69} }
  249. /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SYS_SPD_BUS_NUM... */
  250. /* TSEC */
  251. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  252. #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
  253. #define CONFIG_SYS_TSEC2_OFFSET 0x25000
  254. #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
  255. /*
  256. * General PCI
  257. * Addresses are mapped 1-1.
  258. */
  259. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  260. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  261. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  262. #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
  263. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  264. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  265. #define CONFIG_SYS_PCI1_IO_BASE 0x00000000
  266. #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
  267. #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */
  268. #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000
  269. #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE
  270. #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */
  271. #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000
  272. #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE
  273. #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */
  274. #define CONFIG_SYS_PCI2_IO_BASE 0x00000000
  275. #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000
  276. #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */
  277. #if defined(CONFIG_PCI)
  278. #define PCI_64BIT
  279. #define PCI_ONE_PCI1
  280. #if defined(PCI_64BIT)
  281. #undef PCI_ALL_PCI1
  282. #undef PCI_TWO_PCI1
  283. #undef PCI_ONE_PCI1
  284. #endif
  285. #undef CONFIG_EEPRO100
  286. #undef CONFIG_TULIP
  287. #if !defined(CONFIG_PCI_PNP)
  288. #define PCI_ENET0_IOADDR 0xFIXME
  289. #define PCI_ENET0_MEMADDR 0xFIXME
  290. #define PCI_IDSEL_NUMBER 0xFIXME
  291. #endif
  292. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  293. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */
  294. #endif /* CONFIG_PCI */
  295. /*
  296. * TSEC configuration
  297. */
  298. #define CONFIG_TSEC_ENET /* TSEC ethernet support */
  299. #if defined(CONFIG_TSEC_ENET)
  300. #define CONFIG_TSEC1 1
  301. #define CONFIG_TSEC1_NAME "TSEC0"
  302. #define CONFIG_TSEC2 1
  303. #define CONFIG_TSEC2_NAME "TSEC1"
  304. #define CONFIG_PHY_BCM5421S 1
  305. #define TSEC1_PHY_ADDR 0x19
  306. #define TSEC2_PHY_ADDR 0x1a
  307. #define TSEC1_PHYIDX 0
  308. #define TSEC2_PHYIDX 0
  309. #define TSEC1_FLAGS TSEC_GIGABIT
  310. #define TSEC2_FLAGS TSEC_GIGABIT
  311. /* Options are: TSEC[0-1] */
  312. #define CONFIG_ETHPRIME "TSEC0"
  313. #endif /* CONFIG_TSEC_ENET */
  314. /*
  315. * Environment
  316. */
  317. #ifndef CONFIG_SYS_RAMBOOT
  318. #define CONFIG_ENV_IS_IN_FLASH 1
  319. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000)
  320. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
  321. #define CONFIG_ENV_SIZE 0x2000
  322. /* Address and size of Redundant Environment Sector */
  323. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
  324. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  325. #else
  326. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  327. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  328. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  329. #define CONFIG_ENV_SIZE 0x2000
  330. #endif
  331. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  332. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  333. /*
  334. * BOOTP options
  335. */
  336. #define CONFIG_BOOTP_BOOTFILESIZE
  337. #define CONFIG_BOOTP_BOOTPATH
  338. #define CONFIG_BOOTP_GATEWAY
  339. #define CONFIG_BOOTP_HOSTNAME
  340. /*
  341. * Command line configuration.
  342. */
  343. #if defined(CONFIG_PCI)
  344. #define CONFIG_CMD_PCI
  345. #endif
  346. #undef CONFIG_WATCHDOG /* watchdog disabled */
  347. /*
  348. * Miscellaneous configurable options
  349. */
  350. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  351. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  352. #if defined(CONFIG_CMD_KGDB)
  353. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  354. #else
  355. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  356. #endif
  357. /* Print Buffer Size */
  358. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  359. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  360. /* Boot Argument Buffer Size */
  361. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  362. /*
  363. * For booting Linux, the board info and command line data
  364. * have to be in the first 256 MB of memory, since this is
  365. * the maximum mapped by the Linux kernel during initialization.
  366. */
  367. /* Initial Memory map for Linux*/
  368. #define CONFIG_SYS_BOOTMAPSZ (256 << 20)
  369. #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */
  370. #if 1 /*528/264*/
  371. #define CONFIG_SYS_HRCW_LOW (\
  372. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  373. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  374. HRCWL_CSB_TO_CLKIN |\
  375. HRCWL_VCO_1X2 |\
  376. HRCWL_CORE_TO_CSB_2X1)
  377. #elif 0 /*396/132*/
  378. #define CONFIG_SYS_HRCW_LOW (\
  379. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  380. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  381. HRCWL_CSB_TO_CLKIN |\
  382. HRCWL_VCO_1X4 |\
  383. HRCWL_CORE_TO_CSB_3X1)
  384. #elif 0 /*264/132*/
  385. #define CONFIG_SYS_HRCW_LOW (\
  386. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  387. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  388. HRCWL_CSB_TO_CLKIN |\
  389. HRCWL_VCO_1X4 |\
  390. HRCWL_CORE_TO_CSB_2X1)
  391. #elif 0 /*132/132*/
  392. #define CONFIG_SYS_HRCW_LOW (\
  393. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  394. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  395. HRCWL_CSB_TO_CLKIN |\
  396. HRCWL_VCO_1X4 |\
  397. HRCWL_CORE_TO_CSB_1X1)
  398. #elif 0 /*264/264 */
  399. #define CONFIG_SYS_HRCW_LOW (\
  400. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  401. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  402. HRCWL_CSB_TO_CLKIN |\
  403. HRCWL_VCO_1X4 |\
  404. HRCWL_CORE_TO_CSB_1X1)
  405. #endif
  406. #if defined(PCI_64BIT)
  407. #define CONFIG_SYS_HRCW_HIGH (\
  408. HRCWH_PCI_HOST |\
  409. HRCWH_64_BIT_PCI |\
  410. HRCWH_PCI1_ARBITER_ENABLE |\
  411. HRCWH_PCI2_ARBITER_DISABLE |\
  412. HRCWH_CORE_ENABLE |\
  413. HRCWH_FROM_0X00000100 |\
  414. HRCWH_BOOTSEQ_DISABLE |\
  415. HRCWH_SW_WATCHDOG_DISABLE |\
  416. HRCWH_ROM_LOC_LOCAL_16BIT |\
  417. HRCWH_TSEC1M_IN_GMII |\
  418. HRCWH_TSEC2M_IN_GMII)
  419. #else
  420. #define CONFIG_SYS_HRCW_HIGH (\
  421. HRCWH_PCI_HOST |\
  422. HRCWH_32_BIT_PCI |\
  423. HRCWH_PCI1_ARBITER_ENABLE |\
  424. HRCWH_PCI2_ARBITER_ENABLE |\
  425. HRCWH_CORE_ENABLE |\
  426. HRCWH_FROM_0X00000100 |\
  427. HRCWH_BOOTSEQ_DISABLE |\
  428. HRCWH_SW_WATCHDOG_DISABLE |\
  429. HRCWH_ROM_LOC_LOCAL_16BIT |\
  430. HRCWH_TSEC1M_IN_GMII |\
  431. HRCWH_TSEC2M_IN_GMII)
  432. #endif
  433. /* System IO Config */
  434. #define CONFIG_SYS_SICRH 0
  435. #define CONFIG_SYS_SICRL SICRL_LDP_A
  436. #define CONFIG_SYS_HID0_INIT 0x000000000
  437. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK \
  438. | HID0_ENABLE_INSTRUCTION_CACHE)
  439. /* #define CONFIG_SYS_HID0_FINAL (\
  440. HID0_ENABLE_INSTRUCTION_CACHE |\
  441. HID0_ENABLE_M_BIT |\
  442. HID0_ENABLE_ADDRESS_BROADCAST) */
  443. #define CONFIG_SYS_HID2 HID2_HBE
  444. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  445. /* DDR @ 0x00000000 */
  446. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
  447. | BATL_PP_RW \
  448. | BATL_MEMCOHERENCE)
  449. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
  450. | BATU_BL_256M \
  451. | BATU_VS \
  452. | BATU_VP)
  453. /* PCI @ 0x80000000 */
  454. #ifdef CONFIG_PCI
  455. #define CONFIG_PCI_INDIRECT_BRIDGE
  456. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE \
  457. | BATL_PP_RW \
  458. | BATL_MEMCOHERENCE)
  459. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE \
  460. | BATU_BL_256M \
  461. | BATU_VS \
  462. | BATU_VP)
  463. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE \
  464. | BATL_PP_RW \
  465. | BATL_CACHEINHIBIT \
  466. | BATL_GUARDEDSTORAGE)
  467. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE \
  468. | BATU_BL_256M \
  469. | BATU_VS \
  470. | BATU_VP)
  471. #else
  472. #define CONFIG_SYS_IBAT1L (0)
  473. #define CONFIG_SYS_IBAT1U (0)
  474. #define CONFIG_SYS_IBAT2L (0)
  475. #define CONFIG_SYS_IBAT2U (0)
  476. #endif
  477. #ifdef CONFIG_MPC83XX_PCI2
  478. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE \
  479. | BATL_PP_RW \
  480. | BATL_MEMCOHERENCE)
  481. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE \
  482. | BATU_BL_256M \
  483. | BATU_VS \
  484. | BATU_VP)
  485. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE \
  486. | BATL_PP_RW \
  487. | BATL_CACHEINHIBIT \
  488. | BATL_GUARDEDSTORAGE)
  489. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE \
  490. | BATU_BL_256M \
  491. | BATU_VS \
  492. | BATU_VP)
  493. #else
  494. #define CONFIG_SYS_IBAT3L (0)
  495. #define CONFIG_SYS_IBAT3U (0)
  496. #define CONFIG_SYS_IBAT4L (0)
  497. #define CONFIG_SYS_IBAT4U (0)
  498. #endif
  499. /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */
  500. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR \
  501. | BATL_PP_RW \
  502. | BATL_CACHEINHIBIT \
  503. | BATL_GUARDEDSTORAGE)
  504. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR \
  505. | BATU_BL_256M \
  506. | BATU_VS \
  507. | BATU_VP)
  508. /* LBC SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
  509. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_LBC_SDRAM_BASE \
  510. | BATL_PP_RW \
  511. | BATL_MEMCOHERENCE \
  512. | BATL_GUARDEDSTORAGE)
  513. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_LBC_SDRAM_BASE \
  514. | BATU_BL_256M \
  515. | BATU_VS \
  516. | BATU_VP)
  517. #define CONFIG_SYS_IBAT7L (0)
  518. #define CONFIG_SYS_IBAT7U (0)
  519. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  520. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  521. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  522. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  523. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  524. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  525. #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
  526. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  527. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  528. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  529. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  530. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  531. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  532. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  533. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  534. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  535. #if defined(CONFIG_CMD_KGDB)
  536. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  537. #endif
  538. /*
  539. * Environment Configuration
  540. */
  541. #define CONFIG_ENV_OVERWRITE
  542. #if defined(CONFIG_TSEC_ENET)
  543. #define CONFIG_HAS_ETH0
  544. #define CONFIG_HAS_ETH1
  545. #endif
  546. #define CONFIG_HOSTNAME SBC8349
  547. #define CONFIG_ROOTPATH "/tftpboot/rootfs"
  548. #define CONFIG_BOOTFILE "uImage"
  549. /* default location for tftp and bootm */
  550. #define CONFIG_LOADADDR 800000
  551. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  552. #define CONFIG_BAUDRATE 115200
  553. #define CONFIG_EXTRA_ENV_SETTINGS \
  554. "netdev=eth0\0" \
  555. "hostname=sbc8349\0" \
  556. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  557. "nfsroot=${serverip}:${rootpath}\0" \
  558. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  559. "addip=setenv bootargs ${bootargs} " \
  560. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  561. ":${hostname}:${netdev}:off panic=1\0" \
  562. "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
  563. "flash_nfs=run nfsargs addip addtty;" \
  564. "bootm ${kernel_addr}\0" \
  565. "flash_self=run ramargs addip addtty;" \
  566. "bootm ${kernel_addr} ${ramdisk_addr}\0" \
  567. "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \
  568. "bootm\0" \
  569. "load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0" \
  570. "update=protect off ff800000 ff83ffff; " \
  571. "era ff800000 ff83ffff; cp.b 100000 ff800000 ${filesize}\0" \
  572. "upd=run load update\0" \
  573. "fdtaddr=780000\0" \
  574. "fdtfile=sbc8349.dtb\0" \
  575. ""
  576. #define CONFIG_NFSBOOTCOMMAND \
  577. "setenv bootargs root=/dev/nfs rw " \
  578. "nfsroot=$serverip:$rootpath " \
  579. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:" \
  580. "$netdev:off " \
  581. "console=$consoledev,$baudrate $othbootargs;" \
  582. "tftp $loadaddr $bootfile;" \
  583. "tftp $fdtaddr $fdtfile;" \
  584. "bootm $loadaddr - $fdtaddr"
  585. #define CONFIG_RAMBOOTCOMMAND \
  586. "setenv bootargs root=/dev/ram rw " \
  587. "console=$consoledev,$baudrate $othbootargs;" \
  588. "tftp $ramdiskaddr $ramdiskfile;" \
  589. "tftp $loadaddr $bootfile;" \
  590. "tftp $fdtaddr $fdtfile;" \
  591. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  592. #define CONFIG_BOOTCOMMAND "run flash_self"
  593. #endif /* __CONFIG_H */