omap5_common.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. * SPDX-License-Identifier: GPL-2.0+
  12. *
  13. * For more details, please see the technical documents listed at
  14. * http://www.ti.com/product/omap5432
  15. */
  16. #ifndef __CONFIG_OMAP5_COMMON_H
  17. #define __CONFIG_OMAP5_COMMON_H
  18. #define CONFIG_OMAP54XX
  19. #define CONFIG_DISPLAY_CPUINFO
  20. #define CONFIG_DISPLAY_BOARDINFO
  21. #define CONFIG_MISC_INIT_R
  22. #define CONFIG_ARCH_CPU_INIT
  23. #define CONFIG_SYS_CACHELINE_SIZE 64
  24. /* Use General purpose timer 1 */
  25. #define CONFIG_SYS_TIMERBASE GPT2_BASE
  26. /*
  27. * For the DDR timing information we can either dynamically determine
  28. * the timings to use or use pre-determined timings (based on using the
  29. * dynamic method. Default to the static timing infomation.
  30. */
  31. #define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
  32. #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
  33. #define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
  34. #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
  35. #endif
  36. #ifndef CONFIG_SPL_BUILD
  37. #define CONFIG_PALMAS_POWER
  38. #endif
  39. #include <asm/arch/cpu.h>
  40. #include <asm/arch/omap.h>
  41. #define CONFIG_ENV_SIZE (128 << 10)
  42. #include <configs/ti_armv7_common.h>
  43. /*
  44. * Hardware drivers
  45. */
  46. #define CONFIG_SYS_NS16550
  47. #define CONFIG_SYS_NS16550_SERIAL
  48. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  49. #define CONFIG_SYS_NS16550_CLK 48000000
  50. /* Per-SoC commands */
  51. #undef CONFIG_CMD_NET
  52. #undef CONFIG_CMD_NFS
  53. /*
  54. * Environment setup
  55. */
  56. #ifndef PARTS_DEFAULT
  57. #define PARTS_DEFAULT
  58. #endif
  59. #define CONFIG_EXTRA_ENV_SETTINGS \
  60. "loadaddr=0x82000000\0" \
  61. "console=" CONSOLEDEV ",115200n8\0" \
  62. "fdt_high=0xffffffff\0" \
  63. "fdtaddr=0x80f80000\0" \
  64. "fdtfile=undefined\0" \
  65. "bootpart=0:2\0" \
  66. "bootdir=/boot\0" \
  67. "bootfile=zImage\0" \
  68. "usbtty=cdc_acm\0" \
  69. "vram=16M\0" \
  70. "partitions=" PARTS_DEFAULT "\0" \
  71. "optargs=\0" \
  72. "mmcdev=0\0" \
  73. "mmcroot=/dev/mmcblk0p2 rw\0" \
  74. "mmcrootfstype=ext4 rootwait\0" \
  75. "mmcargs=setenv bootargs console=${console} " \
  76. "${optargs} " \
  77. "vram=${vram} " \
  78. "root=${mmcroot} " \
  79. "rootfstype=${mmcrootfstype}\0" \
  80. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  81. "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  82. "source ${loadaddr}\0" \
  83. "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
  84. "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
  85. "env import -t ${loadaddr} ${filesize}\0" \
  86. "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
  87. "mmcboot=echo Booting from mmc${mmcdev} ...; " \
  88. "run mmcargs; " \
  89. "bootz ${loadaddr} - ${fdtaddr}\0" \
  90. "findfdt="\
  91. "if test $board_name = omap5_uevm; then " \
  92. "setenv fdtfile omap5-uevm.dtb; fi; " \
  93. "if test $board_name = dra7xx; then " \
  94. "setenv fdtfile dra7-evm.dtb; fi;" \
  95. "if test $fdtfile = undefined; then " \
  96. "echo WARNING: Could not determine device tree to use; fi; \0" \
  97. "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
  98. #define CONFIG_BOOTCOMMAND \
  99. "run findfdt; " \
  100. "mmc dev ${mmcdev}; if mmc rescan; then " \
  101. "if run loadbootscript; then " \
  102. "run bootscript; " \
  103. "else " \
  104. "if run loadbootenv; then " \
  105. "run importbootenv; " \
  106. "fi;" \
  107. "if test -n ${uenvcmd}; then " \
  108. "echo Running uenvcmd ...;" \
  109. "run uenvcmd;" \
  110. "fi;" \
  111. "fi;" \
  112. "if run loadimage; then " \
  113. "run loadfdt; " \
  114. "run mmcboot; " \
  115. "fi; " \
  116. "fi"
  117. /*
  118. * SPL related defines. The Public RAM memory map the ROM defines the
  119. * area between 0x40300000 and 0x4031E000 as a download area for OMAP5
  120. * (dra7xx is larger, but we do not need to be larger at this time). We
  121. * set CONFIG_SPL_DISPLAY_PRINT to have omap_rev_string() called and
  122. * print some information.
  123. */
  124. #define CONFIG_SPL_TEXT_BASE 0x40300000
  125. #define CONFIG_SPL_MAX_SIZE (0x4031E000 - CONFIG_SPL_TEXT_BASE)
  126. #define CONFIG_SPL_DISPLAY_PRINT
  127. #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  128. #endif /* __CONFIG_OMAP5_COMMON_H */