pcm030.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. /*
  2. * (C) Copyright 2003-2005
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * (C) Copyright 2006
  6. * Eric Schumann, Phytec Messatechnik GmbH
  7. *
  8. * (C) Copyright 2009
  9. * Jon Smirl <jonsmirl@gmail.com>
  10. *
  11. * SPDX-License-Identifier: GPL-2.0+
  12. */
  13. #ifndef __CONFIG_H
  14. #define __CONFIG_H
  15. #define CONFIG_BOARDINFO "phyCORE-MPC5200B-tiny"
  16. /*-----------------------------------------------------------------------------
  17. High Level Configuration Options
  18. (easy to change)
  19. -----------------------------------------------------------------------------*/
  20. #define CONFIG_MPC5200 1 /* This is an MPC5200 CPU */
  21. #define CONFIG_MPC5200_DDR 1 /* (with DDR-SDRAM) */
  22. #define CONFIG_PHYCORE_MPC5200B_TINY 1 /* phyCORE-MPC5200B -> */
  23. /* FEC configuration and IDE */
  24. /*
  25. * Valid values for CONFIG_SYS_TEXT_BASE are:
  26. * 0xFFF00000 boot high (standard configuration)
  27. * 0xFF000000 boot low
  28. * 0x00100000 boot from RAM (for testing only)
  29. */
  30. #ifndef CONFIG_SYS_TEXT_BASE
  31. #define CONFIG_SYS_TEXT_BASE 0xFFF00000
  32. #endif
  33. #define CONFIG_SYS_MPC5XXX_CLKIN 33333333 /* ... running at 33.333333MHz */
  34. /*-----------------------------------------------------------------------------
  35. Serial console configuration
  36. -----------------------------------------------------------------------------*/
  37. #define CONFIG_PSC_CONSOLE 3 /* console is on PSC3 -> */
  38. /*define gps port conf. */
  39. /* register later on to */
  40. /*enable UART function! */
  41. #define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */
  42. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
  43. /*
  44. * Command line configuration.
  45. */
  46. #define CONFIG_CMD_DATE
  47. #define CONFIG_CMD_EEPROM
  48. #define CONFIG_CMD_JFFS2
  49. #define CONFIG_CMD_PCI
  50. #define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */
  51. #if (CONFIG_SYS_TEXT_BASE == 0xFF000000) /* Boot low */
  52. #define CONFIG_SYS_LOWBOOT 1
  53. #endif
  54. /* RAMBOOT will be defined automatically in memory section */
  55. #define CONFIG_JFFS2_CMDLINE
  56. #define MTDIDS_DEFAULT "nor0=physmap-flash.0"
  57. #define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(ubootl)," \
  58. "1792k(kernel),13312k(jffs2),256k(uboot)ro,256k(oftree),-(space)"
  59. #undef CONFIG_BOOTARGS
  60. #define CONFIG_PREBOOT "echo;" \
  61. "echo Type \"run bootcmd_net\" to load Kernel over TFTP and to "\
  62. "mount root filesystem over NFS;" \
  63. "echo"
  64. #define CONFIG_EXTRA_ENV_SETTINGS \
  65. "netdev=eth0\0" \
  66. "uimage=uImage-pcm030\0" \
  67. "oftree=oftree-pcm030.dtb\0" \
  68. "jffs2=root-pcm030.jffs2\0" \
  69. "uboot=u-boot-pcm030.bin\0" \
  70. "bargs_base=setenv bootargs console=ttyPSC0,$(baudrate)" \
  71. " $(mtdparts) rw\0" \
  72. "bargs_flash=setenv bootargs $(bootargs) root=/dev/mtdblock2" \
  73. " rootfstype=jffs2\0" \
  74. "bargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs" \
  75. " ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)::" \
  76. "$(netdev):off nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \
  77. "bcmd_net=run bargs_base bargs_nfs; tftpboot 0x500000 $(uimage);" \
  78. " tftp 0x400000 $(oftree); bootm 0x500000 - 0x400000\0" \
  79. "bcmd_flash=run bargs_base bargs_flash; bootm 0xff040000 - " \
  80. "0xfff40000\0" \
  81. " cp.b 0x400000 0xff040000 $(filesize)\0" \
  82. "prg_jffs2=tftp 0x400000 $(jffs2); erase 0xff200000 0xffefffff; " \
  83. "cp.b 0x400000 0xff200000 $(filesize)\0" \
  84. "prg_oftree=tftp 0x400000 $(oftree); erase 0xfff40000 0xfff5ffff;" \
  85. " cp.b 0x400000 0xfff40000 $(filesize)\0" \
  86. "update=tftpboot 0x400000 $(uboot);erase 0xFFF00000 0xfff3ffff;" \
  87. " cp.b 0x400000 0xFFF00000 $(filesize)\0" \
  88. "unlock=yes\0" \
  89. ""
  90. #define CONFIG_BOOTCOMMAND "run bcmd_flash"
  91. /*--------------------------------------------------------------------------
  92. IPB Bus clocking configuration.
  93. ---------------------------------------------------------------------------*/
  94. #define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */
  95. /*-------------------------------------------------------------------------
  96. * PCI Mapping:
  97. * 0x40000000 - 0x4fffffff - PCI Memory
  98. * 0x50000000 - 0x50ffffff - PCI IO Space
  99. * -----------------------------------------------------------------------*/
  100. #define CONFIG_PCI_SCAN_SHOW 1
  101. #define CONFIG_PCI_MEM_BUS 0x40000000
  102. #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS
  103. #define CONFIG_PCI_MEM_SIZE 0x10000000
  104. #define CONFIG_PCI_IO_BUS 0x50000000
  105. #define CONFIG_PCI_IO_PHYS CONFIG_PCI_IO_BUS
  106. #define CONFIG_PCI_IO_SIZE 0x01000000
  107. #define CONFIG_SYS_XLB_PIPELINING 1
  108. /*---------------------------------------------------------------------------
  109. I2C configuration
  110. ---------------------------------------------------------------------------*/
  111. #define CONFIG_HARD_I2C 1 /* I2C with hardware support */
  112. #define CONFIG_SYS_I2C_MODULE 2 /* Select I2C module #1 or #2 */
  113. #define CONFIG_SYS_I2C_SPEED 100000 /* 100 kHz */
  114. #define CONFIG_SYS_I2C_SLAVE 0x7F
  115. /*---------------------------------------------------------------------------
  116. EEPROM CAT24WC32 configuration
  117. ---------------------------------------------------------------------------*/
  118. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 /* 1010100x */
  119. #define CONFIG_SYS_I2C_FACT_ADDR 0x52 /* EEPROM CAT24WC32 */
  120. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */
  121. #define CONFIG_SYS_EEPROM_SIZE 2048
  122. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  123. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 15
  124. /*---------------------------------------------------------------------------
  125. RTC configuration
  126. ---------------------------------------------------------------------------*/
  127. #define RTC
  128. #define CONFIG_RTC_PCF8563 1
  129. #define CONFIG_SYS_I2C_RTC_ADDR 0x51
  130. /*---------------------------------------------------------------------------
  131. Flash configuration
  132. ---------------------------------------------------------------------------*/
  133. #define CONFIG_SYS_FLASH_BASE 0xff000000
  134. #define CONFIG_SYS_FLASH_SIZE 0x01000000
  135. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
  136. #define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */
  137. #define CONFIG_FLASH_CFI_DRIVER 1 /* Use the common driver */
  138. #define CONFIG_SYS_FLASH_EMPTY_INFO
  139. #define CONFIG_SYS_MAX_FLASH_SECT 260 /* max num of sects on one chip */
  140. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
  141. /* (= chip selects) */
  142. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
  143. /*
  144. * Use also hardware protection. This seems required, as the BDI uses
  145. * hardware protection. Without this, U-Boot can't work with this sectors,
  146. * as its protection is software only by default
  147. */
  148. #define CONFIG_SYS_FLASH_PROTECTION 1
  149. /*---------------------------------------------------------------------------
  150. Environment settings
  151. ---------------------------------------------------------------------------*/
  152. /* pcm030 ships with environment is EEPROM by default */
  153. #define CONFIG_ENV_IS_IN_EEPROM 1
  154. #define CONFIG_ENV_OFFSET 0x00 /* environment starts at the */
  155. /*beginning of the EEPROM */
  156. #define CONFIG_ENV_SIZE CONFIG_SYS_EEPROM_SIZE
  157. #define CONFIG_ENV_OVERWRITE 1
  158. /*-----------------------------------------------------------------------------
  159. Memory map
  160. -----------------------------------------------------------------------------*/
  161. #define CONFIG_SYS_MBAR 0xF0000000 /* MBAR has to be switched by other */
  162. /* bootloader or debugger config */
  163. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  164. #define CONFIG_SYS_DEFAULT_MBAR 0x80000000
  165. /* Use SRAM until RAM will be available */
  166. #define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM
  167. #define CONFIG_SYS_INIT_RAM_SIZE MPC5XXX_SRAM_SIZE /* Size of used */
  168. /* area in DPRAM */
  169. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
  170. GENERATED_GBL_DATA_SIZE)
  171. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  172. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  173. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  174. # define CONFIG_SYS_RAMBOOT 1
  175. #endif
  176. #define CONFIG_SYS_MONITOR_LEN (192 << 10) /* Reserve 192 kB for Monitor */
  177. #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  178. #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  179. /*-----------------------------------------------------------------------------
  180. Ethernet configuration
  181. -----------------------------------------------------------------------------*/
  182. #define CONFIG_MPC5xxx_FEC 1
  183. #define CONFIG_MPC5xxx_FEC_MII100
  184. #define CONFIG_PHY_ADDR 0x01
  185. /*---------------------------------------------------------------------------
  186. GPIO configuration
  187. ---------------------------------------------------------------------------*/
  188. /* GPIO port configuration
  189. *
  190. * Pin mapping:
  191. *
  192. * [29:31] = 01x
  193. * PSC1_0 -> AC97 SDATA out
  194. * PSC1_1 -> AC97 SDTA in
  195. * PSC1_2 -> AC97 SYNC out
  196. * PSC1_3 -> AC97 bitclock out
  197. * PSC1_4 -> AC97 reset out
  198. *
  199. * [25:27] = 001
  200. * PSC2_0 -> CAN 1 Tx out
  201. * PSC2_1 -> CAN 1 Rx in
  202. * PSC2_2 -> CAN 2 Tx out
  203. * PSC2_3 -> CAN 2 Rx in
  204. * PSC2_4 -> GPIO (claimed for ATA reset, active low)
  205. *
  206. *
  207. * [20:23] = 1100
  208. * PSC3_0 -> UART Tx out
  209. * PSC3_1 -> UART Rx in
  210. * PSC3_2 -> UART RTS (in/out FIXME)
  211. * PSC3_3 -> UART CTS (in/out FIXME)
  212. * PSC3_4 -> LocalPlus Bus CS6 \
  213. * PSC3_5 -> LocalPlus Bus CS7 / --> see [4] and [5]
  214. * PSC3_6 -> dedicated SPI MOSI out (master case)
  215. * PSC3_7 -> dedicated SPI MISO in (master case)
  216. * PSC3_8 -> dedicated SPI SS out (master case)
  217. * PSC3_9 -> dedicated SPI CLK out (master case)
  218. *
  219. * [18:19] = 01
  220. * USB_0 -> USB OE out
  221. * USB_1 -> USB Tx- out
  222. * USB_2 -> USB Tx+ out
  223. * USB_3 -> USB RxD (in/out FIXME)
  224. * USB_4 -> USB Rx+ in
  225. * USB_5 -> USB Rx- in
  226. * USB_6 -> USB PortPower out
  227. * USB_7 -> USB speed out
  228. * USB_8 -> USB suspend (in/out FIXME)
  229. * USB_9 -> USB overcurrent in
  230. *
  231. * [17] = 0
  232. * USB differential mode
  233. *
  234. * [16] = 0
  235. * PCI enabled
  236. *
  237. * [12:15] = 0101
  238. * ETH_0 -> ETH Txen
  239. * ETH_1 -> ETH TxD0
  240. * ETH_2 -> ETH TxD1
  241. * ETH_3 -> ETH TxD2
  242. * ETH_4 -> ETH TxD3
  243. * ETH_5 -> ETH Txerr
  244. * ETH_6 -> ETH MDC
  245. * ETH_7 -> ETH MDIO
  246. * ETH_8 -> ETH RxDv
  247. * ETH_9 -> ETH RxCLK
  248. * ETH_10 -> ETH Collision
  249. * ETH_11 -> ETH TxD
  250. * ETH_12 -> ETH RxD0
  251. * ETH_13 -> ETH RxD1
  252. * ETH_14 -> ETH RxD2
  253. * ETH_15 -> ETH RxD3
  254. * ETH_16 -> ETH Rxerr
  255. * ETH_17 -> ETH CRS
  256. *
  257. * [9:11] = 101
  258. * PSC6_0 -> UART RxD in
  259. * PSC6_1 -> UART CTS (in/out FIXME)
  260. * PSC6_2 -> UART TxD out
  261. * PSC6_3 -> UART RTS (in/out FIXME)
  262. *
  263. * [2:3/6:7] = 00/11
  264. * TMR_0 -> ATA_CS0 out
  265. * TMR_1 -> ATA_CS1 out
  266. * TMR_2 -> GPIO
  267. * TMR_3 -> GPIO
  268. * TMR_4 -> GPIO
  269. * TMR_5 -> GPIO
  270. * TMR_6 -> GPIO
  271. * TMR_7 -> GPIO
  272. * I2C_0 -> I2C 1 Clock out
  273. * I2C_1 -> I2C 1 IO in/out
  274. * I2C_2 -> I2C 2 Clock out
  275. * I2C_3 -> I2C 2 IO in/out
  276. *
  277. * [4] = 1
  278. * PSC3_5 is used as CS7
  279. *
  280. * [5] = 1
  281. * PSC3_4 is used as CS6
  282. *
  283. * [1] = 0
  284. * gpio_wkup_7 is GPIO
  285. *
  286. * [0] = 0
  287. * gpio_wkup_6 is GPIO
  288. *
  289. */
  290. #define CONFIG_SYS_GPS_PORT_CONFIG 0x0f551c12
  291. /*-----------------------------------------------------------------------------
  292. Miscellaneous configurable options
  293. -------------------------------------------------------------------------------*/
  294. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  295. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  296. #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC5xxx CPUs */
  297. #if defined(CONFIG_CMD_KGDB)
  298. #define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  299. #endif
  300. #if defined(CONFIG_CMD_KGDB)
  301. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  302. #else
  303. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  304. #endif
  305. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  306. /* Print Buffer Size */
  307. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  308. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  309. #define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */
  310. #define CONFIG_SYS_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */
  311. #define CONFIG_SYS_LOAD_ADDR 0x400000 /* default load address */
  312. /*-----------------------------------------------------------------------------
  313. Various low-level settings
  314. -----------------------------------------------------------------------------*/
  315. #define CONFIG_SYS_HID0_INIT HID0_ICE | HID0_ICFI
  316. #define CONFIG_SYS_HID0_FINAL HID0_ICE
  317. /* no burst access on the LPB */
  318. #define CONFIG_SYS_CS_BURST 0x00000000
  319. /* one deadcycle for the 33MHz statemachine */
  320. #define CONFIG_SYS_CS_DEADCYCLE 0x33333331
  321. /* one additional waitstate for the 33MHz statemachine */
  322. #define CONFIG_SYS_BOOTCS_CFG 0x0001dd00
  323. #define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE
  324. #define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
  325. #define CONFIG_SYS_RESET_ADDRESS 0xff000000
  326. /*-----------------------------------------------------------------------
  327. * USB stuff
  328. *-----------------------------------------------------------------------
  329. */
  330. #define CONFIG_USB_CLOCK 0x0001BBBB
  331. #define CONFIG_USB_CONFIG 0x00001000
  332. /*---------------------------------------------------------------------------
  333. IDE/ATA stuff Supports IDE harddisk
  334. ----------------------------------------------------------------------------*/
  335. #undef CONFIG_IDE_8xx_PCCARD /* Use IDE with PC Card Adapter */
  336. #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
  337. #undef CONFIG_IDE_LED /* LED for ide not supported */
  338. #define CONFIG_SYS_ATA_CS_ON_TIMER01
  339. #define CONFIG_IDE_RESET 1 /* reset for ide supported */
  340. #define CONFIG_IDE_PREINIT
  341. #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */
  342. #define CONFIG_SYS_IDE_MAXDEVICE 2 /* max. 2 drives per IDE bus */
  343. #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
  344. #define CONFIG_SYS_ATA_BASE_ADDR MPC5XXX_ATA
  345. /* Offset for data I/O */
  346. #define CONFIG_SYS_ATA_DATA_OFFSET (0x0060)
  347. /* Offset for normal register accesses */
  348. #define CONFIG_SYS_ATA_REG_OFFSET (CONFIG_SYS_ATA_DATA_OFFSET)
  349. /* Offset for alternate registers */
  350. #define CONFIG_SYS_ATA_ALT_OFFSET (0x005C)
  351. /* Interval between registers */
  352. #define CONFIG_SYS_ATA_STRIDE 4
  353. #define CONFIG_ATAPI 1
  354. /* we enable IDE and FAT support, so we also need partition support */
  355. #define CONFIG_DOS_PARTITION 1
  356. /* USB */
  357. #define CONFIG_USB_OHCI
  358. /* pass open firmware flat tree */
  359. #define OF_CPU "PowerPC,5200@0"
  360. #define OF_TBCLK CONFIG_SYS_MPC5XXX_CLKIN
  361. #define OF_SOC "soc5200@f0000000"
  362. #define OF_STDOUT_PATH "/soc5200@f0000000/serial@2400"
  363. #endif /* __CONFIG_H */