cgtqmx6eval.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /*
  2. *
  3. * Congatec Conga-QEVAl board configuration file.
  4. *
  5. * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
  6. * Based on Freescale i.MX6Q Sabre Lite board configuration file.
  7. * Copyright (C) 2013, Adeneo Embedded <www.adeneo-embedded.com>
  8. * Leo Sartre, <lsartre@adeneo-embedded.com>
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __CONFIG_CGTQMX6EVAL_H
  26. #define __CONFIG_CGTQMX6EVAL_H
  27. #define CONFIG_MX6
  28. #include "mx6_common.h"
  29. #define CONFIG_DISPLAY_CPUINFO
  30. #define CONFIG_DISPLAY_BOARDINFO
  31. #define CONFIG_MACH_TYPE 4122
  32. #include <asm/arch/imx-regs.h>
  33. #include <asm/imx-common/gpio.h>
  34. #define CONFIG_CMDLINE_TAG
  35. #define CONFIG_SETUP_MEMORY_TAGS
  36. #define CONFIG_INITRD_TAG
  37. #define CONFIG_REVISION_TAG
  38. /* Size of malloc() pool */
  39. #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
  40. #define CONFIG_BOARD_EARLY_INIT_F
  41. #define CONFIG_MISC_INIT_R
  42. #define CONFIG_MXC_GPIO
  43. #define CONFIG_MXC_UART
  44. #define CONFIG_MXC_UART_BASE UART2_BASE
  45. /* MMC Configs */
  46. #define CONFIG_FSL_ESDHC
  47. #define CONFIG_FSL_USDHC
  48. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  49. #define CONFIG_MMC
  50. #define CONFIG_CMD_MMC
  51. #define CONFIG_GENERIC_MMC
  52. #define CONFIG_BOUNCE_BUFFER
  53. #define CONFIG_CMD_EXT2
  54. #define CONFIG_CMD_FAT
  55. #define CONFIG_DOS_PARTITION
  56. /* Miscellaneous commands */
  57. #define CONFIG_CMD_BMODE
  58. /* allow to overwrite serial and ethaddr */
  59. #define CONFIG_ENV_OVERWRITE
  60. #define CONFIG_CONS_INDEX 1
  61. #define CONFIG_BAUDRATE 115200
  62. /* Command definition */
  63. #include <config_cmd_default.h>
  64. #undef CONFIG_CMD_IMLS
  65. #define CONFIG_BOOTDELAY 3
  66. #define CONFIG_LOADADDR 0x12000000
  67. #define CONFIG_SYS_TEXT_BASE 0x17800000
  68. #define CONFIG_DEFAULT_FDT_FILE "imx6q-congatec.dtb"
  69. #define CONFIG_EXTRA_ENV_SETTINGS \
  70. "script=boot.scr\0" \
  71. "uimage=uImage\0" \
  72. "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
  73. "boot_dir=/boot\0" \
  74. "console=ttymxc1\0" \
  75. "fdt_high=0xffffffff\0" \
  76. "initrd_high=0xffffffff\0" \
  77. "fdt_addr=0x11000000\0" \
  78. "boot_fdt=try\0" \
  79. "mmcdev=1\0" \
  80. "mmcpart=1\0" \
  81. "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
  82. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  83. "root=${mmcroot}\0" \
  84. "loadbootscript=" \
  85. "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  86. "bootscript=echo Running bootscript from mmc ...; " \
  87. "source\0" \
  88. "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
  89. "${boot_dir}/${uimage}\0" \
  90. "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} " \
  91. "${boot_dir}/${fdt_file}\0" \
  92. "mmcboot=echo Booting from mmc ...; " \
  93. "run mmcargs; " \
  94. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  95. "if run loadfdt; then " \
  96. "bootm ${loadaddr} - ${fdt_addr}; " \
  97. "else " \
  98. "if test ${boot_fdt} = try; then " \
  99. "bootm; " \
  100. "else " \
  101. "echo WARN: Cannot load the DT; " \
  102. "fi; " \
  103. "fi; " \
  104. "else " \
  105. "bootm; " \
  106. "fi;\0"
  107. #define CONFIG_BOOTCOMMAND \
  108. "mmc dev ${mmcdev};" \
  109. "mmc dev ${mmcdev}; if mmc rescan; then " \
  110. "if run loadbootscript; then " \
  111. "run bootscript; " \
  112. "else " \
  113. "if run loaduimage; then " \
  114. "run mmcboot; " \
  115. "else "\
  116. "echo ERR: Fail to boot from mmc; " \
  117. "fi; " \
  118. "fi; " \
  119. "else echo ERR: Fail to boot from mmc; fi"
  120. /* Miscellaneous configurable options */
  121. #define CONFIG_SYS_LONGHELP
  122. #define CONFIG_SYS_HUSH_PARSER
  123. #define CONFIG_SYS_PROMPT "CGT-QMX6-Quad U-Boot > "
  124. #define CONFIG_AUTO_COMPLETE
  125. #define CONFIG_SYS_CBSIZE 256
  126. /* Print Buffer Size */
  127. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  128. #define CONFIG_SYS_MAXARGS 16
  129. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  130. #define CONFIG_SYS_MEMTEST_START 0x10000000
  131. #define CONFIG_SYS_MEMTEST_END 0x10010000
  132. #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
  133. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  134. #define CONFIG_SYS_HZ 1000
  135. #define CONFIG_CMDLINE_EDITING
  136. /* Physical Memory Map */
  137. #define CONFIG_NR_DRAM_BANKS 1
  138. #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
  139. #define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
  140. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  141. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  142. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  143. #define CONFIG_SYS_INIT_SP_OFFSET \
  144. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  145. #define CONFIG_SYS_INIT_SP_ADDR \
  146. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  147. /* FLASH and environment organization */
  148. #define CONFIG_SYS_NO_FLASH
  149. #define CONFIG_ENV_SIZE (8 * 1024)
  150. #define CONFIG_ENV_IS_IN_MMC
  151. #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
  152. #define CONFIG_SYS_MMC_ENV_DEV 0
  153. #define CONFIG_OF_LIBFDT
  154. #define CONFIG_CMD_BOOTZ
  155. #ifndef CONFIG_SYS_DCACHE_OFF
  156. #define CONFIG_CMD_CACHE
  157. #endif
  158. #endif /* __CONFIG_CGTQMX6EVAL_H */