sbc8349.h 23 KB

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