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