MERGERBOX.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. /*
  2. * Copyright (C) 2007 Freescale Semiconductor, Inc.
  3. *
  4. * Copyright (C) 2011 Matrix Vision GmbH
  5. * Andre Schwarz <andre.schwarz@matrix-vision.de>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __CONFIG_H
  23. #define __CONFIG_H
  24. #include <version.h>
  25. /*
  26. * High Level Configuration Options
  27. */
  28. #define CONFIG_E300 1
  29. #define CONFIG_MPC83xx 1
  30. #define CONFIG_MPC837x 1
  31. #define CONFIG_MPC8377 1
  32. #define CONFIG_SYS_TEXT_BASE 0xFC000000
  33. #define CONFIG_PCI 1
  34. #define CONFIG_MASK_AER_AO
  35. #define CONFIG_DISPLAY_AER_FULL
  36. #define CONFIG_MISC_INIT_R
  37. /*
  38. * On-board devices
  39. */
  40. #define CONFIG_TSEC_ENET
  41. /*
  42. * System Clock Setup
  43. */
  44. #define CONFIG_83XX_CLKIN 66666667 /* in Hz */
  45. #define CONFIG_PCIE
  46. #define CONFIG_83XX_GENERIC_PCIE_REGISTER_HOSES
  47. #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN
  48. /*
  49. * Hardware Reset Configuration Word stored in EEPROM.
  50. */
  51. #define CONFIG_SYS_HRCW_LOW 0
  52. #define CONFIG_SYS_HRCW_HIGH 0
  53. /* Arbiter Configuration Register */
  54. #define CONFIG_SYS_ACR_PIPE_DEP 3
  55. #define CONFIG_SYS_ACR_RPTCNT 3
  56. /* System Priority Control Regsiter */
  57. #define CONFIG_SYS_SPCR_TSECEP 3
  58. /* System Clock Configuration Register */
  59. #define CONFIG_SYS_SCCR_TSEC1CM 3
  60. #define CONFIG_SYS_SCCR_TSEC2CM 0
  61. #define CONFIG_SYS_SCCR_SDHCCM 3
  62. #define CONFIG_SYS_SCCR_ENCCM 3 /* also clock for I2C-1 */
  63. #define CONFIG_SYS_SCCR_USBDRCM CONFIG_SYS_SCCR_ENCCM /* must match */
  64. #define CONFIG_SYS_SCCR_PCIEXP1CM 3
  65. #define CONFIG_SYS_SCCR_PCIEXP2CM 3
  66. #define CONFIG_SYS_SCCR_PCICM 1
  67. #define CONFIG_SYS_SCCR_SATACM 0xFF
  68. /*
  69. * System IO Config
  70. */
  71. #define CONFIG_SYS_SICRH 0x087c0000
  72. #define CONFIG_SYS_SICRL 0x40000000
  73. /*
  74. * Output Buffer Impedance
  75. */
  76. #define CONFIG_SYS_OBIR 0x30000000
  77. /*
  78. * IMMR new address
  79. */
  80. #define CONFIG_SYS_IMMR 0xE0000000
  81. /*
  82. * DDR Setup
  83. */
  84. #define CONFIG_SYS_DDR_BASE 0x00000000
  85. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  86. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  87. #define CONFIG_SYS_83XX_DDR_USES_CS0
  88. #define CONFIG_SYS_DDRCDR_VALUE (DDRCDR_EN | DDRCDR_PZ_HIZ |\
  89. DDRCDR_NZ_HIZ | DDRCDR_ODT |\
  90. DDRCDR_Q_DRN)
  91. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
  92. #define CONFIG_SYS_DDR_MODE_WEAK
  93. #define CONFIG_SYS_DDR_WRITE_DATA_DELAY 2
  94. #define CONFIG_SYS_DDR_CPO 0x1f
  95. /* SPD table located at offset 0x20 in extended adressing ROM
  96. * used for HRCW fetch after power-on reset
  97. */
  98. #define CONFIG_SPD_EEPROM
  99. #define SPD_EEPROM_ADDRESS 0x50
  100. #define SPD_EEPROM_OFFSET 0x20
  101. #define SPD_EEPROM_ADDR_LEN 2
  102. /*
  103. * The reserved memory
  104. */
  105. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  106. #define CONFIG_SYS_MONITOR_LEN (512*1024)
  107. #define CONFIG_SYS_MALLOC_LEN (512*1024)
  108. /*
  109. * Initial RAM Base Address Setup
  110. */
  111. #define CONFIG_SYS_INIT_RAM_LOCK 1
  112. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  113. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */
  114. #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */
  115. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE -\
  116. CONFIG_SYS_GBL_DATA_SIZE)
  117. /*
  118. * Local Bus Configuration & Clock Setup
  119. */
  120. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  121. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_8
  122. #define CONFIG_SYS_LBC_LBCR 0x00000000
  123. #define CONFIG_FSL_ELBC 1
  124. /*
  125. * FLASH on the Local Bus
  126. */
  127. #define CONFIG_SYS_FLASH_CFI
  128. #define CONFIG_FLASH_CFI_DRIVER
  129. #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  130. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE
  131. #define CONFIG_SYS_FLASH_SIZE 64
  132. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  133. #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_64MB)
  134. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V)
  135. #define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_FLASH_BASE | OR_UPM_XAM |\
  136. OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 |\
  137. OR_GPCM_XACS | OR_GPCM_SCY_15 | OR_GPCM_TRLX |\
  138. OR_GPCM_EHTR | OR_GPCM_EAD)
  139. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  140. #define CONFIG_SYS_MAX_FLASH_SECT 512
  141. #undef CONFIG_SYS_FLASH_CHECKSUM
  142. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Flash Erase Timeout (ms) */
  143. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  144. /*
  145. * NAND Flash on the Local Bus
  146. */
  147. #define CONFIG_MTD_NAND_VERIFY_WRITE 1
  148. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  149. #define CONFIG_NAND_FSL_ELBC 1
  150. #define CONFIG_SYS_NAND_BASE 0xE0600000
  151. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE | (2<<BR_DECC_SHIFT) |\
  152. BR_PS_8 | BR_MS_FCM | BR_V)
  153. #define CONFIG_SYS_OR1_PRELIM (0xFFFF8000 | OR_FCM_BCTLD | OR_FCM_CST |\
  154. OR_FCM_CHT | OR_FCM_SCY_1 | OR_FCM_RST |\
  155. OR_FCM_TRLX | OR_FCM_EHTR)
  156. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE
  157. #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E
  158. /*
  159. * Serial Port
  160. */
  161. #define CONFIG_CONS_INDEX 1
  162. #define CONFIG_SYS_NS16550
  163. #define CONFIG_SYS_NS16550_SERIAL
  164. #define CONFIG_SYS_NS16550_REG_SIZE 1
  165. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  166. #define CONFIG_SYS_BAUDRATE_TABLE \
  167. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
  168. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  169. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  170. #define CONFIG_CONSOLE ttyS0
  171. #define CONFIG_BAUDRATE 115200
  172. /* SERDES */
  173. #define CONFIG_FSL_SERDES
  174. #define CONFIG_FSL_SERDES1 0xe3000
  175. #define CONFIG_FSL_SERDES2 0xe3100
  176. /* Use the HUSH parser */
  177. #define CONFIG_SYS_HUSH_PARSER
  178. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  179. /* Pass open firmware flat tree */
  180. #define CONFIG_OF_LIBFDT 1
  181. #define CONFIG_OF_BOARD_SETUP 1
  182. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  183. /* I2C */
  184. #define CONFIG_HARD_I2C
  185. #define CONFIG_FSL_I2C
  186. #define CONFIG_I2C_MULTI_BUS
  187. #define CONFIG_SYS_I2C_SPEED 120000
  188. #define CONFIG_SYS_I2C_SLAVE 0x7F
  189. #define CONFIG_SYS_I2C_OFFSET 0x3000
  190. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  191. /*
  192. * General PCI
  193. * Addresses are mapped 1-1.
  194. */
  195. #define CONFIG_SYS_PCI_MEM_BASE 0x80000000
  196. #define CONFIG_SYS_PCI_MEM_PHYS CONFIG_SYS_PCI_MEM_BASE
  197. #define CONFIG_SYS_PCI_MEM_SIZE (256 << 20)
  198. #define CONFIG_SYS_PCI_MMIO_BASE 0x90000000
  199. #define CONFIG_SYS_PCI_MMIO_PHYS CONFIG_SYS_PCI_MMIO_BASE
  200. #define CONFIG_SYS_PCI_MMIO_SIZE (256 << 20)
  201. #define CONFIG_SYS_PCI_IO_BASE 0x00000000
  202. #define CONFIG_SYS_PCI_IO_PHYS 0xE0300000
  203. #define CONFIG_SYS_PCI_IO_SIZE (1 << 20)
  204. #ifdef CONFIG_PCIE
  205. #define CONFIG_SYS_PCIE1_BASE 0xA0000000
  206. #define CONFIG_SYS_PCIE1_CFG_BASE 0xA0000000
  207. #define CONFIG_SYS_PCIE1_CFG_SIZE (128 << 20)
  208. #define CONFIG_SYS_PCIE1_MEM_BASE 0xA8000000
  209. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xA8000000
  210. #define CONFIG_SYS_PCIE1_MEM_SIZE (256 << 20)
  211. #define CONFIG_SYS_PCIE1_IO_BASE 0x00000000
  212. #define CONFIG_SYS_PCIE1_IO_PHYS 0xB8000000
  213. #define CONFIG_SYS_PCIE1_IO_SIZE (8 << 20)
  214. #define CONFIG_SYS_PCIE2_BASE 0xC0000000
  215. #define CONFIG_SYS_PCIE2_CFG_BASE 0xC0000000
  216. #define CONFIG_SYS_PCIE2_CFG_SIZE (128 << 20)
  217. #define CONFIG_SYS_PCIE2_MEM_BASE 0xC8000000
  218. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xC8000000
  219. #define CONFIG_SYS_PCIE2_MEM_SIZE (256 << 20)
  220. #define CONFIG_SYS_PCIE2_IO_BASE 0x00000000
  221. #define CONFIG_SYS_PCIE2_IO_PHYS 0xD8000000
  222. #define CONFIG_SYS_PCIE2_IO_SIZE (8 << 20)
  223. #endif
  224. #define CONFIG_PCI_PNP
  225. #define CONFIG_PCI_SCAN_SHOW
  226. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  227. /*
  228. * TSEC
  229. */
  230. #define CONFIG_GMII /* MII PHY management */
  231. #define CONFIG_SYS_VSC8601_SKEWFIX
  232. #define CONFIG_SYS_VSC8601_SKEW_TX 3
  233. #define CONFIG_SYS_VSC8601_SKEW_RX 3
  234. #define CONFIG_TSEC1
  235. #define CONFIG_HAS_ETH0
  236. #define CONFIG_TSEC1_NAME "TSEC0"
  237. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  238. #define TSEC1_PHY_ADDR 0x10
  239. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  240. #define TSEC1_PHYIDX 0
  241. #define CONFIG_ETHPRIME "TSEC0"
  242. #define CONFIG_HAS_ETH0
  243. /*
  244. * SATA
  245. */
  246. #define CONFIG_LIBATA
  247. #define CONFIG_FSL_SATA
  248. #define CONFIG_SYS_SATA_MAX_DEVICE 2
  249. #define CONFIG_SATA1
  250. #define CONFIG_SYS_SATA1_OFFSET 0x18000
  251. #define CONFIG_SYS_SATA1 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA1_OFFSET)
  252. #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
  253. #define CONFIG_SATA2
  254. #define CONFIG_SYS_SATA2_OFFSET 0x19000
  255. #define CONFIG_SYS_SATA2 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA2_OFFSET)
  256. #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
  257. #define CONFIG_LBA48
  258. #define CONFIG_CMD_SATA
  259. #define CONFIG_DOS_PARTITION
  260. #define CONFIG_CMD_EXT2
  261. /*
  262. * BOOTP options
  263. */
  264. #define CONFIG_BOOTP_BOOTFILESIZE
  265. #define CONFIG_BOOTP_BOOTPATH
  266. #define CONFIG_BOOTP_GATEWAY
  267. #define CONFIG_BOOTP_HOSTNAME
  268. #define CONFIG_BOOTP_VENDOREX
  269. #define CONFIG_BOOTP_SUBNETMASK
  270. #define CONFIG_BOOTP_DNS
  271. #define CONFIG_BOOTP_DNS2
  272. #define CONFIG_BOOTP_NTPSERVER
  273. #define CONFIG_BOOTP_RANDOM_DELAY
  274. #define CONFIG_BOOTP_SEND_HOSTNAME
  275. /*
  276. * Command line configuration.
  277. */
  278. #include <config_cmd_default.h>
  279. #define CONFIG_CMD_ASKENV
  280. #define CONFIG_CMD_NAND
  281. #define CONFIG_CMD_PING
  282. #define CONFIG_CMD_EEPROM
  283. #define CONFIG_CMD_I2C
  284. #define CONFIG_CMD_MII
  285. #define CONFIG_CMD_PCI
  286. #define CONFIG_CMD_USB
  287. #define CONFIG_CMD_SPI
  288. #define CONFIG_CMD_DHCP
  289. #define CONFIG_CMD_UBI
  290. #define CONFIG_CMD_UBIFS
  291. #define CONFIG_CMD_MTDPARTS
  292. #define CONFIG_CMD_SATA
  293. #define CONFIG_CMD_EXT2
  294. #define CONFIG_CMD_FAT
  295. #define CONFIG_CMD_JFFS2
  296. #define CONFIG_RBTREE
  297. #define CONFIG_LZO
  298. #define CONFIG_MTD_DEVICE
  299. #define CONFIG_MTD_PARTITIONS
  300. #define CONFIG_FLASH_CFI_MTD
  301. #define MTDIDS_DEFAULT "nor0=NOR,nand0=NAND"
  302. #define MTDPARTS_DEFAULT "mtdparts=NOR:1M(u-boot),2M(FPGA);NAND:-(root)"
  303. #define CONFIG_FIT
  304. #define CONFIG_FIT_VERBOSE 1
  305. #define CONFIG_CMDLINE_EDITING 1
  306. #define CONFIG_AUTO_COMPLETE
  307. /*
  308. * Miscellaneous configurable options
  309. */
  310. #define CONFIG_SYS_LONGHELP
  311. #define CONFIG_SYS_LOAD_ADDR 0x2000000
  312. #define CONFIG_LOADADDR 0x4000000
  313. #define CONFIG_SYS_PROMPT "=> "
  314. #define CONFIG_SYS_CBSIZE 256
  315. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  316. #define CONFIG_SYS_MAXARGS 16
  317. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  318. #define CONFIG_SYS_HZ 1000
  319. #define CONFIG_LOADS_ECHO 1
  320. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1
  321. #define CONFIG_SYS_MEMTEST_START (60<<20)
  322. #define CONFIG_SYS_MEMTEST_END (70<<20)
  323. /*
  324. * For booting Linux, the board info and command line data
  325. * have to be in the first 256 MB of memory, since this is
  326. * the maximum mapped by the Linux kernel during initialization.
  327. */
  328. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */
  329. /*
  330. * Core HID Setup
  331. */
  332. #define CONFIG_SYS_HID0_INIT 0x000000000
  333. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \
  334. HID0_ENABLE_INSTRUCTION_CACHE)
  335. #define CONFIG_SYS_HID2 HID2_HBE
  336. /*
  337. * MMU Setup
  338. */
  339. #define CONFIG_HIGH_BATS 1
  340. /* DDR: cache cacheable */
  341. #define CONFIG_SYS_SDRAM CONFIG_SYS_SDRAM_BASE
  342. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM | BATL_PP_10 |\
  343. BATL_MEMCOHERENCE)
  344. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM | BATU_BL_256M | BATU_VS |\
  345. BATU_VP)
  346. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  347. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  348. /* unused */
  349. #define CONFIG_SYS_IBAT1L (0)
  350. #define CONFIG_SYS_IBAT1U (0)
  351. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  352. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  353. /* IMMRBAR, PCI IO and NAND: cache-inhibit and guarded */
  354. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_IMMR | BATL_PP_10 |\
  355. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  356. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_IMMR | BATU_BL_8M | BATU_VS |\
  357. BATU_VP)
  358. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  359. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  360. /* unused */
  361. #define CONFIG_SYS_IBAT3L (0)
  362. #define CONFIG_SYS_IBAT3U (0)
  363. #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
  364. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  365. /* FLASH: icache cacheable, but dcache-inhibit and guarded */
  366. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 |\
  367. BATL_MEMCOHERENCE)
  368. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_FLASH_BASE | BATU_BL_64M |\
  369. BATU_VS | BATU_VP)
  370. #define CONFIG_SYS_DBAT4L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | \
  371. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  372. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  373. /* Stack in dcache: cacheable, no memory coherence */
  374. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_10)
  375. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K |\
  376. BATU_VS | BATU_VP)
  377. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  378. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  379. /* PCI MEM space: cacheable */
  380. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI_MEM_PHYS | BATL_PP_10 |\
  381. BATL_MEMCOHERENCE)
  382. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI_MEM_PHYS | BATU_BL_256M |\
  383. BATU_VS | BATU_VP)
  384. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  385. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  386. /* PCI MMIO space: cache-inhibit and guarded */
  387. #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI_MMIO_PHYS | BATL_PP_10 | \
  388. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  389. #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI_MMIO_PHYS | BATU_BL_256M |\
  390. BATU_VS | BATU_VP)
  391. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  392. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  393. /*
  394. * I2C EEPROM settings
  395. */
  396. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  397. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
  398. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
  399. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
  400. #define CONFIG_SYS_EEPROM_SIZE 0x4000
  401. /*
  402. * Environment Configuration
  403. */
  404. #define CONFIG_SYS_FLASH_PROTECTION
  405. #define CONFIG_ENV_OVERWRITE
  406. #define CONFIG_ENV_IS_IN_FLASH 1
  407. #define CONFIG_ENV_ADDR 0xFFD00000
  408. #define CONFIG_ENV_SECT_SIZE 0x20000
  409. #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
  410. /*
  411. * Video
  412. */
  413. #define CONFIG_VIDEO
  414. #define CONFIG_VIDEO_SM501_PCI
  415. #define VIDEO_FB_LITTLE_ENDIAN
  416. #define CONFIG_CMD_BMP
  417. #define CONFIG_VIDEO_SM501
  418. #define CONFIG_VIDEO_SM501_32BPP
  419. #define CONFIG_VIDEO_SM501_FBMEM_OFFSET 0x10000
  420. #define CONFIG_CFB_CONSOLE
  421. #define CONFIG_VIDEO_LOGO
  422. #define CONFIG_VIDEO_BMP_LOGO
  423. #define CONFIG_VGA_AS_SINGLE_DEVICE
  424. #define CONFIG_SPLASH_SCREEN
  425. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  426. #define CONFIG_VIDEO_BMP_GZIP
  427. #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20)
  428. /*
  429. * SPI
  430. */
  431. #define CONFIG_MPC8XXX_SPI
  432. /*
  433. * USB
  434. */
  435. #define CONFIG_SYS_USB_HOST
  436. #define CONFIG_USB_EHCI
  437. #define CONFIG_USB_EHCI_FSL
  438. #define CONFIG_HAS_FSL_DR_USB
  439. #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
  440. #define CONFIG_USB_STORAGE
  441. #define CONFIG_USB_KEYBOARD
  442. /*
  443. *
  444. */
  445. #define CONFIG_BOOTDELAY 5
  446. #define CONFIG_AUTOBOOT_KEYED
  447. #define CONFIG_AUTOBOOT_STOP_STR "s"
  448. #define CONFIG_ZERO_BOOTDELAY_CHECK
  449. #define CONFIG_RESET_TO_RETRY 1000
  450. #define MV_CI MergerBox
  451. #define MV_VCI MergerBox
  452. #define MV_FPGA_DATA 0xfc100000
  453. #define MV_FPGA_SIZE 0x00200000
  454. #define CONFIG_SHOW_BOOT_PROGRESS 1
  455. #define MV_KERNEL_ADDR_RAM 0x02800000
  456. #define MV_DTB_ADDR_RAM 0x00600000
  457. #define MV_INITRD_ADDR_RAM 0x01000000
  458. #define MV_FITADDR 0xfc300000
  459. #define MV_SPLAH_ADDR 0xffe00000
  460. #define CONFIG_BOOTCOMMAND "run i2c_init;if test ${boot_sqfs} -eq 1;"\
  461. "then; run fitboot;else;run ubiboot;fi;"
  462. #define CONFIG_BOOTARGS "console=ttyS0,115200n8"
  463. #define XMK_STR(x) #x
  464. #define MK_STR(x) XMK_STR(x)
  465. #define CONFIG_EXTRA_ENV_SETTINGS \
  466. "console_nr=0\0"\
  467. "stdin=serial\0"\
  468. "stdout=serial\0"\
  469. "stderr=serial\0"\
  470. "boot_sqfs=1\0"\
  471. "usb_dr_mode=host\0"\
  472. "bootfile=MergerBox.fit\0"\
  473. "baudrate=" MK_STR(CONFIG_BAUDRATE) "\0"\
  474. "fpga=0\0"\
  475. "fpgadata=" MK_STR(MV_FPGA_DATA) "\0"\
  476. "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0"\
  477. "mv_kernel_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0"\
  478. "mv_initrd_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0"\
  479. "mv_dtb_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0"\
  480. "uboota=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0"\
  481. "fitaddr=" MK_STR(MV_FITADDR) "\0"\
  482. "mv_version=" U_BOOT_VERSION "\0"\
  483. "mtdids=" MTDIDS_DEFAULT "\0"\
  484. "mtdparts=" MTDPARTS_DEFAULT "\0"\
  485. "dhcp_client_id=" MK_STR(MV_CI) "\0"\
  486. "dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0"\
  487. "upd_uboot=dhcp;tftp bdi2000/u-boot-mergerbox-xp.bin;"\
  488. "protect off all;erase $uboota +0xC0000;"\
  489. "cp.b $loadaddr $uboota $filesize\0"\
  490. "upd_fpga=dhcp;tftp MergerBox.rbf;erase $fpgadata +$fpgadatasize;"\
  491. "cp.b $loadaddr $fpgadata $filesize\0"\
  492. "upd_fit=dhcp;tftp MergerBox.fit;erase $fitaddr +0x1000000;"\
  493. "cp.b $loadaddr $fitaddr $filesize\0"\
  494. "addsqshrfs=set bootargs $bootargs root=/dev/ram ro "\
  495. "rootfstype=squashfs\0"\
  496. "addubirfs=set bootargs $bootargs ubi.mtd=9 root=ubi0:rootfs rw "\
  497. "rootfstype=ubifs\0"\
  498. "addusbrfs=set bootargs $bootargs root=/dev/sda1 rw "\
  499. "rootfstype=ext3 usb-storage.delay_use=1 rootdelay=3\0"\
  500. "netusbboot=bootp;run fpganetload fitnetload addusbrfs doboot\0"\
  501. "netubiboot= bootp;run fpganetload fitnetload addubirfs doboot\0"\
  502. "ubiboot=run fitprep addubirfs;set mv_initrd_ram -;run doboot\0"\
  503. "doboot=bootm $mv_kernel_ram $mv_initrd_ram $mv_dtb_ram\0"\
  504. "fitprep=imxtract $fitaddr kernel $mv_kernel_ram;"\
  505. "imxtract $fitaddr ramdisk $mv_initrd_ram;"\
  506. "imxtract $fitaddr fdt $mv_dtb_ram\0"\
  507. "fdtprep=fdt addr $mv_dtb_ram;fdt boardsetup\0"\
  508. "fitboot=run fitprep fdtprep addsqshrfs doboot\0"\
  509. "i2c_init=run i2c_speed init_sdi_tx i2c_init_pll\0"\
  510. "i2c_init_pll=i2c mw 65 9 2;i2c mw 65 9 0;i2c mw 65 5 2b;"\
  511. "i2c mw 65 7 f;i2c mw 65 8 f;i2c mw 65 11 40;i2c mw 65 12 40;"\
  512. "i2c mw 65 13 40; i2c mw 65 14 40; i2c mw 65 a 0\0"\
  513. "i2c_speed=i2c dev 0;i2c speed 300000;i2c dev 1;i2c speed 120000\0"\
  514. "init_sdi_tx=i2c mw 21 6 0;i2c mw 21 2 0;i2c mw 21 3 0;sleep 1;"\
  515. "i2c mw 21 2 ff;i2c mw 21 3 3c\0"\
  516. "splashimage=" MK_STR(MV_SPLAH_ADDR) "\0"\
  517. ""
  518. #undef MK_STR
  519. #undef XMK_STR
  520. /*
  521. * FPGA
  522. */
  523. #define CONFIG_FPGA_COUNT 1
  524. #define CONFIG_FPGA CONFIG_SYS_ALTERA_CYCLON2
  525. #define CONFIG_FPGA_ALTERA
  526. #define CONFIG_FPGA_CYCLON2
  527. #endif