xm250.h 10 KB

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