1 /* 2 * Copyright (C) 2013 Freescale Semiconductor, Inc. 3 * 4 * Configuration settings for Udoo board. 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 #ifndef __CONFIG_H 10 #define __CONFIG_H 11 12 #include "mx6_common.h" 13 #include <asm/arch/imx-regs.h> 14 #include <asm/imx-common/gpio.h> 15 #include <linux/sizes.h> 16 17 #define CONFIG_MX6 18 #define CONFIG_DISPLAY_CPUINFO 19 #define CONFIG_DISPLAY_BOARDINFO 20 21 #define MACH_TYPE_UDOO 4800 22 #define CONFIG_MACH_TYPE MACH_TYPE_UDOO 23 24 #define CONFIG_CMDLINE_TAG 25 #define CONFIG_SETUP_MEMORY_TAGS 26 #define CONFIG_INITRD_TAG 27 #define CONFIG_REVISION_TAG 28 29 #define CONFIG_SYS_GENERIC_BOARD 30 31 /* Size of malloc() pool */ 32 #define CONFIG_SYS_MALLOC_LEN (2 * 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 UART2_BASE 39 40 /* SATA Configs */ 41 42 #define CONFIG_CMD_SATA 43 #ifdef CONFIG_CMD_SATA 44 #define CONFIG_DWC_AHSATA 45 #define CONFIG_SYS_SATA_MAX_DEVICE 1 46 #define CONFIG_DWC_AHSATA_PORT_ID 0 47 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR 48 #define CONFIG_LBA48 49 #define CONFIG_LIBATA 50 #endif 51 52 /* Network support */ 53 54 #define CONFIG_CMD_PING 55 #define CONFIG_CMD_DHCP 56 #define CONFIG_CMD_MII 57 #define CONFIG_CMD_NET 58 #define CONFIG_FEC_MXC 59 #define CONFIG_MII 60 #define IMX_FEC_BASE ENET_BASE_ADDR 61 #define CONFIG_FEC_XCV_TYPE RGMII 62 #define CONFIG_ETHPRIME "FEC" 63 #define CONFIG_FEC_MXC_PHYADDR 6 64 #define CONFIG_PHYLIB 65 #define CONFIG_PHY_MICREL 66 #define CONFIG_PHY_MICREL_KSZ9031 67 68 /* allow to overwrite serial and ethaddr */ 69 #define CONFIG_ENV_OVERWRITE 70 #define CONFIG_CONS_INDEX 1 71 #define CONFIG_BAUDRATE 115200 72 73 /* Command definition */ 74 #include <config_cmd_default.h> 75 76 #undef CONFIG_CMD_IMLS 77 78 #define CONFIG_CMD_BMODE 79 #define CONFIG_CMD_SETEXPR 80 81 #define CONFIG_BOOTDELAY 3 82 83 #define CONFIG_SYS_MEMTEST_START 0x10000000 84 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) 85 #define CONFIG_LOADADDR 0x12000000 86 #define CONFIG_SYS_TEXT_BASE 0x17800000 87 88 /* MMC Configuration */ 89 #define CONFIG_FSL_ESDHC 90 #define CONFIG_FSL_USDHC 91 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 92 93 #define CONFIG_MMC 94 #define CONFIG_CMD_MMC 95 #define CONFIG_GENERIC_MMC 96 #define CONFIG_BOUNCE_BUFFER 97 #define CONFIG_CMD_EXT2 98 #define CONFIG_CMD_FAT 99 #define CONFIG_DOS_PARTITION 100 101 #define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb" 102 103 #define CONFIG_EXTRA_ENV_SETTINGS \ 104 "script=boot.scr\0" \ 105 "image=zImage\0" \ 106 "console=ttymxc1\0" \ 107 "splashpos=m,m\0" \ 108 "fdt_high=0xffffffff\0" \ 109 "initrd_high=0xffffffff\0" \ 110 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ 111 "fdt_addr=0x18000000\0" \ 112 "boot_fdt=try\0" \ 113 "ip_dyn=yes\0" \ 114 "mmcdev=0\0" \ 115 "mmcpart=1\0" \ 116 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ 117 "update_sd_firmware_filename=u-boot.imx\0" \ 118 "update_sd_firmware=" \ 119 "if test ${ip_dyn} = yes; then " \ 120 "setenv get_cmd dhcp; " \ 121 "else " \ 122 "setenv get_cmd tftp; " \ 123 "fi; " \ 124 "if mmc dev ${mmcdev}; then " \ 125 "if ${get_cmd} ${update_sd_firmware_filename}; then " \ 126 "setexpr fw_sz ${filesize} / 0x200; " \ 127 "setexpr fw_sz ${fw_sz} + 1; " \ 128 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ 129 "fi; " \ 130 "fi\0" \ 131 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 132 "root=${mmcroot}\0" \ 133 "loadbootscript=" \ 134 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ 135 "bootscript=echo Running bootscript from mmc ...; " \ 136 "source\0" \ 137 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ 138 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ 139 "mmcboot=echo Booting from mmc ...; " \ 140 "run mmcargs; " \ 141 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 142 "if run loadfdt; then " \ 143 "bootz ${loadaddr} - ${fdt_addr}; " \ 144 "else " \ 145 "if test ${boot_fdt} = try; then " \ 146 "bootz; " \ 147 "else " \ 148 "echo WARN: Cannot load the DT; " \ 149 "fi; " \ 150 "fi; " \ 151 "else " \ 152 "bootz; " \ 153 "fi;\0" \ 154 "netargs=setenv bootargs console=${console},${baudrate} " \ 155 "root=/dev/nfs " \ 156 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ 157 "netboot=echo Booting from net ...; " \ 158 "run netargs; " \ 159 "if test ${ip_dyn} = yes; then " \ 160 "setenv get_cmd dhcp; " \ 161 "else " \ 162 "setenv get_cmd tftp; " \ 163 "fi; " \ 164 "${get_cmd} ${image}; " \ 165 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ 166 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ 167 "bootz ${loadaddr} - ${fdt_addr}; " \ 168 "else " \ 169 "if test ${boot_fdt} = try; then " \ 170 "bootz; " \ 171 "else " \ 172 "echo WARN: Cannot load the DT; " \ 173 "fi; " \ 174 "fi; " \ 175 "else " \ 176 "bootz; " \ 177 "fi;\0" 178 179 #define CONFIG_BOOTCOMMAND \ 180 "mmc dev ${mmcdev}; if mmc rescan; then " \ 181 "if run loadbootscript; then " \ 182 "run bootscript; " \ 183 "else " \ 184 "if run loadimage; then " \ 185 "run mmcboot; " \ 186 "else run netboot; " \ 187 "fi; " \ 188 "fi; " \ 189 "else run netboot; fi" 190 191 /* Miscellaneous configurable options */ 192 #define CONFIG_SYS_LONGHELP 193 #define CONFIG_SYS_HUSH_PARSER 194 #define CONFIG_AUTO_COMPLETE 195 #define CONFIG_SYS_CBSIZE 256 196 197 /* Print Buffer Size */ 198 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) 199 #define CONFIG_SYS_MAXARGS 16 200 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 201 202 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 203 204 #define CONFIG_CMDLINE_EDITING 205 206 /* Physical Memory Map */ 207 #define CONFIG_NR_DRAM_BANKS 1 208 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 209 210 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 211 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 212 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 213 214 #define CONFIG_SYS_INIT_SP_OFFSET \ 215 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 216 #define CONFIG_SYS_INIT_SP_ADDR \ 217 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 218 219 /* FLASH and environment organization */ 220 #define CONFIG_SYS_NO_FLASH 221 222 #define CONFIG_ENV_SIZE (8 * 1024) 223 224 #define CONFIG_ENV_IS_IN_MMC 225 #define CONFIG_ENV_OFFSET (6 * 64 * 1024) 226 #define CONFIG_SYS_MMC_ENV_DEV 0 227 228 #define CONFIG_OF_LIBFDT 229 #define CONFIG_CMD_BOOTZ 230 231 #ifndef CONFIG_SYS_DCACHE_OFF 232 #define CONFIG_CMD_CACHE 233 #endif 234 235 #endif /* __CONFIG_H * */ 236