blob: 606da4a8543b869ca05c66ab72d27d7b7fd9b3c3 [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
Tom Rinicd7b6342017-01-25 20:42:38 -050020/* Provide the MACH_TYPE value that the vendor kernel requires. */
21#define CONFIG_MACH_TYPE 3769
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000022
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000023/* Size of malloc() pool */
24#define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024)
25
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000026#define CONFIG_MISC_INIT_R
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000027
28#define CONFIG_MXC_UART
29#define CONFIG_MXC_UART_BASE UART1_BASE
30
31/* I2C Configs */
tremb089d032013-09-21 18:13:36 +020032#define CONFIG_SYS_I2C
33#define CONFIG_SYS_I2C_MXC
Albert ARIBAUD \\(3ADEV\\)03544c62015-09-21 22:43:38 +020034#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
35#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
York Sunf8cb1012015-03-20 10:20:40 -070036#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000037#define CONFIG_SYS_I2C_SPEED 100000
38
39/* MMC Configs */
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000040#define CONFIG_SYS_FSL_ESDHC_ADDR 0
41#define CONFIG_SYS_FSL_USDHC_NUM 1
42
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000043#define CONFIG_FEC_MXC
44#define CONFIG_MII
45#define IMX_FEC_BASE ENET_BASE_ADDR
46#define CONFIG_FEC_XCV_TYPE RGMII
47#define CONFIG_FEC_MXC_PHYADDR 4
48#define CONFIG_PHYLIB
49#define CONFIG_PHY_MICREL
50#define CONFIG_PHY_MICREL_KSZ9021
51
52/* USB Configs */
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000053#define CONFIG_MXC_USB_PORT 1
54#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
55#define CONFIG_MXC_USB_FLAGS 0
56
Stefan Roeseb29ca4a2013-04-17 00:32:43 +000057#define CONFIG_SYS_MEMTEST_START 0x10000000
58#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (500 << 20))
59
60#define CONFIG_HOSTNAME titanium
61#define CONFIG_UBI_PART ubi
62#define CONFIG_UBIFS_VOLUME rootfs0
63
64#define MTDIDS_DEFAULT "nand0=gpmi-nand"
65#define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:16M(uboot),512k(env1)," \
66 "512k(env2),-(ubi)"
67
68#define CONFIG_EXTRA_ENV_SETTINGS \
69 "kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \
70 "kernel_fs=/boot/uImage\0" \
71 "kernel_addr=11000000\0" \
72 "dtb=" __stringify(CONFIG_HOSTNAME) "/" \
73 __stringify(CONFIG_HOSTNAME) ".dtb\0" \
74 "dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0" \
75 "dtb_addr=12800000\0" \
76 "script=boot.scr\0" \
77 "uimage=uImage\0" \
78 "console=ttymxc0\0" \
79 "baudrate=115200\0" \
80 "fdt_high=0xffffffff\0" \
81 "initrd_high=0xffffffff\0" \
82 "mmcdev=0\0" \
83 "mmcpart=1\0" \
84 "uimage=uImage\0" \
85 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
86 " ${script}\0" \
87 "bootscript=echo Running bootscript from mmc ...; source\0" \
88 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
89 "mmcroot=/dev/mmcblk0p2\0" \
90 "mmcargs=setenv bootargs console=${console},${baudrate} " \
91 "root=${mmcroot} rootwait rw\0" \
92 "bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
93 " ${uimage}; bootm\0" \
94 "addip=setenv bootargs ${bootargs} " \
95 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
96 ":${hostname}:${netdev}:off panic=1\0" \
97 "addcon=setenv bootargs ${bootargs} console=ttymxc0," \
98 "${baudrate}\0" \
99 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
100 "rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0" \
101 "nfsargs=setenv bootargs root=/dev/nfs rw " \
102 "nfsroot=${serverip}:${rootpath}\0" \
103 "ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0" \
104 "part=" __stringify(CONFIG_UBI_PART) "\0" \
105 "boot_vol=0\0" \
106 "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0" \
107 "load_ubifs=tftp ${kernel_addr} ${ubifs}\0" \
108 "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \
109 " ${filesize}\0" \
110 "upd_ubifs=run load_ubifs update_ubifs\0" \
111 "init_ubi=nand erase.part ubi;ubi part ${part};" \
112 "ubi create ${vol} c800000\0" \
113 "mtdids=" MTDIDS_DEFAULT "\0" \
114 "mtdparts=" MTDPARTS_DEFAULT "\0" \
115 "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip" \
116 " addcon addmtd;" \
117 "bootm ${kernel_addr} - ${dtb_addr}\0" \
118 "ubifsargs=set bootargs ubi.mtd=ubi " \
119 "root=ubi:rootfs${boot_vol} rootfstype=ubifs\0" \
120 "ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0" \
121 "ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};" \
122 "ubifsload ${dtb_addr} ${dtb_fs};\0" \
123 "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \
124 "addmtd;bootm ${kernel_addr} - ${dtb_addr}\0" \
125 "load_kernel=tftp ${kernel_addr} ${kernel}\0" \
126 "load_dtb=tftp ${dtb_addr} ${dtb}\0" \
127 "net_nfs=run load_dtb load_kernel; " \
128 "run nfsargs addip addcon addmtd;" \
129 "bootm ${kernel_addr} - ${dtb_addr}\0" \
130 "delenv=env default -a -f; saveenv; reset\0"
131
132#define CONFIG_BOOTCOMMAND "run nand_ubifs"
133
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000134/* Print Buffer Size */
135#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
136 sizeof(CONFIG_SYS_PROMPT) + 16)
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000137
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000138/* Physical Memory Map */
139#define CONFIG_NR_DRAM_BANKS 1
140#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
141#define PHYS_SDRAM_SIZE (512 << 20)
142
143#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
144#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
145#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
146
147#define CONFIG_SYS_INIT_SP_OFFSET \
148 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
149#define CONFIG_SYS_INIT_SP_ADDR \
150 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
151
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000152/* Enable NAND support */
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000153#ifdef CONFIG_CMD_NAND
154
155/* NAND stuff */
156#define CONFIG_NAND_MXS
157#define CONFIG_SYS_MAX_NAND_DEVICE 1
158#define CONFIG_SYS_NAND_BASE 0x40000000
159#define CONFIG_SYS_NAND_5_ADDR_CYCLE
160#define CONFIG_SYS_NAND_ONFI_DETECTION
161
162/* DMA stuff, needed for GPMI/MXS NAND support */
163#define CONFIG_APBH_DMA
164#define CONFIG_APBH_DMA_BURST
165#define CONFIG_APBH_DMA_BURST8
166
167/* Environment in NAND */
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000168#define CONFIG_ENV_OFFSET (16 << 20)
169#define CONFIG_ENV_SECT_SIZE (128 << 10)
170#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
171#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 << 10))
172#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
173
174#else /* CONFIG_CMD_NAND */
175
176/* Environment in MMC */
177#define CONFIG_ENV_SIZE (8 << 10)
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000178#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
179#define CONFIG_SYS_MMC_ENV_DEV 0
180
181#endif /* CONFIG_CMD_NAND */
182
183/* UBI/UBIFS config options */
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000184#define CONFIG_MTD_DEVICE
185#define CONFIG_MTD_PARTITIONS
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000186
Stefan Roeseb29ca4a2013-04-17 00:32:43 +0000187#endif /* __CONFIG_H */