trats.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /*
  2. * Copyright (C) 2011 Samsung Electronics
  3. * Heungjun Kim <riverful.kim@samsung.com>
  4. *
  5. * Configuation settings for the SAMSUNG TRATS (EXYNOS4210) board.
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef __CONFIG_TRATS_H
  10. #define __CONFIG_TRATS_H
  11. #include <configs/exynos4-common.h>
  12. #define CONFIG_TRATS
  13. #define CONFIG_TIZEN /* TIZEN lib */
  14. #define CONFIG_SYS_L2CACHE_OFF
  15. #ifndef CONFIG_SYS_L2CACHE_OFF
  16. #define CONFIG_SYS_L2_PL310
  17. #define CONFIG_SYS_PL310_BASE 0x10502000
  18. #endif
  19. /* TRATS has 4 banks of DRAM */
  20. #define CONFIG_NR_DRAM_BANKS 4
  21. #define CONFIG_SYS_SDRAM_BASE 0x40000000
  22. #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
  23. #define CONFIG_SYS_TEXT_BASE 0x63300000
  24. #define SDRAM_BANK_SIZE (256 << 20) /* 256 MB */
  25. /* memtest works on */
  26. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
  27. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5000000)
  28. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4800000)
  29. #define CONFIG_SYS_TEXT_BASE 0x63300000
  30. /* select serial console configuration */
  31. #define CONFIG_SERIAL2
  32. #define CONFIG_BAUDRATE 115200
  33. /* Console configuration */
  34. /* MACH_TYPE_TRATS macro will be removed once added to mach-types */
  35. #define MACH_TYPE_TRATS 3928
  36. #define CONFIG_MACH_TYPE MACH_TYPE_TRATS
  37. #define CONFIG_BOOTARGS "Please use defined boot"
  38. #define CONFIG_BOOTCOMMAND "run autoboot"
  39. #define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
  40. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \
  41. - GENERATED_GBL_DATA_SIZE)
  42. #define CONFIG_SYS_MEM_TOP_HIDE (1 << 20) /* ram console */
  43. #define CONFIG_SYS_MONITOR_BASE 0x00000000
  44. #define CONFIG_BOOTBLOCK "10"
  45. #define CONFIG_ENV_COMMON_BOOT "${console} ${meminfo}"
  46. #define CONFIG_ENV_IS_IN_MMC
  47. #define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV
  48. #define CONFIG_ENV_SIZE 4096
  49. #define CONFIG_ENV_OFFSET ((32 - 4) << 10) /* 32KiB - 4KiB */
  50. #define CONFIG_ENV_OVERWRITE
  51. #define CONFIG_ENV_VARS_UBOOT_CONFIG
  52. #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  53. /* Tizen - partitions definitions */
  54. #define PARTS_CSA "csa-mmc"
  55. #define PARTS_BOOT "boot"
  56. #define PARTS_QBOOT "qboot"
  57. #define PARTS_CSC "csc"
  58. #define PARTS_ROOT "platform"
  59. #define PARTS_DATA "data"
  60. #define PARTS_UMS "ums"
  61. #define PARTS_DEFAULT \
  62. "uuid_disk=${uuid_gpt_disk};" \
  63. "name="PARTS_CSA",start=5MiB,size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \
  64. "name="PARTS_BOOT",size=60MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \
  65. "name="PARTS_QBOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_QBOOT"};" \
  66. "name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \
  67. "name="PARTS_ROOT",size=1536MiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \
  68. "name="PARTS_DATA",size=3000MiB,uuid=${uuid_gpt_"PARTS_DATA"};" \
  69. "name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \
  70. #define CONFIG_DFU_ALT \
  71. "u-boot raw 0x80 0x400;" \
  72. "/uImage ext4 0 2;" \
  73. "/modem.bin ext4 0 2;" \
  74. "/exynos4210-trats.dtb ext4 0 2;" \
  75. ""PARTS_CSA" part 0 1;" \
  76. ""PARTS_BOOT" part 0 2;" \
  77. ""PARTS_QBOOT" part 0 3;" \
  78. ""PARTS_CSC" part 0 4;" \
  79. ""PARTS_ROOT" part 0 5;" \
  80. ""PARTS_DATA" part 0 6;" \
  81. ""PARTS_UMS" part 0 7;" \
  82. "params.bin raw 0x38 0x8;" \
  83. "/Image.itb ext4 0 2\0"
  84. #define CONFIG_EXTRA_ENV_SETTINGS \
  85. "bootk=" \
  86. "run loaduimage;" \
  87. "if run loaddtb; then " \
  88. "bootm 0x40007FC0 - ${fdtaddr};" \
  89. "fi;" \
  90. "bootm 0x40007FC0;\0" \
  91. "updatebackup=" \
  92. "mmc dev 0 2; mmc write 0 0x42100000 0 0x200;" \
  93. "mmc dev 0 0\0" \
  94. "updatebootb=" \
  95. "mmc read 0 0x42100000 0x80 0x200; run updatebackup\0" \
  96. "lpj=lpj=3981312\0" \
  97. "nfsboot=" \
  98. "setenv bootargs root=/dev/nfs rw " \
  99. "nfsroot=${nfsroot},nolock,tcp " \
  100. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  101. "${netmask}:generic:usb0:off " CONFIG_ENV_COMMON_BOOT \
  102. "; run bootk\0" \
  103. "ramfsboot=" \
  104. "setenv bootargs root=/dev/ram0 rw rootfstype=ext2 " \
  105. "${console} ${meminfo} " \
  106. "initrd=0x43000000,8M ramdisk=8192\0" \
  107. "mmcboot=" \
  108. "setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
  109. "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \
  110. "run bootk\0" \
  111. "bootchart=setenv opts init=/sbin/bootchartd; run bootcmd\0" \
  112. "boottrace=setenv opts initcall_debug; run bootcmd\0" \
  113. "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
  114. "verify=n\0" \
  115. "rootfstype=ext4\0" \
  116. "console=" CONFIG_DEFAULT_CONSOLE \
  117. "meminfo=crashkernel=32M@0x50000000\0" \
  118. "nfsroot=/nfsroot/arm\0" \
  119. "bootblock=" CONFIG_BOOTBLOCK "\0" \
  120. "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage\0" \
  121. "loaddtb=ext4load mmc ${mmcdev}:${mmcbootpart} ${fdtaddr} " \
  122. "${fdtfile}\0" \
  123. "mmcdev=0\0" \
  124. "mmcbootpart=2\0" \
  125. "mmcrootpart=5\0" \
  126. "opts=always_resume=1\0" \
  127. "partitions=" PARTS_DEFAULT \
  128. "dfu_alt_info=" CONFIG_DFU_ALT \
  129. "spladdr=0x40000100\0" \
  130. "splsize=0x200\0" \
  131. "splfile=falcon.bin\0" \
  132. "spl_export=" \
  133. "setexpr spl_imgsize ${splsize} + 8 ;" \
  134. "setenv spl_imgsize 0x${spl_imgsize};" \
  135. "setexpr spl_imgaddr ${spladdr} - 8 ;" \
  136. "setexpr spl_addr_tmp ${spladdr} - 4 ;" \
  137. "mw.b ${spl_imgaddr} 0x00 ${spl_imgsize};run loaduimage;" \
  138. "setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
  139. "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo};" \
  140. "spl export atags 0x40007FC0;" \
  141. "crc32 ${spladdr} ${splsize} ${spl_imgaddr};" \
  142. "mw.l ${spl_addr_tmp} ${splsize};" \
  143. "ext4write mmc ${mmcdev}:${mmcbootpart}" \
  144. " /${splfile} ${spl_imgaddr} ${spl_imgsize};" \
  145. "setenv spl_imgsize;" \
  146. "setenv spl_imgaddr;" \
  147. "setenv spl_addr_tmp;\0" \
  148. CONFIG_EXTRA_ENV_ITB \
  149. "fdtaddr=40800000\0" \
  150. /* Falcon mode definitions */
  151. #define CONFIG_CMD_SPL
  152. #define CONFIG_SYS_SPL_ARGS_ADDR CONFIG_SYS_SDRAM_BASE + 0x100
  153. /* GPT */
  154. #define CONFIG_RANDOM_UUID
  155. /* Security subsystem - enable hw_rand() */
  156. #define CONFIG_EXYNOS_ACE_SHA
  157. #define CONFIG_LIB_HW_RAND
  158. /* Common misc for Samsung */
  159. #define CONFIG_MISC_COMMON
  160. #define CONFIG_MISC_INIT_R
  161. /* Download menu - Samsung common */
  162. #define CONFIG_LCD_MENU
  163. #define CONFIG_LCD_MENU_BOARD
  164. /* Download menu - definitions for check keys */
  165. #ifndef __ASSEMBLY__
  166. #include <power/max8997_pmic.h>
  167. #define KEY_PWR_PMIC_NAME "MAX8997_PMIC"
  168. #define KEY_PWR_STATUS_REG MAX8997_REG_STATUS1
  169. #define KEY_PWR_STATUS_MASK (1 << 0)
  170. #define KEY_PWR_INTERRUPT_REG MAX8997_REG_INT1
  171. #define KEY_PWR_INTERRUPT_MASK (1 << 0)
  172. #define KEY_VOL_UP_GPIO EXYNOS4_GPIO_X20
  173. #define KEY_VOL_DOWN_GPIO EXYNOS4_GPIO_X21
  174. #endif /* __ASSEMBLY__ */
  175. /* LCD console */
  176. #define LCD_BPP LCD_COLOR16
  177. #define CONFIG_SYS_WHITE_ON_BLACK
  178. /* LCD */
  179. #define CONFIG_BMP_16BPP
  180. #define CONFIG_FB_ADDR 0x52504000
  181. #define CONFIG_EXYNOS_MIPI_DSIM
  182. #define CONFIG_VIDEO_BMP_GZIP
  183. #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
  184. #endif /* __CONFIG_H */