2 * (C) Copyright 2012, Stefano Babic <sbabic@denx.de>
4 * Copyright (C) 2010 Freescale Semiconductor, Inc.
6 * Configuration settings for the MX53-EVK Freescale board.
8 * SPDX-License-Identifier: GPL-2.0+
14 /* SOC type must be included before imx-regs.h */
16 #include <asm/arch/imx-regs.h>
18 #define CONFIG_DISPLAY_CPUINFO
19 #define CONFIG_DISPLAY_BOARDINFO
21 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
22 #define CONFIG_SETUP_MEMORY_TAGS
23 #define CONFIG_INITRD_TAG
25 #define CONFIG_OF_LIBFDT
27 /* Size of malloc() pool */
28 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
30 #define CONFIG_BOARD_EARLY_INIT_F
33 #define CONFIG_MXC_GPIO
36 #define CONFIG_MXC_UART
37 #define CONFIG_MXC_UART_BASE UART4_BASE_ADDR
40 #define CONFIG_FSL_ESDHC
41 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
42 #define CONFIG_SYS_FSL_ESDHC_NUM 1
45 #define CONFIG_GENERIC_MMC
46 #define CONFIG_DOS_PARTITION
49 #define CONFIG_NET_MULTI
52 #define CONFIG_FEC_MXC
53 #define IMX_FEC_BASE FEC_BASE_ADDR
54 #define CONFIG_FEC_MXC_PHYADDR 0x01
55 #define CONFIG_PHY_ADDR CONFIG_FEC_MXC_PHYADDR
56 #define CONFIG_RESET_PHY_R
57 #define CONFIG_FEC_MXC_NO_ANEG
58 #define CONFIG_ETHPRIME "FEC0"
61 #define CONFIG_HARD_SPI
62 #define CONFIG_MXC_SPI
63 #define CONFIG_DEFAULT_SPI_BUS 1
64 #define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0
66 /* SPI FLASH - not used for environment */
67 #define CONFIG_SPI_FLASH
68 #define CONFIG_SPI_FLASH_STMICRO
69 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
70 #define CONFIG_SF_DEFAULT_SPEED 25000000
72 /* allow to overwrite serial and ethaddr */
73 #define CONFIG_ENV_OVERWRITE
74 #define CONFIG_CONS_INDEX 1
75 #define CONFIG_BAUDRATE 115200
77 /* Command definition */
78 #include <config_cmd_default.h>
79 #define CONFIG_CMD_PING
80 #define CONFIG_CMD_DHCP
81 #define CONFIG_CMD_MII
82 #define CONFIG_CMD_MMC
83 #define CONFIG_CMD_FAT
84 #define CONFIG_CMD_EXT2
85 #define CONFIG_CMD_MTDPARTS
86 #define CONFIG_CMD_SPI
88 #define CONFIG_CMD_GPIO
90 #define CONFIG_BOOTDELAY 3
92 #define CONFIG_LOADADDR 0x70800000 /* loadaddr env var */
93 #define CONFIG_SYS_TEXT_BASE 0xf0001400 /* uboot in nor flash */
95 #define CONFIG_ARP_TIMEOUT 200UL
97 /* Miscellaneous configurable options */
98 #define CONFIG_SYS_LONGHELP /* undef to save memory */
99 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
100 #define CONFIG_SYS_PROMPT "IMA3 MX53 U-Boot > "
101 #define CONFIG_AUTO_COMPLETE
102 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
104 /* Print Buffer Size */
105 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
106 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
107 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
109 #define CONFIG_SYS_MEMTEST_START 0x70000000
110 #define CONFIG_SYS_MEMTEST_END 0x10000
112 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
114 #define CONFIG_CMDLINE_EDITING
116 /* Physical Memory Map */
117 #define CONFIG_NR_DRAM_BANKS 1
118 #define PHYS_SDRAM_1 CSD0_BASE_ADDR
119 #define PHYS_SDRAM_1_SIZE (1024 * 1024 * 1024)
121 #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1)
122 #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR)
123 #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE)
125 #define CONFIG_SYS_INIT_SP_OFFSET \
126 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
127 #define CONFIG_SYS_INIT_SP_ADDR \
128 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
130 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
131 #define MTDIDS_DEFAULT "nor0=f0000000.flash"
133 /* FLASH and environment organization */
135 #define CONFIG_SYS_FLASH_BASE 0xF0000000
136 #define CONFIG_SYS_FLASH_CFI /* Flash is CFI conformant */
137 #define CONFIG_FLASH_CFI_DRIVER /* Use the common driver */
138 #define CONFIG_FLASH_CFI_MTD /* with MTD support */
139 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
140 #define CONFIG_SYS_MAX_FLASH_BANKS 1
141 #define CONFIG_SYS_MAX_FLASH_SECT 1024
143 #define CONFIG_SYS_FLASH_EMPTY_INFO
144 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
146 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
147 #define CONFIG_SYS_MONITOR_LEN (512 * 1024)
149 #define CONFIG_ENV_SIZE (8 * 1024)
150 #define CONFIG_ENV_IS_IN_FLASH
151 #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
152 CONFIG_SYS_MONITOR_LEN)
153 #define CONFIG_ENV_SECT_SIZE 0x20000
154 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
155 CONFIG_ENV_SECT_SIZE)
156 #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
159 * Default environment and default scripts
160 * to update uboot and load kernel
163 #define HOSTNAME ima3-mx53
165 #define CONFIG_HOSTNAME ima3-mx53
166 #define CONFIG_EXTRA_ENV_SETTINGS \
168 "nfsargs=setenv bootargs root=/dev/nfs rw " \
169 "nfsroot=${serverip}:${rootpath}\0" \
170 "ramargs=setenv bootargs root=/dev/ram0 rw\0" \
171 "addip_sta=setenv bootargs ${bootargs} " \
172 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
173 ":${hostname}:${netdev}:off panic=1\0" \
174 "addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0" \
175 "addip=if test -n ${ipdyn};then run addip_dyn;" \
176 "else run addip_sta;fi\0" \
177 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
178 "addtty=setenv bootargs ${bootargs}" \
179 " console=${console},${baudrate}\0" \
180 "addmisc=setenv bootargs ${bootargs} ${misc}\0" \
181 "console=ttymxc3\0" \
182 "loadaddr=70800000\0" \
183 "kernel_addr_r=70800000\0" \
184 "ramdisk_addr_r=71000000\0" \
185 "hostname=" __stringify(CONFIG_HOSTNAME) "\0" \
186 "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \
187 "ramdisk_file=" __stringify(CONFIG_HOSTNAME) "/uRamdisk\0" \
188 "mmcargs=setenv bootargs root=${mmcroot} " \
189 "rootfstype=${mmcrootfstype}\0" \
190 "mmcroot=/dev/mmcblk0p3 rw\0" \
191 "mmcboot=echo Booting from mmc ...; " \
192 "run mmcargs addip addtty addmtd addmisc mmcload;" \
194 "mmcload=fatload mmc ${mmcdev}:${mmcpart} " \
195 "${loadaddr} ${uimage}\0" \
196 "mmcrootfstype=ext3 rootwait\0" \
197 "flash_self=run ramargs addip addtty addmtd addmisc;" \
198 "bootm ${kernel_addr} ${ramdisk_addr}\0" \
199 "flash_nfs=run nfsargs addip addtty addmtd addmisc;" \
200 "bootm ${kernel_addr}\0" \
201 "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \
202 "run nfsargs addip addtty addmtd addmisc;" \
203 "bootm ${kernel_addr_r}\0" \
204 "net_self_load=tftp ${ramdisk_addr_r} ${ramdisk_file};" \
205 "tftp ${kernel_addr_r} ${bootfile}\0" \
206 "net_self=if run net_self_load;then " \
207 "run ramargs addip addtty addmtd addmisc;" \
208 "bootm ${kernel_addr_r} ${ramdisk_addr_r};" \
209 "else echo Images not loades;fi\0" \
210 "satargs=setenv bootargs root=/dev/sda1\0" \
211 "satafile=boot/uImage\0" \
212 "ssdboot=echo Booting from ssd ...; " \
213 "run satargs addip addtty addmtd addmisc;" \
214 "sata init;ext2load sata 0:1 ${kernel_addr_r} " \
215 "${satafile};bootm\0" \
216 "u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.imx\0" \
218 "load=tftp ${loadaddr} ${u-boot}\0" \
219 "uboot_addr=0xf0001000\0" \
220 "update=protect off 0xf0000000 +60000;" \
221 "erase ${uboot_addr} +60000;" \
222 "cp.b ${loadaddr} ${uboot_addr} ${filesize}\0" \
223 "upd=if run load;then echo Updating u-boot;if run update;" \
224 "then echo U-Boot updated;" \
225 "else echo Error updating u-boot !;" \
226 "echo Board without bootloader !!;" \
228 "else echo U-Boot not downloaded..exiting;fi\0" \
229 "bootcmd=run net_nfs\0"
232 #define CONFIG_CMD_SATA
233 #ifdef CONFIG_CMD_SATA
234 #define CONFIG_DWC_AHSATA
235 #define CONFIG_SYS_SATA_MAX_DEVICE 1
236 #define CONFIG_DWC_AHSATA_PORT_ID 0
237 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_BASE_ADDR
239 #define CONFIG_LIBATA
242 #endif /* __CONFIG_H */