vf610twr.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. /*
  2. * Copyright 2013 Freescale Semiconductor, Inc.
  3. *
  4. * Configuration settings for the Freescale Vybrid vf610twr 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. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef __CONFIG_H
  22. #define __CONFIG_H
  23. #include <asm/arch/imx-regs.h>
  24. #include <config_cmd_default.h>
  25. #define CONFIG_VF610
  26. #define CONFIG_USB_DEVICE
  27. #define CONFIG_IMX_UDC 1
  28. #define CONFIG_FASTBOOT 1
  29. #define CONFIG_FASTBOOT_STORAGE_EMMC_SATA
  30. #define CONFIG_FASTBOOT_VENDOR_ID 0x18d1
  31. #define CONFIG_FASTBOOT_PRODUCT_ID 0x0d02
  32. #define CONFIG_FASTBOOT_BCD_DEVICE 0x311
  33. #define CONFIG_FASTBOOT_MANUFACTURER_STR "Freescale"
  34. #define CONFIG_FASTBOOT_PRODUCT_NAME_STR "Vybrid"
  35. #define CONFIG_FASTBOOT_INTERFACE_STR "Android fastboot"
  36. #define CONFIG_FASTBOOT_CONFIGURATION_STR "Android fastboot"
  37. #define CONFIG_FASTBOOT_SERIAL_NUM "12345"
  38. #define CONFIG_FASTBOOT_SATA_NO 0
  39. /* For system.img growing up more than 256MB, more buffer needs
  40. * * to receive the system.img*/
  41. #define CONFIG_FASTBOOT_TRANSFER_BUF 0x2c000000
  42. #define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x14000000 /* 320M byte */
  43. /* which mmc bus is your main storage ? */
  44. #define CONFIG_ANDROID_MAIN_MMC_BUS 3
  45. #define CONFIG_ANDROID_BOOT_PARTITION_MMC 1
  46. #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 5
  47. #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 2
  48. #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
  49. #define CONFIG_DISPLAY_CPUINFO
  50. #define CONFIG_DISPLAY_BOARDINFO
  51. #define CONFIG_MACH_TYPE 4146
  52. #define CONFIG_SKIP_LOWLEVEL_INIT
  53. /* Enable passing of ATAGs */
  54. #define CONFIG_CMDLINE_TAG
  55. #define CONFIG_CMD_FUSE
  56. #ifdef CONFIG_CMD_FUSE
  57. #define CONFIG_MXC_OCOTP
  58. #endif
  59. /* Size of malloc() pool */
  60. #define CONFIG_SYS_MALLOC_LEN (16<<10)
  61. #define CONFIG_BOARD_EARLY_INIT_F
  62. #define CONFIG_FSL_LPUART
  63. #define LPUART_BASE UART1_BASE
  64. /* Allow to overwrite serial and ethaddr */
  65. #define CONFIG_ENV_OVERWRITE
  66. #define CONFIG_SYS_UART_PORT (1)
  67. #define CONFIG_BAUDRATE 115200
  68. #undef CONFIG_CMD_IMLS
  69. #define CONFIG_MMC
  70. #define CONFIG_FSL_ESDHC
  71. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  72. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  73. #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
  74. #define CONFIG_CMD_MMC
  75. #define CONFIG_GENERIC_MMC
  76. #define CONFIG_CMD_FAT
  77. #define CONFIG_DOS_PARTITION
  78. #if 0
  79. #define CONFIG_CMD_PING
  80. #define CONFIG_CMD_DHCP
  81. #define CONFIG_CMD_MII
  82. #define CONFIG_CMD_NET
  83. #define CONFIG_FEC_MXC
  84. #define CONFIG_MII
  85. #define IMX_FEC_BASE ENET_BASE_ADDR
  86. #define CONFIG_FEC_XCV_TYPE RMII
  87. #define CONFIG_FEC_MXC_PHYADDR 0
  88. #define CONFIG_PHYLIB
  89. #define CONFIG_PHY_MICREL
  90. #endif
  91. #define CONFIG_BOOTDELAY 3
  92. #define CONFIG_LOADADDR 0x3f400000
  93. #define CONFIG_SYS_TEXT_BASE 0x3f008000
  94. #define CONFIG_EXTRA_ENV_SETTINGS \
  95. "script=boot.scr\0" \
  96. "uimage=uImage\0" \
  97. "console=ttyLP1\0" \
  98. "fdt_high=0xffffffff\0" \
  99. "initrd_high=0xffffffff\0" \
  100. "fdt_file=vf610-twr.dtb\0" \
  101. "fdt_addr=0x81000000\0" \
  102. "boot_fdt=try\0" \
  103. "ip_dyn=yes\0" \
  104. "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  105. "mmcpart=1\0" \
  106. "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
  107. "update_sd_firmware_filename=u-boot.imx\0" \
  108. "update_sd_firmware=" \
  109. "if test ${ip_dyn} = yes; then " \
  110. "setenv get_cmd dhcp; " \
  111. "else " \
  112. "setenv get_cmd tftp; " \
  113. "fi; " \
  114. "if mmc dev ${mmcdev}; then " \
  115. "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  116. "setexpr fw_sz ${filesize} / 0x200; " \
  117. "setexpr fw_sz ${fw_sz} + 1; " \
  118. "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  119. "fi; " \
  120. "fi\0" \
  121. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  122. "root=${mmcroot}\0" \
  123. "loadbootscript=" \
  124. "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  125. "bootscript=echo Running bootscript from mmc ...; " \
  126. "source\0" \
  127. "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
  128. "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  129. "mmcboot=echo Booting from mmc ...; " \
  130. "run mmcargs; " \
  131. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  132. "if run loadfdt; then " \
  133. "bootm ${loadaddr} - ${fdt_addr}; " \
  134. "else " \
  135. "if test ${boot_fdt} = try; then " \
  136. "bootm; " \
  137. "else " \
  138. "echo WARN: Cannot load the DT; " \
  139. "fi; " \
  140. "fi; " \
  141. "else " \
  142. "bootm; " \
  143. "fi;\0" \
  144. "netargs=setenv bootargs console=${console},${baudrate} " \
  145. "root=/dev/nfs " \
  146. "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  147. "netboot=echo Booting from net ...; " \
  148. "run netargs; " \
  149. "if test ${ip_dyn} = yes; then " \
  150. "setenv get_cmd dhcp; " \
  151. "else " \
  152. "setenv get_cmd tftp; " \
  153. "fi; " \
  154. "${get_cmd} ${uimage}; " \
  155. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  156. "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  157. "bootm ${loadaddr} - ${fdt_addr}; " \
  158. "else " \
  159. "if test ${boot_fdt} = try; then " \
  160. "bootm; " \
  161. "else " \
  162. "echo WARN: Cannot load the DT; " \
  163. "fi; " \
  164. "fi; " \
  165. "else " \
  166. "bootm; " \
  167. "fi;\0"
  168. #define CONFIG_BOOTCOMMAND \
  169. "mmc dev ${mmcdev}; if mmc rescan; then " \
  170. "if run loadbootscript; then " \
  171. "run bootscript; " \
  172. "else " \
  173. "if run loaduimage; then " \
  174. "run mmcboot; " \
  175. "else run netboot; " \
  176. "fi; " \
  177. "fi; " \
  178. "else run netboot; fi"
  179. /* Miscellaneous configurable options */
  180. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  181. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  182. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  183. #define CONFIG_SYS_PROMPT "=> "
  184. #undef CONFIG_AUTO_COMPLETE
  185. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  186. #define CONFIG_SYS_PBSIZE \
  187. (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  188. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  189. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  190. #define CONFIG_CMD_MEMTEST
  191. #define CONFIG_SYS_MEMTEST_START 0x3f400000
  192. #define CONFIG_SYS_MEMTEST_END 0x3f480000
  193. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  194. #define CONFIG_SYS_HZ 1000
  195. /*
  196. * Stack sizes
  197. * The stack sizes are set up in start.S using the settings below
  198. */
  199. #define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
  200. /* Physical memory map */
  201. #define CONFIG_NR_DRAM_BANKS 1
  202. #define PHYS_SDRAM (0x3f400000)
  203. #define PHYS_SDRAM_SIZE (512 * 1024)
  204. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  205. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  206. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  207. #define CONFIG_SYS_INIT_SP_OFFSET \
  208. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  209. #define CONFIG_SYS_INIT_SP_ADDR \
  210. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  211. /* FLASH and environment organization */
  212. #define CONFIG_SYS_NO_FLASH
  213. #define CONFIG_ENV_SIZE (8 * 1024)
  214. #undef CONFIG_ENV_IS_IN_MMC
  215. #define CONFIG_ENV_IS_NOWHERE
  216. #define CONFIG_ENV_OFFSET (12 * 64 * 1024)
  217. #define CONFIG_SYS_MMC_ENV_DEV 0
  218. #define CONFIG_OF_LIBFDT
  219. #define CONFIG_CMD_BOOTZ
  220. #endif