1 /* 2 * Copyright (C) 2013 Stefan Roese <sr@denx.de> 3 * 4 * Configuration settings for the ProjectionDesign / Barco 5 * Titanium board. 6 * 7 * Based on mx6qsabrelite.h which is: 8 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. 9 * 10 * This program is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU General Public License as 12 * published by the Free Software Foundation; either version 2 of 13 * the License, or (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 */ 20 21 #ifndef __CONFIG_H 22 #define __CONFIG_H 23 24 #include <asm/arch/imx-regs.h> 25 #include <asm/imx-common/gpio.h> 26 27 #define CONFIG_MX6 28 #define CONFIG_MX6Q 29 #define CONFIG_DISPLAY_CPUINFO 30 #define CONFIG_DISPLAY_BOARDINFO 31 32 #define MACH_TYPE_TITANIUM 3769 33 #define CONFIG_MACH_TYPE MACH_TYPE_TITANIUM 34 35 #define CONFIG_CMDLINE_TAG 36 #define CONFIG_SETUP_MEMORY_TAGS 37 #define CONFIG_INITRD_TAG 38 #define CONFIG_REVISION_TAG 39 40 /* Size of malloc() pool */ 41 #define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024) 42 43 #define CONFIG_BOARD_EARLY_INIT_F 44 #define CONFIG_MISC_INIT_R 45 #define CONFIG_MXC_GPIO 46 47 #define CONFIG_MXC_UART 48 #define CONFIG_MXC_UART_BASE UART1_BASE 49 50 /* I2C Configs */ 51 #define CONFIG_CMD_I2C 52 #define CONFIG_I2C_MULTI_BUS 53 #define CONFIG_I2C_MXC 54 #define CONFIG_SYS_I2C_SPEED 100000 55 56 /* MMC Configs */ 57 #define CONFIG_FSL_ESDHC 58 #define CONFIG_FSL_USDHC 59 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 60 #define CONFIG_SYS_FSL_USDHC_NUM 1 61 62 #define CONFIG_MMC 63 #define CONFIG_CMD_MMC 64 #define CONFIG_GENERIC_MMC 65 #define CONFIG_BOUNCE_BUFFER 66 #define CONFIG_CMD_EXT2 67 #define CONFIG_CMD_FAT 68 #define CONFIG_DOS_PARTITION 69 70 #define CONFIG_CMD_PING 71 #define CONFIG_CMD_DHCP 72 #define CONFIG_CMD_MII 73 #define CONFIG_CMD_NET 74 #define CONFIG_FEC_MXC 75 #define CONFIG_MII 76 #define IMX_FEC_BASE ENET_BASE_ADDR 77 #define CONFIG_FEC_XCV_TYPE RGMII 78 #define CONFIG_FEC_MXC_PHYADDR 4 79 #define CONFIG_PHYLIB 80 #define CONFIG_PHY_MICREL 81 #define CONFIG_PHY_MICREL_KSZ9021 82 83 /* USB Configs */ 84 #define CONFIG_CMD_USB 85 #define CONFIG_CMD_FAT 86 #define CONFIG_USB_EHCI 87 #define CONFIG_USB_EHCI_MX6 88 #define CONFIG_USB_STORAGE 89 #define CONFIG_MXC_USB_PORT 1 90 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) 91 #define CONFIG_MXC_USB_FLAGS 0 92 93 /* Miscellaneous commands */ 94 #define CONFIG_CMD_BMODE 95 96 /* allow to overwrite serial and ethaddr */ 97 #define CONFIG_ENV_OVERWRITE 98 #define CONFIG_CONS_INDEX 1 99 #define CONFIG_BAUDRATE 115200 100 101 /* Command definition */ 102 #include <config_cmd_default.h> 103 104 #undef CONFIG_CMD_IMLS 105 106 #define CONFIG_BOOTDELAY 3 107 108 #define CONFIG_LOADADDR 0x12000000 109 #define CONFIG_SYS_TEXT_BASE 0x17800000 110 111 #define CONFIG_SYS_MEMTEST_START 0x10000000 112 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (500 << 20)) 113 114 #define CONFIG_HOSTNAME titanium 115 #define CONFIG_UBI_PART ubi 116 #define CONFIG_UBIFS_VOLUME rootfs0 117 118 #define MTDIDS_DEFAULT "nand0=gpmi-nand" 119 #define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:16M(uboot),512k(env1)," \ 120 "512k(env2),-(ubi)" 121 122 #define CONFIG_EXTRA_ENV_SETTINGS \ 123 "kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \ 124 "kernel_fs=/boot/uImage\0" \ 125 "kernel_addr=11000000\0" \ 126 "dtb=" __stringify(CONFIG_HOSTNAME) "/" \ 127 __stringify(CONFIG_HOSTNAME) ".dtb\0" \ 128 "dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0" \ 129 "dtb_addr=12800000\0" \ 130 "script=boot.scr\0" \ 131 "uimage=uImage\0" \ 132 "console=ttymxc0\0" \ 133 "baudrate=115200\0" \ 134 "fdt_high=0xffffffff\0" \ 135 "initrd_high=0xffffffff\0" \ 136 "mmcdev=0\0" \ 137 "mmcpart=1\0" \ 138 "uimage=uImage\0" \ 139 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \ 140 " ${script}\0" \ 141 "bootscript=echo Running bootscript from mmc ...; source\0" \ 142 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ 143 "mmcroot=/dev/mmcblk0p2\0" \ 144 "mmcargs=setenv bootargs console=${console},${baudrate} " \ 145 "root=${mmcroot} rootwait rw\0" \ 146 "bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \ 147 " ${uimage}; bootm\0" \ 148 "addip=setenv bootargs ${bootargs} " \ 149 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ 150 ":${hostname}:${netdev}:off panic=1\0" \ 151 "addcon=setenv bootargs ${bootargs} console=ttymxc0," \ 152 "${baudrate}\0" \ 153 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ 154 "rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0" \ 155 "nfsargs=setenv bootargs root=/dev/nfs rw " \ 156 "nfsroot=${serverip}:${rootpath}\0" \ 157 "ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0" \ 158 "part=" __stringify(CONFIG_UBI_PART) "\0" \ 159 "boot_vol=0\0" \ 160 "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0" \ 161 "load_ubifs=tftp ${kernel_addr} ${ubifs}\0" \ 162 "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \ 163 " ${filesize}\0" \ 164 "upd_ubifs=run load_ubifs update_ubifs\0" \ 165 "init_ubi=nand erase.part ubi;ubi part ${part};" \ 166 "ubi create ${vol} c800000\0" \ 167 "mtdids=" MTDIDS_DEFAULT "\0" \ 168 "mtdparts=" MTDPARTS_DEFAULT "\0" \ 169 "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip" \ 170 " addcon addmtd;" \ 171 "bootm ${kernel_addr} - ${dtb_addr}\0" \ 172 "ubifsargs=set bootargs ubi.mtd=ubi " \ 173 "root=ubi:rootfs${boot_vol} rootfstype=ubifs\0" \ 174 "ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0" \ 175 "ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};" \ 176 "ubifsload ${dtb_addr} ${dtb_fs};\0" \ 177 "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \ 178 "addmtd;bootm ${kernel_addr} - ${dtb_addr}\0" \ 179 "load_kernel=tftp ${kernel_addr} ${kernel}\0" \ 180 "load_dtb=tftp ${dtb_addr} ${dtb}\0" \ 181 "net_nfs=run load_dtb load_kernel; " \ 182 "run nfsargs addip addcon addmtd;" \ 183 "bootm ${kernel_addr} - ${dtb_addr}\0" \ 184 "delenv=env default -a -f; saveenv; reset\0" 185 186 #define CONFIG_BOOTCOMMAND "run nand_ubifs" 187 188 /* Miscellaneous configurable options */ 189 #define CONFIG_SYS_LONGHELP 190 #define CONFIG_SYS_HUSH_PARSER 191 #define CONFIG_SYS_PROMPT "Titanium > " 192 #define CONFIG_AUTO_COMPLETE 193 #define CONFIG_CMDLINE_EDITING 194 #define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ 195 196 #define CONFIG_SYS_CBSIZE 256 197 198 /* Print Buffer Size */ 199 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 200 sizeof(CONFIG_SYS_PROMPT) + 16) 201 #define CONFIG_SYS_MAXARGS 16 202 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 203 204 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 205 #define CONFIG_SYS_HZ 1000 206 207 /* Physical Memory Map */ 208 #define CONFIG_NR_DRAM_BANKS 1 209 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR 210 #define PHYS_SDRAM_SIZE (512 << 20) 211 212 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 213 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 214 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 215 216 #define CONFIG_SYS_INIT_SP_OFFSET \ 217 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 218 #define CONFIG_SYS_INIT_SP_ADDR \ 219 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 220 221 /* FLASH and environment organization */ 222 #define CONFIG_SYS_NO_FLASH 223 224 /* Enable NAND support */ 225 #define CONFIG_CMD_NAND 226 #define CONFIG_CMD_NAND_TRIMFFS 227 #define CONFIG_CMD_TIME 228 229 #ifdef CONFIG_CMD_NAND 230 231 /* NAND stuff */ 232 #define CONFIG_NAND_MXS 233 #define CONFIG_SYS_MAX_NAND_DEVICE 1 234 #define CONFIG_SYS_NAND_BASE 0x40000000 235 #define CONFIG_SYS_NAND_5_ADDR_CYCLE 236 #define CONFIG_SYS_NAND_ONFI_DETECTION 237 238 /* DMA stuff, needed for GPMI/MXS NAND support */ 239 #define CONFIG_APBH_DMA 240 #define CONFIG_APBH_DMA_BURST 241 #define CONFIG_APBH_DMA_BURST8 242 243 /* Environment in NAND */ 244 #define CONFIG_ENV_IS_IN_NAND 245 #define CONFIG_ENV_OFFSET (16 << 20) 246 #define CONFIG_ENV_SECT_SIZE (128 << 10) 247 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE 248 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 << 10)) 249 #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE 250 251 #else /* CONFIG_CMD_NAND */ 252 253 /* Environment in MMC */ 254 #define CONFIG_ENV_SIZE (8 << 10) 255 #define CONFIG_ENV_IS_IN_MMC 256 #define CONFIG_ENV_OFFSET (6 * 64 * 1024) 257 #define CONFIG_SYS_MMC_ENV_DEV 0 258 259 #endif /* CONFIG_CMD_NAND */ 260 261 /* UBI/UBIFS config options */ 262 #define CONFIG_LZO 263 #define CONFIG_MTD_DEVICE 264 #define CONFIG_MTD_PARTITIONS 265 #define CONFIG_RBTREE 266 #define CONFIG_CMD_MTDPARTS 267 #define CONFIG_CMD_UBI 268 #define CONFIG_CMD_UBIFS 269 270 #define CONFIG_OF_LIBFDT 271 #define CONFIG_CMD_BOOTZ 272 273 #ifndef CONFIG_SYS_DCACHE_OFF 274 #define CONFIG_CMD_CACHE 275 #endif 276 277 #endif /* __CONFIG_H */ 278