pcm030.h 15 KB

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