pcm052_nand.h 8.2 KB

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