exynos5-common.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /*
  2. * Copyright (C) 2013 Samsung Electronics
  3. *
  4. * Configuration settings for the SAMSUNG EXYNOS5 board.
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef __CONFIG_EXYNOS5_COMMON_H
  9. #define __CONFIG_EXYNOS5_COMMON_H
  10. #define CONFIG_EXYNOS5 /* Exynos5 Family */
  11. #include "exynos-common.h"
  12. #define CONFIG_SYS_CACHELINE_SIZE 64
  13. #define CONFIG_EXYNOS_SPL
  14. /* Allow tracing to be enabled */
  15. #define CONFIG_TRACE
  16. #define CONFIG_CMD_TRACE
  17. #define CONFIG_TRACE_BUFFER_SIZE (16 << 20)
  18. #define CONFIG_TRACE_EARLY_SIZE (8 << 20)
  19. #define CONFIG_TRACE_EARLY
  20. #define CONFIG_TRACE_EARLY_ADDR 0x50000000
  21. /* Enable ACE acceleration for SHA1 and SHA256 */
  22. #define CONFIG_EXYNOS_ACE_SHA
  23. #define CONFIG_SHA_HW_ACCEL
  24. /* Power Down Modes */
  25. #define S5P_CHECK_SLEEP 0x00000BAD
  26. #define S5P_CHECK_DIDLE 0xBAD00000
  27. #define S5P_CHECK_LPA 0xABAD0000
  28. /* Offset for inform registers */
  29. #define INFORM0_OFFSET 0x800
  30. #define INFORM1_OFFSET 0x804
  31. #define INFORM2_OFFSET 0x808
  32. #define INFORM3_OFFSET 0x80c
  33. /* select serial console configuration */
  34. #define CONFIG_BAUDRATE 115200
  35. #define EXYNOS5_DEFAULT_UART_OFFSET 0x010000
  36. #define CONFIG_SILENT_CONSOLE
  37. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  38. #define CONFIG_CONSOLE_MUX
  39. #define CONFIG_CMD_HASH
  40. /* Thermal Management Unit */
  41. #define CONFIG_EXYNOS_TMU
  42. #define CONFIG_CMD_DTT
  43. #define CONFIG_TMU_CMD_DTT
  44. /* TPM */
  45. #define CONFIG_TPM
  46. #define CONFIG_CMD_TPM
  47. #define CONFIG_TPM_TIS_I2C
  48. #define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3
  49. #define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20
  50. /* MMC SPL */
  51. #define COPY_BL2_FNPTR_ADDR 0x02020030
  52. #define CONFIG_SUPPORT_EMMC_BOOT
  53. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  54. #define CONFIG_SPL_GPIO_SUPPORT
  55. /* specific .lds file */
  56. #define CONFIG_SPL_LDSCRIPT "board/samsung/common/exynos-uboot-spl.lds"
  57. /* Boot Argument Buffer Size */
  58. /* memtest works on */
  59. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  60. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5E00000)
  61. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000)
  62. #define CONFIG_RD_LVL
  63. #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
  64. #define PHYS_SDRAM_1_SIZE SDRAM_BANK_SIZE
  65. #define PHYS_SDRAM_2 (CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE)
  66. #define PHYS_SDRAM_2_SIZE SDRAM_BANK_SIZE
  67. #define PHYS_SDRAM_3 (CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE))
  68. #define PHYS_SDRAM_3_SIZE SDRAM_BANK_SIZE
  69. #define PHYS_SDRAM_4 (CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE))
  70. #define PHYS_SDRAM_4_SIZE SDRAM_BANK_SIZE
  71. #define PHYS_SDRAM_5 (CONFIG_SYS_SDRAM_BASE + (4 * SDRAM_BANK_SIZE))
  72. #define PHYS_SDRAM_5_SIZE SDRAM_BANK_SIZE
  73. #define PHYS_SDRAM_6 (CONFIG_SYS_SDRAM_BASE + (5 * SDRAM_BANK_SIZE))
  74. #define PHYS_SDRAM_6_SIZE SDRAM_BANK_SIZE
  75. #define PHYS_SDRAM_7 (CONFIG_SYS_SDRAM_BASE + (6 * SDRAM_BANK_SIZE))
  76. #define PHYS_SDRAM_7_SIZE SDRAM_BANK_SIZE
  77. #define PHYS_SDRAM_8 (CONFIG_SYS_SDRAM_BASE + (7 * SDRAM_BANK_SIZE))
  78. #define PHYS_SDRAM_8_SIZE SDRAM_BANK_SIZE
  79. #define CONFIG_SYS_MONITOR_BASE 0x00000000
  80. #define CONFIG_SYS_MMC_ENV_DEV 0
  81. #define CONFIG_SECURE_BL1_ONLY
  82. /* Secure FW size configuration */
  83. #ifdef CONFIG_SECURE_BL1_ONLY
  84. #define CONFIG_SEC_FW_SIZE (8 << 10) /* 8KB */
  85. #else
  86. #define CONFIG_SEC_FW_SIZE 0
  87. #endif
  88. /* Configuration of BL1, BL2, ENV Blocks on mmc */
  89. #define CONFIG_RES_BLOCK_SIZE (512)
  90. #define CONFIG_BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
  91. #define CONFIG_BL2_SIZE (512UL << 10UL) /* 512 KB */
  92. #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
  93. #define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
  94. #define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE)
  95. /* U-boot copy size from boot Media to DRAM.*/
  96. #define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512)
  97. #define BL2_SIZE_BLOC_COUNT (CONFIG_BL2_SIZE/512)
  98. #define EXYNOS_COPY_SPI_FNPTR_ADDR 0x02020058
  99. #define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
  100. /* I2C */
  101. /* TODO(sjg@chromium.org): Move these two options to Kconfig */
  102. #define CONFIG_DM_I2C
  103. #define CONFIG_DM_I2C_COMPAT
  104. #define CONFIG_CMD_I2C
  105. #define CONFIG_SYS_I2C_S3C24X0
  106. #define CONFIG_SYS_I2C_S3C24X0_SPEED 100000 /* 100 Kbps */
  107. #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0x0
  108. #define CONFIG_I2C_EDID
  109. /* SPI */
  110. #ifdef CONFIG_SPI_FLASH
  111. #define CONFIG_EXYNOS_SPI
  112. #define CONFIG_CMD_SF
  113. #define CONFIG_CMD_SPI
  114. #define CONFIG_SPI_FLASH_WINBOND
  115. #define CONFIG_SPI_FLASH_GIGADEVICE
  116. #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
  117. #define CONFIG_SF_DEFAULT_SPEED 50000000
  118. #define EXYNOS5_SPI_NUM_CONTROLLERS 5
  119. #define CONFIG_OF_SPI
  120. #endif
  121. #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
  122. #define CONFIG_ENV_SPI_MODE SPI_MODE_0
  123. #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
  124. #define CONFIG_ENV_SPI_BUS 1
  125. #define CONFIG_ENV_SPI_MAX_HZ 50000000
  126. #endif
  127. /* Ethernet Controllor Driver */
  128. #ifdef CONFIG_CMD_NET
  129. #define CONFIG_SMC911X
  130. #define CONFIG_SMC911X_BASE 0x5000000
  131. #define CONFIG_SMC911X_16_BIT
  132. #define CONFIG_ENV_SROM_BANK 1
  133. #endif /*CONFIG_CMD_NET*/
  134. /* SHA hashing */
  135. #define CONFIG_CMD_HASH
  136. #define CONFIG_HASH_VERIFY
  137. #define CONFIG_SHA1
  138. #define CONFIG_SHA256
  139. /* Enable Time Command */
  140. #define CONFIG_CMD_TIME
  141. #define CONFIG_CMD_GPIO
  142. /* USB */
  143. #define CONFIG_CMD_USB
  144. #define CONFIG_USB_STORAGE
  145. #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
  146. #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
  147. #define CONFIG_USB_HOST_ETHER
  148. #define CONFIG_USB_ETHER_ASIX
  149. #define CONFIG_USB_ETHER_SMSC95XX
  150. /* USB boot mode */
  151. #define CONFIG_USB_BOOTING
  152. #define EXYNOS_COPY_USB_FNPTR_ADDR 0x02020070
  153. #define EXYNOS_USB_SECONDARY_BOOT 0xfeed0002
  154. #define EXYNOS_IRAM_SECONDARY_BASE 0x02020018
  155. /* Enable FIT support and comparison */
  156. #define CONFIG_FIT
  157. #define CONFIG_FIT_BEST_MATCH
  158. #define BOOT_TARGET_DEVICES(func) \
  159. func(MMC, mmc, 1) \
  160. func(MMC, mmc, 0) \
  161. func(PXE, pxe, na) \
  162. func(DHCP, dhcp, na)
  163. #include <config_distro_bootcmd.h>
  164. #ifndef MEM_LAYOUT_ENV_SETTINGS
  165. /* 2GB RAM, bootm size of 256M, load scripts after that */
  166. #define MEM_LAYOUT_ENV_SETTINGS \
  167. "bootm_size=0x10000000\0" \
  168. "kernel_addr_r=0x42000000\0" \
  169. "fdt_addr_r=0x43000000\0" \
  170. "ramdisk_addr_r=0x43300000\0" \
  171. "scriptaddr=0x50000000\0" \
  172. "pxefile_addr_r=0x51000000\0"
  173. #endif
  174. #ifndef EXYNOS_DEVICE_SETTINGS
  175. #define EXYNOS_DEVICE_SETTINGS \
  176. "stdin=serial\0" \
  177. "stdout=serial\0" \
  178. "stderr=serial\0"
  179. #endif
  180. #ifndef EXYNOS_FDTFILE_SETTING
  181. #define EXYNOS_FDTFILE_SETTING
  182. #endif
  183. #define CONFIG_EXTRA_ENV_SETTINGS \
  184. EXYNOS_DEVICE_SETTINGS \
  185. EXYNOS_FDTFILE_SETTING \
  186. MEM_LAYOUT_ENV_SETTINGS \
  187. BOOTENV
  188. #endif /* __CONFIG_EXYNOS5_COMMON_H */