blob: 9100d3b14a018cd84c9338aa4e66c14e147a3ec2 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefan Roese05d10b52013-04-17 00:32:43 +00002/*
3 * Copyright (C) 2013 Stefan Roese <sr@denx.de>
4 *
5 * Configuration settings for the ProjectionDesign / Barco
6 * Titanium board.
7 *
8 * Based on mx6qsabrelite.h which is:
9 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
Stefan Roese05d10b52013-04-17 00:32:43 +000010 */
11
12#ifndef __CONFIG_H
13#define __CONFIG_H
14
Eric Nelson062772c2013-11-26 17:40:30 -070015#include "mx6_common.h"
Stefan Roese05d10b52013-04-17 00:32:43 +000016
Stefan Roese05d10b52013-04-17 00:32:43 +000017#define CONFIG_MX6Q
Stefan Roese05d10b52013-04-17 00:32:43 +000018
Tom Rinic6e2db42017-01-25 20:42:38 -050019/* Provide the MACH_TYPE value that the vendor kernel requires. */
20#define CONFIG_MACH_TYPE 3769
Stefan Roese05d10b52013-04-17 00:32:43 +000021
Stefan Roese05d10b52013-04-17 00:32:43 +000022/* Size of malloc() pool */
23#define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024)
24
Stefan Roese05d10b52013-04-17 00:32:43 +000025#define CONFIG_MXC_UART_BASE UART1_BASE
26
27/* I2C Configs */
trem03997412013-09-21 18:13:36 +020028#define CONFIG_SYS_I2C
29#define CONFIG_SYS_I2C_MXC
Albert ARIBAUD \\(3ADEV\\)eb943872015-09-21 22:43:38 +020030#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
31#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
York Sunf1a52162015-03-20 10:20:40 -070032#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Stefan Roese05d10b52013-04-17 00:32:43 +000033#define CONFIG_SYS_I2C_SPEED 100000
34
35/* MMC Configs */
Stefan Roese05d10b52013-04-17 00:32:43 +000036#define CONFIG_SYS_FSL_ESDHC_ADDR 0
37#define CONFIG_SYS_FSL_USDHC_NUM 1
38
Stefan Roese05d10b52013-04-17 00:32:43 +000039#define CONFIG_FEC_MXC
Stefan Roese05d10b52013-04-17 00:32:43 +000040#define IMX_FEC_BASE ENET_BASE_ADDR
41#define CONFIG_FEC_XCV_TYPE RGMII
42#define CONFIG_FEC_MXC_PHYADDR 4
Stefan Roese05d10b52013-04-17 00:32:43 +000043
44/* USB Configs */
Stefan Roese05d10b52013-04-17 00:32:43 +000045#define CONFIG_MXC_USB_PORT 1
46#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
47#define CONFIG_MXC_USB_FLAGS 0
48
Mario Six790d8442018-03-28 14:38:20 +020049#define CONFIG_HOSTNAME "titanium"
Stefan Roese05d10b52013-04-17 00:32:43 +000050#define CONFIG_UBI_PART ubi
51#define CONFIG_UBIFS_VOLUME rootfs0
52
Stefan Roese05d10b52013-04-17 00:32:43 +000053#define CONFIG_EXTRA_ENV_SETTINGS \
Mario Six790d8442018-03-28 14:38:20 +020054 "kernel=" CONFIG_HOSTNAME "/uImage\0" \
Stefan Roese05d10b52013-04-17 00:32:43 +000055 "kernel_fs=/boot/uImage\0" \
56 "kernel_addr=11000000\0" \
Mario Six790d8442018-03-28 14:38:20 +020057 "dtb=" CONFIG_HOSTNAME "/" \
58 CONFIG_HOSTNAME ".dtb\0" \
59 "dtb_fs=/boot/" CONFIG_HOSTNAME ".dtb\0" \
Stefan Roese05d10b52013-04-17 00:32:43 +000060 "dtb_addr=12800000\0" \
61 "script=boot.scr\0" \
62 "uimage=uImage\0" \
63 "console=ttymxc0\0" \
64 "baudrate=115200\0" \
65 "fdt_high=0xffffffff\0" \
66 "initrd_high=0xffffffff\0" \
67 "mmcdev=0\0" \
68 "mmcpart=1\0" \
69 "uimage=uImage\0" \
70 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
71 " ${script}\0" \
72 "bootscript=echo Running bootscript from mmc ...; source\0" \
73 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
74 "mmcroot=/dev/mmcblk0p2\0" \
75 "mmcargs=setenv bootargs console=${console},${baudrate} " \
76 "root=${mmcroot} rootwait rw\0" \
77 "bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
78 " ${uimage}; bootm\0" \
79 "addip=setenv bootargs ${bootargs} " \
80 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
81 ":${hostname}:${netdev}:off panic=1\0" \
82 "addcon=setenv bootargs ${bootargs} console=ttymxc0," \
83 "${baudrate}\0" \
84 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
85 "rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0" \
86 "nfsargs=setenv bootargs root=/dev/nfs rw " \
87 "nfsroot=${serverip}:${rootpath}\0" \
Mario Six790d8442018-03-28 14:38:20 +020088 "ubifs=" CONFIG_HOSTNAME "/ubifs.img\0" \
Stefan Roese05d10b52013-04-17 00:32:43 +000089 "part=" __stringify(CONFIG_UBI_PART) "\0" \
90 "boot_vol=0\0" \
91 "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0" \
92 "load_ubifs=tftp ${kernel_addr} ${ubifs}\0" \
93 "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \
94 " ${filesize}\0" \
95 "upd_ubifs=run load_ubifs update_ubifs\0" \
96 "init_ubi=nand erase.part ubi;ubi part ${part};" \
97 "ubi create ${vol} c800000\0" \
Tom Rini5ad8e112017-10-22 17:55:07 -040098 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
99 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
Stefan Roese05d10b52013-04-17 00:32:43 +0000100 "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip" \
101 " addcon addmtd;" \
102 "bootm ${kernel_addr} - ${dtb_addr}\0" \
103 "ubifsargs=set bootargs ubi.mtd=ubi " \
104 "root=ubi:rootfs${boot_vol} rootfstype=ubifs\0" \
105 "ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0" \
106 "ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};" \
107 "ubifsload ${dtb_addr} ${dtb_fs};\0" \
108 "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \
109 "addmtd;bootm ${kernel_addr} - ${dtb_addr}\0" \
110 "load_kernel=tftp ${kernel_addr} ${kernel}\0" \
111 "load_dtb=tftp ${dtb_addr} ${dtb}\0" \
112 "net_nfs=run load_dtb load_kernel; " \
113 "run nfsargs addip addcon addmtd;" \
114 "bootm ${kernel_addr} - ${dtb_addr}\0" \
115 "delenv=env default -a -f; saveenv; reset\0"
116
117#define CONFIG_BOOTCOMMAND "run nand_ubifs"
118
Stefan Roese05d10b52013-04-17 00:32:43 +0000119/* Physical Memory Map */
Stefan Roese05d10b52013-04-17 00:32:43 +0000120#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
121#define PHYS_SDRAM_SIZE (512 << 20)
122
123#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
124#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
125#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
126
127#define CONFIG_SYS_INIT_SP_OFFSET \
128 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
129#define CONFIG_SYS_INIT_SP_ADDR \
130 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
131
Stefan Roese05d10b52013-04-17 00:32:43 +0000132/* Enable NAND support */
Stefan Roese05d10b52013-04-17 00:32:43 +0000133#ifdef CONFIG_CMD_NAND
134
135/* NAND stuff */
Stefan Roese05d10b52013-04-17 00:32:43 +0000136#define CONFIG_SYS_MAX_NAND_DEVICE 1
137#define CONFIG_SYS_NAND_BASE 0x40000000
138#define CONFIG_SYS_NAND_5_ADDR_CYCLE
139#define CONFIG_SYS_NAND_ONFI_DETECTION
140
141/* DMA stuff, needed for GPMI/MXS NAND support */
Stefan Roese05d10b52013-04-17 00:32:43 +0000142
143/* Environment in NAND */
Stefan Roese05d10b52013-04-17 00:32:43 +0000144
145#else /* CONFIG_CMD_NAND */
146
147/* Environment in MMC */
Stefan Roese05d10b52013-04-17 00:32:43 +0000148#define CONFIG_SYS_MMC_ENV_DEV 0
149
150#endif /* CONFIG_CMD_NAND */
151
152/* UBI/UBIFS config options */
Stefan Roese05d10b52013-04-17 00:32:43 +0000153
Stefan Roese05d10b52013-04-17 00:32:43 +0000154#endif /* __CONFIG_H */