sbc8349.h 22 KB

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