MPC8568MDS.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. /*
  2. * Copyright 2004-2007, 2010-2011 Freescale Semiconductor.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. /*
  7. * mpc8568mds board configuration file
  8. */
  9. #ifndef __CONFIG_H
  10. #define __CONFIG_H
  11. #define CONFIG_SYS_TEXT_BASE 0xfff80000
  12. #define CONFIG_SYS_SRIO
  13. #define CONFIG_SRIO1 /* SRIO port 1 */
  14. #define CONFIG_PCI1 1 /* PCI controller */
  15. #define CONFIG_PCIE1 1 /* PCIE controller */
  16. #define CONFIG_FSL_PCI_INIT 1 /* use common fsl pci init code */
  17. #define CONFIG_PCI_INDIRECT_BRIDGE 1 /* indirect PCI bridge support */
  18. #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */
  19. #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */
  20. #define CONFIG_TSEC_ENET /* tsec ethernet support */
  21. #define CONFIG_QE /* Enable QE */
  22. #define CONFIG_ENV_OVERWRITE
  23. #ifndef __ASSEMBLY__
  24. extern unsigned long get_clock_freq(void);
  25. #endif /*Replace a call to get_clock_freq (after it is implemented)*/
  26. #define CONFIG_SYS_CLK_FREQ 66000000 /*TODO: restore if wanting to read from BCSR: get_clock_freq()*/ /* sysclk for MPC85xx */
  27. /*
  28. * These can be toggled for performance analysis, otherwise use default.
  29. */
  30. #define CONFIG_L2_CACHE /* toggle L2 cache */
  31. #define CONFIG_BTB /* toggle branch predition */
  32. /*
  33. * Only possible on E500 Version 2 or newer cores.
  34. */
  35. #define CONFIG_ENABLE_36BIT_PHYS 1
  36. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */
  37. #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */
  38. #define CONFIG_SYS_MEMTEST_END 0x00400000
  39. #define CONFIG_SYS_CCSRBAR 0xe0000000
  40. #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
  41. /* DDR Setup */
  42. #undef CONFIG_FSL_DDR_INTERACTIVE
  43. #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/
  44. #define CONFIG_DDR_SPD
  45. #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */
  46. #define CONFIG_MEM_INIT_VALUE 0xDeadBeef
  47. #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/
  48. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  49. #define CONFIG_DIMM_SLOTS_PER_CTLR 1
  50. #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR)
  51. /* I2C addresses of SPD EEPROMs */
  52. #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */
  53. /* Make sure required options are set */
  54. #ifndef CONFIG_SPD_EEPROM
  55. #error ("CONFIG_SPD_EEPROM is required")
  56. #endif
  57. #undef CONFIG_CLOCKS_IN_MHZ
  58. /*
  59. * Local Bus Definitions
  60. */
  61. /*
  62. * FLASH on the Local Bus
  63. * Two banks, 8M each, using the CFI driver.
  64. * Boot from BR0/OR0 bank at 0xff00_0000
  65. * Alternate BR1/OR1 bank at 0xff80_0000
  66. *
  67. * BR0, BR1:
  68. * Base address 0 = 0xff00_0000 = BR0[0:16] = 1111 1111 0000 0000 0
  69. * Base address 1 = 0xff80_0000 = BR1[0:16] = 1111 1111 1000 0000 0
  70. * Port Size = 16 bits = BRx[19:20] = 10
  71. * Use GPCM = BRx[24:26] = 000
  72. * Valid = BRx[31] = 1
  73. *
  74. * 0 4 8 12 16 20 24 28
  75. * 1111 1111 1000 0000 0001 0000 0000 0001 = ff801001 BR0
  76. * 1111 1111 0000 0000 0001 0000 0000 0001 = ff001001 BR1
  77. *
  78. * OR0, OR1:
  79. * Addr Mask = 8M = ORx[0:16] = 1111 1111 1000 0000 0
  80. * Reserved ORx[17:18] = 11, confusion here?
  81. * CSNT = ORx[20] = 1
  82. * ACS = half cycle delay = ORx[21:22] = 11
  83. * SCY = 6 = ORx[24:27] = 0110
  84. * TRLX = use relaxed timing = ORx[29] = 1
  85. * EAD = use external address latch delay = OR[31] = 1
  86. *
  87. * 0 4 8 12 16 20 24 28
  88. * 1111 1111 1000 0000 0110 1110 0110 0101 = ff806e65 ORx
  89. */
  90. #define CONFIG_SYS_BCSR_BASE 0xf8000000
  91. #define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 32M */
  92. /*Chip select 0 - Flash*/
  93. #define CONFIG_SYS_BR0_PRELIM 0xfe001001
  94. #define CONFIG_SYS_OR0_PRELIM 0xfe006ff7
  95. /*Chip slelect 1 - BCSR*/
  96. #define CONFIG_SYS_BR1_PRELIM 0xf8000801
  97. #define CONFIG_SYS_OR1_PRELIM 0xffffe9f7
  98. /*#define CONFIG_SYS_FLASH_BANKS_LIST {0xff800000, CONFIG_SYS_FLASH_BASE} */
  99. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  100. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* sectors per device */
  101. #undef CONFIG_SYS_FLASH_CHECKSUM
  102. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  103. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  104. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  105. #define CONFIG_FLASH_CFI_DRIVER
  106. #define CONFIG_SYS_FLASH_CFI
  107. #define CONFIG_SYS_FLASH_EMPTY_INFO
  108. /*
  109. * SDRAM on the LocalBus
  110. */
  111. #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000 /* Localbus SDRAM */
  112. #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */
  113. /*Chip select 2 - SDRAM*/
  114. #define CONFIG_SYS_BR2_PRELIM 0xf0001861
  115. #define CONFIG_SYS_OR2_PRELIM 0xfc006901
  116. #define CONFIG_SYS_LBC_LCRR 0x00030004 /* LB clock ratio reg */
  117. #define CONFIG_SYS_LBC_LBCR 0x00000000 /* LB config reg */
  118. #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */
  119. #define CONFIG_SYS_LBC_MRTPR 0x00000000 /* LB refresh timer prescal*/
  120. /*
  121. * Common settings for all Local Bus SDRAM commands.
  122. * At run time, either BSMA1516 (for CPU 1.1)
  123. * or BSMA1617 (for CPU 1.0) (old)
  124. * is OR'ed in too.
  125. */
  126. #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFCR16 \
  127. | LSDMR_PRETOACT7 \
  128. | LSDMR_ACTTORW7 \
  129. | LSDMR_BL8 \
  130. | LSDMR_WRC4 \
  131. | LSDMR_CL3 \
  132. | LSDMR_RFEN \
  133. )
  134. /*
  135. * The bcsr registers are connected to CS3 on MDS.
  136. * The new memory map places bcsr at 0xf8000000.
  137. *
  138. * For BR3, need:
  139. * Base address of 0xf8000000 = BR[0:16] = 1111 1000 0000 0000 0
  140. * port-size = 8-bits = BR[19:20] = 01
  141. * no parity checking = BR[21:22] = 00
  142. * GPMC for MSEL = BR[24:26] = 000
  143. * Valid = BR[31] = 1
  144. *
  145. * 0 4 8 12 16 20 24 28
  146. * 1111 1000 0000 0000 0000 1000 0000 0001 = f8000801
  147. *
  148. * For OR3, need:
  149. * 1 MB mask for AM, OR[0:16] = 1111 1111 1111 0000 0
  150. * disable buffer ctrl OR[19] = 0
  151. * CSNT OR[20] = 1
  152. * ACS OR[21:22] = 11
  153. * XACS OR[23] = 1
  154. * SCY 15 wait states OR[24:27] = 1111 max is suboptimal but safe
  155. * SETA OR[28] = 0
  156. * TRLX OR[29] = 1
  157. * EHTR OR[30] = 1
  158. * EAD extra time OR[31] = 1
  159. *
  160. * 0 4 8 12 16 20 24 28
  161. * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7
  162. */
  163. #define CONFIG_SYS_BCSR (0xf8000000)
  164. /*Chip slelect 4 - PIB*/
  165. #define CONFIG_SYS_BR4_PRELIM 0xf8008801
  166. #define CONFIG_SYS_OR4_PRELIM 0xffffe9f7
  167. /*Chip select 5 - PIB*/
  168. #define CONFIG_SYS_BR5_PRELIM 0xf8010801
  169. #define CONFIG_SYS_OR5_PRELIM 0xffff69f7
  170. #define CONFIG_SYS_INIT_RAM_LOCK 1
  171. #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */
  172. #define CONFIG_SYS_INIT_RAM_SIZE 0x4000 /* Size of used area in RAM */
  173. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  174. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  175. #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
  176. #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
  177. /* Serial Port */
  178. #define CONFIG_CONS_INDEX 1
  179. #define CONFIG_SYS_NS16550_SERIAL
  180. #define CONFIG_SYS_NS16550_REG_SIZE 1
  181. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  182. #define CONFIG_SYS_BAUDRATE_TABLE \
  183. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
  184. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500)
  185. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600)
  186. /*
  187. * I2C
  188. */
  189. #define CONFIG_SYS_I2C
  190. #define CONFIG_SYS_I2C_FSL
  191. #define CONFIG_SYS_FSL_I2C_SPEED 400000
  192. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  193. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  194. #define CONFIG_SYS_FSL_I2C2_SPEED 400000
  195. #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
  196. #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
  197. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} }
  198. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52
  199. /*
  200. * General PCI
  201. * Memory Addresses are mapped 1-1. I/O is mapped from 0
  202. */
  203. #define CONFIG_SYS_PCI1_MEM_VIRT 0x80000000
  204. #define CONFIG_SYS_PCI1_MEM_BUS 0x80000000
  205. #define CONFIG_SYS_PCI1_MEM_PHYS 0x80000000
  206. #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */
  207. #define CONFIG_SYS_PCI1_IO_VIRT 0xe2000000
  208. #define CONFIG_SYS_PCI1_IO_BUS 0x00000000
  209. #define CONFIG_SYS_PCI1_IO_PHYS 0xe2000000
  210. #define CONFIG_SYS_PCI1_IO_SIZE 0x00800000 /* 8M */
  211. #define CONFIG_SYS_PCIE1_NAME "Slot"
  212. #define CONFIG_SYS_PCIE1_MEM_VIRT 0xa0000000
  213. #define CONFIG_SYS_PCIE1_MEM_BUS 0xa0000000
  214. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xa0000000
  215. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
  216. #define CONFIG_SYS_PCIE1_IO_VIRT 0xe2800000
  217. #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
  218. #define CONFIG_SYS_PCIE1_IO_PHYS 0xe2800000
  219. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */
  220. #define CONFIG_SYS_SRIO1_MEM_VIRT 0xC0000000
  221. #define CONFIG_SYS_SRIO1_MEM_BUS 0xC0000000
  222. #define CONFIG_SYS_SRIO1_MEM_PHYS CONFIG_SYS_SRIO1_MEM_BUS
  223. #define CONFIG_SYS_SRIO1_MEM_SIZE 0x20000000 /* 512M */
  224. #ifdef CONFIG_QE
  225. /*
  226. * QE UEC ethernet configuration
  227. */
  228. #define CONFIG_UEC_ETH
  229. #ifndef CONFIG_TSEC_ENET
  230. #define CONFIG_ETHPRIME "UEC0"
  231. #endif
  232. #define CONFIG_PHY_MODE_NEED_CHANGE
  233. #define CONFIG_eTSEC_MDIO_BUS
  234. #ifdef CONFIG_eTSEC_MDIO_BUS
  235. #define CONFIG_MIIM_ADDRESS 0xE0024520
  236. #endif
  237. #define CONFIG_UEC_ETH1 /* GETH1 */
  238. #ifdef CONFIG_UEC_ETH1
  239. #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
  240. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE
  241. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK16
  242. #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH
  243. #define CONFIG_SYS_UEC1_PHY_ADDR 7
  244. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_ID
  245. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 1000
  246. #endif
  247. #define CONFIG_UEC_ETH2 /* GETH2 */
  248. #ifdef CONFIG_UEC_ETH2
  249. #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */
  250. #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE
  251. #define CONFIG_SYS_UEC2_TX_CLK QE_CLK16
  252. #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH
  253. #define CONFIG_SYS_UEC2_PHY_ADDR 1
  254. #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_ID
  255. #define CONFIG_SYS_UEC2_INTERFACE_SPEED 1000
  256. #endif
  257. #endif /* CONFIG_QE */
  258. #if defined(CONFIG_PCI)
  259. #undef CONFIG_EEPRO100
  260. #undef CONFIG_TULIP
  261. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  262. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */
  263. #endif /* CONFIG_PCI */
  264. #if defined(CONFIG_TSEC_ENET)
  265. #define CONFIG_MII 1 /* MII PHY management */
  266. #define CONFIG_TSEC1 1
  267. #define CONFIG_TSEC1_NAME "eTSEC0"
  268. #define CONFIG_TSEC2 1
  269. #define CONFIG_TSEC2_NAME "eTSEC1"
  270. #define TSEC1_PHY_ADDR 2
  271. #define TSEC2_PHY_ADDR 3
  272. #define TSEC1_PHYIDX 0
  273. #define TSEC2_PHYIDX 0
  274. #define TSEC1_FLAGS TSEC_GIGABIT
  275. #define TSEC2_FLAGS TSEC_GIGABIT
  276. /* Options are: eTSEC[0-1] */
  277. #define CONFIG_ETHPRIME "eTSEC0"
  278. #endif /* CONFIG_TSEC_ENET */
  279. /*
  280. * Environment
  281. */
  282. #define CONFIG_ENV_IS_IN_FLASH 1
  283. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000)
  284. #define CONFIG_ENV_SECT_SIZE 0x40000 /* 256K(one sector) for env */
  285. #define CONFIG_ENV_SIZE 0x2000
  286. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  287. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  288. /*
  289. * BOOTP options
  290. */
  291. #define CONFIG_BOOTP_BOOTFILESIZE
  292. #define CONFIG_BOOTP_BOOTPATH
  293. #define CONFIG_BOOTP_GATEWAY
  294. #define CONFIG_BOOTP_HOSTNAME
  295. /*
  296. * Command line configuration.
  297. */
  298. #define CONFIG_CMD_IRQ
  299. #define CONFIG_CMD_REGINFO
  300. #if defined(CONFIG_PCI)
  301. #define CONFIG_CMD_PCI
  302. #endif
  303. #undef CONFIG_WATCHDOG /* watchdog disabled */
  304. /*
  305. * Miscellaneous configurable options
  306. */
  307. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  308. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  309. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  310. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  311. #if defined(CONFIG_CMD_KGDB)
  312. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  313. #else
  314. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  315. #endif
  316. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  317. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  318. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  319. /*
  320. * For booting Linux, the board info and command line data
  321. * have to be in the first 64 MB of memory, since this is
  322. * the maximum mapped by the Linux kernel during initialization.
  323. */
  324. #define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory map for Linux*/
  325. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
  326. #if defined(CONFIG_CMD_KGDB)
  327. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  328. #endif
  329. /*
  330. * Environment Configuration
  331. */
  332. /* The mac addresses for all ethernet interface */
  333. #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_UEC_ETH)
  334. #define CONFIG_HAS_ETH0
  335. #define CONFIG_HAS_ETH1
  336. #define CONFIG_HAS_ETH2
  337. #define CONFIG_HAS_ETH3
  338. #endif
  339. #define CONFIG_IPADDR 192.168.1.253
  340. #define CONFIG_HOSTNAME unknown
  341. #define CONFIG_ROOTPATH "/nfsroot"
  342. #define CONFIG_BOOTFILE "your.uImage"
  343. #define CONFIG_SERVERIP 192.168.1.1
  344. #define CONFIG_GATEWAYIP 192.168.1.1
  345. #define CONFIG_NETMASK 255.255.255.0
  346. #define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/
  347. #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/
  348. #define CONFIG_BAUDRATE 115200
  349. #define CONFIG_EXTRA_ENV_SETTINGS \
  350. "netdev=eth0\0" \
  351. "consoledev=ttyS0\0" \
  352. "ramdiskaddr=600000\0" \
  353. "ramdiskfile=your.ramdisk.u-boot\0" \
  354. "fdtaddr=400000\0" \
  355. "fdtfile=your.fdt.dtb\0" \
  356. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  357. "nfsroot=$serverip:$rootpath " \
  358. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  359. "console=$consoledev,$baudrate $othbootargs\0" \
  360. "ramargs=setenv bootargs root=/dev/ram rw " \
  361. "console=$consoledev,$baudrate $othbootargs\0" \
  362. #define CONFIG_NFSBOOTCOMMAND \
  363. "run nfsargs;" \
  364. "tftp $loadaddr $bootfile;" \
  365. "tftp $fdtaddr $fdtfile;" \
  366. "bootm $loadaddr - $fdtaddr"
  367. #define CONFIG_RAMBOOTCOMMAND \
  368. "run ramargs;" \
  369. "tftp $ramdiskaddr $ramdiskfile;" \
  370. "tftp $loadaddr $bootfile;" \
  371. "bootm $loadaddr $ramdiskaddr"
  372. #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND
  373. #endif /* __CONFIG_H */