Advertisement
p0rc0_r0ss0

wandboard.h

Jun 9th, 2013
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.69 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2013 Freescale Semiconductor, Inc.
  3.  *
  4.  * Configuration settings for the Wandboard.
  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.  
  12. #ifndef __CONFIG_H
  13. #define __CONFIG_H
  14.  
  15. #include <asm/arch/imx-regs.h>
  16. #include <asm/imx-common/gpio.h>
  17. #include <asm/sizes.h>
  18.  
  19. #define CONFIG_MX6
  20. #define CONFIG_DISPLAY_CPUINFO
  21. #define CONFIG_DISPLAY_BOARDINFO
  22.  
  23. #define MACH_TYPE_WANDBOARD     4412
  24. #define CONFIG_MACH_TYPE        MACH_TYPE_WANDBOARD
  25.  
  26. #define CONFIG_CMDLINE_TAG
  27. #define CONFIG_SETUP_MEMORY_TAGS
  28. #define CONFIG_INITRD_TAG
  29. #define CONFIG_REVISION_TAG
  30.  
  31. /* Size of malloc() pool */
  32. #define CONFIG_SYS_MALLOC_LEN       (3 * SZ_1M)
  33.  
  34. #define CONFIG_BOARD_EARLY_INIT_F
  35. #define CONFIG_MXC_GPIO
  36.  
  37. #define CONFIG_MXC_UART
  38. #define CONFIG_MXC_UART_BASE        UART1_BASE
  39.  
  40. /* allow to overwrite serial and ethaddr */
  41. #define CONFIG_ENV_OVERWRITE
  42. #define CONFIG_CONS_INDEX       1
  43. #define CONFIG_BAUDRATE         115200
  44.  
  45. // IMPORTANT HERE!
  46. #define CONFIG_NETCONSOLE 1
  47. #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
  48.  
  49.  
  50. /* Command definition */
  51. #include <config_cmd_default.h>
  52.  
  53. #undef CONFIG_CMD_IMLS
  54.  
  55. #define CONFIG_BOOTDELAY        1
  56.  
  57. #define CONFIG_SYS_MEMTEST_START    0x10000000
  58. #define CONFIG_SYS_MEMTEST_END      (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
  59. #define CONFIG_LOADADDR         0x12000000
  60. #define CONFIG_SYS_TEXT_BASE        0x17800000
  61.  
  62. /* MMC Configuration */
  63. #define CONFIG_FSL_ESDHC
  64. #define CONFIG_FSL_USDHC
  65. #define CONFIG_SYS_FSL_ESDHC_ADDR   0
  66.  
  67. #define CONFIG_MMC
  68. #define CONFIG_CMD_MMC
  69. #define CONFIG_GENERIC_MMC
  70. #define CONFIG_BOUNCE_BUFFER
  71. #define CONFIG_CMD_EXT2
  72. #define CONFIG_CMD_FAT
  73. #define CONFIG_CMD_EXT4
  74. #define CONFIG_CMD_FS_GENERIC
  75. #define CONFIG_DOS_PARTITION
  76.  
  77. /* Ethernet Configuration */
  78. #define CONFIG_CMD_PING
  79. #define CONFIG_CMD_DHCP
  80. #define CONFIG_CMD_MII
  81. #define CONFIG_CMD_NET
  82. #define CONFIG_FEC_MXC
  83. #define CONFIG_MII
  84. #define IMX_FEC_BASE            ENET_BASE_ADDR
  85. #define CONFIG_FEC_XCV_TYPE     RGMII
  86. #define CONFIG_ETHPRIME         "FEC"
  87. #define CONFIG_FEC_MXC_PHYADDR      1
  88. #define CONFIG_PHYLIB
  89. #define CONFIG_PHY_ATHEROS
  90.  
  91. #if defined(CONFIG_MX6DL)
  92. #define CONFIG_DEFAULT_FDT_FILE     "imx6dl-wandboard.dtb"
  93. #elif defined(CONFIG_MX6S)
  94. #define CONFIG_DEFAULT_FDT_FILE     "imx6s-wandboard.dtb"
  95. #endif
  96.  
  97. // console=${console},${baudrate}
  98.  
  99. #define CONFIG_EXTRA_ENV_SETTINGS \
  100. \
  101.     "script=boot.scr\0" \
  102.     "uimage=uImage\0" \
  103.     "console=ttymxc0\0" \
  104.     "initrd_high=0xffffffff\0" \
  105.     "fdt_high=0xffffffff\0" \
  106.     "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
  107.     "fdt_addr=0x11000000\0" \
  108.     "boot_fdt=try\0" \
  109. \
  110.     "ip_dyn=no\0" \
  111.     "ethaddr=\" <PUT YOUR MAC HERE> \"\0" \
  112.     "ipaddr=192.168.10.99\0" \
  113.     "netmask=255.255.255.0\0" \
  114.     "serverip=192.168.10.126\0" \
  115. \
  116.     "baudrate=115200\0" \
  117.     "ser=setenv stdin serial;setenv stdout serial;setenv sterr serial\0" \
  118. \
  119.     "ncip=192.168.10.126\0" \
  120.     "nc=setenv stdin nc;setenv stdout nc;setenv sterr nc\0" \
  121.     "stdin=nc\0" \
  122.     "stdout=nc\0" \
  123.     "stderr=nc\0" \
  124. \
  125.     "optargs=\0" \
  126.     "video=\0" \
  127.     "mmcdev=0\0" \
  128.     "mmcpart=1\0" \
  129.     "mmcroot=/dev/mmcblk0p2 ro\0" \
  130.     "mmcrootfstype=ext4 rootwait\0" \
  131.     "mmcargs=setenv bootargs netconsole=6666@192.168.10.99/,@192.168.10.126/ " \
  132.         "${optargs} " \
  133.         "root=${mmcroot} " \
  134.         "rootfstype=${mmcrootfstype} " \
  135.         "video=${video}\0" \
  136.     "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt\0" \
  137.     "importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
  138.         "env import -t $loadaddr $filesize\0" \
  139.     "loadbootscript=" \
  140.         "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  141.     "bootscript=echo Running bootscript from mmc ...; " \
  142.         "source\0" \
  143.     "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
  144.     "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \
  145.     "mmcboot=echo Booting from mmc ...; " \
  146.         "run mmcargs; " \
  147.         "bootz ${loadaddr};\0"
  148.  
  149. #define CONFIG_BOOTCOMMAND \
  150.     "mmc dev ${mmcdev};" \
  151.     "if mmc rescan; then " \
  152.         "echo SD/MMC found on device ${mmcdev};" \
  153.         "if run loadbootenv; then " \
  154.             "run importbootenv;" \
  155.         "fi;" \
  156.         "if test -n $uenvcmd; then " \
  157.             "echo Running uenvcmd ...;" \
  158.             "run uenvcmd;" \
  159.         "fi;" \
  160.         "if run loadzimage; then " \
  161.             "run mmcboot;" \
  162.         "fi;" \
  163.     "fi;"
  164.  
  165. /* Miscellaneous configurable options */
  166. #define CONFIG_SYS_LONGHELP
  167. #define CONFIG_SYS_HUSH_PARSER
  168. #define CONFIG_SYS_PROMPT          "=> "
  169. #define CONFIG_AUTO_COMPLETE
  170. #define CONFIG_SYS_CBSIZE       256
  171.  
  172. /* Print Buffer Size */
  173. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  174. #define CONFIG_SYS_MAXARGS         16
  175. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  176.  
  177. #define CONFIG_SYS_LOAD_ADDR        CONFIG_LOADADDR
  178. #define CONFIG_SYS_HZ           1000
  179.  
  180. #define CONFIG_CMDLINE_EDITING
  181.  
  182. /* Physical Memory Map */
  183. #define CONFIG_NR_DRAM_BANKS        1
  184. #define PHYS_SDRAM          MMDC0_ARB_BASE_ADDR
  185.  
  186. #define CONFIG_SYS_SDRAM_BASE       PHYS_SDRAM
  187. #define CONFIG_SYS_INIT_RAM_ADDR    IRAM_BASE_ADDR
  188. #define CONFIG_SYS_INIT_RAM_SIZE    IRAM_SIZE
  189.  
  190. #define CONFIG_SYS_INIT_SP_OFFSET \
  191.     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  192. #define CONFIG_SYS_INIT_SP_ADDR \
  193.     (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
  194.  
  195. /* FLASH and environment organization */
  196. #define CONFIG_SYS_NO_FLASH
  197.  
  198. #define CONFIG_ENV_SIZE         (8 * 1024)
  199.  
  200. #define CONFIG_ENV_IS_IN_MMC
  201. #define CONFIG_ENV_OFFSET       (6 * 64 * 1024)
  202. #define CONFIG_SYS_MMC_ENV_DEV      0
  203.  
  204. #define CONFIG_OF_LIBFDT
  205. /* bootz: zImage/initrd.img support */
  206. #define CONFIG_CMD_BOOTZ
  207. #define CONFIG_SUPPORT_RAW_INITRD
  208.  
  209. #ifndef CONFIG_SYS_DCACHE_OFF
  210. #define CONFIG_CMD_CACHE
  211. #endif
  212.  
  213. #endif                 /* __CONFIG_H * */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement