sbc8349.h 22 KB

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