omap5_common.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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=0x80200000\0" \
  61. "fdtaddr=0x80F80000\0" \
  62. "fdt_high=0xffffffff\0" \
  63. "rdaddr=0x81000000\0" \
  64. "console=" CONSOLEDEV ",115200n8\0" \
  65. "fdtfile=undefined\0" \
  66. "bootpart=0:2\0" \
  67. "bootdir=/boot\0" \
  68. "bootfile=zImage\0" \
  69. "usbtty=cdc_acm\0" \
  70. "vram=16M\0" \
  71. "partitions=" PARTS_DEFAULT "\0" \
  72. "optargs=\0" \
  73. "mmcdev=0\0" \
  74. "mmcroot=/dev/mmcblk1p2 rw\0" \
  75. "mmcrootfstype=ext4 rootwait\0" \
  76. "mmcargs=setenv bootargs console=${console} " \
  77. "${optargs} " \
  78. "vram=${vram} " \
  79. "root=${mmcroot} " \
  80. "rootfstype=${mmcrootfstype}\0" \
  81. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  82. "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  83. "source ${loadaddr}\0" \
  84. "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
  85. "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
  86. "env import -t ${loadaddr} ${filesize}\0" \
  87. "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
  88. "mmcboot=mmc dev ${mmcdev}; " \
  89. "if mmc rescan; then " \
  90. "echo SD/MMC found on device ${mmcdev};" \
  91. "if run loadbootenv; then " \
  92. "echo Loaded environment from ${bootenv};" \
  93. "run importbootenv;" \
  94. "fi;" \
  95. "if test -n $uenvcmd; then " \
  96. "echo Running uenvcmd ...;" \
  97. "run uenvcmd;" \
  98. "fi;" \
  99. "if run loadimage; then " \
  100. "run loadfdt; " \
  101. "echo Booting from mmc${mmcdev} ...; " \
  102. "run mmcargs; " \
  103. "bootz ${loadaddr} - ${fdtaddr}; " \
  104. "fi;" \
  105. "fi;\0" \
  106. "findfdt="\
  107. "if test $board_name = omap5_uevm; then " \
  108. "setenv fdtfile omap5-uevm.dtb; fi; " \
  109. "if test $board_name = dra7xx; then " \
  110. "setenv fdtfile dra7-evm.dtb; fi;" \
  111. "if test $fdtfile = undefined; then " \
  112. "echo WARNING: Could not determine device tree to use; fi; \0" \
  113. "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
  114. #define CONFIG_BOOTCOMMAND \
  115. "run findfdt; " \
  116. "run mmcboot;" \
  117. "setenv mmcdev 1; " \
  118. "setenv bootpart 1:2; " \
  119. "setenv mmcroot /dev/mmcblk0p2 rw; " \
  120. "run mmcboot;" \
  121. /*
  122. * SPL related defines. The Public RAM memory map the ROM defines the
  123. * area between 0x40300000 and 0x4031E000 as a download area for OMAP5
  124. * (dra7xx is larger, but we do not need to be larger at this time). We
  125. * set CONFIG_SPL_DISPLAY_PRINT to have omap_rev_string() called and
  126. * print some information.
  127. */
  128. #define CONFIG_SPL_TEXT_BASE 0x40300000
  129. #define CONFIG_SPL_MAX_SIZE (0x4031E000 - CONFIG_SPL_TEXT_BASE)
  130. #define CONFIG_SPL_DISPLAY_PRINT
  131. #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  132. #endif /* __CONFIG_OMAP5_COMMON_H */