ti_omap4_common.h 4.2 KB

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