pcm052.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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 4391
  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. /* Size of malloc() pool */
  89. #define CONFIG_SYS_MALLOC_LEN (256<<10)
  90. #define CONFIG_BOARD_EARLY_INIT_F
  91. #define CONFIG_FSL_LPUART
  92. #define LPUART_BASE UART1_BASE
  93. /* Allow to overwrite serial and ethaddr */
  94. #define CONFIG_ENV_OVERWRITE
  95. #define CONFIG_SYS_UART_PORT (1)
  96. #define CONFIG_BAUDRATE 115200
  97. #undef CONFIG_CMD_IMLS
  98. #define CONFIG_MMC
  99. #define CONFIG_FSL_ESDHC
  100. #define CONFIG_SYS_FSL_ESDHC_ADDR 0
  101. #define CONFIG_SYS_FSL_ESDHC_NUM 1
  102. #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
  103. #define CONFIG_CMD_MMC
  104. #define CONFIG_GENERIC_MMC
  105. #define CONFIG_CMD_FAT
  106. #define CONFIG_DOS_PARTITION
  107. #define CONFIG_CMD_PING
  108. #define CONFIG_CMD_DHCP
  109. #define CONFIG_CMD_MII
  110. #define CONFIG_CMD_NET
  111. #define CONFIG_FEC_MXC
  112. #define CONFIG_MII
  113. #define IMX_FEC_BASE ENET_BASE_ADDR
  114. #define CONFIG_FEC_XCV_TYPE RMII
  115. #define CONFIG_FEC_MXC_PHYADDR 0
  116. #define CONFIG_PHYLIB
  117. #define CONFIG_PHY_MICREL
  118. #define CONFIG_ETHADDR 00:e0:0c:bc:e5:60
  119. #define CONFIG_BOOTDELAY 3
  120. #define CONFIG_LOADADDR 0x80010000
  121. #define CONFIG_SYS_TEXT_BASE 0x3f000800
  122. #define CONFIG_EXTRA_ENV_SETTINGS \
  123. "script=boot.scr\0" \
  124. "uimage=uImage\0" \
  125. "console=ttyLP1\0" \
  126. "fdt_high=0xffffffff\0" \
  127. "initrd_high=0xffffffff\0" \
  128. "fdt_file=twr_vf600.dtb\0" \
  129. "fdt_addr=0x81000000\0" \
  130. "boot_fdt=try\0" \
  131. "ip_dyn=yes\0" \
  132. "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
  133. "mmcpart=2\0" \
  134. "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \
  135. "update_sd_firmware_filename=u-boot.imx\0" \
  136. "update_sd_firmware=" \
  137. "if test ${ip_dyn} = yes; then " \
  138. "setenv get_cmd dhcp; " \
  139. "else " \
  140. "setenv get_cmd tftp; " \
  141. "fi; " \
  142. "if mmc dev ${mmcdev}; then " \
  143. "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  144. "setexpr fw_sz ${filesize} / 0x200; " \
  145. "setexpr fw_sz ${fw_sz} + 1; " \
  146. "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  147. "fi; " \
  148. "fi\0" \
  149. "mmcargs=setenv bootargs console=${console},${baudrate} " \
  150. "root=${mmcroot}\0" \
  151. "loadbootscript=" \
  152. "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  153. "bootscript=echo Running bootscript from mmc ...; " \
  154. "source\0" \
  155. "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
  156. "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  157. "mmcboot=echo Booting from mmc ...; " \
  158. "run mmcargs; " \
  159. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  160. "if run loadfdt; then " \
  161. "bootm ${loadaddr} - ${fdt_addr}; " \
  162. "else " \
  163. "if test ${boot_fdt} = try; then " \
  164. "bootm; " \
  165. "else " \
  166. "echo WARN: Cannot load the DT; " \
  167. "fi; " \
  168. "fi; " \
  169. "else " \
  170. "bootm; " \
  171. "fi;\0" \
  172. "netargs=setenv bootargs console=${console},${baudrate} " \
  173. "root=/dev/nfs " \
  174. "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
  175. "netboot=echo Booting from net ...; " \
  176. "run netargs; " \
  177. "if test ${ip_dyn} = yes; then " \
  178. "setenv get_cmd dhcp; " \
  179. "else " \
  180. "setenv get_cmd tftp; " \
  181. "fi; " \
  182. "${get_cmd} ${uimage}; " \
  183. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  184. "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  185. "bootm ${loadaddr} - ${fdt_addr}; " \
  186. "else " \
  187. "if test ${boot_fdt} = try; then " \
  188. "bootm; " \
  189. "else " \
  190. "echo WARN: Cannot load the DT; " \
  191. "fi; " \
  192. "fi; " \
  193. "else " \
  194. "bootm; " \
  195. "fi;\0"
  196. #define CONFIG_BOOTCOMMAND \
  197. "mmc dev ${mmcdev}; if mmc rescan; then " \
  198. "if run loadbootscript; then " \
  199. "run bootscript; " \
  200. "else " \
  201. "if run loaduimage; then " \
  202. "run mmcboot; " \
  203. "else run netboot; " \
  204. "fi; " \
  205. "fi; " \
  206. "else run netboot; fi"
  207. /* Miscellaneous configurable options */
  208. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  209. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  210. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  211. #define CONFIG_SYS_PROMPT "=> "
  212. #undef CONFIG_AUTO_COMPLETE
  213. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  214. #define CONFIG_SYS_PBSIZE \
  215. (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  216. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  217. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  218. #define CONFIG_CMD_MEMTEST
  219. #define CONFIG_SYS_MEMTEST_START 0x80010000
  220. #define CONFIG_SYS_MEMTEST_END 0x87C00000
  221. #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
  222. #define CONFIG_SYS_HZ 1000
  223. /*
  224. * Stack sizes
  225. * The stack sizes are set up in start.S using the settings below
  226. */
  227. #define CONFIG_STACKSIZE (64 * 1024) /* regular stack */
  228. /* Physical memory map */
  229. #define CONFIG_NR_DRAM_BANKS 1
  230. #define PHYS_SDRAM (0x80000000)
  231. #define PHYS_SDRAM_SIZE (256 * 1024 * 1024)
  232. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
  233. #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
  234. #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
  235. #define CONFIG_SYS_INIT_SP_OFFSET \
  236. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  237. #define CONFIG_SYS_INIT_SP_ADDR \
  238. (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  239. /* FLASH and environment organization */
  240. #define CONFIG_SYS_NO_FLASH
  241. #define CONFIG_ENV_SIZE (8 * 1024)
  242. #define CONFIG_ENV_IS_IN_MMC
  243. #undef CONFIG_ENV_IS_NOWHERE
  244. #define CONFIG_ENV_OFFSET (8 * 64 * 1024)
  245. #define CONFIG_SYS_MMC_ENV_DEV 0
  246. #define CONFIG_OF_LIBFDT
  247. #define CONFIG_CMD_BOOTZ
  248. #define CONFIG_VF610_QSPI
  249. #endif