mx6qsabre_common.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. * Copyright (C) 2012 Freescale Semiconductor, Inc.
  3. *
  4. * Configuration settings for the Freescale i.MX6Q SabreSD board.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef __MX6QSABRE_COMMON_CONFIG_H
  17. #define __MX6QSABRE_COMMON_CONFIG_H
  18. #define CONFIG_MX6
  19. #define CONFIG_MX6Q
  20. #define CONFIG_DISPLAY_CPUINFO
  21. #define CONFIG_DISPLAY_BOARDINFO
  22. #include <asm/arch/imx-regs.h>
  23. #define CONFIG_CMDLINE_TAG
  24. #define CONFIG_SETUP_MEMORY_TAGS
  25. #define CONFIG_INITRD_TAG
  26. #define CONFIG_REVISION_TAG
  27. /* Size of malloc() pool */
  28. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
  29. #define CONFIG_BOARD_EARLY_INIT_F
  30. #define CONFIG_MXC_GPIO
  31. #define CONFIG_MXC_UART
  32. /* MMC Configs */
  33. #define CONFIG_FSL_ESDHC
  34. #define CONFIG_FSL_USDHC
  35. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  36. #define CONFIG_MMC
  37. #define CONFIG_CMD_MMC
  38. #define CONFIG_GENERIC_MMC
  39. #define CONFIG_BOUNCE_BUFFER
  40. #define CONFIG_CMD_EXT2
  41. #define CONFIG_CMD_FAT
  42. #define CONFIG_DOS_PARTITION
  43. #define CONFIG_CMD_PING
  44. #define CONFIG_CMD_DHCP
  45. #define CONFIG_CMD_MII
  46. #define CONFIG_CMD_NET
  47. #define CONFIG_FEC_MXC
  48. #define CONFIG_MII
  49. #define IMX_FEC_BASE ENET_BASE_ADDR
  50. #define CONFIG_FEC_XCV_TYPE RGMII
  51. #define CONFIG_ETHPRIME "FEC"
  52. #define CONFIG_FEC_MXC_PHYADDR 1
  53. #define CONFIG_PHYLIB
  54. #define CONFIG_PHY_ATHEROS
  55. /* allow to overwrite serial and ethaddr */
  56. #define CONFIG_ENV_OVERWRITE
  57. #define CONFIG_CONS_INDEX 1
  58. #define CONFIG_BAUDRATE 115200
  59. /* Command definition */
  60. #include <config_cmd_default.h>
  61. #define CONFIG_CMD_BOOTZ
  62. #undef CONFIG_CMD_IMLS
  63. #define CONFIG_BOOTDELAY 1
  64. #define CONFIG_LOADADDR 0x12000000
  65. #define CONFIG_SYS_TEXT_BASE 0x17800000
  66. #define CONFIG_EXTRA_ENV_SETTINGS \
  67. "script=boot.scr\0" \
  68. "uimage=uImage\0" \
  69. "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
  70. "fdt_addr=0x11000000\0" \
  71. "boot_fdt=try\0" \
  72. "ip_dyn=yes\0" \
  73. "console=" CONFIG_CONSOLE_DEV "\0" \
  74. "fdt_high=0xffffffff\0" \
  75. "initrd_high=0xffffffff\0" \
  76. "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  77. "mmcpart=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \
  78. "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
  79. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  80. "root=${mmcroot}\0" \
  81. "loadbootscript=" \
  82. "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  83. "bootscript=echo Running bootscript from mmc ...; " \
  84. "source\0" \
  85. "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
  86. "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  87. "mmcboot=echo Booting from mmc ...; " \
  88. "run mmcargs; " \
  89. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  90. "if run loadfdt; then " \
  91. "bootm ${loadaddr} - ${fdt_addr}; " \
  92. "else " \
  93. "if test ${boot_fdt} = try; then " \
  94. "bootm; " \
  95. "else " \
  96. "echo WARN: Cannot load the DT; " \
  97. "fi; " \
  98. "fi; " \
  99. "else " \
  100. "bootm; " \
  101. "fi;\0" \
  102. "netargs=setenv bootargs console=${console},${baudrate} " \
  103. "root=/dev/nfs " \
  104. "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  105. "netboot=echo Booting from net ...; " \
  106. "run netargs; " \
  107. "if test ${ip_dyn} = yes; then " \
  108. "setenv get_cmd dhcp; " \
  109. "else " \
  110. "setenv get_cmd tftp; " \
  111. "fi; " \
  112. "${get_cmd} ${uimage}; " \
  113. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  114. "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  115. "bootm ${loadaddr} - ${fdt_addr}; " \
  116. "else " \
  117. "if test ${boot_fdt} = try; then " \
  118. "bootm; " \
  119. "else " \
  120. "echo WARN: Cannot load the DT; " \
  121. "fi; " \
  122. "fi; " \
  123. "else " \
  124. "bootm; " \
  125. "fi;\0"
  126. #define CONFIG_BOOTCOMMAND \
  127. "mmc dev ${mmcdev};" \
  128. "if mmc rescan ${mmcdev}; then " \
  129. "if run loadbootscript; then " \
  130. "run bootscript; " \
  131. "else " \
  132. "if run loaduimage; then " \
  133. "run mmcboot; " \
  134. "else run netboot; " \
  135. "fi; " \
  136. "fi; " \
  137. "else run netboot; fi"
  138. #define CONFIG_ARP_TIMEOUT 200UL
  139. /* Miscellaneous configurable options */
  140. #define CONFIG_SYS_LONGHELP
  141. #define CONFIG_SYS_HUSH_PARSER
  142. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  143. #define CONFIG_SYS_PROMPT "U-Boot > "
  144. #define CONFIG_AUTO_COMPLETE
  145. #define CONFIG_SYS_CBSIZE 256
  146. /* Print Buffer Size */
  147. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  148. #define CONFIG_SYS_MAXARGS 16
  149. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  150. #define CONFIG_SYS_MEMTEST_START 0x10000000
  151. #define CONFIG_SYS_MEMTEST_END 0x10010000
  152. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  153. #define CONFIG_SYS_HZ 1000
  154. #define CONFIG_CMDLINE_EDITING
  155. #define CONFIG_STACKSIZE (128 * 1024)
  156. /* Physical Memory Map */
  157. #define CONFIG_NR_DRAM_BANKS 1
  158. #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
  159. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  160. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  161. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  162. #define CONFIG_SYS_INIT_SP_OFFSET \
  163. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  164. #define CONFIG_SYS_INIT_SP_ADDR \
  165. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  166. /* FLASH and environment organization */
  167. #define CONFIG_SYS_NO_FLASH
  168. #define CONFIG_ENV_SIZE (8 * 1024)
  169. #define CONFIG_ENV_IS_IN_MMC
  170. #if defined(CONFIG_ENV_IS_IN_MMC)
  171. #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
  172. #endif
  173. #define CONFIG_OF_LIBFDT
  174. #ifndef CONFIG_SYS_DCACHE_OFF
  175. #define CONFIG_CMD_CACHE
  176. #endif
  177. #endif /* __MX6QSABRE_COMMON_CONFIG_H */