p1_p2_rdb_pc.h 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105
  1. /*
  2. * Copyright 2010-2011 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. /*
  7. * QorIQ RDB boards configuration file
  8. */
  9. #ifndef __CONFIG_H
  10. #define __CONFIG_H
  11. #define CONFIG_SYS_GENERIC_BOARD
  12. #define CONFIG_DISPLAY_BOARDINFO
  13. #ifdef CONFIG_36BIT
  14. #define CONFIG_PHYS_64BIT
  15. #endif
  16. #if defined(CONFIG_P1020MBG)
  17. #define CONFIG_BOARDNAME "P1020MBG-PC"
  18. #define CONFIG_P1020
  19. #define CONFIG_VSC7385_ENET
  20. #define CONFIG_SLIC
  21. #define __SW_BOOT_MASK 0x03
  22. #define __SW_BOOT_NOR 0xe4
  23. #define __SW_BOOT_SD 0x54
  24. #define CONFIG_SYS_L2_SIZE (256 << 10)
  25. #endif
  26. #if defined(CONFIG_P1020UTM)
  27. #define CONFIG_BOARDNAME "P1020UTM-PC"
  28. #define CONFIG_P1020
  29. #define __SW_BOOT_MASK 0x03
  30. #define __SW_BOOT_NOR 0xe0
  31. #define __SW_BOOT_SD 0x50
  32. #define CONFIG_SYS_L2_SIZE (256 << 10)
  33. #endif
  34. #if defined(CONFIG_P1020RDB_PC)
  35. #define CONFIG_BOARDNAME "P1020RDB-PC"
  36. #define CONFIG_NAND_FSL_ELBC
  37. #define CONFIG_P1020
  38. #define CONFIG_SPI_FLASH
  39. #define CONFIG_VSC7385_ENET
  40. #define CONFIG_SLIC
  41. #define __SW_BOOT_MASK 0x03
  42. #define __SW_BOOT_NOR 0x5c
  43. #define __SW_BOOT_SPI 0x1c
  44. #define __SW_BOOT_SD 0x9c
  45. #define __SW_BOOT_NAND 0xec
  46. #define __SW_BOOT_PCIE 0x6c
  47. #define CONFIG_SYS_L2_SIZE (256 << 10)
  48. #endif
  49. /*
  50. * P1020RDB-PD board has user selectable switches for evaluating different
  51. * frequency and boot options for the P1020 device. The table that
  52. * follow describe the available options. The front six binary number was in
  53. * accordance with SW3[1:6].
  54. * 111101 533 533 267 667 NOR Core0 boot; Core1 hold-off
  55. * 101101 667 667 333 667 NOR Core0 boot; Core1 hold-off
  56. * 011001 800 800 400 667 NOR Core0 boot; Core1 hold-off
  57. * 001001 800 800 400 667 SD/MMC Core0 boot; Core1 hold-off
  58. * 001101 800 800 400 667 SPI Core0 boot; Core1 hold-off
  59. * 010001 800 800 400 667 NAND Core0 boot; Core1 hold-off
  60. * 011101 800 800 400 667 PCIe-2 Core0 boot; Core1 hold-off
  61. */
  62. #if defined(CONFIG_P1020RDB_PD)
  63. #define CONFIG_BOARDNAME "P1020RDB-PD"
  64. #define CONFIG_NAND_FSL_ELBC
  65. #define CONFIG_P1020
  66. #define CONFIG_SPI_FLASH
  67. #define CONFIG_VSC7385_ENET
  68. #define CONFIG_SLIC
  69. #define __SW_BOOT_MASK 0x03
  70. #define __SW_BOOT_NOR 0x64
  71. #define __SW_BOOT_SPI 0x34
  72. #define __SW_BOOT_SD 0x24
  73. #define __SW_BOOT_NAND 0x44
  74. #define __SW_BOOT_PCIE 0x74
  75. #define CONFIG_SYS_L2_SIZE (256 << 10)
  76. /*
  77. * Dynamic MTD Partition support with mtdparts
  78. */
  79. #define CONFIG_MTD_DEVICE
  80. #define CONFIG_MTD_PARTITIONS
  81. #define CONFIG_CMD_MTDPARTS
  82. #define CONFIG_FLASH_CFI_MTD
  83. #define MTDIDS_DEFAULT "nor0=ec000000.nor"
  84. #define MTDPARTS_DEFAULT "mtdparts=ec000000.nor:128k(dtb),6016k(kernel)," \
  85. "57088k(fs),1m(vsc7385-firmware),1280k(u-boot)"
  86. #endif
  87. #if defined(CONFIG_P1021RDB)
  88. #define CONFIG_BOARDNAME "P1021RDB-PC"
  89. #define CONFIG_NAND_FSL_ELBC
  90. #define CONFIG_P1021
  91. #define CONFIG_QE
  92. #define CONFIG_SPI_FLASH
  93. #define CONFIG_VSC7385_ENET
  94. #define CONFIG_SYS_LBC_LBCR 0x00080000 /* Implement conversion of
  95. addresses in the LBC */
  96. #define __SW_BOOT_MASK 0x03
  97. #define __SW_BOOT_NOR 0x5c
  98. #define __SW_BOOT_SPI 0x1c
  99. #define __SW_BOOT_SD 0x9c
  100. #define __SW_BOOT_NAND 0xec
  101. #define __SW_BOOT_PCIE 0x6c
  102. #define CONFIG_SYS_L2_SIZE (256 << 10)
  103. /*
  104. * Dynamic MTD Partition support with mtdparts
  105. */
  106. #define CONFIG_MTD_DEVICE
  107. #define CONFIG_MTD_PARTITIONS
  108. #define CONFIG_CMD_MTDPARTS
  109. #define CONFIG_FLASH_CFI_MTD
  110. #ifdef CONFIG_PHYS_64BIT
  111. #define MTDIDS_DEFAULT "nor0=fef000000.nor"
  112. #define MTDPARTS_DEFAULT "mtdparts=fef000000.nor:256k(vsc7385-firmware)," \
  113. "256k(dtb),4608k(kernel),9728k(fs)," \
  114. "256k(qe-ucode-firmware),1280k(u-boot)"
  115. #else
  116. #define MTDIDS_DEFAULT "nor0=ef000000.nor"
  117. #define MTDPARTS_DEFAULT "mtdparts=ef000000.nor:256k(vsc7385-firmware)," \
  118. "256k(dtb),4608k(kernel),9728k(fs)," \
  119. "256k(qe-ucode-firmware),1280k(u-boot)"
  120. #endif
  121. #endif
  122. #if defined(CONFIG_P1024RDB)
  123. #define CONFIG_BOARDNAME "P1024RDB"
  124. #define CONFIG_NAND_FSL_ELBC
  125. #define CONFIG_P1024
  126. #define CONFIG_SLIC
  127. #define CONFIG_SPI_FLASH
  128. #define __SW_BOOT_MASK 0xf3
  129. #define __SW_BOOT_NOR 0x00
  130. #define __SW_BOOT_SPI 0x08
  131. #define __SW_BOOT_SD 0x04
  132. #define __SW_BOOT_NAND 0x0c
  133. #define CONFIG_SYS_L2_SIZE (256 << 10)
  134. #endif
  135. #if defined(CONFIG_P1025RDB)
  136. #define CONFIG_BOARDNAME "P1025RDB"
  137. #define CONFIG_NAND_FSL_ELBC
  138. #define CONFIG_P1025
  139. #define CONFIG_QE
  140. #define CONFIG_SLIC
  141. #define CONFIG_SPI_FLASH
  142. #define CONFIG_SYS_LBC_LBCR 0x00080000 /* Implement conversion of
  143. addresses in the LBC */
  144. #define __SW_BOOT_MASK 0xf3
  145. #define __SW_BOOT_NOR 0x00
  146. #define __SW_BOOT_SPI 0x08
  147. #define __SW_BOOT_SD 0x04
  148. #define __SW_BOOT_NAND 0x0c
  149. #define CONFIG_SYS_L2_SIZE (256 << 10)
  150. #endif
  151. #if defined(CONFIG_P2020RDB)
  152. #define CONFIG_BOARDNAME "P2020RDB-PCA"
  153. #define CONFIG_NAND_FSL_ELBC
  154. #define CONFIG_P2020
  155. #define CONFIG_SPI_FLASH
  156. #define CONFIG_VSC7385_ENET
  157. #define __SW_BOOT_MASK 0x03
  158. #define __SW_BOOT_NOR 0xc8
  159. #define __SW_BOOT_SPI 0x28
  160. #define __SW_BOOT_SD 0x68 /* or 0x18 */
  161. #define __SW_BOOT_NAND 0xe8
  162. #define __SW_BOOT_PCIE 0xa8
  163. #define CONFIG_SYS_L2_SIZE (512 << 10)
  164. /*
  165. * Dynamic MTD Partition support with mtdparts
  166. */
  167. #define CONFIG_MTD_DEVICE
  168. #define CONFIG_MTD_PARTITIONS
  169. #define CONFIG_CMD_MTDPARTS
  170. #define CONFIG_FLASH_CFI_MTD
  171. #ifdef CONFIG_PHYS_64BIT
  172. #define MTDIDS_DEFAULT "nor0=fef000000.nor"
  173. #define MTDPARTS_DEFAULT "mtdparts=fef000000.nor:256k(vsc7385-firmware)," \
  174. "256k(dtb),4608k(kernel),9984k(fs),1280k(u-boot)"
  175. #else
  176. #define MTDIDS_DEFAULT "nor0=ef000000.nor"
  177. #define MTDPARTS_DEFAULT "mtdparts=ef000000.nor:256k(vsc7385-firmware)," \
  178. "256k(dtb),4608k(kernel),9984k(fs),1280k(u-boot)"
  179. #endif
  180. #endif
  181. #ifdef CONFIG_SDCARD
  182. #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
  183. #define CONFIG_SPL_ENV_SUPPORT
  184. #define CONFIG_SPL_SERIAL_SUPPORT
  185. #define CONFIG_SPL_MMC_SUPPORT
  186. #define CONFIG_SPL_MMC_MINIMAL
  187. #define CONFIG_SPL_FLUSH_IMAGE
  188. #define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
  189. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  190. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  191. #define CONFIG_SPL_I2C_SUPPORT
  192. #define CONFIG_FSL_LAW /* Use common FSL init code */
  193. #define CONFIG_SYS_TEXT_BASE 0x11001000
  194. #define CONFIG_SPL_TEXT_BASE 0xf8f81000
  195. #define CONFIG_SPL_PAD_TO 0x20000
  196. #define CONFIG_SPL_MAX_SIZE (128 * 1024)
  197. #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10)
  198. #define CONFIG_SYS_MMC_U_BOOT_DST (0x11000000)
  199. #define CONFIG_SYS_MMC_U_BOOT_START (0x11000000)
  200. #define CONFIG_SYS_MMC_U_BOOT_OFFS (128 << 10)
  201. #define CONFIG_SYS_MPC85XX_NO_RESETVEC
  202. #define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds"
  203. #define CONFIG_SPL_MMC_BOOT
  204. #ifdef CONFIG_SPL_BUILD
  205. #define CONFIG_SPL_COMMON_INIT_DDR
  206. #endif
  207. #endif
  208. #ifdef CONFIG_SPIFLASH
  209. #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
  210. #define CONFIG_SPL_ENV_SUPPORT
  211. #define CONFIG_SPL_SERIAL_SUPPORT
  212. #define CONFIG_SPL_SPI_SUPPORT
  213. #define CONFIG_SPL_SPI_FLASH_SUPPORT
  214. #define CONFIG_SPL_SPI_FLASH_MINIMAL
  215. #define CONFIG_SPL_FLUSH_IMAGE
  216. #define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
  217. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  218. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  219. #define CONFIG_SPL_I2C_SUPPORT
  220. #define CONFIG_FSL_LAW /* Use common FSL init code */
  221. #define CONFIG_SYS_TEXT_BASE 0x11001000
  222. #define CONFIG_SPL_TEXT_BASE 0xf8f81000
  223. #define CONFIG_SPL_PAD_TO 0x20000
  224. #define CONFIG_SPL_MAX_SIZE (128 * 1024)
  225. #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10)
  226. #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x11000000)
  227. #define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x11000000)
  228. #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (128 << 10)
  229. #define CONFIG_SYS_MPC85XX_NO_RESETVEC
  230. #define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds"
  231. #define CONFIG_SPL_SPI_BOOT
  232. #ifdef CONFIG_SPL_BUILD
  233. #define CONFIG_SPL_COMMON_INIT_DDR
  234. #endif
  235. #endif
  236. #ifdef CONFIG_NAND
  237. #ifdef CONFIG_TPL_BUILD
  238. #define CONFIG_SPL_NAND_BOOT
  239. #define CONFIG_SPL_FLUSH_IMAGE
  240. #define CONFIG_SPL_ENV_SUPPORT
  241. #define CONFIG_SPL_NAND_INIT
  242. #define CONFIG_SPL_SERIAL_SUPPORT
  243. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  244. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  245. #define CONFIG_SPL_I2C_SUPPORT
  246. #define CONFIG_SPL_NAND_SUPPORT
  247. #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
  248. #define CONFIG_SPL_COMMON_INIT_DDR
  249. #define CONFIG_SPL_MAX_SIZE (128 << 10)
  250. #define CONFIG_SPL_TEXT_BASE 0xf8f81000
  251. #define CONFIG_SYS_MPC85XX_NO_RESETVEC
  252. #define CONFIG_SYS_NAND_U_BOOT_SIZE (832 << 10)
  253. #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000)
  254. #define CONFIG_SYS_NAND_U_BOOT_START (0x11000000)
  255. #define CONFIG_SYS_NAND_U_BOOT_OFFS ((128 + 128) << 10)
  256. #elif defined(CONFIG_SPL_BUILD)
  257. #define CONFIG_SPL_INIT_MINIMAL
  258. #define CONFIG_SPL_SERIAL_SUPPORT
  259. #define CONFIG_SPL_NAND_SUPPORT
  260. #define CONFIG_SPL_FLUSH_IMAGE
  261. #define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
  262. #define CONFIG_SPL_TEXT_BASE 0xff800000
  263. #define CONFIG_SPL_MAX_SIZE 4096
  264. #define CONFIG_SYS_NAND_U_BOOT_SIZE (128 << 10)
  265. #define CONFIG_SYS_NAND_U_BOOT_DST 0xf8f80000
  266. #define CONFIG_SYS_NAND_U_BOOT_START 0xf8f80000
  267. #define CONFIG_SYS_NAND_U_BOOT_OFFS (128 << 10)
  268. #endif /* not CONFIG_TPL_BUILD */
  269. #define CONFIG_SPL_PAD_TO 0x20000
  270. #define CONFIG_TPL_PAD_TO 0x20000
  271. #define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
  272. #define CONFIG_SYS_TEXT_BASE 0x11001000
  273. #define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
  274. #endif
  275. #ifndef CONFIG_SYS_TEXT_BASE
  276. #define CONFIG_SYS_TEXT_BASE 0xeff40000
  277. #endif
  278. #ifndef CONFIG_RESET_VECTOR_ADDRESS
  279. #define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc
  280. #endif
  281. #ifndef CONFIG_SYS_MONITOR_BASE
  282. #ifdef CONFIG_SPL_BUILD
  283. #define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE
  284. #else
  285. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  286. #endif
  287. #endif
  288. /* High Level Configuration Options */
  289. #define CONFIG_BOOKE
  290. #define CONFIG_E500
  291. #define CONFIG_MP
  292. #define CONFIG_FSL_ELBC
  293. #define CONFIG_PCI
  294. #define CONFIG_PCIE1 /* PCIE controler 1 (slot 1) */
  295. #define CONFIG_PCIE2 /* PCIE controler 2 (slot 2) */
  296. #define CONFIG_FSL_PCI_INIT /* Use common FSL init code */
  297. #define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */
  298. #define CONFIG_FSL_PCIE_RESET /* need PCIe reset errata */
  299. #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */
  300. #define CONFIG_FSL_LAW
  301. #define CONFIG_TSEC_ENET /* tsec ethernet support */
  302. #define CONFIG_ENV_OVERWRITE
  303. #define CONFIG_CMD_SATA
  304. #define CONFIG_SATA_SIL
  305. #define CONFIG_SYS_SATA_MAX_DEVICE 2
  306. #define CONFIG_LIBATA
  307. #define CONFIG_LBA48
  308. #if defined(CONFIG_P2020RDB)
  309. #define CONFIG_SYS_CLK_FREQ 100000000
  310. #else
  311. #define CONFIG_SYS_CLK_FREQ 66666666
  312. #endif
  313. #define CONFIG_DDR_CLK_FREQ 66666666
  314. #define CONFIG_HWCONFIG
  315. /*
  316. * These can be toggled for performance analysis, otherwise use default.
  317. */
  318. #define CONFIG_L2_CACHE
  319. #define CONFIG_BTB
  320. #define CONFIG_BOARD_EARLY_INIT_F /* Call board_pre_init */
  321. #define CONFIG_ENABLE_36BIT_PHYS
  322. #ifdef CONFIG_PHYS_64BIT
  323. #define CONFIG_ADDR_MAP 1
  324. #define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */
  325. #endif
  326. #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */
  327. #define CONFIG_SYS_MEMTEST_END 0x1fffffff
  328. #define CONFIG_PANIC_HANG /* do not reset board on panic */
  329. #define CONFIG_SYS_CCSRBAR 0xffe00000
  330. #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
  331. /* IN case of NAND bootloader relocate CCSRBAR in RAMboot code not in the 4k
  332. SPL code*/
  333. #ifdef CONFIG_SPL_BUILD
  334. #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
  335. #endif
  336. /* DDR Setup */
  337. #define CONFIG_SYS_FSL_DDR3
  338. #define CONFIG_SYS_DDR_RAW_TIMING
  339. #define CONFIG_DDR_SPD
  340. #define CONFIG_SYS_SPD_BUS_NUM 1
  341. #define SPD_EEPROM_ADDRESS 0x52
  342. #undef CONFIG_FSL_DDR_INTERACTIVE
  343. #if (defined(CONFIG_P1020MBG) || defined(CONFIG_P1020RDB_PD))
  344. #define CONFIG_SYS_SDRAM_SIZE_LAW LAW_SIZE_2G
  345. #define CONFIG_CHIP_SELECTS_PER_CTRL 2
  346. #else
  347. #define CONFIG_SYS_SDRAM_SIZE_LAW LAW_SIZE_1G
  348. #define CONFIG_CHIP_SELECTS_PER_CTRL 1
  349. #endif
  350. #define CONFIG_SYS_SDRAM_SIZE (1u << (CONFIG_SYS_SDRAM_SIZE_LAW - 19))
  351. #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
  352. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  353. #define CONFIG_NUM_DDR_CONTROLLERS 1
  354. #define CONFIG_DIMM_SLOTS_PER_CTLR 1
  355. /* Default settings for DDR3 */
  356. #ifndef CONFIG_P2020RDB
  357. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000003f
  358. #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014302
  359. #define CONFIG_SYS_DDR_CS0_CONFIG_2 0x00000000
  360. #define CONFIG_SYS_DDR_CS1_BNDS 0x0040007f
  361. #define CONFIG_SYS_DDR_CS1_CONFIG 0x80014302
  362. #define CONFIG_SYS_DDR_CS1_CONFIG_2 0x00000000
  363. #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef
  364. #define CONFIG_SYS_DDR_INIT_ADDR 0x00000000
  365. #define CONFIG_SYS_DDR_INIT_EXT_ADDR 0x00000000
  366. #define CONFIG_SYS_DDR_MODE_CONTROL 0x00000000
  367. #define CONFIG_SYS_DDR_ZQ_CONTROL 0x89080600
  368. #define CONFIG_SYS_DDR_WRLVL_CONTROL 0x8655A608
  369. #define CONFIG_SYS_DDR_SR_CNTR 0x00000000
  370. #define CONFIG_SYS_DDR_RCW_1 0x00000000
  371. #define CONFIG_SYS_DDR_RCW_2 0x00000000
  372. #define CONFIG_SYS_DDR_CONTROL 0xC70C0000 /* Type = DDR3 */
  373. #define CONFIG_SYS_DDR_CONTROL_2 0x04401050
  374. #define CONFIG_SYS_DDR_TIMING_4 0x00220001
  375. #define CONFIG_SYS_DDR_TIMING_5 0x03402400
  376. #define CONFIG_SYS_DDR_TIMING_3 0x00020000
  377. #define CONFIG_SYS_DDR_TIMING_0 0x00330004
  378. #define CONFIG_SYS_DDR_TIMING_1 0x6f6B4846
  379. #define CONFIG_SYS_DDR_TIMING_2 0x0FA8C8CF
  380. #define CONFIG_SYS_DDR_CLK_CTRL 0x03000000
  381. #define CONFIG_SYS_DDR_MODE_1 0x40461520
  382. #define CONFIG_SYS_DDR_MODE_2 0x8000c000
  383. #define CONFIG_SYS_DDR_INTERVAL 0x0C300000
  384. #endif
  385. #undef CONFIG_CLOCKS_IN_MHZ
  386. /*
  387. * Memory map
  388. *
  389. * 0x0000_0000 0x7fff_ffff DDR Up to 2GB cacheable
  390. * 0x8000_0000 0xdfff_ffff PCI Express Mem 1.5G non-cacheable(PCIe * 3)
  391. * 0xec00_0000 0xefff_ffff NOR flash Up to 64M non-cacheable CS0/1
  392. * 0xf8f8_0000 0xf8ff_ffff L2 SRAM Up to 512K cacheable
  393. * (early boot only)
  394. * 0xff80_0000 0xff80_7fff NAND flash 32K non-cacheable CS1/0
  395. * 0xff98_0000 0xff98_ffff PMC 64K non-cacheable CS2
  396. * 0xffa0_0000 0xffaf_ffff CPLD 1M non-cacheable CS3
  397. * 0xffb0_0000 0xffbf_ffff VSC7385 switch 1M non-cacheable CS2
  398. * 0xffc0_0000 0xffc3_ffff PCI IO range 256k non-cacheable
  399. * 0xffd0_0000 0xffd0_3fff L1 for stack 16K cacheable
  400. * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable
  401. */
  402. /*
  403. * Local Bus Definitions
  404. */
  405. #if (defined(CONFIG_P1020MBG) || defined(CONFIG_P1020RDB_PD))
  406. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* 64M */
  407. #define CONFIG_SYS_FLASH_BASE 0xec000000
  408. #elif defined(CONFIG_P1020UTM)
  409. #define CONFIG_SYS_MAX_FLASH_SECT 256 /* 32M */
  410. #define CONFIG_SYS_FLASH_BASE 0xee000000
  411. #else
  412. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* 16M */
  413. #define CONFIG_SYS_FLASH_BASE 0xef000000
  414. #endif
  415. #ifdef CONFIG_PHYS_64BIT
  416. #define CONFIG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CONFIG_SYS_FLASH_BASE)
  417. #else
  418. #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
  419. #endif
  420. #define CONFIG_FLASH_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) \
  421. | BR_PS_16 | BR_V)
  422. #define CONFIG_FLASH_OR_PRELIM 0xfc000ff7
  423. #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS}
  424. #define CONFIG_SYS_FLASH_QUIET_TEST
  425. #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
  426. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  427. #undef CONFIG_SYS_FLASH_CHECKSUM
  428. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  429. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  430. #define CONFIG_FLASH_CFI_DRIVER
  431. #define CONFIG_SYS_FLASH_CFI
  432. #define CONFIG_SYS_FLASH_EMPTY_INFO
  433. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
  434. /* Nand Flash */
  435. #ifdef CONFIG_NAND_FSL_ELBC
  436. #define CONFIG_SYS_NAND_BASE 0xff800000
  437. #ifdef CONFIG_PHYS_64BIT
  438. #define CONFIG_SYS_NAND_BASE_PHYS 0xfff800000ull
  439. #else
  440. #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
  441. #endif
  442. #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
  443. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  444. #define CONFIG_CMD_NAND
  445. #if defined(CONFIG_P1020RDB_PD)
  446. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
  447. #else
  448. #define CONFIG_SYS_NAND_BLOCK_SIZE (16 * 1024)
  449. #endif
  450. #define CONFIG_SYS_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
  451. | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \
  452. | BR_PS_8 /* Port Size = 8 bit */ \
  453. | BR_MS_FCM /* MSEL = FCM */ \
  454. | BR_V) /* valid */
  455. #if defined(CONFIG_P1020RDB_PD)
  456. #define CONFIG_SYS_NAND_OR_PRELIM (OR_AM_32KB \
  457. | OR_FCM_PGS /* Large Page*/ \
  458. | OR_FCM_CSCT \
  459. | OR_FCM_CST \
  460. | OR_FCM_CHT \
  461. | OR_FCM_SCY_1 \
  462. | OR_FCM_TRLX \
  463. | OR_FCM_EHTR)
  464. #else
  465. #define CONFIG_SYS_NAND_OR_PRELIM (OR_AM_32KB /* small page */ \
  466. | OR_FCM_CSCT \
  467. | OR_FCM_CST \
  468. | OR_FCM_CHT \
  469. | OR_FCM_SCY_1 \
  470. | OR_FCM_TRLX \
  471. | OR_FCM_EHTR)
  472. #endif
  473. #endif /* CONFIG_NAND_FSL_ELBC */
  474. #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */
  475. #define CONFIG_SYS_INIT_RAM_LOCK
  476. #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* stack in RAM */
  477. #ifdef CONFIG_PHYS_64BIT
  478. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf
  479. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR
  480. /* The assembler doesn't like typecast */
  481. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
  482. ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
  483. CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
  484. #else
  485. /* Initial L1 address */
  486. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS CONFIG_SYS_INIT_RAM_ADDR
  487. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
  488. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
  489. #endif
  490. /* Size of used area in RAM */
  491. #define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
  492. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
  493. GENERATED_GBL_DATA_SIZE)
  494. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  495. #define CONFIG_SYS_MONITOR_LEN (768 * 1024)
  496. #define CONFIG_SYS_MALLOC_LEN (1024 * 1024)/* Reserved for malloc */
  497. #define CONFIG_SYS_CPLD_BASE 0xffa00000
  498. #ifdef CONFIG_PHYS_64BIT
  499. #define CONFIG_SYS_CPLD_BASE_PHYS 0xfffa00000ull
  500. #else
  501. #define CONFIG_SYS_CPLD_BASE_PHYS CONFIG_SYS_CPLD_BASE
  502. #endif
  503. /* CPLD config size: 1Mb */
  504. #define CONFIG_CPLD_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE_PHYS) | \
  505. BR_PS_8 | BR_V)
  506. #define CONFIG_CPLD_OR_PRELIM (0xfff009f7)
  507. #define CONFIG_SYS_PMC_BASE 0xff980000
  508. #define CONFIG_SYS_PMC_BASE_PHYS CONFIG_SYS_PMC_BASE
  509. #define CONFIG_PMC_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_PMC_BASE_PHYS) | \
  510. BR_PS_8 | BR_V)
  511. #define CONFIG_PMC_OR_PRELIM (OR_AM_64KB | OR_GPCM_CSNT | OR_GPCM_XACS | \
  512. OR_GPCM_SCY | OR_GPCM_TRLX | OR_GPCM_EHTR | \
  513. OR_GPCM_EAD)
  514. #ifdef CONFIG_NAND
  515. #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM /* NAND Base Addr */
  516. #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM /* NAND Options */
  517. #define CONFIG_SYS_BR1_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */
  518. #define CONFIG_SYS_OR1_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */
  519. #else
  520. #define CONFIG_SYS_BR0_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */
  521. #define CONFIG_SYS_OR0_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */
  522. #ifdef CONFIG_NAND_FSL_ELBC
  523. #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NAND_BR_PRELIM /* NAND Base Addr */
  524. #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NAND_OR_PRELIM /* NAND Options */
  525. #endif
  526. #endif
  527. #define CONFIG_SYS_BR3_PRELIM CONFIG_CPLD_BR_PRELIM /* CPLD Base Address */
  528. #define CONFIG_SYS_OR3_PRELIM CONFIG_CPLD_OR_PRELIM /* CPLD Options */
  529. /* Vsc7385 switch */
  530. #ifdef CONFIG_VSC7385_ENET
  531. #define CONFIG_SYS_VSC7385_BASE 0xffb00000
  532. #ifdef CONFIG_PHYS_64BIT
  533. #define CONFIG_SYS_VSC7385_BASE_PHYS 0xfffb00000ull
  534. #else
  535. #define CONFIG_SYS_VSC7385_BASE_PHYS CONFIG_SYS_VSC7385_BASE
  536. #endif
  537. #define CONFIG_SYS_VSC7385_BR_PRELIM \
  538. (BR_PHYS_ADDR(CONFIG_SYS_VSC7385_BASE_PHYS) | BR_PS_8 | BR_V)
  539. #define CONFIG_SYS_VSC7385_OR_PRELIM (OR_AM_128KB | OR_GPCM_CSNT | \
  540. OR_GPCM_XACS | OR_GPCM_SCY_15 | OR_GPCM_SETA | \
  541. OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD)
  542. #define CONFIG_SYS_BR2_PRELIM CONFIG_SYS_VSC7385_BR_PRELIM
  543. #define CONFIG_SYS_OR2_PRELIM CONFIG_SYS_VSC7385_OR_PRELIM
  544. /* The size of the VSC7385 firmware image */
  545. #define CONFIG_VSC7385_IMAGE_SIZE 8192
  546. #endif
  547. /*
  548. * Config the L2 Cache as L2 SRAM
  549. */
  550. #if defined(CONFIG_SPL_BUILD)
  551. #if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
  552. #define CONFIG_SYS_INIT_L2_ADDR 0xf8f80000
  553. #define CONFIG_SYS_INIT_L2_ADDR_PHYS CONFIG_SYS_INIT_L2_ADDR
  554. #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
  555. #define CONFIG_SPL_RELOC_TEXT_BASE 0xf8f81000
  556. #define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
  557. #define CONFIG_SPL_RELOC_STACK (CONFIG_SYS_INIT_L2_ADDR + 116 * 1024)
  558. #define CONFIG_SPL_RELOC_STACK_SIZE (32 << 10)
  559. #define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SYS_INIT_L2_ADDR + 148 * 1024)
  560. #if defined(CONFIG_P2020RDB)
  561. #define CONFIG_SPL_RELOC_MALLOC_SIZE (364 << 10)
  562. #else
  563. #define CONFIG_SPL_RELOC_MALLOC_SIZE (108 << 10)
  564. #endif
  565. #elif defined(CONFIG_NAND)
  566. #ifdef CONFIG_TPL_BUILD
  567. #define CONFIG_SYS_INIT_L2_ADDR 0xf8f80000
  568. #define CONFIG_SYS_INIT_L2_ADDR_PHYS CONFIG_SYS_INIT_L2_ADDR
  569. #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
  570. #define CONFIG_SPL_RELOC_TEXT_BASE 0xf8f81000
  571. #define CONFIG_SPL_RELOC_STACK (CONFIG_SYS_INIT_L2_ADDR + 192 * 1024)
  572. #define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SYS_INIT_L2_ADDR + 208 * 1024)
  573. #define CONFIG_SPL_RELOC_MALLOC_SIZE (48 << 10)
  574. #define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L2_ADDR + 176 * 1024)
  575. #else
  576. #define CONFIG_SYS_INIT_L2_ADDR 0xf8f80000
  577. #define CONFIG_SYS_INIT_L2_ADDR_PHYS CONFIG_SYS_INIT_L2_ADDR
  578. #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
  579. #define CONFIG_SPL_RELOC_TEXT_BASE (CONFIG_SYS_INIT_L2_END - 0x2000)
  580. #define CONFIG_SPL_RELOC_STACK ((CONFIG_SYS_INIT_L2_END - 1) & ~0xF)
  581. #endif /* CONFIG_TPL_BUILD */
  582. #endif
  583. #endif
  584. /* Serial Port - controlled on board with jumper J8
  585. * open - index 2
  586. * shorted - index 1
  587. */
  588. #define CONFIG_CONS_INDEX 1
  589. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  590. #define CONFIG_SYS_NS16550
  591. #define CONFIG_SYS_NS16550_SERIAL
  592. #define CONFIG_SYS_NS16550_REG_SIZE 1
  593. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  594. #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL)
  595. #define CONFIG_NS16550_MIN_FUNCTIONS
  596. #endif
  597. #define CONFIG_SYS_BAUDRATE_TABLE \
  598. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
  599. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500)
  600. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600)
  601. /* Use the HUSH parser */
  602. #define CONFIG_SYS_HUSH_PARSER
  603. /*
  604. * Pass open firmware flat tree
  605. */
  606. #define CONFIG_OF_LIBFDT
  607. #define CONFIG_OF_BOARD_SETUP
  608. #define CONFIG_OF_STDOUT_VIA_ALIAS
  609. /* new uImage format support */
  610. #define CONFIG_FIT
  611. #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */
  612. /* I2C */
  613. #define CONFIG_SYS_I2C
  614. #define CONFIG_SYS_I2C_FSL
  615. #define CONFIG_SYS_FSL_I2C_SPEED 400000
  616. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  617. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  618. #define CONFIG_SYS_FSL_I2C2_SPEED 400000
  619. #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
  620. #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
  621. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} }
  622. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52
  623. #define CONFIG_SYS_SPD_BUS_NUM 1 /* For rom_loc and flash bank */
  624. /*
  625. * I2C2 EEPROM
  626. */
  627. #undef CONFIG_ID_EEPROM
  628. #define CONFIG_RTC_PT7C4338
  629. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  630. #define CONFIG_SYS_I2C_PCA9557_ADDR 0x18
  631. /* enable read and write access to EEPROM */
  632. #define CONFIG_CMD_EEPROM
  633. #define CONFIG_SYS_I2C_MULTI_EEPROMS
  634. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  635. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  636. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
  637. /*
  638. * eSPI - Enhanced SPI
  639. */
  640. #define CONFIG_HARD_SPI
  641. #define CONFIG_FSL_ESPI
  642. #if defined(CONFIG_SPI_FLASH)
  643. #define CONFIG_SPI_FLASH_SPANSION
  644. #define CONFIG_CMD_SF
  645. #define CONFIG_SF_DEFAULT_SPEED 10000000
  646. #define CONFIG_SF_DEFAULT_MODE 0
  647. #endif
  648. #if defined(CONFIG_PCI)
  649. /*
  650. * General PCI
  651. * Memory space is mapped 1-1, but I/O space must start from 0.
  652. */
  653. /* controller 2, direct to uli, tgtid 2, Base address 9000 */
  654. #define CONFIG_SYS_PCIE2_NAME "PCIe SLOT"
  655. #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
  656. #ifdef CONFIG_PHYS_64BIT
  657. #define CONFIG_SYS_PCIE2_MEM_BUS 0xc0000000
  658. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull
  659. #else
  660. #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
  661. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
  662. #endif
  663. #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */
  664. #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000
  665. #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
  666. #ifdef CONFIG_PHYS_64BIT
  667. #define CONFIG_SYS_PCIE2_IO_PHYS 0xfffc10000ull
  668. #else
  669. #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000
  670. #endif
  671. #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
  672. /* controller 1, Slot 2, tgtid 1, Base address a000 */
  673. #define CONFIG_SYS_PCIE1_NAME "mini PCIe SLOT"
  674. #define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000
  675. #ifdef CONFIG_PHYS_64BIT
  676. #define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
  677. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc00000000ull
  678. #else
  679. #define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
  680. #define CONFIG_SYS_PCIE1_MEM_PHYS 0x80000000
  681. #endif
  682. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
  683. #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc00000
  684. #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
  685. #ifdef CONFIG_PHYS_64BIT
  686. #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc00000ull
  687. #else
  688. #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc00000
  689. #endif
  690. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
  691. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  692. #define CONFIG_E1000 /* Defind e1000 pci Ethernet card*/
  693. #define CONFIG_CMD_PCI
  694. #define CONFIG_CMD_NET
  695. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  696. #define CONFIG_DOS_PARTITION
  697. #endif /* CONFIG_PCI */
  698. #if defined(CONFIG_TSEC_ENET)
  699. #define CONFIG_MII /* MII PHY management */
  700. #define CONFIG_TSEC1
  701. #define CONFIG_TSEC1_NAME "eTSEC1"
  702. #define CONFIG_TSEC2
  703. #define CONFIG_TSEC2_NAME "eTSEC2"
  704. #define CONFIG_TSEC3
  705. #define CONFIG_TSEC3_NAME "eTSEC3"
  706. #define TSEC1_PHY_ADDR 2
  707. #define TSEC2_PHY_ADDR 0
  708. #define TSEC3_PHY_ADDR 1
  709. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  710. #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  711. #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  712. #define TSEC1_PHYIDX 0
  713. #define TSEC2_PHYIDX 0
  714. #define TSEC3_PHYIDX 0
  715. #define CONFIG_ETHPRIME "eTSEC1"
  716. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  717. #define CONFIG_HAS_ETH0
  718. #define CONFIG_HAS_ETH1
  719. #define CONFIG_HAS_ETH2
  720. #endif /* CONFIG_TSEC_ENET */
  721. #ifdef CONFIG_QE
  722. /* QE microcode/firmware address */
  723. #define CONFIG_SYS_QE_FMAN_FW_IN_NOR
  724. #define CONFIG_SYS_QE_FW_ADDR 0xefec0000
  725. #define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000
  726. #endif /* CONFIG_QE */
  727. #ifdef CONFIG_P1025RDB
  728. /*
  729. * QE UEC ethernet configuration
  730. */
  731. #define CONFIG_MIIM_ADDRESS (CONFIG_SYS_CCSRBAR + 0x82120)
  732. #undef CONFIG_UEC_ETH
  733. #define CONFIG_PHY_MODE_NEED_CHANGE
  734. #define CONFIG_UEC_ETH1 /* ETH1 */
  735. #define CONFIG_HAS_ETH0
  736. #ifdef CONFIG_UEC_ETH1
  737. #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
  738. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK12 /* CLK12 for MII */
  739. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9 /* CLK9 for MII */
  740. #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH
  741. #define CONFIG_SYS_UEC1_PHY_ADDR 0x0 /* 0x0 for MII */
  742. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
  743. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 100
  744. #endif /* CONFIG_UEC_ETH1 */
  745. #define CONFIG_UEC_ETH5 /* ETH5 */
  746. #define CONFIG_HAS_ETH1
  747. #ifdef CONFIG_UEC_ETH5
  748. #define CONFIG_SYS_UEC5_UCC_NUM 4 /* UCC5 */
  749. #define CONFIG_SYS_UEC5_RX_CLK QE_CLK_NONE
  750. #define CONFIG_SYS_UEC5_TX_CLK QE_CLK13 /* CLK 13 for RMII */
  751. #define CONFIG_SYS_UEC5_ETH_TYPE FAST_ETH
  752. #define CONFIG_SYS_UEC5_PHY_ADDR 0x3 /* 0x3 for RMII */
  753. #define CONFIG_SYS_UEC5_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
  754. #define CONFIG_SYS_UEC5_INTERFACE_SPEED 100
  755. #endif /* CONFIG_UEC_ETH5 */
  756. #endif /* CONFIG_P1025RDB */
  757. /*
  758. * Environment
  759. */
  760. #ifdef CONFIG_SPIFLASH
  761. #define CONFIG_ENV_IS_IN_SPI_FLASH
  762. #define CONFIG_ENV_SPI_BUS 0
  763. #define CONFIG_ENV_SPI_CS 0
  764. #define CONFIG_ENV_SPI_MAX_HZ 10000000
  765. #define CONFIG_ENV_SPI_MODE 0
  766. #define CONFIG_ENV_SIZE 0x2000 /* 8KB */
  767. #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */
  768. #define CONFIG_ENV_SECT_SIZE 0x10000
  769. #elif defined(CONFIG_SDCARD)
  770. #define CONFIG_ENV_IS_IN_MMC
  771. #define CONFIG_FSL_FIXED_MMC_LOCATION
  772. #define CONFIG_ENV_SIZE 0x2000
  773. #define CONFIG_SYS_MMC_ENV_DEV 0
  774. #elif defined(CONFIG_NAND)
  775. #ifdef CONFIG_TPL_BUILD
  776. #define CONFIG_ENV_SIZE 0x2000
  777. #define CONFIG_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
  778. #else
  779. #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
  780. #endif
  781. #define CONFIG_ENV_IS_IN_NAND
  782. #define CONFIG_ENV_OFFSET (1024 * 1024)
  783. #define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)
  784. #elif defined(CONFIG_SYS_RAMBOOT)
  785. #define CONFIG_ENV_IS_NOWHERE /* Store ENV in memory only */
  786. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  787. #define CONFIG_ENV_SIZE 0x2000
  788. #else
  789. #define CONFIG_ENV_IS_IN_FLASH
  790. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
  791. #define CONFIG_ENV_SIZE 0x2000
  792. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */
  793. #endif
  794. #define CONFIG_LOADS_ECHO /* echo on for serial download */
  795. #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
  796. /*
  797. * Command line configuration.
  798. */
  799. #include <config_cmd_default.h>
  800. #define CONFIG_CMD_IRQ
  801. #define CONFIG_CMD_PING
  802. #define CONFIG_CMD_I2C
  803. #define CONFIG_CMD_MII
  804. #define CONFIG_CMD_DATE
  805. #define CONFIG_CMD_ELF
  806. #define CONFIG_CMD_SETEXPR
  807. #define CONFIG_CMD_REGINFO
  808. /*
  809. * USB
  810. */
  811. #define CONFIG_HAS_FSL_DR_USB
  812. #if defined(CONFIG_HAS_FSL_DR_USB)
  813. #define CONFIG_USB_EHCI
  814. #ifdef CONFIG_USB_EHCI
  815. #define CONFIG_CMD_USB
  816. #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
  817. #define CONFIG_USB_EHCI_FSL
  818. #define CONFIG_USB_STORAGE
  819. #endif
  820. #endif
  821. #if defined(CONFIG_P1020RDB_PD)
  822. #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
  823. #endif
  824. #define CONFIG_MMC
  825. #ifdef CONFIG_MMC
  826. #define CONFIG_FSL_ESDHC
  827. #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
  828. #define CONFIG_CMD_MMC
  829. #define CONFIG_GENERIC_MMC
  830. #endif
  831. #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI) \
  832. || defined(CONFIG_FSL_SATA)
  833. #define CONFIG_CMD_EXT2
  834. #define CONFIG_CMD_FAT
  835. #define CONFIG_DOS_PARTITION
  836. #endif
  837. #undef CONFIG_WATCHDOG /* watchdog disabled */
  838. /*
  839. * Miscellaneous configurable options
  840. */
  841. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  842. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  843. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  844. #if defined(CONFIG_CMD_KGDB)
  845. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  846. #else
  847. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  848. #endif
  849. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  850. /* Print Buffer Size */
  851. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  852. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */
  853. /*
  854. * For booting Linux, the board info and command line data
  855. * have to be in the first 64 MB of memory, since this is
  856. * the maximum mapped by the Linux kernel during initialization.
  857. */
  858. #define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory for Linux*/
  859. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
  860. #if defined(CONFIG_CMD_KGDB)
  861. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  862. #endif
  863. /*
  864. * Environment Configuration
  865. */
  866. #define CONFIG_HOSTNAME unknown
  867. #define CONFIG_ROOTPATH "/opt/nfsroot"
  868. #define CONFIG_BOOTFILE "uImage"
  869. #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
  870. /* default location for tftp and bootm */
  871. #define CONFIG_LOADADDR 1000000
  872. #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */
  873. #define CONFIG_BOOTARGS /* the boot command will set bootargs */
  874. #define CONFIG_BAUDRATE 115200
  875. #ifdef __SW_BOOT_NOR
  876. #define __NOR_RST_CMD \
  877. norboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_NOR 1; \
  878. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  879. #endif
  880. #ifdef __SW_BOOT_SPI
  881. #define __SPI_RST_CMD \
  882. spiboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_SPI 1; \
  883. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  884. #endif
  885. #ifdef __SW_BOOT_SD
  886. #define __SD_RST_CMD \
  887. sdboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_SD 1; \
  888. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  889. #endif
  890. #ifdef __SW_BOOT_NAND
  891. #define __NAND_RST_CMD \
  892. nandboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_NAND 1; \
  893. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  894. #endif
  895. #ifdef __SW_BOOT_PCIE
  896. #define __PCIE_RST_CMD \
  897. pciboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_PCIE 1; \
  898. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  899. #endif
  900. #define CONFIG_EXTRA_ENV_SETTINGS \
  901. "netdev=eth0\0" \
  902. "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \
  903. "loadaddr=1000000\0" \
  904. "bootfile=uImage\0" \
  905. "tftpflash=tftpboot $loadaddr $uboot; " \
  906. "protect off " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
  907. "erase " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
  908. "cp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize; " \
  909. "protect on " __stringify(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
  910. "cmp.b $loadaddr " __stringify(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
  911. "hwconfig=usb1:dr_mode=host,phy_type=ulpi\0" \
  912. "consoledev=ttyS0\0" \
  913. "ramdiskaddr=2000000\0" \
  914. "ramdiskfile=rootfs.ext2.gz.uboot\0" \
  915. "fdtaddr=c00000\0" \
  916. "bdev=sda1\0" \
  917. "jffs2nor=mtdblock3\0" \
  918. "norbootaddr=ef080000\0" \
  919. "norfdtaddr=ef040000\0" \
  920. "jffs2nand=mtdblock9\0" \
  921. "nandbootaddr=100000\0" \
  922. "nandfdtaddr=80000\0" \
  923. "ramdisk_size=120000\0" \
  924. "map_lowernorbank=i2c dev 1; i2c mw 18 1 02 1; i2c mw 18 3 fd 1\0" \
  925. "map_uppernorbank=i2c dev 1; i2c mw 18 1 00 1; i2c mw 18 3 fd 1\0" \
  926. __stringify(__NOR_RST_CMD)"\0" \
  927. __stringify(__SPI_RST_CMD)"\0" \
  928. __stringify(__SD_RST_CMD)"\0" \
  929. __stringify(__NAND_RST_CMD)"\0" \
  930. __stringify(__PCIE_RST_CMD)"\0"
  931. #define CONFIG_NFSBOOTCOMMAND \
  932. "setenv bootargs root=/dev/nfs rw " \
  933. "nfsroot=$serverip:$rootpath " \
  934. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  935. "console=$consoledev,$baudrate $othbootargs;" \
  936. "tftp $loadaddr $bootfile;" \
  937. "tftp $fdtaddr $fdtfile;" \
  938. "bootm $loadaddr - $fdtaddr"
  939. #define CONFIG_HDBOOT \
  940. "setenv bootargs root=/dev/$bdev rw rootdelay=30 " \
  941. "console=$consoledev,$baudrate $othbootargs;" \
  942. "usb start;" \
  943. "ext2load usb 0:1 $loadaddr /boot/$bootfile;" \
  944. "ext2load usb 0:1 $fdtaddr /boot/$fdtfile;" \
  945. "bootm $loadaddr - $fdtaddr"
  946. #define CONFIG_USB_FAT_BOOT \
  947. "setenv bootargs root=/dev/ram rw " \
  948. "console=$consoledev,$baudrate $othbootargs " \
  949. "ramdisk_size=$ramdisk_size;" \
  950. "usb start;" \
  951. "fatload usb 0:2 $loadaddr $bootfile;" \
  952. "fatload usb 0:2 $fdtaddr $fdtfile;" \
  953. "fatload usb 0:2 $ramdiskaddr $ramdiskfile;" \
  954. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  955. #define CONFIG_USB_EXT2_BOOT \
  956. "setenv bootargs root=/dev/ram rw " \
  957. "console=$consoledev,$baudrate $othbootargs " \
  958. "ramdisk_size=$ramdisk_size;" \
  959. "usb start;" \
  960. "ext2load usb 0:4 $loadaddr $bootfile;" \
  961. "ext2load usb 0:4 $fdtaddr $fdtfile;" \
  962. "ext2load usb 0:4 $ramdiskaddr $ramdiskfile;" \
  963. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  964. #define CONFIG_NORBOOT \
  965. "setenv bootargs root=/dev/$jffs2nor rw " \
  966. "console=$consoledev,$baudrate rootfstype=jffs2 $othbootargs;" \
  967. "bootm $norbootaddr - $norfdtaddr"
  968. #define CONFIG_RAMBOOTCOMMAND \
  969. "setenv bootargs root=/dev/ram rw " \
  970. "console=$consoledev,$baudrate $othbootargs " \
  971. "ramdisk_size=$ramdisk_size;" \
  972. "tftp $ramdiskaddr $ramdiskfile;" \
  973. "tftp $loadaddr $bootfile;" \
  974. "tftp $fdtaddr $fdtfile;" \
  975. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  976. #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT
  977. #endif /* __CONFIG_H */