omap3_overo.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /*
  2. * Configuration settings for the Gumstix Overo board.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc.
  17. */
  18. #ifndef __CONFIG_H
  19. #define __CONFIG_H
  20. /*
  21. * High Level Configuration Options
  22. */
  23. #define CONFIG_OMAP /* in a TI OMAP core */
  24. #define CONFIG_OMAP34XX /* which is a 34XX */
  25. #define CONFIG_OMAP3_OVERO /* working with overo */
  26. #define CONFIG_SDRC /* The chip has SDRC controller */
  27. #include <asm/arch/cpu.h> /* get chip and board defs */
  28. #include <asm/arch/omap3.h>
  29. /*
  30. * Display CPU and Board information
  31. */
  32. #define CONFIG_DISPLAY_CPUINFO
  33. #define CONFIG_DISPLAY_BOARDINFO
  34. /* Clock Defines */
  35. #define V_OSCK 26000000 /* Clock output from T2 */
  36. #define V_SCLK (V_OSCK >> 1)
  37. #undef CONFIG_USE_IRQ /* no support for IRQs */
  38. #define CONFIG_MISC_INIT_R
  39. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  40. #define CONFIG_SETUP_MEMORY_TAGS
  41. #define CONFIG_INITRD_TAG
  42. #define CONFIG_REVISION_TAG
  43. #define CONFIG_OF_LIBFDT
  44. /*
  45. * Size of malloc() pool
  46. */
  47. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  48. /* Sector */
  49. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
  50. /*
  51. * Hardware drivers
  52. */
  53. /*
  54. * NS16550 Configuration
  55. */
  56. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  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 V_NS16550_CLK
  61. /*
  62. * select serial console configuration
  63. */
  64. #define CONFIG_CONS_INDEX 3
  65. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  66. #define CONFIG_SERIAL3 3
  67. /* allow to overwrite serial and ethaddr */
  68. #define CONFIG_ENV_OVERWRITE
  69. #define CONFIG_BAUDRATE 115200
  70. #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, \
  71. 115200}
  72. #define CONFIG_GENERIC_MMC
  73. #define CONFIG_MMC
  74. #define CONFIG_OMAP_HSMMC
  75. #define CONFIG_DOS_PARTITION
  76. /* commands to include */
  77. #include <config_cmd_default.h>
  78. #define CONFIG_CMD_CACHE
  79. #define CONFIG_CMD_EXT2 /* EXT2 Support */
  80. #define CONFIG_CMD_FAT /* FAT support */
  81. #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
  82. #define CONFIG_CMD_I2C /* I2C serial bus support */
  83. #define CONFIG_CMD_MMC /* MMC support */
  84. #define CONFIG_CMD_NAND /* NAND support */
  85. #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
  86. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  87. #undef CONFIG_CMD_IMI /* iminfo */
  88. #undef CONFIG_CMD_IMLS /* List all found images */
  89. #undef CONFIG_CMD_NFS /* NFS support */
  90. #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
  91. #define CONFIG_SYS_NO_FLASH
  92. #define CONFIG_HARD_I2C
  93. #define CONFIG_SYS_I2C_SPEED 100000
  94. #define CONFIG_SYS_I2C_SLAVE 1
  95. #define CONFIG_I2C_MULTI_BUS
  96. #define CONFIG_DRIVER_OMAP34XX_I2C
  97. /*
  98. * TWL4030
  99. */
  100. #define CONFIG_TWL4030_POWER
  101. #define CONFIG_TWL4030_LED
  102. /*
  103. * Board NAND Info.
  104. */
  105. #define CONFIG_SYS_NAND_QUIET_TEST
  106. #define CONFIG_NAND_OMAP_GPMC
  107. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  108. /* to access nand */
  109. #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
  110. /* to access nand */
  111. /* at CS0 */
  112. #define GPMC_NAND_ECC_LP_x16_LAYOUT
  113. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
  114. /* devices */
  115. #define CONFIG_JFFS2_NAND
  116. /* nand device jffs2 lives on */
  117. #define CONFIG_JFFS2_DEV "nand0"
  118. /* start of jffs2 partition */
  119. #define CONFIG_JFFS2_PART_OFFSET 0x680000
  120. #define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */
  121. /* partition */
  122. /* Environment information */
  123. #define CONFIG_BOOTDELAY 5
  124. #define CONFIG_EXTRA_ENV_SETTINGS \
  125. "loadaddr=0x82000000\0" \
  126. "console=ttyO2,115200n8\0" \
  127. "mpurate=500\0" \
  128. "optargs=\0" \
  129. "vram=12M\0" \
  130. "dvimode=1024x768MR-16@60\0" \
  131. "defaultdisplay=dvi\0" \
  132. "mmcdev=0\0" \
  133. "mmcroot=/dev/mmcblk0p2 rw\0" \
  134. "mmcrootfstype=ext3 rootwait\0" \
  135. "nandroot=ubi0:rootfs ubi.mtd=4\0" \
  136. "nandrootfstype=ubifs\0" \
  137. "mmcargs=setenv bootargs console=${console} " \
  138. "${optargs} " \
  139. "mpurate=${mpurate} " \
  140. "vram=${vram} " \
  141. "omapfb.mode=dvi:${dvimode} " \
  142. "omapdss.def_disp=${defaultdisplay} " \
  143. "root=${mmcroot} " \
  144. "rootfstype=${mmcrootfstype}\0" \
  145. "nandargs=setenv bootargs console=${console} " \
  146. "${optargs} " \
  147. "mpurate=${mpurate} " \
  148. "vram=${vram} " \
  149. "omapfb.mode=dvi:${dvimode} " \
  150. "omapdss.def_disp=${defaultdisplay} " \
  151. "root=${nandroot} " \
  152. "rootfstype=${nandrootfstype}\0" \
  153. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  154. "bootscript=echo Running bootscript from mmc ...; " \
  155. "source ${loadaddr}\0" \
  156. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  157. "mmcboot=echo Booting from mmc ...; " \
  158. "run mmcargs; " \
  159. "bootm ${loadaddr}\0" \
  160. "nandboot=echo Booting from nand ...; " \
  161. "run nandargs; " \
  162. "nand read ${loadaddr} 280000 400000; " \
  163. "bootm ${loadaddr}\0" \
  164. #define CONFIG_BOOTCOMMAND \
  165. "if mmc rescan ${mmcdev}; then " \
  166. "if run loadbootscript; then " \
  167. "run bootscript; " \
  168. "else " \
  169. "if run loaduimage; then " \
  170. "run mmcboot; " \
  171. "else run nandboot; " \
  172. "fi; " \
  173. "fi; " \
  174. "else run nandboot; fi"
  175. #define CONFIG_AUTO_COMPLETE 1
  176. /*
  177. * Miscellaneous configurable options
  178. */
  179. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  180. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  181. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  182. #define CONFIG_SYS_PROMPT "Overo # "
  183. #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
  184. /* Print Buffer Size */
  185. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  186. sizeof(CONFIG_SYS_PROMPT) + 16)
  187. #define CONFIG_SYS_MAXARGS 16 /* max number of command */
  188. /* args */
  189. /* Boot Argument Buffer Size */
  190. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  191. /* memtest works on */
  192. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
  193. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
  194. 0x01F00000) /* 31MB */
  195. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load */
  196. /* address */
  197. /*
  198. * OMAP3 has 12 GP timers, they can be driven by the system clock
  199. * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
  200. * This rate is divided by a local divisor.
  201. */
  202. #define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2
  203. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  204. #define CONFIG_SYS_HZ 1000
  205. /*-----------------------------------------------------------------------
  206. * Stack sizes
  207. *
  208. * The stack sizes are set up in start.S using the settings below
  209. */
  210. #define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
  211. /*-----------------------------------------------------------------------
  212. * Physical Memory Map
  213. */
  214. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  215. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  216. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  217. /*-----------------------------------------------------------------------
  218. * FLASH and environment organization
  219. */
  220. /* **** PISMO SUPPORT *** */
  221. /* Configure the PISMO */
  222. #define PISMO1_NAND_SIZE GPMC_SIZE_128M
  223. #define PISMO1_ONEN_SIZE GPMC_SIZE_128M
  224. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
  225. #if defined(CONFIG_CMD_NAND)
  226. #define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE
  227. #endif
  228. /* Monitor at start of flash */
  229. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  230. #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
  231. #define CONFIG_ENV_IS_IN_NAND
  232. #define ONENAND_ENV_OFFSET 0x240000 /* environment starts here */
  233. #define SMNAND_ENV_OFFSET 0x240000 /* environment starts here */
  234. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  235. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  236. #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
  237. #if defined(CONFIG_CMD_NET)
  238. /*----------------------------------------------------------------------------
  239. * SMSC9211 Ethernet from SMSC9118 family
  240. *----------------------------------------------------------------------------
  241. */
  242. #define CONFIG_SMC911X
  243. #define CONFIG_SMC911X_32_BIT
  244. #define CONFIG_SMC911X_BASE 0x2C000000
  245. #endif /* (CONFIG_CMD_NET) */
  246. /*
  247. * Leave it at 0x80008000 to allow booting new u-boot.bin with X-loader
  248. * and older u-boot.bin with the new U-Boot SPL.
  249. */
  250. #define CONFIG_SYS_TEXT_BASE 0x80008000
  251. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  252. #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
  253. #define CONFIG_SYS_INIT_RAM_SIZE 0x800
  254. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  255. CONFIG_SYS_INIT_RAM_SIZE - \
  256. GENERATED_GBL_DATA_SIZE)
  257. #define CONFIG_SYS_CACHELINE_SIZE 64
  258. /* Defines for SPL */
  259. #define CONFIG_SPL
  260. #define CONFIG_SPL_NAND_SIMPLE
  261. #define CONFIG_SPL_TEXT_BASE 0x40200800
  262. #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */
  263. #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
  264. /* move malloc and bss high to prevent clashing with the main image */
  265. #define CONFIG_SYS_SPL_MALLOC_START 0x87000000
  266. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000
  267. #define CONFIG_SPL_BSS_START_ADDR 0x87080000 /* end of minimum RAM */
  268. #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
  269. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
  270. #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
  271. #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1
  272. #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img"
  273. #define CONFIG_SPL_BOARD_INIT
  274. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  275. #define CONFIG_SPL_LIBDISK_SUPPORT
  276. #define CONFIG_SPL_I2C_SUPPORT
  277. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  278. #define CONFIG_SPL_MMC_SUPPORT
  279. #define CONFIG_SPL_FAT_SUPPORT
  280. #define CONFIG_SPL_SERIAL_SUPPORT
  281. #define CONFIG_SPL_NAND_SUPPORT
  282. #define CONFIG_SPL_POWER_SUPPORT
  283. #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  284. /* NAND boot config */
  285. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  286. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  287. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  288. #define CONFIG_SYS_NAND_OOBSIZE 64
  289. #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
  290. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  291. #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
  292. 10, 11, 12, 13}
  293. #define CONFIG_SYS_NAND_ECCSIZE 512
  294. #define CONFIG_SYS_NAND_ECCBYTES 3
  295. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
  296. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  297. #endif /* __CONFIG_H */