Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 10 | * SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #ifndef __CONFIG_H |
| 14 | #define __CONFIG_H |
| 15 | |
Eric Nelson | 062772c | 2013-11-26 17:40:30 -0700 | [diff] [blame] | 16 | #include "mx6_common.h" |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 17 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 18 | #define CONFIG_MX6Q |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 19 | |
| 20 | #define MACH_TYPE_TITANIUM 3769 |
| 21 | #define CONFIG_MACH_TYPE MACH_TYPE_TITANIUM |
| 22 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 23 | /* Size of malloc() pool */ |
| 24 | #define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024) |
| 25 | |
| 26 | #define CONFIG_BOARD_EARLY_INIT_F |
| 27 | #define CONFIG_MISC_INIT_R |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 28 | |
| 29 | #define CONFIG_MXC_UART |
| 30 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 31 | |
| 32 | /* I2C Configs */ |
| 33 | #define CONFIG_CMD_I2C |
trem | 0399741 | 2013-09-21 18:13:36 +0200 | [diff] [blame] | 34 | #define CONFIG_SYS_I2C |
| 35 | #define CONFIG_SYS_I2C_MXC |
York Sun | f1a5216 | 2015-03-20 10:20:40 -0700 | [diff] [blame] | 36 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 37 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 38 | |
| 39 | /* MMC Configs */ |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 40 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 41 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 42 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 43 | #define CONFIG_CMD_PING |
| 44 | #define CONFIG_CMD_DHCP |
| 45 | #define CONFIG_CMD_MII |
| 46 | #define CONFIG_CMD_NET |
| 47 | #define CONFIG_FEC_MXC |
| 48 | #define CONFIG_MII |
| 49 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 50 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 51 | #define CONFIG_FEC_MXC_PHYADDR 4 |
| 52 | #define CONFIG_PHYLIB |
| 53 | #define CONFIG_PHY_MICREL |
| 54 | #define CONFIG_PHY_MICREL_KSZ9021 |
| 55 | |
| 56 | /* USB Configs */ |
| 57 | #define CONFIG_CMD_USB |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 58 | #define CONFIG_USB_EHCI |
| 59 | #define CONFIG_USB_EHCI_MX6 |
| 60 | #define CONFIG_USB_STORAGE |
| 61 | #define CONFIG_MXC_USB_PORT 1 |
| 62 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 63 | #define CONFIG_MXC_USB_FLAGS 0 |
| 64 | |
| 65 | /* Miscellaneous commands */ |
| 66 | #define CONFIG_CMD_BMODE |
| 67 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 68 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
| 69 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (500 << 20)) |
| 70 | |
| 71 | #define CONFIG_HOSTNAME titanium |
| 72 | #define CONFIG_UBI_PART ubi |
| 73 | #define CONFIG_UBIFS_VOLUME rootfs0 |
| 74 | |
| 75 | #define MTDIDS_DEFAULT "nand0=gpmi-nand" |
| 76 | #define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:16M(uboot),512k(env1)," \ |
| 77 | "512k(env2),-(ubi)" |
| 78 | |
| 79 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 80 | "kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \ |
| 81 | "kernel_fs=/boot/uImage\0" \ |
| 82 | "kernel_addr=11000000\0" \ |
| 83 | "dtb=" __stringify(CONFIG_HOSTNAME) "/" \ |
| 84 | __stringify(CONFIG_HOSTNAME) ".dtb\0" \ |
| 85 | "dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0" \ |
| 86 | "dtb_addr=12800000\0" \ |
| 87 | "script=boot.scr\0" \ |
| 88 | "uimage=uImage\0" \ |
| 89 | "console=ttymxc0\0" \ |
| 90 | "baudrate=115200\0" \ |
| 91 | "fdt_high=0xffffffff\0" \ |
| 92 | "initrd_high=0xffffffff\0" \ |
| 93 | "mmcdev=0\0" \ |
| 94 | "mmcpart=1\0" \ |
| 95 | "uimage=uImage\0" \ |
| 96 | "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \ |
| 97 | " ${script}\0" \ |
| 98 | "bootscript=echo Running bootscript from mmc ...; source\0" \ |
| 99 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ |
| 100 | "mmcroot=/dev/mmcblk0p2\0" \ |
| 101 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 102 | "root=${mmcroot} rootwait rw\0" \ |
| 103 | "bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \ |
| 104 | " ${uimage}; bootm\0" \ |
| 105 | "addip=setenv bootargs ${bootargs} " \ |
| 106 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 107 | ":${hostname}:${netdev}:off panic=1\0" \ |
| 108 | "addcon=setenv bootargs ${bootargs} console=ttymxc0," \ |
| 109 | "${baudrate}\0" \ |
| 110 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ |
| 111 | "rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0" \ |
| 112 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 113 | "nfsroot=${serverip}:${rootpath}\0" \ |
| 114 | "ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0" \ |
| 115 | "part=" __stringify(CONFIG_UBI_PART) "\0" \ |
| 116 | "boot_vol=0\0" \ |
| 117 | "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0" \ |
| 118 | "load_ubifs=tftp ${kernel_addr} ${ubifs}\0" \ |
| 119 | "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \ |
| 120 | " ${filesize}\0" \ |
| 121 | "upd_ubifs=run load_ubifs update_ubifs\0" \ |
| 122 | "init_ubi=nand erase.part ubi;ubi part ${part};" \ |
| 123 | "ubi create ${vol} c800000\0" \ |
| 124 | "mtdids=" MTDIDS_DEFAULT "\0" \ |
| 125 | "mtdparts=" MTDPARTS_DEFAULT "\0" \ |
| 126 | "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip" \ |
| 127 | " addcon addmtd;" \ |
| 128 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ |
| 129 | "ubifsargs=set bootargs ubi.mtd=ubi " \ |
| 130 | "root=ubi:rootfs${boot_vol} rootfstype=ubifs\0" \ |
| 131 | "ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0" \ |
| 132 | "ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};" \ |
| 133 | "ubifsload ${dtb_addr} ${dtb_fs};\0" \ |
| 134 | "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \ |
| 135 | "addmtd;bootm ${kernel_addr} - ${dtb_addr}\0" \ |
| 136 | "load_kernel=tftp ${kernel_addr} ${kernel}\0" \ |
| 137 | "load_dtb=tftp ${dtb_addr} ${dtb}\0" \ |
| 138 | "net_nfs=run load_dtb load_kernel; " \ |
| 139 | "run nfsargs addip addcon addmtd;" \ |
| 140 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ |
| 141 | "delenv=env default -a -f; saveenv; reset\0" |
| 142 | |
| 143 | #define CONFIG_BOOTCOMMAND "run nand_ubifs" |
| 144 | |
| 145 | /* Miscellaneous configurable options */ |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 146 | #define CONFIG_SYS_PROMPT "Titanium > " |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 147 | |
| 148 | /* Print Buffer Size */ |
| 149 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 150 | sizeof(CONFIG_SYS_PROMPT) + 16) |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 151 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 152 | /* Physical Memory Map */ |
| 153 | #define CONFIG_NR_DRAM_BANKS 1 |
| 154 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 155 | #define PHYS_SDRAM_SIZE (512 << 20) |
| 156 | |
| 157 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 158 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 159 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 160 | |
| 161 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 162 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 163 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 164 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 165 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 166 | /* Enable NAND support */ |
| 167 | #define CONFIG_CMD_NAND |
| 168 | #define CONFIG_CMD_NAND_TRIMFFS |
| 169 | #define CONFIG_CMD_TIME |
| 170 | |
| 171 | #ifdef CONFIG_CMD_NAND |
| 172 | |
| 173 | /* NAND stuff */ |
| 174 | #define CONFIG_NAND_MXS |
| 175 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 176 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
| 177 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 178 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
| 179 | |
| 180 | /* DMA stuff, needed for GPMI/MXS NAND support */ |
| 181 | #define CONFIG_APBH_DMA |
| 182 | #define CONFIG_APBH_DMA_BURST |
| 183 | #define CONFIG_APBH_DMA_BURST8 |
| 184 | |
| 185 | /* Environment in NAND */ |
| 186 | #define CONFIG_ENV_IS_IN_NAND |
| 187 | #define CONFIG_ENV_OFFSET (16 << 20) |
| 188 | #define CONFIG_ENV_SECT_SIZE (128 << 10) |
| 189 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE |
| 190 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 << 10)) |
| 191 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
| 192 | |
| 193 | #else /* CONFIG_CMD_NAND */ |
| 194 | |
| 195 | /* Environment in MMC */ |
| 196 | #define CONFIG_ENV_SIZE (8 << 10) |
| 197 | #define CONFIG_ENV_IS_IN_MMC |
| 198 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) |
| 199 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 200 | |
| 201 | #endif /* CONFIG_CMD_NAND */ |
| 202 | |
| 203 | /* UBI/UBIFS config options */ |
| 204 | #define CONFIG_LZO |
| 205 | #define CONFIG_MTD_DEVICE |
| 206 | #define CONFIG_MTD_PARTITIONS |
| 207 | #define CONFIG_RBTREE |
| 208 | #define CONFIG_CMD_MTDPARTS |
| 209 | #define CONFIG_CMD_UBI |
| 210 | #define CONFIG_CMD_UBIFS |
| 211 | |
Stefan Roese | 05d10b5 | 2013-04-17 00:32:43 +0000 | [diff] [blame] | 212 | #endif /* __CONFIG_H */ |