omap3_sdp3430.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. /*
  2. * (C) Copyright 2006-2009
  3. * Texas Instruments Incorporated.
  4. * Richard Woodruff <r-woodruff2@ti.com>
  5. * Syed Mohammed Khasim <x0khasim@ti.com>
  6. * Nishanth Menon <nm@ti.com>
  7. *
  8. * Configuration settings for the 3430 TI SDP3430 board.
  9. *
  10. * See file CREDITS for list of people who contributed to this
  11. * project.
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License as
  15. * published by the Free Software Foundation; either version 2 of
  16. * the License, or (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  26. * MA 02111-1307 USA
  27. */
  28. #ifndef __CONFIG_H
  29. #define __CONFIG_H
  30. /* TODO: REMOVE THE FOLLOWING
  31. * Retained the following till size.h is removed in u-boot
  32. */
  33. #include <asm/sizes.h>
  34. /*
  35. * High Level Configuration Options
  36. */
  37. #define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
  38. #define CONFIG_OMAP 1 /* in a TI OMAP core */
  39. #define CONFIG_OMAP34XX 1 /* which is a 34XX */
  40. #define CONFIG_OMAP3430 1 /* which is in a 3430 */
  41. #define CONFIG_OMAP3_3430SDP 1 /* working with SDP Rev2 */
  42. #define CONFIG_SDRC /* The chip has SDRC controller */
  43. #include <asm/arch/cpu.h> /* get chip and board defs */
  44. #include <asm/arch/omap3.h>
  45. /*
  46. * NOTE: these #defines presume standard SDP jumper settings.
  47. * In particular:
  48. * - 26 MHz clock (not 19.2 or 38.4 MHz)
  49. * - Boot from 128MB NOR, not NAND or OneNAND
  50. *
  51. * At this writing, OMAP3 U-Boot support doesn't permit concurrent
  52. * support for all the flash types the board supports.
  53. */
  54. #define CONFIG_DISPLAY_CPUINFO 1
  55. #define CONFIG_DISPLAY_BOARDINFO 1
  56. /* Clock Defines */
  57. #define V_OSCK 26000000 /* Clock output from T2 */
  58. #define V_SCLK (V_OSCK >> 1)
  59. #undef CONFIG_USE_IRQ /* no support for IRQs */
  60. #define CONFIG_MISC_INIT_R
  61. #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
  62. #define CONFIG_SETUP_MEMORY_TAGS 1
  63. #define CONFIG_INITRD_TAG 1
  64. #define CONFIG_REVISION_TAG 1
  65. /*
  66. * Size of malloc() pool
  67. * Total Size Environment - 256k
  68. * Malloc - add 256k
  69. */
  70. #define CONFIG_ENV_SIZE (256 << 10)
  71. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (256 << 10))
  72. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for */
  73. /* initial data */
  74. /*--------------------------------------------------------------------------*/
  75. /*
  76. * Hardware drivers
  77. */
  78. /*
  79. * TWL4030
  80. */
  81. #define CONFIG_TWL4030_POWER 1
  82. /*
  83. * serial port - NS16550 compatible
  84. */
  85. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  86. #define CONFIG_SYS_NS16550
  87. #define CONFIG_SYS_NS16550_SERIAL
  88. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  89. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  90. /* Original SDP u-boot used UART1 and thus J8 (innermost); that can be
  91. * swapped with UART2 via jumpering. Downsides of using J8: it doesn't
  92. * support UART boot (that's only for UART3); it prevents sharing a Linux
  93. * kernel (LL_DEBUG_UART3) or filesystem (getty ttyS2) with most boards.
  94. *
  95. * UART boot uses UART3 on J9, and the SDP user's guide says to use
  96. * that for console. Downsides of using J9: you can't use IRDA too;
  97. * since UART3 isn't in the CORE power domain, it may be a bit less
  98. * usable in certain PM-sensitive debug scenarios.
  99. */
  100. #undef CONSOLE_J9 /* else J8/UART1 (innermost) */
  101. #ifdef CONSOLE_J9
  102. #define CONFIG_CONS_INDEX 3
  103. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  104. #define CONFIG_SERIAL3 3 /* UART3 */
  105. #else
  106. #define CONFIG_CONS_INDEX 1
  107. #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
  108. #define CONFIG_SERIAL1 1 /* UART1 */
  109. #endif
  110. #define CONFIG_ENV_OVERWRITE
  111. #define CONFIG_BAUDRATE 115200
  112. #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
  113. 115200}
  114. /*
  115. * I2C for power management setup
  116. */
  117. #define CONFIG_HARD_I2C 1
  118. #define CONFIG_SYS_I2C_SPEED 100000
  119. #define CONFIG_SYS_I2C_SLAVE 1
  120. #define CONFIG_SYS_I2C_BUS 0
  121. #define CONFIG_SYS_I2C_BUS_SELECT 1
  122. #define CONFIG_DRIVER_OMAP34XX_I2C 1
  123. /* DDR - I use Infineon DDR */
  124. #define CONFIG_OMAP3_INFINEON_DDR 1
  125. /* OMITTED: single 1 Gbit MT29F1G NAND flash */
  126. /*
  127. * NOR boot support - single 1 Gbit PF48F6000M0 Strataflash
  128. */
  129. #define CONFIG_SYS_FLASH_BASE 0x10000000
  130. #define CONFIG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */
  131. #define CONFIG_SYS_FLASH_CFI 1 /* use CFI geometry data */
  132. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* ~10x faster writes */
  133. #define CONFIG_SYS_FLASH_PROTECTION 1 /* hardware sector protection */
  134. #define CONFIG_SYS_FLASH_EMPTY_INFO 1 /* flinfo 'E' for empty */
  135. #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE}
  136. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */
  137. #define CONFIG_SYS_FLASH_CFI_WIDTH 2
  138. #define PHYS_FLASH_SIZE (128 << 20)
  139. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max sectors on one chip */
  140. /* timeout values are in milliseconds */
  141. #define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)
  142. #define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ)
  143. /* OMITTED: single 2 Gbit KFM2G16 OneNAND flash */
  144. #define CONFIG_ENV_IS_IN_FLASH 1
  145. #define CONFIG_SYS_ENV_SECT_SIZE (256 << 10)
  146. #define CONFIG_ENV_OFFSET CONFIG_SYS_ENV_SECT_SIZE
  147. #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_ENV_SECT_SIZE)
  148. /*--------------------------------------------------------------------------*/
  149. /* commands to include */
  150. #include <config_cmd_default.h>
  151. /* Enabled commands */
  152. #define CONFIG_CMD_DHCP /* DHCP Support */
  153. #define CONFIG_CMD_EXT2 /* EXT2 Support */
  154. #define CONFIG_CMD_FAT /* FAT support */
  155. #define CONFIG_CMD_I2C /* I2C serial bus support */
  156. #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
  157. #define CONFIG_CMD_MMC /* MMC support */
  158. #define CONFIG_CMD_NET
  159. /* Disabled commands */
  160. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  161. #undef CONFIG_CMD_IMLS /* List all found images */
  162. /*--------------------------------------------------------------------------*/
  163. /*
  164. * MMC boot support
  165. */
  166. #if defined(CONFIG_CMD_MMC)
  167. #define CONFIG_MMC 1
  168. #define CONFIG_OMAP3_MMC 1
  169. #define CONFIG_DOS_PARTITION 1
  170. #endif
  171. /*----------------------------------------------------------------------------
  172. * SMSC9115 Ethernet from SMSC9118 family
  173. *----------------------------------------------------------------------------
  174. */
  175. #if defined(CONFIG_CMD_NET)
  176. #define CONFIG_NET_MULTI
  177. #define CONFIG_LAN91C96
  178. #define CONFIG_LAN91C96_BASE DEBUG_BASE
  179. #define CONFIG_LAN91C96_EXT_PHY
  180. #define CONFIG_BOOTP_SEND_HOSTNAME
  181. /*
  182. * BOOTP fields
  183. */
  184. #define CONFIG_BOOTP_SUBNETMASK 0x00000001
  185. #define CONFIG_BOOTP_GATEWAY 0x00000002
  186. #define CONFIG_BOOTP_HOSTNAME 0x00000004
  187. #define CONFIG_BOOTP_BOOTPATH 0x00000010
  188. #endif /* (CONFIG_CMD_NET) */
  189. /*
  190. * Environment setup
  191. *
  192. * Default boot order: mmc bootscript, MMC uImage, NOR image.
  193. * Network booting environment must be configured at site.
  194. */
  195. /* allow overwriting serial config and ethaddr */
  196. #define CONFIG_ENV_OVERWRITE
  197. #define CONFIG_EXTRA_ENV_SETTINGS \
  198. "loadaddr=0x82000000\0" \
  199. "console=ttyS0,115200n8\0" \
  200. "mmcargs=setenv bootargs console=${console} " \
  201. "root=/dev/mmcblk0p2 rw " \
  202. "rootfstype=ext3 rootwait\0" \
  203. "norargs=setenv bootargs console=${console} " \
  204. "root=/dev/mtdblock3 rw " \
  205. "rootfstype=jffs2\0" \
  206. "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
  207. "bootscript=echo Running bootscript from MMC/SD ...; " \
  208. "autoscr ${loadaddr}\0" \
  209. "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
  210. "mmcboot=echo Booting from MMC/SD ...; " \
  211. "run mmcargs; " \
  212. "bootm ${loadaddr}\0" \
  213. "norboot=echo Booting from NOR ...; " \
  214. "run norargs; " \
  215. "bootm 0x80000\0" \
  216. #define CONFIG_BOOTCOMMAND \
  217. "if mmcinit; then " \
  218. "if run loadbootscript; then " \
  219. "run bootscript; " \
  220. "else " \
  221. "if run loaduimage; then " \
  222. "run mmcboot; " \
  223. "else run norboot; " \
  224. "fi; " \
  225. "fi; " \
  226. "else run norboot; fi"
  227. #define CONFIG_AUTO_COMPLETE 1
  228. /*--------------------------------------------------------------------------*/
  229. /*
  230. * Miscellaneous configurable options
  231. */
  232. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  233. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  234. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  235. #define CONFIG_SYS_PROMPT "OMAP34XX SDP # "
  236. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  237. /* Print Buffer Size */
  238. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  239. sizeof(CONFIG_SYS_PROMPT) + 16)
  240. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  241. /* Boot Argument Buffer Size */
  242. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  243. /* SDRAM Test range - start at 16 meg boundary -ends at 32Meg -
  244. * a basic sanity check ONLY
  245. * IF you would like to increase coverage, increase the end address
  246. * or run the test with custom options
  247. */
  248. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0 + 0x01000000)
  249. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + (32 << 20))
  250. /* Default load address */
  251. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
  252. /*--------------------------------------------------------------------------*/
  253. /*
  254. * 3430 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) or by
  255. * 32KHz clk, or from external sig. This rate is divided by a local divisor.
  256. */
  257. #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
  258. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  259. #define CONFIG_SYS_HZ 1000
  260. /*
  261. * Stack sizes
  262. *
  263. * The stack sizes are set up in start.S using the settings below
  264. */
  265. #define CONFIG_STACKSIZE (128 << 10) /* Regular stack */
  266. #ifdef CONFIG_USE_IRQ
  267. #define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack */
  268. #define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack */
  269. #endif
  270. /*
  271. * SDRAM Memory Map
  272. */
  273. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  274. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  275. #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 meg */
  276. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  277. /* SDRAM Bank Allocation method */
  278. #define SDRC_R_B_C 1
  279. /*--------------------------------------------------------------------------*/
  280. /*
  281. * NOR FLASH usage ... default nCS0:
  282. * - one 256KB sector for U-Boot
  283. * - one 256KB sector for its parameters (not all used)
  284. * - eight sectors (2 MB) for kernel
  285. * - rest for JFFS2
  286. */
  287. /* Monitor at start of flash */
  288. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  289. #define CONFIG_SYS_MONITOR_LEN (256 << 10)
  290. #define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS
  291. #define CONFIG_SYS_JFFS2_NUM_BANKS 1
  292. /*
  293. * NAND FLASH usage ... default nCS1:
  294. * - four 128KB sectors for X-Loader
  295. * - four 128KB sectors for U-Boot
  296. * - two 128KB sector for its parameters
  297. * - 32 sectors (4 MB) for kernel
  298. * - rest for filesystem
  299. */
  300. /*
  301. * OneNAND FLASH usage ... default nCS2:
  302. * - four 128KB sectors for X-Loader
  303. * - two 128KB sectors for U-Boot
  304. * - one 128KB sector for its parameters
  305. * - sixteen sectors (2 MB) for kernel
  306. * - rest for filesystem
  307. */
  308. /*--------------------------------------------------------------------------*/
  309. #ifndef __ASSEMBLY__
  310. extern unsigned int boot_flash_base;
  311. extern volatile unsigned int boot_flash_env_addr;
  312. extern unsigned int boot_flash_off;
  313. extern unsigned int boot_flash_sec;
  314. extern unsigned int boot_flash_type;
  315. #endif
  316. #endif /* __CONFIG_H */