omap5_common.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /*
  2. * (C) Copyright 2013
  3. * Texas Instruments Incorporated.
  4. * Sricharan R <r.sricharan@ti.com>
  5. *
  6. * Derived from OMAP4 done by:
  7. * Aneesh V <aneesh@ti.com>
  8. *
  9. * TI OMAP5 AND DRA7XX common configuration settings
  10. *
  11. * See file CREDITS for list of people who contributed to this
  12. * project.
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License as
  16. * published by the Free Software Foundation; either version 2 of
  17. * the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  27. * MA 02111-1307 USA
  28. */
  29. #ifndef __CONFIG_OMAP5_COMMON_H
  30. #define __CONFIG_OMAP5_COMMON_H
  31. /*
  32. * High Level Configuration Options
  33. */
  34. #define CONFIG_OMAP /* in a TI OMAP core */
  35. #define CONFIG_OMAP54XX /* which is a 54XX */
  36. #define CONFIG_OMAP_GPIO
  37. /* Get CPU defs */
  38. #include <asm/arch/cpu.h>
  39. #include <asm/arch/omap.h>
  40. /* Display CPU and Board Info */
  41. #define CONFIG_DISPLAY_CPUINFO
  42. #define CONFIG_DISPLAY_BOARDINFO
  43. /* Clock Defines */
  44. #define V_OSCK 19200000 /* Clock output from T2 */
  45. #define V_SCLK V_OSCK
  46. #define CONFIG_MISC_INIT_R
  47. #define CONFIG_OF_LIBFDT
  48. #define CONFIG_CMD_BOOTZ
  49. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  50. #define CONFIG_SETUP_MEMORY_TAGS
  51. #define CONFIG_INITRD_TAG
  52. /*
  53. * Size of malloc() pool
  54. * Total Size Environment - 128k
  55. * Malloc - add 256k
  56. */
  57. #define CONFIG_ENV_SIZE (128 << 10)
  58. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (256 << 10))
  59. /* Vector Base */
  60. #define CONFIG_SYS_CA9_VECTOR_BASE SRAM_ROM_VECT_BASE
  61. /*
  62. * Hardware drivers
  63. */
  64. /*
  65. * serial port - NS16550 compatible
  66. */
  67. #define V_NS16550_CLK 48000000
  68. #define CONFIG_SYS_NS16550
  69. #define CONFIG_SYS_NS16550_SERIAL
  70. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  71. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  72. #define CONFIG_CONS_INDEX 3
  73. #define CONFIG_SYS_NS16550_COM3 UART3_BASE
  74. #define CONFIG_BAUDRATE 115200
  75. #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
  76. 115200}
  77. /* I2C */
  78. #define CONFIG_HARD_I2C
  79. #define CONFIG_SYS_I2C_SPEED 100000
  80. #define CONFIG_SYS_I2C_SLAVE 1
  81. #define CONFIG_DRIVER_OMAP34XX_I2C
  82. #define CONFIG_I2C_MULTI_BUS
  83. /* MMC */
  84. #define CONFIG_GENERIC_MMC
  85. #define CONFIG_MMC
  86. #define CONFIG_OMAP_HSMMC
  87. #define CONFIG_DOS_PARTITION
  88. /* MMC ENV related defines */
  89. #define CONFIG_ENV_IS_IN_MMC
  90. #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
  91. #define CONFIG_ENV_OFFSET 0xE0000
  92. #define CONFIG_CMD_SAVEENV
  93. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  94. /* Flash */
  95. #define CONFIG_SYS_NO_FLASH
  96. /* Cache */
  97. #define CONFIG_SYS_CACHELINE_SIZE 64
  98. #define CONFIG_SYS_CACHELINE_SHIFT 6
  99. /* commands to include */
  100. #include <config_cmd_default.h>
  101. /* Enabled commands */
  102. #define CONFIG_CMD_EXT2 /* EXT2 Support */
  103. #define CONFIG_CMD_FAT /* FAT support */
  104. #define CONFIG_CMD_I2C /* I2C serial bus support */
  105. #define CONFIG_CMD_MMC /* MMC support */
  106. #define CONFIG_CMD_SAVEENV
  107. /* Disabled commands */
  108. #undef CONFIG_CMD_NET
  109. #undef CONFIG_CMD_NFS
  110. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  111. #undef CONFIG_CMD_IMLS /* List all found images */
  112. /*
  113. * Environment setup
  114. */
  115. #define CONFIG_BOOTDELAY 3
  116. #define CONFIG_ENV_OVERWRITE
  117. #define CONFIG_EXTRA_ENV_SETTINGS \
  118. "loadaddr=0x82000000\0" \
  119. "console=ttyO2,115200n8\0" \
  120. "fdt_high=0xffffffff\0" \
  121. "usbtty=cdc_acm\0" \
  122. "vram=16M\0" \
  123. "mmcdev=0\0" \
  124. "mmcroot=/dev/mmcblk0p2 rw\0" \
  125. "mmcrootfstype=ext3 rootwait\0" \
  126. "mmcargs=setenv bootargs console=${console} " \
  127. "vram=${vram} " \
  128. "root=${mmcroot} " \
  129. "rootfstype=${mmcrootfstype}\0" \
  130. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  131. "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  132. "source ${loadaddr}\0" \
  133. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  134. "mmcboot=echo Booting from mmc${mmcdev} ...; " \
  135. "run mmcargs; " \
  136. "bootm ${loadaddr}\0" \
  137. #define CONFIG_BOOTCOMMAND \
  138. "mmc dev ${mmcdev}; if mmc rescan; then " \
  139. "if run loadbootscript; then " \
  140. "run bootscript; " \
  141. "else " \
  142. "if run loaduimage; then " \
  143. "run mmcboot; " \
  144. "fi; " \
  145. "fi; " \
  146. "fi"
  147. #define CONFIG_AUTO_COMPLETE 1
  148. /*
  149. * Miscellaneous configurable options
  150. */
  151. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  152. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  153. #define CONFIG_SYS_CBSIZE 256
  154. /* Print Buffer Size */
  155. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  156. sizeof(CONFIG_SYS_PROMPT) + 16)
  157. #define CONFIG_SYS_MAXARGS 16
  158. /* Boot Argument Buffer Size */
  159. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  160. /*
  161. * memtest setup
  162. */
  163. #define CONFIG_SYS_MEMTEST_START 0x80000000
  164. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (32 << 20))
  165. /* Default load address */
  166. #define CONFIG_SYS_LOAD_ADDR 0x80000000
  167. /* Use General purpose timer 1 */
  168. #define CONFIG_SYS_TIMERBASE GPT2_BASE
  169. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  170. #define CONFIG_SYS_HZ 1000
  171. /*
  172. * SDRAM Memory Map
  173. * Even though we use two CS all the memory
  174. * is mapped to one contiguous block
  175. */
  176. #define CONFIG_NR_DRAM_BANKS 1
  177. #define CONFIG_SYS_SDRAM_BASE 0x80000000
  178. #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
  179. GENERATED_GBL_DATA_SIZE)
  180. #define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
  181. /* Defines for SDRAM init */
  182. #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
  183. #define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
  184. #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
  185. #endif
  186. /* Defines for SPL */
  187. #define CONFIG_SPL
  188. #define CONFIG_SPL_FRAMEWORK
  189. #define CONFIG_SPL_TEXT_BASE 0x40300350
  190. #define CONFIG_SPL_MAX_SIZE 0x19000 /* 100K */
  191. #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR
  192. #define CONFIG_SPL_DISPLAY_PRINT
  193. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
  194. #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
  195. #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1
  196. #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img"
  197. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  198. #define CONFIG_SPL_LIBDISK_SUPPORT
  199. #define CONFIG_SPL_I2C_SUPPORT
  200. #define CONFIG_SPL_MMC_SUPPORT
  201. #define CONFIG_SPL_FAT_SUPPORT
  202. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  203. #define CONFIG_SPL_SERIAL_SUPPORT
  204. #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  205. /*
  206. * 64 bytes before this address should be set aside for u-boot.img's
  207. * header. That is 80E7FFC0--0x80E80000 should not be used for any
  208. * other needs.
  209. */
  210. #define CONFIG_SYS_TEXT_BASE 0x80E80000
  211. /*
  212. * BSS and malloc area 64MB into memory to allow enough
  213. * space for the kernel at the beginning of memory
  214. */
  215. #define CONFIG_SPL_BSS_START_ADDR 0x84000000
  216. #define CONFIG_SPL_BSS_MAX_SIZE 0x100000 /* 1 MB */
  217. #define CONFIG_SYS_SPL_MALLOC_START 0x84100000
  218. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 /* 1 MB */
  219. #define CONFIG_SPL_GPIO_SUPPORT
  220. #endif /* __CONFIG_OMAP5_COMMON_H */