2 * Copyright (C) 2012 <LW@KARO-electronics.de>
4 * SPDX-License-Identifier: GPL-2.0
11 #include <linux/kconfig.h>
12 #include <linux/sizes.h>
13 #include <asm/arch/regs-base.h>
16 * Ka-Ro TX28 board - SoC configuration
18 #define CONFIG_MXS_GPIO /* GPIO control */
19 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
20 #define PHYS_SDRAM_1_SIZE CONFIG_SYS_SDRAM_SIZE
22 #define TX28_MOD_SUFFIX "1"
24 #define CONFIG_SYS_SPL_FIXED_BATT_SUPPLY
25 #define TX28_MOD_SUFFIX "0"
27 #define IRAM_BASE_ADDR 0x00000000
29 #ifndef CONFIG_SPL_BUILD
30 #define CONFIG_SKIP_LOWLEVEL_INIT
31 #define CONFIG_SHOW_ACTIVITY
32 #define CONFIG_ARCH_CPU_INIT
33 #define CONFIG_ARCH_MISC_INIT /* init vector table after relocation */
34 #define CONFIG_DISPLAY_CPUINFO
35 #define CONFIG_DISPLAY_BOARDINFO
36 #define CONFIG_BOARD_LATE_INIT
37 #define CONFIG_BOARD_EARLY_INIT_F
38 #define CONFIG_SYS_GENERIC_BOARD
40 /* LCD Logo and Splash screen support */
42 #define CONFIG_SPLASH_SCREEN
43 #define CONFIG_SPLASH_SCREEN_ALIGN
44 #define CONFIG_VIDEO_MXS
45 #define CONFIG_LCD_LOGO
46 #define LCD_BPP LCD_COLOR32
47 #define CONFIG_CMD_BMP
48 #define CONFIG_VIDEO_BMP_RLE8
49 #endif /* CONFIG_LCD */
50 #endif /* CONFIG_SPL_BUILD */
53 * Memory configuration options
55 #define CONFIG_NR_DRAM_BANKS 0x1 /* 1 bank of SDRAM */
56 #define PHYS_SDRAM_1 0x40000000 /* SDRAM Bank #1 */
57 #define CONFIG_STACKSIZE SZ_64K
58 #define CONFIG_SYS_MALLOC_LEN SZ_4M
59 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* Memtest start address */
60 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_4M)
63 * U-Boot general configurations
65 #define CONFIG_SYS_LONGHELP
66 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
67 #define CONFIG_SYS_PBSIZE \
68 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
69 /* Print buffer size */
70 #define CONFIG_SYS_MAXARGS 256 /* Max number of command args */
71 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
72 /* Boot argument buffer size */
73 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
74 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
75 #define CONFIG_CMDLINE_EDITING /* Command history etc */
77 #define CONFIG_SYS_64BIT_VSPRINTF
80 * Flattened Device Tree (FDT) support
82 #ifdef CONFIG_OF_LIBFDT
88 #define xstr(s) str(s)
90 #define __pfx(x, s) (x##s)
91 #define _pfx(x, s) __pfx(x, s)
93 #define CONFIG_CMDLINE_TAG
94 #define CONFIG_SETUP_MEMORY_TAGS
95 #define CONFIG_BOOTDELAY 3
96 #define CONFIG_ZERO_BOOTDELAY_CHECK
97 #define CONFIG_SYS_AUTOLOAD "no"
98 #define CONFIG_BOOTFILE "uImage"
99 #define CONFIG_BOOTARGS "init=/linuxrc console=ttyAMA0,115200 ro debug panic=1"
100 #define CONFIG_BOOTCOMMAND "run bootcmd_${boot_mode} bootm_cmd"
102 #define CONFIG_LOADADDR 41000000
104 #define CONFIG_LOADADDR 43000000
106 #define CONFIG_FDTADDR 40800000
107 #define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
108 #define CONFIG_SYS_FDT_ADDR _pfx(0x, CONFIG_FDTADDR)
109 #define CONFIG_U_BOOT_IMG_SIZE SZ_1M
112 * Extra Environment Settings
114 #ifdef CONFIG_TX28_UBOOT_NOENV
115 #define CONFIG_EXTRA_ENV_SETTINGS \
118 "baseboard=stk5-v3\0" \
120 "fdtaddr=" xstr(CONFIG_FDTADDR) "\0" \
121 "mtdids=" MTDIDS_DEFAULT "\0" \
122 "mtdparts=" MTDPARTS_DEFAULT "\0"
124 #define CONFIG_EXTRA_ENV_SETTINGS \
126 "baseboard=stk5-v3\0" \
127 "bootargs_jffs2=run default_bootargs" \
128 ";setenv bootargs ${bootargs}" \
129 " root=/dev/mtdblock3 rootfstype=jffs2\0" \
130 "bootargs_mmc=run default_bootargs;setenv bootargs ${bootargs}" \
131 " root=/dev/mmcblk0p3 rootwait\0" \
132 "bootargs_nfs=run default_bootargs;setenv bootargs ${bootargs}" \
133 " root=/dev/nfs nfsroot=${nfs_server}:${nfsroot},nolock" \
135 "bootargs_ubifs=run default_bootargs" \
136 ";setenv bootargs ${bootargs}" \
137 " ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs\0" \
138 "bootcmd_jffs2=setenv autostart no;run bootargs_jffs2" \
140 "bootcmd_mmc=setenv autostart no;run bootargs_mmc" \
141 ";fatload mmc 0 ${loadaddr} uImage\0" \
142 "bootcmd_nand=setenv autostart no;run bootargs_ubifs" \
144 "bootcmd_net=setenv autoload y;setenv autostart n" \
145 ";run bootargs_nfs" \
147 "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0" \
149 "default_bootargs=setenv bootargs " CONFIG_BOOTARGS \
150 " ${append_bootargs}\0" \
151 "fdtaddr=" xstr(CONFIG_FDTADDR) "\0" \
152 "fdtsave=fdt resize;nand erase.part dtb" \
153 ";nand write ${fdtaddr} dtb ${fdtsize}\0" \
154 "mtdids=" MTDIDS_DEFAULT "\0" \
155 "mtdparts=" MTDPARTS_DEFAULT "\0" \
156 "nfsroot=/tftpboot/rootfs\0" \
157 "otg_mode=device\0" \
158 "touchpanel=tsc2007\0" \
160 #endif /* CONFIG_ENV_IS_NOWHERE */
162 #define MTD_NAME "gpmi-nand"
163 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
168 #define CONFIG_PL011_SERIAL
169 #define CONFIG_PL011_CLOCK 24000000
170 #define CONFIG_PL01x_PORTS { \
171 (void *)MXS_UARTDBG_BASE, \
173 #define CONFIG_CONS_INDEX 0 /* do not change! */
174 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
175 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, }
176 #define CONFIG_SYS_CONSOLE_INFO_QUIET
181 #ifdef CONFIG_FEC_MXC
182 /* This is required for the FEC driver to work with cache enabled */
183 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
184 #define CONFIG_SYS_CACHELINE_SIZE 32
187 #define CONFIG_FEC_MXC_PHYADDR 0
188 #define IMX_FEC_BASE MXS_ENET0_BASE
191 #define CONFIG_FEC_XCV_TYPE RMII
198 #define CONFIG_SYS_NAND_BLOCK_SIZE SZ_128K
199 #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SYS_NAND_BLOCK_SIZE
200 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
201 #define CONFIG_SYS_NAND_MAX_CHIPS 0x1
202 #define CONFIG_SYS_MAX_NAND_DEVICE 0x1
203 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
204 #define CONFIG_SYS_NAND_BASE 0x00000000
205 #endif /* CONFIG_CMD_NAND */
207 #ifdef CONFIG_ENV_IS_IN_NAND
208 #define CONFIG_ENV_OFFSET (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
209 #define CONFIG_ENV_SIZE SZ_128K
210 #define CONFIG_ENV_RANGE (3 * CONFIG_SYS_NAND_BLOCK_SIZE)
211 #endif /* CONFIG_ENV_IS_IN_NAND */
213 #ifdef CONFIG_ENV_OFFSET_REDUND
214 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_SYS_ENV_PART_SIZE) \
216 xstr(CONFIG_SYS_ENV_PART_SIZE) \
218 #define CONFIG_SYS_USERFS_PART_STR xstr(CONFIG_SYS_USERFS_PART_SIZE2) "(userfs)"
220 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_SYS_ENV_PART_SIZE) \
222 #define CONFIG_SYS_USERFS_PART_STR xstr(CONFIG_SYS_USERFS_PART_SIZE) "(userfs)"
223 #endif /* CONFIG_ENV_OFFSET_REDUND */
228 #ifdef CONFIG_MXS_MMC
229 #ifdef CONFIG_CMD_MMC
230 #define CONFIG_CMD_FAT
231 #define CONFIG_FAT_WRITE
232 #define CONFIG_CMD_EXT2
236 * Environments on MMC
238 #ifdef CONFIG_ENV_IS_IN_MMC
239 #define CONFIG_SYS_MMC_ENV_DEV 0
240 #define CONFIG_ENV_OVERWRITE
241 /* Associated with the MMC layout defined in mmcops.c */
242 #define CONFIG_ENV_OFFSET SZ_1K
243 #define CONFIG_ENV_SIZE (SZ_128K - CONFIG_ENV_OFFSET)
244 #define CONFIG_DYNAMIC_MMC_DEVNO
245 #endif /* CONFIG_ENV_IS_IN_MMC */
246 #endif /* CONFIG_MXS_MMC */
248 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
249 "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot)," \
250 CONFIG_SYS_ENV_PART_STR \
251 "6m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR \
252 ",512k@" xstr(CONFIG_SYS_NAND_DTB_OFFSET) "(dtb)" \
253 ",512k@" xstr(CONFIG_SYS_NAND_BBT_OFFSET) "(bbt)ro"
255 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
256 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
257 GENERATED_GBL_DATA_SIZE)
259 /* Defines for SPL */
260 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
261 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
262 #define CONFIG_SPL_LIBCOMMON_SUPPORT
263 #define CONFIG_SPL_LIBGENERIC_SUPPORT
264 #define CONFIG_SPL_SERIAL_SUPPORT
265 #define CONFIG_SPL_GPIO_SUPPORT
266 #define CONFIG_SYS_SPL_VDDD_VAL 1500
267 #define CONFIG_SYS_SPL_BATT_BO_LEVEL 2400
268 #define CONFIG_SYS_SPL_VDDA_BO_VAL 100
269 #define CONFIG_SYS_SPL_VDDMEM_VAL 0 /* VDDMEM is not utilized on TX28 */
271 #endif /* __CONFIG_H */