xm250.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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. * If we are developing, we might want to start armboot from ram
  31. * so we MUST NOT initialize critical regs like mem-timing ...
  32. */
  33. #define CONFIG_INIT_CRITICAL /* undef for developing */
  34. /*
  35. * High Level Configuration Options
  36. * (easy to change)
  37. */
  38. #define CONFIG_PXA250 1 /* This is an PXA250 CPU */
  39. #define CONFIG_XM250 1 /* on a MicroSys XM250 Board */
  40. #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
  41. /*
  42. * Size of malloc() pool; this lives below the uppermost 128 KiB which are
  43. * used for the RAM copy of the uboot code
  44. *
  45. */
  46. #define CFG_MALLOC_LEN (256*1024)
  47. #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
  48. /*
  49. * Hardware drivers
  50. */
  51. #define CONFIG_DRIVER_SMC91111
  52. #define CONFIG_SMC91111_BASE 0x04000300
  53. #undef CONFIG_SMC91111_EXT_PHY
  54. #define CONFIG_SMC_USE_32_BIT
  55. #undef CONFIG_SHOW_ACTIVITY
  56. #define CONFIG_NET_RETRY_COUNT 10 /* # of retries */
  57. /*
  58. * I2C bus
  59. */
  60. #define CONFIG_HARD_I2C 1
  61. #define CFG_I2C_SPEED 50000
  62. #define CFG_I2C_SLAVE 0xfe
  63. #define CONFIG_RTC_PCF8563 1
  64. #define CFG_I2C_RTC_ADDR 0x51
  65. #define CFG_I2C_EEPROM_ADDR 0x58 /* A0 = 0 (hardwired) */
  66. #define CFG_EEPROM_PAGE_WRITE_BITS 4 /* 4 bits = 16 octets */
  67. #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10 /* between stop and start */
  68. #define CFG_I2C_EEPROM_ADDR_LEN 1 /* length of address */
  69. #define CFG_EEPROM_SIZE 2048 /* size in bytes */
  70. #undef CFG_I2C_INIT_BOARD /* board has no own init */
  71. /*
  72. * select serial console configuration
  73. */
  74. #define CONFIG_FFUART 1 /* we use FFUART */
  75. /* allow to overwrite serial and ethaddr */
  76. #define CONFIG_ENV_OVERWRITE
  77. #define CONFIG_BAUDRATE 115200
  78. #define CONFIG_COMMANDS (CONFIG_CMD_DFL | \
  79. CFG_CMD_ELF | \
  80. CFG_CMD_EEPROM | \
  81. CFG_CMD_DATE | \
  82. CFG_CMD_I2C )
  83. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  84. #include <cmd_confdefs.h>
  85. #define CONFIG_BOOTDELAY 3
  86. /*
  87. * Miscellaneous configurable options
  88. */
  89. #define CFG_LONGHELP /* undef to save memory */
  90. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  91. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  92. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  93. #define CFG_MAXARGS 16 /* max number of command args */
  94. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  95. #define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
  96. #define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
  97. #undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
  98. #define CFG_LOAD_ADDR 0xa3000000 /* default load address */
  99. #define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
  100. #define CFG_CPUSPEED 0x161 /* set core clock to 400/400/100 MHz */
  101. /* valid baudrates */
  102. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  103. /*
  104. * Definitions related to passing arguments to kernel.
  105. */
  106. #define CONFIG_CMDLINE_TAG 1 /* send commandline to Kernel */
  107. #define CONFIG_SETUP_MEMORY_TAGS 1 /* send memory definition to kernel */
  108. #undef CONFIG_INITRD_TAG /* do not send initrd params */
  109. #undef CONFIG_VFD /* do not send framebuffer setup */
  110. /*
  111. * Stack sizes
  112. *
  113. * The stack sizes are set up in start.S using the settings below
  114. */
  115. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  116. #ifdef CONFIG_USE_IRQ
  117. #define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  118. #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  119. #endif
  120. /*
  121. * Physical Memory Map
  122. */
  123. #define CONFIG_NR_DRAM_BANKS 4
  124. #define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
  125. #define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
  126. #define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */
  127. #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */
  128. #define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */
  129. #define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */
  130. #define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */
  131. #define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */
  132. #define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
  133. #define PHYS_FLASH_2 0x04000000 /* Flash Bank #1 */
  134. #define PHYS_FLASH_SIZE 0x01000000 /* 16 MB */
  135. #define PHYS_FLASH_BANK_SIZE 0x01000000 /* 16 MB Banks */
  136. #define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */
  137. #define CFG_DRAM_BASE 0xa0000000
  138. #define CFG_DRAM_SIZE 0x04000000
  139. #define CFG_FLASH_BASE PHYS_FLASH_1
  140. /*
  141. * FLASH and environment organization
  142. */
  143. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  144. #define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
  145. /* timeout values are in ticks */
  146. #define CFG_FLASH_ERASE_TOUT (2*CFG_HZ) /* Timeout for Flash Erase */
  147. #define CFG_FLASH_WRITE_TOUT (2*CFG_HZ) /* Timeout for Flash Write */
  148. #define CFG_FLASH_LOCK_TOUT (2*CFG_HZ) /* Timeout for Flash Set Lock Bit */
  149. #define CFG_FLASH_UNLOCK_TOUT (2*CFG_HZ) /* Timeout for Flash Clear Lock Bits */
  150. #define CFG_FLASH_PROTECTION /* "Real" (hardware) sectors protection */
  151. #define CFG_ENV_IS_IN_FLASH 1
  152. #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x40000) /* Addr of Environment Sector */
  153. #define CFG_ENV_SIZE 0x4000
  154. #define CFG_ENV_SECT_SIZE 0x40000 /* Size of the Environment Sector */
  155. #define CFG_MONITOR_LEN 0x20000 /* 128 KiB */
  156. /******************************************************************************
  157. *
  158. * CPU specific defines
  159. *
  160. ******************************************************************************/
  161. /*
  162. * GPIO settings
  163. *
  164. * GPIO pin assignments
  165. * GPIO Name Dir Out AF
  166. * 0 NC
  167. * 1 NC
  168. * 2 SIRQ1 I
  169. * 3 SIRQ2 I
  170. * 4 SIRQ3 I
  171. * 5 DMAACK1 O 0
  172. * 6 DMAACK2 O 0
  173. * 7 DMAACK3 O 0
  174. * 8 TC1 O 0
  175. * 9 TC2 O 0
  176. * 10 TC3 O 0
  177. * 11 nDMAEN O 1
  178. * 12 AENCTRL O 0
  179. * 13 PLDTC O 0
  180. * 14 ETHIRQ I
  181. * 15 NC
  182. * 16 NC
  183. * 17 NC
  184. * 18 RDY I
  185. * 19 DMASIO I
  186. * 20 ETHIRQ NC
  187. * 21 NC
  188. * 22 PGMEN O 1 FIXME for debug only enable flash
  189. * 23 NC
  190. * 24 NC
  191. * 25 NC
  192. * 26 NC
  193. * 27 NC
  194. * 28 NC
  195. * 29 NC
  196. * 30 NC
  197. * 31 NC
  198. * 32 NC
  199. * 33 NC
  200. * 34 FFRXD I 01
  201. * 35 FFCTS I 01
  202. * 36 FFDCD I 01
  203. * 37 FFDSR I 01
  204. * 38 FFRI I 01
  205. * 39 FFTXD O 1 10
  206. * 40 FFDTR O 0 10
  207. * 41 FFRTS O 0 10
  208. * 42 RS232FOFF O 0 00
  209. * 43 NC
  210. * 44 NC
  211. * 45 IRSL0 O 0
  212. * 46 IRRX0 I 01
  213. * 47 IRTX0 O 0 10
  214. * 48 NC
  215. * 49 nIOWE O 0
  216. * 50 NC
  217. * 51 NC
  218. * 52 NC
  219. * 53 NC
  220. * 54 NC
  221. * 55 NC
  222. * 56 NC
  223. * 57 NC
  224. * 58 DKDIRQ I
  225. * 59 NC
  226. * 60 NC
  227. * 61 NC
  228. * 62 NC
  229. * 63 NC
  230. * 64 COMLED O 0
  231. * 65 COMLED O 0
  232. * 66 COMLED O 0
  233. * 67 COMLED O 0
  234. * 68 COMLED O 0
  235. * 69 COMLED O 0
  236. * 70 COMLED O 0
  237. * 71 COMLED O 0
  238. * 72 NC
  239. * 73 NC
  240. * 74 NC
  241. * 75 NC
  242. * 76 NC
  243. * 77 NC
  244. * 78 CSIO O 1
  245. * 79 NC
  246. * 80 CSETH O 1
  247. *
  248. * NOTE: All NC's are defined to be outputs
  249. *
  250. */
  251. /* Pin direction control */
  252. #define CFG_GPDR0_VAL 0xd3808000
  253. #define CFG_GPDR1_VAL 0xfcffab83
  254. #define CFG_GPDR2_VAL 0x0001ffff
  255. /* Set and Clear registers */
  256. #define CFG_GPSR0_VAL 0x00008000
  257. #define CFG_GPSR1_VAL 0x00ff0002
  258. #define CFG_GPSR2_VAL 0x0001c000
  259. #define CFG_GPCR0_VAL 0x00000000
  260. #define CFG_GPCR1_VAL 0x00000000
  261. #define CFG_GPCR2_VAL 0x00000000
  262. /* Edge detect registers (these are set by the kernel) */
  263. #define CFG_GRER0_VAL 0x00002180
  264. #define CFG_GRER1_VAL 0x00000000
  265. #define CFG_GRER2_VAL 0x00000000
  266. #define CFG_GFER0_VAL 0x000043e0
  267. #define CFG_GFER1_VAL 0x00000000
  268. #define CFG_GFER2_VAL 0x00000000
  269. /* Alternate function registers */
  270. #define CFG_GAFR0_L_VAL 0x80000004
  271. #define CFG_GAFR0_U_VAL 0x595a8010
  272. #define CFG_GAFR1_L_VAL 0x699a9559
  273. #define CFG_GAFR1_U_VAL 0xaaa5aaaa
  274. #define CFG_GAFR2_L_VAL 0xaaaaaaaa
  275. #define CFG_GAFR2_U_VAL 0x00000002
  276. /*
  277. * Clocks, power control and interrupts
  278. */
  279. #define CFG_PSSR_VAL 0x00000030
  280. #define CFG_CCCR_VAL 0x00000161 /* 100 MHz memory, 400 MHz CPU, 400 Turbo */
  281. #define CFG_CKEN_VAL 0x000141ec /* FFUART and STUART enabled */
  282. #define CFG_ICMR_VAL 0x00000000 /* No interrupts enabled */
  283. /* FIXME
  284. *
  285. * RTC settings
  286. * Watchdog
  287. *
  288. */
  289. /*
  290. * Memory settings
  291. *
  292. */
  293. #define CFG_MSC0_VAL 0x122423f0 /* FLASH / LAN (cs0)/(cS1) */
  294. #define CFG_MSC1_VAL 0x35f4aa4c /* USB / ST3+ST5 (cs2)/(cS3) */
  295. #define CFG_MSC2_VAL 0x35f435fc /* IDE / BCR + WatchDog (cs4)/(cS5) */
  296. #define CFG_MDCNFG_VAL 0x000009c9
  297. #define CFG_MDMRS_VAL 0x00220022
  298. #define CFG_MDREFR_VAL 0x000da018 /* Initial setting, individual bits set in memsetup.S */
  299. /*
  300. * PCMCIA and CF Interfaces (NOT USED, these values from lubbock init)
  301. */
  302. #define CFG_MECR_VAL 0x00000000
  303. #define CFG_MCMEM0_VAL 0x00010504
  304. #define CFG_MCMEM1_VAL 0x00010504
  305. #define CFG_MCATT0_VAL 0x00010504
  306. #define CFG_MCATT1_VAL 0x00010504
  307. #define CFG_MCIO0_VAL 0x00004715
  308. #define CFG_MCIO1_VAL 0x00004715
  309. /* Board specific defines */
  310. #ifndef __ASSEMBLY__
  311. /* global prototypes */
  312. void led_code(int code, int color);
  313. #endif
  314. #endif /* __CONFIG_H */