xm250.h 9.7 KB

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