Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * Configuration settings for the Freescale i.MX6Q Armadillo2 board. |
| 5 | * |
Wolfgang Denk | 3765b3e | 2013-10-07 13:07:26 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef __CONFIG_H |
| 10 | #define __CONFIG_H |
| 11 | |
Troy Kisky | 5ea6d7c | 2012-10-23 10:57:47 +0000 | [diff] [blame] | 12 | #define CONFIG_MX6 |
Stephen Warren | 8f39377 | 2013-02-26 12:28:29 +0000 | [diff] [blame] | 13 | |
| 14 | #include "mx6_common.h" |
| 15 | |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 16 | #define CONFIG_DISPLAY_CPUINFO |
| 17 | #define CONFIG_DISPLAY_BOARDINFO |
| 18 | |
| 19 | #include <asm/arch/imx-regs.h> |
| 20 | |
| 21 | #define CONFIG_CMDLINE_TAG |
| 22 | #define CONFIG_SETUP_MEMORY_TAGS |
| 23 | #define CONFIG_INITRD_TAG |
| 24 | |
Ye.Li | 9500fac | 2014-09-09 14:51:57 +0800 | [diff] [blame] | 25 | #define CONFIG_SYS_GENERIC_BOARD |
| 26 | |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 27 | /* Size of malloc() pool */ |
| 28 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) |
| 29 | |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 30 | #define CONFIG_BOARD_EARLY_INIT_F |
| 31 | #define CONFIG_MXC_GPIO |
| 32 | |
| 33 | #define CONFIG_MXC_UART |
| 34 | #define CONFIG_MXC_UART_BASE UART4_BASE |
| 35 | |
| 36 | /* MMC Configs */ |
| 37 | #define CONFIG_FSL_ESDHC |
| 38 | #define CONFIG_FSL_USDHC |
Peng Fan | 95083b3 | 2014-09-15 14:59:17 +0800 | [diff] [blame] | 39 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 40 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 41 | |
| 42 | #define CONFIG_MMC |
| 43 | #define CONFIG_CMD_MMC |
| 44 | #define CONFIG_GENERIC_MMC |
Stephen Warren | 640fb60 | 2012-11-06 11:27:27 +0000 | [diff] [blame] | 45 | #define CONFIG_BOUNCE_BUFFER |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 46 | #define CONFIG_CMD_FAT |
| 47 | #define CONFIG_DOS_PARTITION |
| 48 | |
Jason Liu | 473c635 | 2011-12-16 05:17:08 +0000 | [diff] [blame] | 49 | #define CONFIG_CMD_PING |
| 50 | #define CONFIG_CMD_DHCP |
| 51 | #define CONFIG_CMD_MII |
| 52 | #define CONFIG_CMD_NET |
| 53 | #define CONFIG_FEC_MXC |
| 54 | #define CONFIG_MII |
| 55 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 56 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 57 | #define CONFIG_FEC_MXC_PHYADDR 0 |
| 58 | |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 59 | /* allow to overwrite serial and ethaddr */ |
| 60 | #define CONFIG_ENV_OVERWRITE |
| 61 | #define CONFIG_CONS_INDEX 1 |
| 62 | #define CONFIG_BAUDRATE 115200 |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 63 | |
| 64 | /* Command definition */ |
| 65 | #include <config_cmd_default.h> |
| 66 | |
| 67 | #undef CONFIG_CMD_IMLS |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 68 | |
| 69 | #define CONFIG_BOOTDELAY 3 |
| 70 | |
Ye.Li | e7380a1 | 2014-09-09 10:16:57 +0800 | [diff] [blame] | 71 | #define CONFIG_LOADADDR 0x12000000 |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 72 | #define CONFIG_SYS_TEXT_BASE 0x17800000 |
| 73 | |
| 74 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 75 | "script=boot.scr\0" \ |
Otavio Salvador | 124f196 | 2014-01-16 19:58:02 -0200 | [diff] [blame] | 76 | "image=zImage\0" \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 77 | "console=ttymxc3\0" \ |
Ye.Li | e7380a1 | 2014-09-09 10:16:57 +0800 | [diff] [blame] | 78 | "fdt_file=imx6q-arm2.dtb\0" \ |
| 79 | "fdt_addr=0x18000000\0" \ |
Dirk Behme | 7e9603e | 2012-01-12 23:49:24 +0000 | [diff] [blame] | 80 | "fdt_high=0xffffffff\0" \ |
| 81 | "initrd_high=0xffffffff\0" \ |
Ye.Li | e7380a1 | 2014-09-09 10:16:57 +0800 | [diff] [blame] | 82 | "boot_fdt=try\0" \ |
| 83 | "ip_dyn=yes\0" \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 84 | "mmcdev=1\0" \ |
Ye.Li | adca187 | 2014-09-09 10:16:58 +0800 | [diff] [blame] | 85 | "mmcpart=1\0" \ |
| 86 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 87 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 88 | "root=${mmcroot}\0" \ |
| 89 | "loadbootscript=" \ |
| 90 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 91 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 92 | "source\0" \ |
Otavio Salvador | 124f196 | 2014-01-16 19:58:02 -0200 | [diff] [blame] | 93 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
Ye.Li | e7380a1 | 2014-09-09 10:16:57 +0800 | [diff] [blame] | 94 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 95 | "mmcboot=echo Booting from mmc ...; " \ |
| 96 | "run mmcargs; " \ |
Ye.Li | e7380a1 | 2014-09-09 10:16:57 +0800 | [diff] [blame] | 97 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 98 | "if run loadfdt; then " \ |
| 99 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 100 | "else " \ |
| 101 | "if test ${boot_fdt} = try; then " \ |
| 102 | "bootz; " \ |
| 103 | "else " \ |
| 104 | "echo WARN: Cannot load the DT; " \ |
| 105 | "fi; " \ |
| 106 | "fi; " \ |
| 107 | "else " \ |
| 108 | "bootz; " \ |
| 109 | "fi;\0" \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 110 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 111 | "root=/dev/nfs " \ |
| 112 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 113 | "netboot=echo Booting from net ...; " \ |
| 114 | "run netargs; " \ |
Ye.Li | e7380a1 | 2014-09-09 10:16:57 +0800 | [diff] [blame] | 115 | "if test ${ip_dyn} = yes; then " \ |
| 116 | "setenv get_cmd dhcp; " \ |
| 117 | "else " \ |
| 118 | "setenv get_cmd tftp; " \ |
| 119 | "fi; " \ |
| 120 | "${get_cmd} ${image}; " \ |
| 121 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 122 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 123 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 124 | "else " \ |
| 125 | "if test ${boot_fdt} = try; then " \ |
| 126 | "bootz; " \ |
| 127 | "else " \ |
| 128 | "echo WARN: Cannot load the DT; " \ |
| 129 | "fi; " \ |
| 130 | "fi; " \ |
| 131 | "else " \ |
| 132 | "bootz; " \ |
| 133 | "fi;\0" |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 134 | |
| 135 | #define CONFIG_BOOTCOMMAND \ |
| 136 | "mmc dev ${mmcdev};" \ |
Andrew Bradford | 6696811 | 2012-10-01 05:06:52 +0000 | [diff] [blame] | 137 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 138 | "if run loadbootscript; then " \ |
| 139 | "run bootscript; " \ |
| 140 | "else " \ |
Otavio Salvador | 124f196 | 2014-01-16 19:58:02 -0200 | [diff] [blame] | 141 | "if run loadimage; then " \ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 142 | "run mmcboot; " \ |
| 143 | "else run netboot; " \ |
| 144 | "fi; " \ |
| 145 | "fi; " \ |
| 146 | "else run netboot; fi" |
| 147 | |
| 148 | #define CONFIG_ARP_TIMEOUT 200UL |
| 149 | |
| 150 | /* Miscellaneous configurable options */ |
| 151 | #define CONFIG_SYS_LONGHELP |
| 152 | #define CONFIG_SYS_HUSH_PARSER |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 153 | #define CONFIG_AUTO_COMPLETE |
| 154 | #define CONFIG_SYS_CBSIZE 256 |
| 155 | |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 156 | #define CONFIG_SYS_MAXARGS 16 |
| 157 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 158 | |
| 159 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 160 | #define CONFIG_SYS_MEMTEST_END 0x10010000 |
| 161 | |
| 162 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 163 | |
| 164 | #define CONFIG_CMDLINE_EDITING |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 165 | |
| 166 | /* Physical Memory Map */ |
| 167 | #define CONFIG_NR_DRAM_BANKS 1 |
| 168 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 169 | |
| 170 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 171 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 172 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 173 | |
| 174 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 175 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 176 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 177 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 178 | |
| 179 | /* FLASH and environment organization */ |
| 180 | #define CONFIG_SYS_NO_FLASH |
| 181 | |
| 182 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 183 | #define CONFIG_ENV_SIZE (8 * 1024) |
| 184 | #define CONFIG_ENV_IS_IN_MMC |
| 185 | #define CONFIG_SYS_MMC_ENV_DEV 1 |
| 186 | |
| 187 | #define CONFIG_OF_LIBFDT |
Fabio Estevam | f0e77b3 | 2012-04-23 06:31:17 +0000 | [diff] [blame] | 188 | #define CONFIG_CMD_BOOTZ |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 189 | |
Peng Fan | fb00bda | 2014-12-02 09:55:28 +0800 | [diff] [blame] | 190 | /* USB Configs */ |
| 191 | #define CONFIG_CMD_USB |
| 192 | #ifdef CONFIG_CMD_USB |
| 193 | #define CONFIG_USB_EHCI |
| 194 | #define CONFIG_USB_EHCI_MX6 |
| 195 | #define CONFIG_USB_STORAGE |
| 196 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 197 | #define CONFIG_USB_HOST_ETHER |
| 198 | #define CONFIG_USB_ETHER_ASIX |
| 199 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 200 | #define CONFIG_MXC_USB_FLAGS 0 |
| 201 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 |
| 202 | #endif |
| 203 | |
Jason Liu | 76d7f57 | 2011-11-25 00:18:05 +0000 | [diff] [blame] | 204 | #endif /* __CONFIG_H */ |