ti_omap4_common.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /*
  2. * (C) Copyright 2010
  3. * Texas Instruments Incorporated.
  4. * Aneesh V <aneesh@ti.com>
  5. * Steve Sakoman <steve@sakoman.com>
  6. *
  7. * TI OMAP4 common configuration settings
  8. *
  9. * SPDX-License-Identifier: GPL-2.0+
  10. */
  11. #ifndef __CONFIG_TI_OMAP4_COMMON_H
  12. #define __CONFIG_TI_OMAP4_COMMON_H
  13. /*
  14. * High Level Configuration Options
  15. */
  16. #define CONFIG_OMAP4430 1 /* which is in a 4430 */
  17. #define CONFIG_MISC_INIT_R
  18. #define CONFIG_DISPLAY_CPUINFO 1
  19. #define CONFIG_DISPLAY_BOARDINFO 1
  20. #define CONFIG_SYS_THUMB_BUILD
  21. #ifndef CONFIG_SYS_L2CACHE_OFF
  22. #define CONFIG_SYS_L2_PL310 1
  23. #define CONFIG_SYS_PL310_BASE 0x48242000
  24. #endif
  25. /* Get CPU defs */
  26. #include <asm/arch/cpu.h>
  27. #include <asm/arch/omap.h>
  28. /* Use General purpose timer 1 */
  29. #define CONFIG_SYS_TIMERBASE GPT2_BASE
  30. /*
  31. * Total Size Environment - 128k
  32. */
  33. #define CONFIG_ENV_SIZE (128 << 10)
  34. /*
  35. * For the DDR timing information we can either dynamically determine
  36. * the timings to use or use pre-determined timings (based on using the
  37. * dynamic method. Default to the static timing infomation.
  38. */
  39. #define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
  40. #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
  41. #define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
  42. #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
  43. #endif
  44. #include <configs/ti_armv7_omap.h>
  45. /*
  46. * Hardware drivers
  47. */
  48. #define CONFIG_SYS_NS16550_CLK 48000000
  49. #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
  50. #define CONFIG_SYS_NS16550_SERIAL
  51. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  52. #define CONFIG_SYS_NS16550_COM3 UART3_BASE
  53. #endif
  54. #define CONFIG_CONS_INDEX 3
  55. /* TWL6030 */
  56. #ifndef CONFIG_SPL_BUILD
  57. #define CONFIG_TWL6030_POWER 1
  58. #endif
  59. /* USB */
  60. #define CONFIG_USB_MUSB_UDC 1
  61. #define CONFIG_USB_OMAP3 1
  62. /* USB device configuration */
  63. #define CONFIG_USB_DEVICE 1
  64. #define CONFIG_USB_TTY 1
  65. #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
  66. /*
  67. * Environment setup
  68. */
  69. #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
  70. "bootcmd_" #devtypel #instance "=" \
  71. "setenv mmcdev " #instance"; "\
  72. "setenv bootpart " #instance":2 ; "\
  73. "run mmcboot\0"
  74. #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
  75. #devtypel #instance " "
  76. #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
  77. #devtypel #instance " "
  78. #define BOOT_TARGET_DEVICES(func) \
  79. func(MMC, mmc, 0) \
  80. func(LEGACY_MMC, legacy_mmc, 0) \
  81. func(MMC, mmc, 1) \
  82. func(LEGACY_MMC, legacy_mmc, 1) \
  83. func(PXE, pxe, na) \
  84. func(DHCP, dhcp, na)
  85. #define CONFIG_BOOTCOMMAND \
  86. "run findfdt; " \
  87. "run envboot; " \
  88. "run distro_bootcmd"
  89. #include <config_distro_bootcmd.h>
  90. #define CONFIG_EXTRA_ENV_SETTINGS \
  91. DEFAULT_LINUX_BOOT_ENV \
  92. DEFAULT_MMC_TI_ARGS \
  93. "console=ttyO2,115200n8\0" \
  94. "fdtfile=undefined\0" \
  95. "bootpart=0:2\0" \
  96. "bootdir=/boot\0" \
  97. "bootfile=zImage\0" \
  98. "usbtty=cdc_acm\0" \
  99. "vram=16M\0" \
  100. "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
  101. "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
  102. "mmcboot=echo Booting from mmc${mmcdev} ...; " \
  103. "run args_mmc; " \
  104. "if run loadimage; then " \
  105. "run loadfdt; " \
  106. "bootz ${loadaddr} - ${fdtaddr}; " \
  107. "fi;\0" \
  108. "uimageboot=echo Booting from mmc${mmcdev} ...; " \
  109. "run args_mmc; " \
  110. "bootm ${loadaddr}\0" \
  111. "findfdt="\
  112. "if test $board_name = sdp4430; then " \
  113. "setenv fdtfile omap4-sdp.dtb; fi; " \
  114. "if test $board_name = panda; then " \
  115. "setenv fdtfile omap4-panda.dtb; fi;" \
  116. "if test $board_name = panda-a4; then " \
  117. "setenv fdtfile omap4-panda-a4.dtb; fi;" \
  118. "if test $board_name = panda-es; then " \
  119. "setenv fdtfile omap4-panda-es.dtb; fi;" \
  120. "if test $board_name = duovero; then " \
  121. "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \
  122. "if test $fdtfile = undefined; then " \
  123. "echo WARNING: Could not determine device tree to use; fi; \0" \
  124. "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
  125. BOOTENV
  126. /*
  127. * Defines for SPL
  128. * It is known that this will break HS devices. Since the current size of
  129. * SPL is overlapped with public stack and breaking non HS devices to boot.
  130. * So moving TEXT_BASE down to non-HS limit.
  131. */
  132. #define CONFIG_SPL_TEXT_BASE 0x40300000
  133. #define CONFIG_SPL_DISPLAY_PRINT
  134. #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  135. #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
  136. (128 << 20))
  137. #ifdef CONFIG_NAND
  138. #define CONFIG_SPL_NAND_AM33XX_BCH /* ELM support */
  139. #endif
  140. #ifdef CONFIG_SPL_BUILD
  141. /* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
  142. #undef CONFIG_SYS_I2C
  143. #undef CONFIG_SYS_I2C_OMAP24XX
  144. #undef CONFIG_SPL_I2C_SUPPORT
  145. #endif
  146. #endif /* __CONFIG_TI_OMAP4_COMMON_H */