omap3_evm.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*
  2. * Configuration settings for the TI OMAP3 EVM board.
  3. *
  4. * Copyright (C) 2006-2011 Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * Author :
  7. * Manikandan Pillai <mani.pillai@ti.com>
  8. * Derived from Beagle Board and 3430 SDP code by
  9. * Richard Woodruff <r-woodruff2@ti.com>
  10. * Syed Mohammed Khasim <khasim@ti.com>
  11. *
  12. * Manikandan Pillai <mani.pillai@ti.com>
  13. *
  14. * See file CREDITS for list of people who contributed to this
  15. * project.
  16. *
  17. * This program is free software; you can redistribute it and/or
  18. * modify it under the terms of the GNU General Public License as
  19. * published by the Free Software Foundation; either version 2 of
  20. * the License, or (at your option) any later version.
  21. *
  22. * This program is distributed in the hope that it will be useful,
  23. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. * GNU General Public License for more details.
  26. *
  27. * You should have received a copy of the GNU General Public License
  28. * along with this program; if not, write to the Free Software
  29. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  30. * MA 02111-1307 USA
  31. */
  32. #ifndef __OMAP3EVM_CONFIG_H
  33. #define __OMAP3EVM_CONFIG_H
  34. #include <asm/arch/cpu.h>
  35. #include <asm/arch/omap3.h>
  36. /* ----------------------------------------------------------------------------
  37. * Supported U-boot commands
  38. * ----------------------------------------------------------------------------
  39. */
  40. #include <config_cmd_default.h>
  41. #define CONFIG_CMD_ASKENV
  42. #define CONFIG_CMD_EXT2
  43. #define CONFIG_CMD_FAT
  44. #define CONFIG_CMD_JFFS2
  45. #define CONFIG_CMD_I2C
  46. #define CONFIG_CMD_MMC
  47. #define CONFIG_CMD_NAND
  48. #define CONFIG_CMD_DHCP
  49. #define CONFIG_CMD_PING
  50. #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
  51. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  52. #undef CONFIG_CMD_IMI /* iminfo */
  53. #undef CONFIG_CMD_IMLS /* List all found images */
  54. /* ----------------------------------------------------------------------------
  55. * Supported U-boot features
  56. * ----------------------------------------------------------------------------
  57. */
  58. #define CONFIG_SYS_LONGHELP
  59. #define CONFIG_SYS_HUSH_PARSER
  60. /* Display CPU and Board information */
  61. #define CONFIG_DISPLAY_CPUINFO
  62. #define CONFIG_DISPLAY_BOARDINFO
  63. /* Allow to overwrite serial and ethaddr */
  64. #define CONFIG_ENV_OVERWRITE
  65. /* Add auto-completion support */
  66. #define CONFIG_AUTO_COMPLETE
  67. /* ----------------------------------------------------------------------------
  68. * Supported hardware
  69. * ----------------------------------------------------------------------------
  70. */
  71. /* MMC */
  72. #define CONFIG_MMC
  73. #define CONFIG_GENERIC_MMC
  74. #define CONFIG_OMAP_HSMMC
  75. /* SPL */
  76. #define CONFIG_SPL_MMC_SUPPORT
  77. #define CONFIG_SPL_FAT_SUPPORT
  78. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
  79. #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
  80. #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1
  81. #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img"
  82. /* Partition tables */
  83. /* Only need DOS partition support for SPL, currently */
  84. #ifndef CONFIG_SPL_BUILD
  85. #define CONFIG_EFI_PARTITION
  86. #endif
  87. #define CONFIG_DOS_PARTITION
  88. /* USB
  89. *
  90. * Enable CONFIG_MUSB_HCD for Host functionalities MSC, keyboard
  91. * Enable CONFIG_MUSB_UDD for Device functionalities.
  92. */
  93. #define CONFIG_USB_OMAP3
  94. #define CONFIG_MUSB_HCD
  95. /* #define CONFIG_MUSB_UDC */
  96. /* NAND SPL */
  97. #define CONFIG_SPL_NAND_SIMPLE
  98. #define CONFIG_SPL_NAND_SUPPORT
  99. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  100. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  101. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  102. #define CONFIG_SYS_NAND_OOBSIZE 64
  103. #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
  104. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
  105. #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
  106. 10, 11, 12, 13}
  107. #define CONFIG_SYS_NAND_ECCSIZE 512
  108. #define CONFIG_SYS_NAND_ECCBYTES 3
  109. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
  110. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  111. /* -----------------------------------------------------------------------------
  112. * Include common board configuration
  113. * -----------------------------------------------------------------------------
  114. */
  115. #include "omap3_evm_common.h"
  116. /* -----------------------------------------------------------------------------
  117. * Default environment
  118. * -----------------------------------------------------------------------------
  119. */
  120. #define CONFIG_BOOTDELAY 3
  121. #define CONFIG_EXTRA_ENV_SETTINGS \
  122. "loadaddr=0x82000000\0" \
  123. "usbtty=cdc_acm\0" \
  124. "mmcdev=0\0" \
  125. "console=ttyO0,115200n8\0" \
  126. "mmcargs=setenv bootargs console=${console} " \
  127. "root=/dev/mmcblk0p2 rw " \
  128. "rootfstype=ext3 rootwait\0" \
  129. "nandargs=setenv bootargs console=${console} " \
  130. "root=/dev/mtdblock4 rw " \
  131. "rootfstype=jffs2\0" \
  132. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  133. "bootscript=echo Running bootscript from mmc ...; " \
  134. "source ${loadaddr}\0" \
  135. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  136. "mmcboot=echo Booting from mmc ...; " \
  137. "run mmcargs; " \
  138. "bootm ${loadaddr}\0" \
  139. "nandboot=echo Booting from nand ...; " \
  140. "run nandargs; " \
  141. "onenand read ${loadaddr} 280000 400000; " \
  142. "bootm ${loadaddr}\0" \
  143. #define CONFIG_BOOTCOMMAND \
  144. "mmc dev ${mmcdev}; if mmc rescan; then " \
  145. "if run loadbootscript; then " \
  146. "run bootscript; " \
  147. "else " \
  148. "if run loaduimage; then " \
  149. "run mmcboot; " \
  150. "else run nandboot; " \
  151. "fi; " \
  152. "fi; " \
  153. "else run nandboot; fi"
  154. #endif /* __OMAP3EVM_CONFIG_H */