xm250.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. /*
  2. * (C) Copyright 2002
  3. * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
  4. *
  5. * (C) Copyright 2002
  6. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  7. * Marius Groeger <mgroeger@sysgo.de>
  8. *
  9. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  25. * MA 02111-1307 USA
  26. */
  27. #ifndef __CONFIG_H
  28. #define __CONFIG_H
  29. /*
  30. * High Level Configuration Options
  31. * (easy to change)
  32. */
  33. #define CONFIG_PXA250 1 /* This is an PXA250 CPU */
  34. #define CONFIG_XM250 1 /* on a MicroSys XM250 Board */
  35. #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
  36. /* we will never enable dcache, because we have to setup MMU first */
  37. #define CONFIG_SYS_NO_DCACHE
  38. /*
  39. * Size of malloc() pool; this lives below the uppermost 128 KiB which are
  40. * used for the RAM copy of the uboot code
  41. *
  42. */
  43. #define CONFIG_SYS_MALLOC_LEN (256*1024)
  44. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
  45. /*
  46. * Hardware drivers
  47. */
  48. #define CONFIG_DRIVER_SMC91111
  49. #define CONFIG_SMC91111_BASE 0x04000300
  50. #undef CONFIG_SMC91111_EXT_PHY
  51. #define CONFIG_SMC_USE_32_BIT
  52. #undef CONFIG_SHOW_ACTIVITY
  53. #define CONFIG_NET_RETRY_COUNT 10 /* # of retries */
  54. /*
  55. * I2C bus
  56. */
  57. #define CONFIG_HARD_I2C 1
  58. #define CONFIG_SYS_I2C_SPEED 50000
  59. #define CONFIG_SYS_I2C_SLAVE 0xfe
  60. #define CONFIG_RTC_PCF8563 1
  61. #define CONFIG_SYS_I2C_RTC_ADDR 0x51
  62. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x58 /* A0 = 0 (hardwired) */
  63. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 4 bits = 16 octets */
  64. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* between stop and start */
  65. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* length of address */
  66. #define CONFIG_SYS_EEPROM_SIZE 2048 /* size in bytes */
  67. #undef CONFIG_SYS_I2C_INIT_BOARD /* board has no own init */
  68. /*
  69. * select serial console configuration
  70. */
  71. #define CONFIG_FFUART 1 /* we use FFUART */
  72. /* allow to overwrite serial and ethaddr */
  73. #define CONFIG_ENV_OVERWRITE
  74. #define CONFIG_BAUDRATE 115200
  75. /*
  76. * BOOTP options
  77. */
  78. #define CONFIG_BOOTP_BOOTFILESIZE
  79. #define CONFIG_BOOTP_BOOTPATH
  80. #define CONFIG_BOOTP_GATEWAY
  81. #define CONFIG_BOOTP_HOSTNAME
  82. /*
  83. * Command line configuration.
  84. */
  85. #include <config_cmd_default.h>
  86. #define CONFIG_CMD_ELF
  87. #define CONFIG_CMD_EEPROM
  88. #define CONFIG_CMD_DATE
  89. #define CONFIG_CMD_I2C
  90. #define CONFIG_BOOTDELAY 3
  91. /*
  92. * Miscellaneous configurable options
  93. */
  94. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  95. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  96. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  97. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  98. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  99. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  100. #define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */
  101. #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
  102. #define CONFIG_SYS_LOAD_ADDR 0xa3000000 /* default load address */
  103. #define CONFIG_SYS_HZ 1000
  104. #define CONFIG_SYS_CPUSPEED 0x161 /* set core clock to 400/400/100 MHz */
  105. /* valid baudrates */
  106. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  107. /*
  108. * Definitions related to passing arguments to kernel.
  109. */
  110. #define CONFIG_CMDLINE_TAG 1 /* send commandline to Kernel */
  111. #define CONFIG_SETUP_MEMORY_TAGS 1 /* send memory definition to kernel */
  112. #define CONFIG_INITRD_TAG 1 /* do not send initrd params */
  113. #undef CONFIG_VFD /* do not send framebuffer setup */
  114. /*
  115. * Stack sizes
  116. *
  117. * The stack sizes are set up in start.S using the settings below
  118. */
  119. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  120. #ifdef CONFIG_USE_IRQ
  121. #define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  122. #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  123. #endif
  124. /*
  125. * Physical Memory Map
  126. */
  127. #define CONFIG_NR_DRAM_BANKS 4
  128. #define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
  129. #define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
  130. #define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */
  131. #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */
  132. #define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */
  133. #define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */
  134. #define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */
  135. #define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */
  136. #define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
  137. #define PHYS_FLASH_2 0x04000000 /* Flash Bank #1 */
  138. #define PHYS_FLASH_SIZE 0x01000000 /* 16 MB */
  139. #define PHYS_FLASH_BANK_SIZE 0x01000000 /* 16 MB Banks */
  140. #define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */
  141. #define CONFIG_SYS_DRAM_BASE 0xa0000000
  142. #define CONFIG_SYS_DRAM_SIZE 0x04000000
  143. #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
  144. /*
  145. * FLASH and environment organization
  146. */
  147. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  148. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
  149. /* timeout values are in ticks */
  150. #define CONFIG_SYS_FLASH_ERASE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Erase */
  151. #define CONFIG_SYS_FLASH_WRITE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Write */
  152. #define CONFIG_SYS_FLASH_LOCK_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Set Lock Bit */
  153. #define CONFIG_SYS_FLASH_UNLOCK_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Clear Lock Bits */
  154. #define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */
  155. #define CONFIG_ENV_IS_IN_FLASH 1
  156. #define CONFIG_ENV_ADDR (PHYS_FLASH_1 + 0x40000) /* Addr of Environment Sector */
  157. #define CONFIG_ENV_SIZE 0x4000
  158. #define CONFIG_ENV_SECT_SIZE 0x40000 /* Size of the Environment Sector */
  159. #define CONFIG_SYS_MONITOR_LEN 0x20000 /* 128 KiB */
  160. /******************************************************************************
  161. *
  162. * CPU specific defines
  163. *
  164. ******************************************************************************/
  165. /*
  166. * GPIO settings
  167. *
  168. * GPIO pin assignments
  169. * GPIO Name Dir Out AF
  170. * 0 NC
  171. * 1 NC
  172. * 2 SIRQ1 I
  173. * 3 SIRQ2 I
  174. * 4 SIRQ3 I
  175. * 5 DMAACK1 O 0
  176. * 6 DMAACK2 O 0
  177. * 7 DMAACK3 O 0
  178. * 8 TC1 O 0
  179. * 9 TC2 O 0
  180. * 10 TC3 O 0
  181. * 11 nDMAEN O 1
  182. * 12 AENCTRL O 0
  183. * 13 PLDTC O 0
  184. * 14 ETHIRQ I
  185. * 15 NC
  186. * 16 NC
  187. * 17 NC
  188. * 18 RDY I
  189. * 19 DMASIO I
  190. * 20 ETHIRQ NC
  191. * 21 NC
  192. * 22 PGMEN O 1 FIXME for debug only enable flash
  193. * 23 NC
  194. * 24 NC
  195. * 25 NC
  196. * 26 NC
  197. * 27 NC
  198. * 28 NC
  199. * 29 NC
  200. * 30 NC
  201. * 31 NC
  202. * 32 NC
  203. * 33 NC
  204. * 34 FFRXD I 01
  205. * 35 FFCTS I 01
  206. * 36 FFDCD I 01
  207. * 37 FFDSR I 01
  208. * 38 FFRI I 01
  209. * 39 FFTXD O 1 10
  210. * 40 FFDTR O 0 10
  211. * 41 FFRTS O 0 10
  212. * 42 RS232FOFF O 0 00
  213. * 43 NC
  214. * 44 NC
  215. * 45 IRSL0 O 0
  216. * 46 IRRX0 I 01
  217. * 47 IRTX0 O 0 10
  218. * 48 NC
  219. * 49 nIOWE O 0
  220. * 50 NC
  221. * 51 NC
  222. * 52 NC
  223. * 53 NC
  224. * 54 NC
  225. * 55 NC
  226. * 56 NC
  227. * 57 NC
  228. * 58 DKDIRQ I
  229. * 59 NC
  230. * 60 NC
  231. * 61 NC
  232. * 62 NC
  233. * 63 NC
  234. * 64 COMLED O 0
  235. * 65 COMLED O 0
  236. * 66 COMLED O 0
  237. * 67 COMLED O 0
  238. * 68 COMLED O 0
  239. * 69 COMLED O 0
  240. * 70 COMLED O 0
  241. * 71 COMLED O 0
  242. * 72 NC
  243. * 73 NC
  244. * 74 NC
  245. * 75 NC
  246. * 76 NC
  247. * 77 NC
  248. * 78 CSIO O 1
  249. * 79 NC
  250. * 80 CSETH O 1
  251. *
  252. * NOTE: All NC's are defined to be outputs
  253. *
  254. */
  255. /* Pin direction control */
  256. #define CONFIG_SYS_GPDR0_VAL 0xd3808000
  257. #define CONFIG_SYS_GPDR1_VAL 0xfcffab83
  258. #define CONFIG_SYS_GPDR2_VAL 0x0001ffff
  259. /* Set and Clear registers */
  260. #define CONFIG_SYS_GPSR0_VAL 0x00008000
  261. #define CONFIG_SYS_GPSR1_VAL 0x00ff0002
  262. #define CONFIG_SYS_GPSR2_VAL 0x0001c000
  263. #define CONFIG_SYS_GPCR0_VAL 0x00000000
  264. #define CONFIG_SYS_GPCR1_VAL 0x00000000
  265. #define CONFIG_SYS_GPCR2_VAL 0x00000000
  266. /* Edge detect registers (these are set by the kernel) */
  267. #define CONFIG_SYS_GRER0_VAL 0x00002180
  268. #define CONFIG_SYS_GRER1_VAL 0x00000000
  269. #define CONFIG_SYS_GRER2_VAL 0x00000000
  270. #define CONFIG_SYS_GFER0_VAL 0x000043e0
  271. #define CONFIG_SYS_GFER1_VAL 0x00000000
  272. #define CONFIG_SYS_GFER2_VAL 0x00000000
  273. /* Alternate function registers */
  274. #define CONFIG_SYS_GAFR0_L_VAL 0x80000004
  275. #define CONFIG_SYS_GAFR0_U_VAL 0x595a8010
  276. #define CONFIG_SYS_GAFR1_L_VAL 0x699a9559
  277. #define CONFIG_SYS_GAFR1_U_VAL 0xaaa5aaaa
  278. #define CONFIG_SYS_GAFR2_L_VAL 0xaaaaaaaa
  279. #define CONFIG_SYS_GAFR2_U_VAL 0x00000002
  280. /*
  281. * Clocks, power control and interrupts
  282. */
  283. #define CONFIG_SYS_PSSR_VAL 0x00000030
  284. #define CONFIG_SYS_CCCR_VAL 0x00000161 /* 100 MHz memory, 400 MHz CPU, 400 Turbo */
  285. #define CONFIG_SYS_CKEN_VAL 0x000141ec /* FFUART and STUART enabled */
  286. #define CONFIG_SYS_ICMR_VAL 0x00000000 /* No interrupts enabled */
  287. /* FIXME
  288. *
  289. * RTC settings
  290. * Watchdog
  291. *
  292. */
  293. /*
  294. * Memory settings
  295. *
  296. */
  297. #define CONFIG_SYS_MSC0_VAL 0x122423f0 /* FLASH / LAN (cs0)/(cS1) */
  298. #define CONFIG_SYS_MSC1_VAL 0x35f4aa4c /* USB / ST3+ST5 (cs2)/(cS3) */
  299. #define CONFIG_SYS_MSC2_VAL 0x35f435fc /* IDE / BCR + WatchDog (cs4)/(cS5) */
  300. #define CONFIG_SYS_MDCNFG_VAL 0x000009c9
  301. #define CONFIG_SYS_MDMRS_VAL 0x00220022
  302. #define CONFIG_SYS_MDREFR_VAL 0x000da018 /* Initial setting, individual bits set in lowlevel_init.S */
  303. /*
  304. * PCMCIA and CF Interfaces (NOT USED, these values from lubbock init)
  305. */
  306. #define CONFIG_SYS_MECR_VAL 0x00000000
  307. #define CONFIG_SYS_MCMEM0_VAL 0x00010504
  308. #define CONFIG_SYS_MCMEM1_VAL 0x00010504
  309. #define CONFIG_SYS_MCATT0_VAL 0x00010504
  310. #define CONFIG_SYS_MCATT1_VAL 0x00010504
  311. #define CONFIG_SYS_MCIO0_VAL 0x00004715
  312. #define CONFIG_SYS_MCIO1_VAL 0x00004715
  313. /* Board specific defines */
  314. #ifndef __ASSEMBLY__
  315. /* global prototypes */
  316. void led_code(int code, int color);
  317. #endif
  318. #endif /* __CONFIG_H */