vf610twr.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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_SYS_ICACHE_OFF
  27. #define CONFIG_SYS_CACHELINE_SIZE 64
  28. #if 0
  29. #define CONFIG_USB_GADGET
  30. #define CONFIG_USB_GADGET_DUALSPEED
  31. #define CONFIG_USB_GADGET_ARCOTG_UDC
  32. #define CONFIG_USB_GADGET_MASS_STORAGE
  33. #define CONFIG_USBDOWNLOAD_GADGET
  34. #define CONFIG_CMD_USB_MASS_STORAGE
  35. #define CONFIG_USB_GADGET_VBUS_DRAW 2
  36. #define CONFIG_G_DNL_VENDOR_NUM 0x066f
  37. #define CONFIG_G_DNL_PRODUCT_NUM 0x37ff
  38. #define CONFIG_G_DNL_MANUFACTURER "Freescale"
  39. #define CONFIG_DFU_FUNCTION
  40. #define CONFIG_FSL_UTP
  41. #define CONFIG_USB_DEVICE
  42. #define CONFIG_IMX_UDC 1
  43. #define CONFIG_FASTBOOT 1
  44. #define CONFIG_FASTBOOT_STORAGE_EMMC_SATA
  45. #define CONFIG_FASTBOOT_VENDOR_ID 0x18d1
  46. #define CONFIG_FASTBOOT_PRODUCT_ID 0x0d02
  47. #define CONFIG_FASTBOOT_BCD_DEVICE 0x311
  48. #define CONFIG_FASTBOOT_MANUFACTURER_STR "Freescale"
  49. #define CONFIG_FASTBOOT_PRODUCT_NAME_STR "Vybrid"
  50. #define CONFIG_FASTBOOT_INTERFACE_STR "Android fastboot"
  51. #define CONFIG_FASTBOOT_CONFIGURATION_STR "Android fastboot"
  52. #define CONFIG_FASTBOOT_SERIAL_NUM "12345"
  53. #define CONFIG_FASTBOOT_SATA_NO 0
  54. /* For system.img growing up more than 256MB, more buffer needs
  55. * * to receive the system.img*/
  56. #define CONFIG_FASTBOOT_TRANSFER_BUF 0x2c000000
  57. #define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x14000000 /* 320M byte */
  58. /* which mmc bus is your main storage ? */
  59. #define CONFIG_ANDROID_MAIN_MMC_BUS 3
  60. #define CONFIG_ANDROID_BOOT_PARTITION_MMC 1
  61. #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 5
  62. #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 2
  63. #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
  64. #endif
  65. /*
  66. * NAND FLASH
  67. */
  68. #define CONFIG_CMD_NAND
  69. #ifdef CONFIG_CMD_NAND
  70. #define CONFIG_JFFS2_NAND
  71. #define CONFIG_NAND_FSL_NFC
  72. #define CONFIG_SYS_NAND_BASE 0x400E0000
  73. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  74. #define NAND_MAX_CHIPS CONFIG_SYS_MAX_NAND_DEVICE
  75. #define CONFIG_SYS_NAND_SELECT_DEVICE
  76. #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */
  77. #endif
  78. #define CONFIG_DISPLAY_CPUINFO
  79. #define CONFIG_DISPLAY_BOARDINFO
  80. #define CONFIG_MACH_TYPE 4146
  81. #define CONFIG_SKIP_LOWLEVEL_INIT
  82. /* Enable passing of ATAGs */
  83. #define CONFIG_CMDLINE_TAG
  84. #define CONFIG_CMD_FUSE
  85. #ifdef CONFIG_CMD_FUSE
  86. #define CONFIG_MXC_OCOTP
  87. #endif
  88. #define VF610_500MHZ
  89. /* Size of malloc() pool */
  90. #define CONFIG_SYS_MALLOC_LEN (256<<10)
  91. #define CONFIG_BOARD_EARLY_INIT_F
  92. #define CONFIG_FSL_LPUART
  93. #define LPUART_BASE UART1_BASE
  94. /* Allow to overwrite serial and ethaddr */
  95. #define CONFIG_ENV_OVERWRITE
  96. #define CONFIG_SYS_UART_PORT (1)
  97. #define CONFIG_BAUDRATE 115200
  98. #undef CONFIG_CMD_IMLS
  99. #define CONFIG_MMC
  100. #define CONFIG_FSL_ESDHC
  101. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  102. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  103. #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
  104. #define CONFIG_CMD_MMC
  105. #define CONFIG_GENERIC_MMC
  106. #define CONFIG_CMD_FAT
  107. #define CONFIG_DOS_PARTITION
  108. #define CONFIG_CMD_PING
  109. #define CONFIG_CMD_DHCP
  110. #define CONFIG_CMD_MII
  111. #define CONFIG_CMD_NET
  112. #define CONFIG_FEC_MXC
  113. #define CONFIG_MII
  114. #define IMX_FEC_BASE ENET_BASE_ADDR
  115. #define CONFIG_FEC_XCV_TYPE RMII
  116. #define CONFIG_FEC_MXC_PHYADDR 0
  117. #define CONFIG_PHYLIB
  118. #define CONFIG_PHY_MICREL
  119. #define CONFIG_ETHADDR 00:e0:0c:bc:e5:60
  120. #define CONFIG_BOOTDELAY 3
  121. #define CONFIG_LOADADDR 0x80010000
  122. #define CONFIG_SYS_TEXT_BASE 0x3f000800
  123. #define CONFIG_EXTRA_ENV_SETTINGS \
  124. "script=boot.scr\0" \
  125. "uimage=uImage\0" \
  126. "console=ttymxc1\0" \
  127. "fdt_high=0xffffffff\0" \
  128. "initrd_high=0xffffffff\0" \
  129. "fdt_file=vf610-twr.dtb\0" \
  130. "fdt_addr=0x81000000\0" \
  131. "boot_fdt=try\0" \
  132. "ip_dyn=yes\0" \
  133. "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  134. "mmcpart=1\0" \
  135. "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
  136. "update_sd_firmware_filename=u-boot.imx\0" \
  137. "update_sd_firmware=" \
  138. "if test ${ip_dyn} = yes; then " \
  139. "setenv get_cmd dhcp; " \
  140. "else " \
  141. "setenv get_cmd tftp; " \
  142. "fi; " \
  143. "if mmc dev ${mmcdev}; then " \
  144. "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  145. "setexpr fw_sz ${filesize} / 0x200; " \
  146. "setexpr fw_sz ${fw_sz} + 1; " \
  147. "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  148. "fi; " \
  149. "fi\0" \
  150. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  151. "root=${mmcroot}\0" \
  152. "loadbootscript=" \
  153. "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  154. "bootscript=echo Running bootscript from mmc ...; " \
  155. "source\0" \
  156. "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
  157. "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  158. "mmcboot=echo Booting from mmc ...; " \
  159. "run mmcargs; " \
  160. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  161. "if run loadfdt; then " \
  162. "bootm ${loadaddr} - ${fdt_addr}; " \
  163. "else " \
  164. "if test ${boot_fdt} = try; then " \
  165. "bootm; " \
  166. "else " \
  167. "echo WARN: Cannot load the DT; " \
  168. "fi; " \
  169. "fi; " \
  170. "else " \
  171. "bootm; " \
  172. "fi;\0" \
  173. "netargs=setenv bootargs console=${console},${baudrate} " \
  174. "root=/dev/nfs " \
  175. "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  176. "netboot=echo Booting from net ...; " \
  177. "run netargs; " \
  178. "if test ${ip_dyn} = yes; then " \
  179. "setenv get_cmd dhcp; " \
  180. "else " \
  181. "setenv get_cmd tftp; " \
  182. "fi; " \
  183. "${get_cmd} ${uimage}; " \
  184. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  185. "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  186. "bootm ${loadaddr} - ${fdt_addr}; " \
  187. "else " \
  188. "if test ${boot_fdt} = try; then " \
  189. "bootm; " \
  190. "else " \
  191. "echo WARN: Cannot load the DT; " \
  192. "fi; " \
  193. "fi; " \
  194. "else " \
  195. "bootm; " \
  196. "fi;\0"
  197. #define CONFIG_BOOTCOMMAND \
  198. "mmc dev ${mmcdev}; if mmc rescan; then " \
  199. "if run loadbootscript; then " \
  200. "run bootscript; " \
  201. "else " \
  202. "if run loaduimage; then " \
  203. "run mmcboot; " \
  204. "else run netboot; " \
  205. "fi; " \
  206. "fi; " \
  207. "else run netboot; fi"
  208. /* Miscellaneous configurable options */
  209. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  210. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  211. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  212. #define CONFIG_SYS_PROMPT "=> "
  213. #undef CONFIG_AUTO_COMPLETE
  214. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  215. #define CONFIG_SYS_PBSIZE \
  216. (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  217. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  218. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  219. #define CONFIG_CMD_MEMTEST
  220. #define CONFIG_SYS_MEMTEST_START 0x80010000
  221. #define CONFIG_SYS_MEMTEST_END 0x87C00000
  222. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  223. #define CONFIG_SYS_HZ 1000
  224. /*
  225. * Stack sizes
  226. * The stack sizes are set up in start.S using the settings below
  227. */
  228. #define CONFIG_STACKSIZE (64 * 1024) /* regular stack */
  229. /* Physical memory map */
  230. #define CONFIG_NR_DRAM_BANKS 1
  231. #define PHYS_SDRAM (0x80000000)
  232. #define PHYS_SDRAM_SIZE (128 * 1024 * 1024)
  233. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  234. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  235. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  236. #define CONFIG_SYS_INIT_SP_OFFSET \
  237. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  238. #define CONFIG_SYS_INIT_SP_ADDR \
  239. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  240. /* FLASH and environment organization */
  241. #define CONFIG_SYS_NO_FLASH
  242. #define CONFIG_ENV_SIZE (8 * 1024)
  243. #define CONFIG_ENV_IS_IN_MMC
  244. #undef CONFIG_ENV_IS_NOWHERE
  245. #define CONFIG_ENV_OFFSET (12 * 64 * 1024)
  246. #define CONFIG_SYS_MMC_ENV_DEV 0
  247. #define CONFIG_OF_LIBFDT
  248. #define CONFIG_CMD_BOOTZ
  249. #define CONFIG_VF610_QSPI
  250. #endif