ti_omap4_common.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2010
  4. * Texas Instruments Incorporated.
  5. * Aneesh V <aneesh@ti.com>
  6. * Steve Sakoman <steve@sakoman.com>
  7. *
  8. * TI OMAP4 common configuration settings
  9. */
  10. #ifndef __CONFIG_TI_OMAP4_COMMON_H
  11. #define __CONFIG_TI_OMAP4_COMMON_H
  12. #define CONFIG_MISC_INIT_R
  13. #ifndef CONFIG_SYS_L2CACHE_OFF
  14. #define CONFIG_SYS_L2_PL310 1
  15. #define CONFIG_SYS_PL310_BASE 0x48242000
  16. #endif
  17. /* Get CPU defs */
  18. #include <asm/arch/cpu.h>
  19. #include <asm/arch/omap.h>
  20. /* Use General purpose timer 1 */
  21. #define CONFIG_SYS_TIMERBASE GPT2_BASE
  22. /*
  23. * Total Size Environment - 128k
  24. */
  25. #define CONFIG_ENV_SIZE (128 << 10)
  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. #include <configs/ti_armv7_omap.h>
  37. /*
  38. * Hardware drivers
  39. */
  40. #define CONFIG_SYS_NS16550_CLK 48000000
  41. #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
  42. #define CONFIG_SYS_NS16550_SERIAL
  43. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  44. #define CONFIG_SYS_NS16550_COM3 UART3_BASE
  45. #endif
  46. /* TWL6030 */
  47. #ifndef CONFIG_SPL_BUILD
  48. #define CONFIG_TWL6030_POWER 1
  49. #endif
  50. /* USB */
  51. /* USB device configuration */
  52. #define CONFIG_USB_DEVICE 1
  53. #define CONFIG_USB_TTY 1
  54. /*
  55. * Environment setup
  56. */
  57. #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
  58. "bootcmd_" #devtypel #instance "=" \
  59. "setenv mmcdev " #instance"; "\
  60. "setenv bootpart " #instance":2 ; "\
  61. "run mmcboot\0"
  62. #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
  63. #devtypel #instance " "
  64. #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
  65. #devtypel #instance " "
  66. #define BOOT_TARGET_DEVICES(func) \
  67. func(MMC, mmc, 0) \
  68. func(LEGACY_MMC, legacy_mmc, 0) \
  69. func(MMC, mmc, 1) \
  70. func(LEGACY_MMC, legacy_mmc, 1) \
  71. func(PXE, pxe, na) \
  72. func(DHCP, dhcp, na)
  73. #include <config_distro_bootcmd.h>
  74. #include <environment/ti/mmc.h>
  75. #define CONFIG_EXTRA_ENV_SETTINGS \
  76. DEFAULT_LINUX_BOOT_ENV \
  77. DEFAULT_MMC_TI_ARGS \
  78. DEFAULT_FIT_TI_ARGS \
  79. "console=ttyO2,115200n8\0" \
  80. "fdtfile=undefined\0" \
  81. "bootpart=0:2\0" \
  82. "bootdir=/boot\0" \
  83. "bootfile=zImage\0" \
  84. "usbtty=cdc_acm\0" \
  85. "vram=16M\0" \
  86. "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
  87. "uimageboot=echo Booting from mmc${mmcdev} ...; " \
  88. "run args_mmc; " \
  89. "bootm ${loadaddr}\0" \
  90. "findfdt="\
  91. "if test $board_name = sdp4430; then " \
  92. "setenv fdtfile omap4-sdp.dtb; fi; " \
  93. "if test $board_name = panda; then " \
  94. "setenv fdtfile omap4-panda.dtb; fi;" \
  95. "if test $board_name = panda-a4; then " \
  96. "setenv fdtfile omap4-panda-a4.dtb; fi;" \
  97. "if test $board_name = panda-es; then " \
  98. "setenv fdtfile omap4-panda-es.dtb; fi;" \
  99. "if test $board_name = duovero; then " \
  100. "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \
  101. "if test $fdtfile = undefined; then " \
  102. "echo WARNING: Could not determine device tree to use; fi; \0" \
  103. BOOTENV
  104. /*
  105. * Defines for SPL
  106. * It is known that this will break HS devices. Since the current size of
  107. * SPL is overlapped with public stack and breaking non HS devices to boot.
  108. * So moving TEXT_BASE down to non-HS limit.
  109. */
  110. #define CONFIG_SPL_TEXT_BASE 0x40300000
  111. #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
  112. (128 << 20))
  113. #ifdef CONFIG_SPL_BUILD
  114. /* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
  115. #undef CONFIG_SYS_I2C
  116. #endif
  117. #endif /* __CONFIG_TI_OMAP4_COMMON_H */