1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2014, Barco (www.barco.com)
6 #ifndef __PLATINUM_CONFIG_H__
7 #define __PLATINUM_CONFIG_H__
11 /* Location in NAND to read U-Boot from */
12 #define CONFIG_SYS_NAND_U_BOOT_OFFS (14 * 1024 * 1024)
14 #include "imx6_spl.h" /* common IMX6 SPL configuration */
15 #include "mx6_common.h"
18 * Hardware configuration
22 #define CONFIG_MXC_UART
23 #define CONFIG_MXC_UART_BASE UART1_BASE
26 #define CONFIG_SYS_I2C
27 #define CONFIG_SYS_I2C_MXC
28 #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
29 #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
30 #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
31 #define CONFIG_SYS_I2C_SPEED 100000
34 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
35 #define CONFIG_SYS_FSL_USDHC_NUM 1
38 #define CONFIG_FEC_MXC
39 #define IMX_FEC_BASE ENET_BASE_ADDR
42 #define CONFIG_MXC_USB_PORT 1
43 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
44 #define CONFIG_MXC_USB_FLAGS 0
47 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
48 #ifndef PHYS_SDRAM_SIZE
49 #define PHYS_SDRAM_SIZE (1024 << 20)
52 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
53 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
54 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
56 #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
57 GENERATED_GBL_DATA_SIZE)
58 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
59 CONFIG_SYS_INIT_SP_OFFSET)
61 #define CONFIG_SYS_MALLOC_LEN (16 * 1024 * 1024)
63 #ifdef CONFIG_CMD_NAND
66 #ifndef CONFIG_SYS_NAND_MAX_CHIPS
67 #define CONFIG_SYS_NAND_MAX_CHIPS 2
69 #define CONFIG_SYS_MAX_NAND_DEVICE 1
70 #define CONFIG_SYS_NAND_BASE 0x40000000
71 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
72 #define CONFIG_SYS_NAND_ONFI_DETECTION
74 /* DMA config, needed for GPMI/MXS NAND support */
76 /* Environment in NAND */
78 #else /* CONFIG_CMD_NAND */
80 /* Environment in MMC */
81 #define CONFIG_SYS_MMC_ENV_DEV 0
83 #endif /* CONFIG_CMD_NAND */
86 * U-Boot configuration
89 /* Board startup config */
91 #define CONFIG_BOOTCOMMAND "run bootubi_scr"
93 /* Miscellaneous configurable options */
95 /* MTD/UBI/UBIFS config */
98 * Environment configuration
101 #if (CONFIG_SYS_NAND_MAX_CHIPS == 1)
102 #define CONFIG_COMMON_ENV_UBI \
103 "setubipartition=env set ubipartition ubi\0" \
104 "setubirfs=env set ubirfs $ubipartition:rootfs$boot_vol\0"
105 #elif (CONFIG_SYS_NAND_MAX_CHIPS == 2)
106 #define CONFIG_COMMON_ENV_UBI \
107 "setubipartition=env set ubipartition ubi$boot_vol\0" \
108 "setubirfs=env set ubirfs ubi0:rootfs\0"
111 #define CONFIG_COMMON_ENV_MISC \
113 "project="CONFIG_PLATINUM_PROJECT"\0" \
115 "dtb="CONFIG_PLATINUM_CPU"-platinum-"CONFIG_PLATINUM_PROJECT".dtb\0" \
116 "serverip=serverip\0" \
117 "memaddrlinux=0x10800000\0" \
118 "memaddrsrc=0x11000000\0" \
119 "memaddrdtb=0x12000000\0" \
120 "console=ttymxc0\0" \
121 "baudrate=115200\0" \
122 "boot_scr=boot.uboot\0" \
124 "mtdids="CONFIG_MTDIDS_DEFAULT"\0" \
125 "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \
129 "setnfspath=env set nfspath /home/nfs/$user/$project/root\0" \
130 "settftpfilelinux=env set tftpfilelinux $user/$project/$uimage\0" \
131 "settftpfiledtb=env set tftpfiledtb $user/$project/$dtb\0" \
132 "setubifilelinux=env set ubifilelinux boot/$uimage\0" \
133 "setubipfiledtb=env set ubifiledtb boot/$dtb\0" \
134 "setmmcrootdev=env set mmcrootdev /dev/mmcblk0p$mmcrootpart\0" \
135 "setmmcfilelinux=env set mmcfilelinux /boot/$uimage\0" \
136 "setmmcfiledtb=env set mmcfiledtb /boot/$dtb\0" \
138 "loadtftpkernel=dhcp $memaddrlinux $tftpfilelinux\0" \
139 "loadtftpdtb=dhcp $memaddrdtb $tftpfiledtb\0" \
140 "loadubikernel=ubifsload $memaddrlinux $ubifilelinux\0" \
141 "loadubidtb=ubifsload $memaddrdtb $ubifiledtb\0" \
142 "loadmmckernel=${mmcfs}load mmc 0:$mmcrootpart $memaddrlinux " \
144 "loadmmcdtb=${mmcfs}load mmc 0:$mmcrootpart $memaddrdtb " \
147 "ubipart=ubi part $ubipartition\0" \
148 "ubimount=ubifsmount $ubirfs\0" \
150 "setbootargscommon=env set bootargs $bootargs " \
151 "console=$console,$baudrate enable_wait_mode=off\0" \
152 "setbootargsmtd=env set bootargs $bootargs $mtdparts\0" \
153 "setbootargsdhcp=env set bootargs $bootargs ip=dhcp\0" \
154 "setbootargsubirfs=env set bootargs $bootargs " \
155 "ubi.mtd=$ubipartition root=$ubirfs rootfstype=ubifs\0" \
156 "setbootargsnfsrfs=env set bootargs $bootargs root=/dev/nfs " \
157 "nfsroot=$serverip:$nfspath,v3,tcp\0" \
158 "setbootargsmmcrfs=env set bootargs $bootargs " \
159 "root=$mmcrootdev rootwait rw\0" \
161 "bootnet=run settftpfilelinux settftpfiledtb setnfspath " \
162 "setbootargscommon setbootargsmtd setbootargsdhcp " \
163 "setbootargsnfsrfs;" \
164 "run loadtftpkernel loadtftpdtb;" \
165 "bootm $memaddrlinux - $memaddrdtb\0" \
166 "bootnet_ubirfs=run settftpfilelinux settftpfiledtb;" \
167 "run setubipartition setubirfs;" \
168 "run setbootargscommon setbootargsmtd " \
169 "setbootargsubirfs;" \
170 "run loadtftpkernel loadtftpdtb;" \
171 "bootm $memaddrlinux - $memaddrdtb\0" \
172 "bootubi=run setubipartition setubirfs setubifilelinux " \
174 "run setbootargscommon setbootargsmtd " \
175 "setbootargsubirfs;" \
176 "run ubipart ubimount loadubikernel loadubidtb;" \
177 "bootm $memaddrlinux - $memaddrdtb\0" \
178 "bootubi_scr=run setubipartition setubirfs;" \
179 "run ubipart ubimount;" \
180 "if ubifsload ${memaddrsrc} boot/${boot_scr}; " \
181 "then source ${memaddrsrc}; else run bootubi; fi\0" \
182 "bootmmc=run setmmcrootdev setmmcfilelinux setmmcfiledtb " \
183 "setbootargscommon setbootargsmmcrfs;" \
184 "run loadmmckernel loadmmcdtb;" \
185 "bootm $memaddrlinux - $memaddrdtb\0" \
187 "bootcmd="CONFIG_BOOTCOMMAND"\0"
189 #define CONFIG_COMMON_ENV_SETTINGS CONFIG_COMMON_ENV_MISC \
190 CONFIG_COMMON_ENV_UBI
191 #endif /* __PLATINUM_CONFIG_H__ */