jadecpu.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. /*
  2. * (C) Copyright 2010
  3. * Matthias Weisser <weisserm@arcor.de>
  4. *
  5. * Configuation settings for the jadecpu board
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __CONFIG_H
  26. #define __CONFIG_H
  27. #define CONFIG_MB86R0x
  28. #define CONFIG_MB86R0x_IOCLK get_bus_freq(0)
  29. #define CONFIG_SYS_HZ 1000
  30. #define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
  31. #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
  32. /*
  33. * Environment settings
  34. */
  35. #define CONFIG_EXTRA_ENV_SETTINGS \
  36. "gs_fast_boot=setenv bootdelay 5\0" \
  37. "gs_slow_boot=setenv bootdelay 10\0" \
  38. "bootcmd=mw.l 0x40000000 0 1024; usb start;" \
  39. "fatls usb 0; fatload usb 0 0x40000000 jadecpu-init.bin;" \
  40. "bootelf 0x40000000\0" \
  41. ""
  42. #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
  43. #define CONFIG_SETUP_MEMORY_TAGS 1
  44. #define CONFIG_INITRD_TAG 1
  45. #define BOARD_LATE_INIT 1
  46. /*
  47. * Compressions
  48. */
  49. #define CONFIG_LZO
  50. /*
  51. * Hardware drivers
  52. */
  53. /*
  54. * Serial
  55. */
  56. #define CONFIG_SERIAL_MULTI
  57. #define CONFIG_SYS_NS16550
  58. #define CONFIG_SYS_NS16550_SERIAL
  59. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  60. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  61. #define CONFIG_SYS_NS16550_COM1 0xfffe1000 /* UART 0 */
  62. #define CONFIG_SYS_NS16550_COM2 0xfff50000 /* UART 2 */
  63. #define CONFIG_SYS_NS16550_COM3 0xfff51000 /* UART 3 */
  64. #define CONFIG_SYS_NS16550_COM4 0xfff43000 /* UART 4 */
  65. #define CONFIG_CONS_INDEX 4
  66. /*
  67. * Ethernet
  68. */
  69. #define CONFIG_NET_MULTI
  70. #define CONFIG_SMC911X
  71. #define CONFIG_SMC911X_BASE 0x02000000
  72. #define CONFIG_SMC911X_16_BIT
  73. /*
  74. * Video
  75. */
  76. #define CONFIG_VIDEO
  77. #define CONFIG_VIDEO_MB86R0xGDC
  78. #define CONFIG_SYS_WHITE_ON_BLACK
  79. #define CONFIG_CFB_CONSOLE
  80. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  81. #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
  82. #define CONFIG_VIDEO_LOGO
  83. #define CONFIG_SPLASH_SCREEN
  84. #define CONFIG_SPLASH_SCREEN_ALIGN
  85. #define CONFIG_VIDEO_BMP_LOGO
  86. #define CONFIG_VIDEO_BMP_GZIP
  87. #define CONFIG_VIDEO_BMP_RLE8
  88. #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (800*480 + 256*4 + 10*1024)
  89. #define VIDEO_FB_16BPP_WORD_SWAP
  90. #define VIDEO_KBD_INIT_FCT 0
  91. #define VIDEO_TSTC_FCT serial_tstc
  92. #define VIDEO_GETC_FCT serial_getc
  93. /*
  94. * BOOTP options
  95. */
  96. #define CONFIG_BOOTP_BOOTFILESIZE 1
  97. #define CONFIG_BOOTP_BOOTPATH 1
  98. #define CONFIG_BOOTP_GATEWAY 1
  99. #define CONFIG_BOOTP_HOSTNAME 1
  100. /*
  101. * Command line configuration.
  102. */
  103. #include <config_cmd_default.h>
  104. #undef CONFIG_CMD_BDI
  105. #undef CONFIG_CMD_FPGA
  106. #undef CONFIG_CMD_IMLS
  107. #undef CONFIG_CMD_LOADS
  108. #undef CONFIG_CMD_SOURCE
  109. #undef CONFIG_CMD_NFS
  110. #undef CONFIG_CMD_XIMG
  111. #define CONFIG_CMD_BMP 1
  112. #define CONFIG_CMD_CAN 1
  113. #define CONFIG_CMD_DHCP 1
  114. #define CONFIG_CMD_ELF 1
  115. #define CONFIG_CMD_FAT 1
  116. #define CONFIG_CMD_PING 1
  117. #define CONFIG_CMD_USB 1
  118. #define CONFIG_SYS_HUSH_PARSER
  119. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  120. /* USB */
  121. #define CONFIG_USB_OHCI_NEW
  122. #define CONFIG_SYS_USB_OHCI_REGS_BASE 0xFFF81000
  123. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "mb86r0x"
  124. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
  125. #define CONFIG_USB_STORAGE
  126. #define CONFIG_DOS_PARTITION
  127. /* SDRAM */
  128. #define CONFIG_NR_DRAM_BANKS 1
  129. #define PHYS_SDRAM 0x40000000 /* Start address of DDRRAM */
  130. #define PHYS_SDRAM_SIZE 0x08000000 /* 128 megs */
  131. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  132. #define CONFIG_SYS_INIT_SP_ADDR 0x01008000
  133. /*
  134. * FLASH and environment organization
  135. */
  136. #define CONFIG_SYS_FLASH_BASE 0x10000000
  137. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  138. #define CONFIG_SYS_MAX_FLASH_SECT 256
  139. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  140. #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x00040000)
  141. #define CONFIG_ENV_IS_IN_FLASH 1
  142. #define CONFIG_ENV_SECT_SIZE (128 * 1024)
  143. #define CONFIG_ENV_SIZE (128 * 1024)
  144. /*
  145. * CFI FLASH driver setup
  146. */
  147. #define CONFIG_SYS_FLASH_CFI 1
  148. #define CONFIG_FLASH_CFI_DRIVER 1
  149. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* ~10x faster */
  150. #define CONFIG_SYS_LOAD_ADDR 0x40000000 /* load address */
  151. #define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM + (512*1024))
  152. #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM + PHYS_SDRAM_SIZE)
  153. #define CONFIG_BAUDRATE 115200
  154. #define CONFIG_SYS_BAUDRATE_TABLE {115200, 19200, 38400, 57600, 9600 }
  155. #define CONFIG_SYS_PROMPT "jade> "
  156. #define CONFIG_SYS_CBSIZE 256
  157. #define CONFIG_SYS_MAXARGS 16
  158. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  159. sizeof(CONFIG_SYS_PROMPT) + 16)
  160. #define CONFIG_SYS_LONGHELP 1
  161. #define CONFIG_CMDLINE_EDITING 1
  162. #define CONFIG_PREBOOT ""
  163. #define CONFIG_BOOTDELAY 5
  164. #define CONFIG_AUTOBOOT_KEYED
  165. #define CONFIG_AUTOBOOT_PROMPT "boot in %d s\n", bootdelay
  166. #define CONFIG_AUTOBOOT_DELAY_STR "delaygs"
  167. #define CONFIG_AUTOBOOT_STOP_STR "stopgs"
  168. /*
  169. * Size of malloc() pool
  170. */
  171. #define CONFIG_SYS_MALLOC_LEN (0x400000 - 0x8000)
  172. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* 128 bytes for initial data */
  173. #define CONFIG_STACKSIZE (32*1024) /* regular stack */
  174. /*
  175. * Clock reset generator init
  176. */
  177. #define CONFIG_SYS_CRG_CRHA_INIT 0xffff
  178. #define CONFIG_SYS_CRG_CRPA_INIT 0xffff
  179. #define CONFIG_SYS_CRG_CRPB_INIT 0xfffe
  180. #define CONFIG_SYS_CRG_CRHB_INIT 0xffff
  181. #define CONFIG_SYS_CRG_CRAM_INIT 0xffef
  182. /*
  183. * Memory controller settings
  184. */
  185. #define CONFIG_SYS_MEMC_MCFMODE0_INIT 0x00000001 /* 16bit */
  186. #define CONFIG_SYS_MEMC_MCFMODE2_INIT 0x00000001 /* 16bit */
  187. #define CONFIG_SYS_MEMC_MCFMODE4_INIT 0x00000021 /* 16bit, Page*/
  188. #define CONFIG_SYS_MEMC_MCFTIM0_INIT 0x16191008
  189. #define CONFIG_SYS_MEMC_MCFTIM2_INIT 0x03061008
  190. #define CONFIG_SYS_MEMC_MCFTIM4_INIT 0x03061804
  191. #define CONFIG_SYS_MEMC_MCFAREA0_INIT 0x000000c0 /* 0x0c000000 1MB */
  192. #define CONFIG_SYS_MEMC_MCFAREA2_INIT 0x00000020 /* 0x02000000 1MB */
  193. #define CONFIG_SYS_MEMC_MCFAREA4_INIT 0x001f0000 /* 0x10000000 32 MB */
  194. /*
  195. * DDR2 controller init settings
  196. */
  197. #define CONFIG_SYS_DDR2_DRIMS_INIT 0x5555
  198. #define CONFIG_SYS_CCNT_CDCRC_INIT_1 0x00000002
  199. #define CONFIG_SYS_CCNT_CDCRC_INIT_2 0x00000003
  200. #define CONFIG_SYS_DDR2_DRIC1_INIT 0x003f
  201. #define CONFIG_SYS_DDR2_DRIC2_INIT 0x0000
  202. #define CONFIG_SYS_DDR2_DRCA_INIT 0xc124 /* 512Mbit DDR2SDRAM x 2 */
  203. #define CONFIG_SYS_DDR2_DRCM_INIT 0x0032
  204. #define CONFIG_SYS_DDR2_DRCST1_INIT 0x3418
  205. #define CONFIG_SYS_DDR2_DRCST2_INIT 0x6e32
  206. #define CONFIG_SYS_DDR2_DRCR_INIT 0x0141
  207. #define CONFIG_SYS_DDR2_DRCF_INIT 0x0002
  208. #define CONFIG_SYS_DDR2_DRASR_INIT 0x0001
  209. #define CONFIG_SYS_DDR2_DROBS_INIT 0x0001
  210. #define CONFIG_SYS_DDR2_DROABA_INIT 0x0103
  211. #define CONFIG_SYS_DDR2_DRIBSODT1_INIT 0x003F
  212. #define CONFIG_SYS_DDR2_DROS_INIT 0x0001
  213. /*
  214. * DRAM init sequence
  215. */
  216. /* PALL Command */
  217. #define CONFIG_SYS_DDR2_INIT_DRIC1_1 0x0017
  218. #define CONFIG_SYS_DDR2_INIT_DRIC2_1 0x0400
  219. /* EMR(2) command */
  220. #define CONFIG_SYS_DDR2_INIT_DRIC1_2 0x0006
  221. #define CONFIG_SYS_DDR2_INIT_DRIC2_2 0x0000
  222. /* EMR(3) command */
  223. #define CONFIG_SYS_DDR2_INIT_DRIC1_3 0x0007
  224. #define CONFIG_SYS_DDR2_INIT_DRIC2_3 0x0000
  225. /* EMR(1) command */
  226. #define CONFIG_SYS_DDR2_INIT_DRIC1_4 0x0005
  227. #define CONFIG_SYS_DDR2_INIT_DRIC2_4 0x0000
  228. /* MRS command */
  229. #define CONFIG_SYS_DDR2_INIT_DRIC1_5 0x0004
  230. #define CONFIG_SYS_DDR2_INIT_DRIC2_5 0x0532
  231. /* PALL command */
  232. #define CONFIG_SYS_DDR2_INIT_DRIC1_6 0x0017
  233. #define CONFIG_SYS_DDR2_INIT_DRIC2_6 0x0400
  234. /* REF command 1 */
  235. #define CONFIG_SYS_DDR2_INIT_DRIC1_7 0x000f
  236. #define CONFIG_SYS_DDR2_INIT_DRIC2_7 0x0000
  237. /* MRS command */
  238. #define CONFIG_SYS_DDR2_INIT_DRIC1_8 0x0004
  239. #define CONFIG_SYS_DDR2_INIT_DRIC2_8 0x0432
  240. /* EMR(1) command */
  241. #define CONFIG_SYS_DDR2_INIT_DRIC1_9 0x0005
  242. #define CONFIG_SYS_DDR2_INIT_DRIC2_9 0x0380
  243. /* EMR(1) command */
  244. #define CONFIG_SYS_DDR2_INIT_DRIC1_10 0x0005
  245. #define CONFIG_SYS_DDR2_INIT_DRIC2_10 0x0002
  246. #ifdef CONFIG_USE_IRQ
  247. #error CONFIG_USE_IRQ not supported
  248. #endif
  249. #endif /* __CONFIG_H */