omap3_mvblx.h 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. /*
  2. * MATRIX VISION GmbH mvBlueLYNX-X
  3. *
  4. * Derived from omap3_beagle.h:
  5. * (C) Copyright 2006-2008
  6. * Texas Instruments.
  7. * Richard Woodruff <r-woodruff2@ti.com>
  8. * Syed Mohammed Khasim <x0khasim@ti.com>
  9. *
  10. * Configuration settings for the TI OMAP3530 Beagle board.
  11. *
  12. * See file CREDITS for list of people who contributed to this
  13. * project.
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License as
  17. * published by the Free Software Foundation; either version 2 of
  18. * the License, or (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  28. * MA 02111-1307 USA
  29. */
  30. #ifndef __CONFIG_H
  31. #define __CONFIG_H
  32. /*
  33. * High Level Configuration Options
  34. */
  35. #define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
  36. #define CONFIG_OMAP 1 /* in a TI OMAP core */
  37. #define CONFIG_OMAP34XX 1 /* which is a 34XX */
  38. #define CONFIG_MVBLX 1 /* working with mvBlueLYNX-X */
  39. #define CONFIG_MACH_TYPE MACH_TYPE_MVBLX
  40. #define CONFIG_SDRC /* The chip has SDRC controller */
  41. #include <asm/arch/cpu.h> /* get chip and board defs */
  42. #include <asm/arch/omap3.h>
  43. /*
  44. * Display CPU and Board information
  45. */
  46. #define CONFIG_DISPLAY_CPUINFO 1
  47. #define CONFIG_DISPLAY_BOARDINFO 1
  48. /* Clock Defines */
  49. #define V_OSCK 26000000 /* Clock output from T2 */
  50. #define V_SCLK (V_OSCK >> 1)
  51. #undef CONFIG_USE_IRQ /* no support for IRQs */
  52. #define CONFIG_MISC_INIT_R
  53. #define CONFIG_OF_LIBFDT 1
  54. #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
  55. #define CONFIG_SETUP_MEMORY_TAGS 1
  56. #define CONFIG_INITRD_TAG 1
  57. #define CONFIG_REVISION_TAG 1
  58. #define CONFIG_SERIAL_TAG 1
  59. /*
  60. * Size of malloc() pool
  61. */
  62. #define CONFIG_ENV_SIZE (2 << 10) /* 2 KiB */
  63. /* Sector */
  64. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
  65. /*
  66. * Hardware drivers
  67. */
  68. /*
  69. * NS16550 Configuration
  70. */
  71. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  72. #define CONFIG_SYS_NS16550
  73. #define CONFIG_SYS_NS16550_SERIAL
  74. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  75. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  76. /*
  77. * select serial console configuration
  78. */
  79. #define CONFIG_CONS_INDEX 3
  80. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  81. #define CONFIG_SERIAL3 3 /* UART3 */
  82. #define CONFIG_BAUDRATE 115200
  83. #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
  84. 115200}
  85. #define CONFIG_GENERIC_MMC 1
  86. #define CONFIG_MMC 1
  87. #define CONFIG_OMAP_HSMMC 1
  88. #define CONFIG_DOS_PARTITION 1
  89. /* USB */
  90. #define CONFIG_MUSB_UDC 1
  91. #define CONFIG_USB_OMAP3 1
  92. #define CONFIG_TWL4030_USB 1
  93. /* USB device configuration */
  94. #define CONFIG_USB_DEVICE 1
  95. #define CONFIG_USB_TTY 1
  96. #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
  97. #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE 1
  98. #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE 1
  99. #define CONFIG_USBD_VENDORID 0x164c
  100. #define CONFIG_USBD_PRODUCTID_GSERIAL 0x0201
  101. #define CONFIG_USBD_PRODUCTID_CDCACM 0x0201
  102. #define CONFIG_USBD_MANUFACTURER "MATRIX VISION GmbH"
  103. #define CONFIG_USBD_PRODUCT_NAME "mvBlueLYNX-X"
  104. /* no FLASH available */
  105. #define CONFIG_SYS_NO_FLASH
  106. /* commands to include */
  107. #include <config_cmd_default.h>
  108. #define CONFIG_CMD_CACHE
  109. #define CONFIG_CMD_EXT2 /* EXT2 Support */
  110. #define CONFIG_CMD_FAT /* FAT support */
  111. #define CONFIG_CMD_I2C /* I2C serial bus support */
  112. #define CONFIG_CMD_MMC /* MMC support */
  113. #define CONFIG_CMD_EEPROM
  114. #define CONFIG_CMD_IMI /* iminfo */
  115. #undef CONFIG_CMD_IMLS /* List all found images */
  116. #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
  117. #define CONFIG_CMD_NFS /* NFS support */
  118. #define CONFIG_CMD_DHCP
  119. #define CONFIG_CMD_PING
  120. #define CONFIG_CMD_FPGA
  121. #define CONFIG_HARD_I2C 1
  122. #define CONFIG_SYS_I2C_SPEED 100000
  123. #define CONFIG_SYS_I2C_SLAVE 0
  124. #define CONFIG_SYS_I2C_BUS 0 /* This isn't used anywhere ?? */
  125. #define CONFIG_SYS_I2C_BUS_SELECT 1 /* This isn't used anywhere ?? */
  126. #define CONFIG_DRIVER_OMAP34XX_I2C 1
  127. #define CONFIG_I2C_MULTI_BUS 1
  128. /*
  129. * TWL4030
  130. */
  131. #define CONFIG_TWL4030_POWER 1
  132. /* Environment information */
  133. #undef CONFIG_ENV_OVERWRITE /* disallow overwriting serial# and ethaddr */
  134. #define CONFIG_BOOTDELAY 3
  135. #define CONFIG_EXTRA_ENV_SETTINGS \
  136. "loadaddr=0x82000000\0" \
  137. "usbtty=cdc_acm\0" \
  138. "console=ttyO2,115200n8\0" \
  139. "mpurate=600\0" \
  140. "vram=12M\0" \
  141. "dvimode=1024x768-24@60\0" \
  142. "defaultdisplay=dvi\0" \
  143. "fpgafilename=mvbluelynx_x.rbf\0" \
  144. "loadfpga=if fatload mmc ${mmcdev} ${loadaddr} ${fpgafilename}; then " \
  145. "fpga load 0 ${loadaddr} ${filesize}; " \
  146. "fi;\0" \
  147. "mmcdev=0\0" \
  148. "mmcroot=/dev/mmcblk0p2 rw\0" \
  149. "mmcrootfstype=ext3 rootwait\0" \
  150. "mmcargs=setenv bootargs console=${console} " \
  151. "mpurate=${mpurate} " \
  152. "vram=${vram} " \
  153. "omapfb.mode=dvi:${dvimode} " \
  154. "omapfb.debug=y " \
  155. "omapdss.def_disp=${defaultdisplay} " \
  156. "root=${mmcroot} " \
  157. "rootfstype=${mmcrootfstype} " \
  158. "${cmdline_suffix}\0" \
  159. "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
  160. "importbootenv=echo Importing environment from mmc ...; " \
  161. "env import -t $loadaddr $filesize\0" \
  162. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  163. "mmcboot=echo Booting from mmc ...; " \
  164. "run mmcargs; " \
  165. "bootm ${loadaddr}\0" \
  166. "mmcbootcmd= " \
  167. "echo Trying mmc${mmcdev}; " \
  168. "mmc dev ${mmcdev}; " \
  169. "if mmc rescan; then " \
  170. "setenv mmcroot /dev/mmcblk${mmcdev}p2 rw; " \
  171. "echo SD/MMC found on device ${mmcdev};" \
  172. "if run loadbootenv; then " \
  173. "echo Loading boot environment from mmc${mmcdev}; " \
  174. "run importbootenv; " \
  175. "fi;" \
  176. "run loadfpga; " \
  177. "if test -n $uenvcmd; then " \
  178. "echo Running uenvcmd ...;" \
  179. "run uenvcmd;" \
  180. "fi;" \
  181. "if run loaduimage; then " \
  182. "run mmcboot; " \
  183. "fi;" \
  184. "fi\0"
  185. #define CONFIG_BOOTCOMMAND \
  186. "setenv mmcdev 1;" \
  187. "run mmcbootcmd || " \
  188. "setenv mmcdev 0;" \
  189. "run mmcbootcmd"
  190. #define CONFIG_AUTO_COMPLETE 1
  191. /*
  192. * Miscellaneous configurable options
  193. */
  194. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  195. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  196. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  197. #define CONFIG_SYS_PROMPT "mvblx # "
  198. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  199. /* Print Buffer Size */
  200. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  201. sizeof(CONFIG_SYS_PROMPT) + 16)
  202. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  203. /* Boot Argument Buffer Size */
  204. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  205. #define CONFIG_SYS_ALT_MEMTEST 1 /* alternative memtest with looping */
  206. #define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest works on */
  207. #define CONFIG_SYS_MEMTEST_END (0x9dffffff) /* end = 448 MB */
  208. #define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */
  209. /* default load address */
  210. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
  211. /*
  212. * OMAP3 has 12 GP timers, they can be driven by the system clock
  213. * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
  214. * This rate is divided by a local divisor.
  215. */
  216. #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
  217. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  218. #define CONFIG_SYS_HZ 1000
  219. /*-----------------------------------------------------------------------
  220. * Stack sizes
  221. *
  222. * The stack sizes are set up in start.S using the settings below
  223. */
  224. #define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
  225. /*-----------------------------------------------------------------------
  226. * Physical Memory Map
  227. */
  228. #define CONFIG_NR_DRAM_BANKS 1
  229. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  230. #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */
  231. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  232. #define CONFIG_ENV_IS_NOWHERE 1
  233. /*----------------------------------------------------------------------------
  234. * Network Subsystem (SMSC9211 Ethernet from SMSC9118 family)
  235. *----------------------------------------------------------------------------
  236. */
  237. #if defined(CONFIG_CMD_NET)
  238. #define CONFIG_NET_MULTI
  239. #define CONFIG_SMC911X 1
  240. #define CONFIG_SMC911X_32_BIT
  241. #define CONFIG_SMC911X_BASE 0x2C000000
  242. #endif /* (CONFIG_CMD_NET) */
  243. #define CONFIG_FPGA_COUNT 1
  244. #define CONFIG_FPGA CONFIG_SYS_ALTERA_CYCLON2
  245. #define CONFIG_FPGA_ALTERA
  246. #define CONFIG_FPGA_CYCLON2
  247. #define CONFIG_SYS_FPGA_PROG_FEEDBACK
  248. #define CONFIG_SYS_FPGA_DONT_USE_CONF_DONE
  249. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* 0xA0>>1 */
  250. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  251. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 2^4 = 16-byte pages */
  252. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
  253. #define CONFIG_SYS_EEPROM_SIZE 256 /* Bytes */
  254. #define CONFIG_ID_EEPROM
  255. #define CONFIG_SYS_EEPROM_BUS_NUM 2
  256. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  257. #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
  258. #define CONFIG_SYS_INIT_RAM_SIZE 0x800
  259. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  260. CONFIG_SYS_INIT_RAM_SIZE - \
  261. GENERATED_GBL_DATA_SIZE)
  262. #define CONFIG_OMAP3_SPI
  263. #define CONFIG_SYS_CACHELINE_SIZE 64
  264. #endif /* __CONFIG_H */