blob: 60158f96d4abbdcfce09d7da39c22804796fbbd4 [file] [log] [blame]
Stefan Roese13b4f632012-08-14 15:04:19 +02001/*
Stefan Roese8aa34492013-04-25 23:20:23 +00002 * Copyright 2012-2013 Stefan Roese <sr@denx.de>
Stefan Roese13b4f632012-08-14 15:04:19 +02003 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Stefan Roese13b4f632012-08-14 15:04:19 +02005 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
9
10/*
11 * High Level Configuration Options
12 * (easy to change)
13 */
14
15#define CONFIG_MPC5200
Masahiro Yamadab2a6dfe2014-01-16 11:03:07 +090016#define CONFIG_A3M071 /* A3M071 board */
Stefan Roese13b4f632012-08-14 15:04:19 +020017
18#define CONFIG_SYS_TEXT_BASE 0x01000000 /* boot low for 32 MiB boards */
19
Stefan Roesed4451d32013-02-07 02:10:11 +000020#define CONFIG_SPL_TARGET "u-boot-img.bin"
21
Stefan Roese13b4f632012-08-14 15:04:19 +020022#define CONFIG_SYS_MPC5XXX_CLKIN 33000000 /* ... running at 33MHz */
23
24#define CONFIG_MISC_INIT_R
25#define CONFIG_SYS_LOWBOOT /* Enable lowboot */
26
Stefan Roesed4451d32013-02-07 02:10:11 +000027#ifdef CONFIG_A4M2K
28#define CONFIG_HOSTNAME a4m2k
29#else
30#define CONFIG_HOSTNAME a3m071
31#endif
32
Stefan Roesed62a89b2013-06-22 16:16:25 +020033#define CONFIG_BOOTCOUNT_LIMIT
34
Stefan Roese13b4f632012-08-14 15:04:19 +020035/*
36 * Serial console configuration
37 */
38#define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */
Stefan Roese13b4f632012-08-14 15:04:19 +020039#define CONFIG_SYS_BAUDRATE_TABLE \
40 { 9600, 19200, 38400, 57600, 115200, 230400 }
41
42/*
43 * Command line configuration.
44 */
Stefan Roese13b4f632012-08-14 15:04:19 +020045#define CONFIG_CMD_BSP
Stefan Roese13b4f632012-08-14 15:04:19 +020046#define CONFIG_CMD_REGINFO
Stefan Roese8aa34492013-04-25 23:20:23 +000047#define CONFIG_BOOTP_SEND_HOSTNAME
48#define CONFIG_BOOTP_SERVERIP
49#define CONFIG_BOOTP_MAY_FAIL
50#define CONFIG_BOOTP_BOOTPATH
51#define CONFIG_BOOTP_GATEWAY
52#define CONFIG_BOOTP_SERVERIP
53#define CONFIG_NET_RETRY_COUNT 3
Stefan Roese8aa34492013-04-25 23:20:23 +000054#define CONFIG_NETCONSOLE
Stefan Roese8aa34492013-04-25 23:20:23 +000055#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
56#define CONFIG_MTD_PARTITIONS /* needed for UBI */
57#define CONFIG_FLASH_CFI_MTD
58#define MTDIDS_DEFAULT "nor0=fc000000.flash"
59#define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \
Stefan Roesed62a89b2013-06-22 16:16:25 +020060 "128k(env1)," \
61 "128k(env2)," \
Stefan Roese8aa34492013-04-25 23:20:23 +000062 "128k(hwinfo)," \
63 "1M(nvramsim)," \
64 "128k(dtb)," \
65 "5M(kernel)," \
66 "128k(sysinfo)," \
67 "7552k(root)," \
68 "4M(app)," \
Stefan Roesed62a89b2013-06-22 16:16:25 +020069 "5376k(data)," \
70 "8M(install)"
71
Stefan Roese8aa34492013-04-25 23:20:23 +000072#define CONFIG_LZO /* needed for UBI */
73#define CONFIG_RBTREE /* needed for UBI */
74#define CONFIG_CMD_MTDPARTS
Stefan Roese8aa34492013-04-25 23:20:23 +000075#define CONFIG_CMD_UBIFS
Stefan Roese13b4f632012-08-14 15:04:19 +020076
77/*
78 * IPB Bus clocking configuration.
79 */
80#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */
81/* define for 66MHz speed - undef for 33MHz PCI clock speed */
Stefan Roesed4451d32013-02-07 02:10:11 +000082#ifdef CONFIG_A4M2K
83#define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
84#else
Stefan Roese13b4f632012-08-14 15:04:19 +020085#undef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
Stefan Roesed4451d32013-02-07 02:10:11 +000086#endif
Stefan Roese13b4f632012-08-14 15:04:19 +020087
Stefan Roese13b4f632012-08-14 15:04:19 +020088/* maximum size of the flat tree (8K) */
89#define OF_FLAT_TREE_MAX_SIZE 8192
90
91#define OF_CPU "PowerPC,5200@0"
92#define OF_SOC "soc5200@f0000000"
93#define OF_TBCLK (bd->bi_busfreq / 4)
94#define OF_STDOUT_PATH "/soc5200@f0000000/serial@2000"
95
96/*
Stefan Roese13b4f632012-08-14 15:04:19 +020097 * NOR flash configuration
98 */
99#define CONFIG_SYS_FLASH_BASE 0xfc000000
Stefan Roesed4451d32013-02-07 02:10:11 +0000100#define CONFIG_SYS_FLASH_SIZE 0x02000000
Stefan Roese8aa34492013-04-25 23:20:23 +0000101#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x80000)
Stefan Roese13b4f632012-08-14 15:04:19 +0200102
103#define CONFIG_SYS_MAX_FLASH_BANKS 1
104#define CONFIG_SYS_MAX_FLASH_SECT 256
105#define CONFIG_SYS_FLASH_ERASE_TOUT 240000
106#define CONFIG_SYS_FLASH_WRITE_TOUT 500
107#define CONFIG_SYS_FLASH_LOCK_TOUT 5
108#define CONFIG_SYS_FLASH_UNLOCK_TOUT 10000
109#define CONFIG_SYS_FLASH_PROTECTION
110#define CONFIG_FLASH_CFI_DRIVER
111#define CONFIG_SYS_FLASH_CFI
112#define CONFIG_SYS_FLASH_EMPTY_INFO
113#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
Stefan Roesef8945512013-04-04 03:55:42 +0000114#define CONFIG_FLASH_VERIFY
Stefan Roese13b4f632012-08-14 15:04:19 +0200115
116/*
117 * Environment settings
118 */
119#define CONFIG_ENV_IS_IN_FLASH
120#define CONFIG_ENV_SIZE 0x10000
121#define CONFIG_ENV_SECT_SIZE 0x20000
122#define CONFIG_ENV_OVERWRITE
Stefan Roese8aa34492013-04-25 23:20:23 +0000123#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
124#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Stefan Roese13b4f632012-08-14 15:04:19 +0200125
126/*
127 * Memory map
128 */
129#define CONFIG_SYS_MBAR 0xf0000000
130#define CONFIG_SYS_SDRAM_BASE 0x00000000
131#define CONFIG_SYS_DEFAULT_MBAR 0x80000000
132
133/* Use SRAM until RAM will be available */
134#define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM
York Sunb39d1212016-04-06 13:22:10 -0700135#define CONFIG_SYS_INIT_RAM_SIZE MPC5XXX_SRAM_SIZE
Stefan Roese13b4f632012-08-14 15:04:19 +0200136
York Sunb39d1212016-04-06 13:22:10 -0700137#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
Stefan Roese704afcc2013-04-25 23:10:02 +0000138 GENERATED_GBL_DATA_SIZE)
Stefan Roese13b4f632012-08-14 15:04:19 +0200139#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
140
141#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
142
Stefan Roese8aa34492013-04-25 23:20:23 +0000143#define CONFIG_SYS_MONITOR_LEN (512 << 10)
144#define CONFIG_SYS_MALLOC_LEN (4 << 20)
Stefan Roese13b4f632012-08-14 15:04:19 +0200145#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
146
147/*
148 * Ethernet configuration
149 */
150#define CONFIG_MPC5xxx_FEC
151#define CONFIG_MPC5xxx_FEC_MII100
Stefan Roesed4451d32013-02-07 02:10:11 +0000152#ifdef CONFIG_A4M2K
153#define CONFIG_PHY_ADDR 0x01
154#else
Stefan Roese13b4f632012-08-14 15:04:19 +0200155#define CONFIG_PHY_ADDR 0x00
Stefan Roesed4451d32013-02-07 02:10:11 +0000156#endif
Stefan Roese13b4f632012-08-14 15:04:19 +0200157
158/*
159 * GPIO configuration
160 */
161
162/*
163 * GPIO-config depends on failsave-level
164 * failsave 0 means just MPX-config, no digiboard, no fpga
165 * 1 means digiboard ok
166 * 2 means fpga ok
167 */
168
Stefan Roesed4451d32013-02-07 02:10:11 +0000169#ifdef CONFIG_A4M2K
Stefan Roese8aa34492013-04-25 23:20:23 +0000170#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C805
Stefan Roesed4451d32013-02-07 02:10:11 +0000171#else
Stefan Roese13b4f632012-08-14 15:04:19 +0200172/* for failsave-level 0 - full failsave */
173#define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C005
174/* for failsave-level 1 - only digiboard ok */
Stefan Roese8aa34492013-04-25 23:20:23 +0000175#define CONFIG_SYS_GPS_PORT_CONFIG_1 0x1005C065
Stefan Roese13b4f632012-08-14 15:04:19 +0200176/* for failsave-level 2 - all ok */
Stefan Roese8aa34492013-04-25 23:20:23 +0000177#define CONFIG_SYS_GPS_PORT_CONFIG_2 0x1005C065
Stefan Roesed4451d32013-02-07 02:10:11 +0000178#endif
Stefan Roese13b4f632012-08-14 15:04:19 +0200179
Stefan Roeseaed75482013-02-07 02:10:28 +0000180#define CONFIG_WDOG_GPIO_PIN GPIO_WKUP_7
181#if defined(CONFIG_A4M2K) && !defined(CONFIG_SPL_BUILD)
182#define CONFIG_HW_WATCHDOG /* Use external HW-Watchdog */
183#endif
184
Stefan Roese13b4f632012-08-14 15:04:19 +0200185/*
186 * Configuration matrix
Stefan Roese8aa34492013-04-25 23:20:23 +0000187 * MSB LSB
Stefan Roesed4451d32013-02-07 02:10:11 +0000188 * failsave 0 0x1005C005 00010000000001011100000000000101 ( full failsave )
Stefan Roese8aa34492013-04-25 23:20:23 +0000189 * failsave 1 0x1005C065 00010000000001011100000001100101 ( digib.-ver ok )
190 * failsave 2 0x1005C065 00010000000001011100000001100101 ( all ok )
Stefan Roese13b4f632012-08-14 15:04:19 +0200191 * || ||| || | ||| | | | |
192 * || ||| || | ||| | | | | bit rev name
193 * ++-+++-++--+---+++-+---+---+---+- 0 31 CS1
194 * +-+++-++--+---+++-+---+---+---+- 1 30 LPTZ
195 * ||| || | ||| | | | | 2 29 ALTs
196 * +++-++--+---+++-+---+---+---+- 3 28 ALTs
197 * ++-++--+---+++-+---+---+---+- 4 27 CS7
198 * +-++--+---+++-+---+---+---+- 5 26 CS6
199 * || | ||| | | | | 6 25 ATA
200 * ++--+---+++-+---+---+---+- 7 24 ATA
201 * +--+---+++-+---+---+---+- 8 23 IR_USB_CLK
202 * | ||| | | | | 9 22 IRDA
203 * | ||| | | | | 10 21 IRDA
204 * +---+++-+---+---+---+- 11 20 IRDA
205 * ||| | | | | 12 19 Ether
206 * ||| | | | | 13 18 Ether
207 * ||| | | | | 14 17 Ether
208 * +++-+---+---+---+- 15 16 Ether
209 * ++-+---+---+---+- 16 15 PCI_DIS
210 * +-+---+---+---+- 17 14 USB_SE
211 * | | | | 18 13 USB
212 * +---+---+---+- 19 12 USB
213 * | | | 20 11 PSC3
214 * | | | 21 10 PSC3
215 * | | | 22 9 PSC3
216 * +---+---+- 23 8 PSC3
217 * | | 24 7 -
218 * | | 25 6 PSC2
219 * | | 26 5 PSC2
220 * +---+- 27 4 PSC2
221 * | 28 3 -
222 * | 29 2 PSC1
223 * | 30 1 PSC1
224 * +- 31 0 PSC1
225 */
226
Stefan Roese13b4f632012-08-14 15:04:19 +0200227/*
228 * Miscellaneous configurable options
229 */
230#define CONFIG_SYS_LONGHELP
Stefan Roese13b4f632012-08-14 15:04:19 +0200231
232#define CONFIG_CMDLINE_EDITING
Stefan Roese13b4f632012-08-14 15:04:19 +0200233
234#if defined(CONFIG_CMD_KGDB)
235#define CONFIG_SYS_CBSIZE 1024
236#else
237#define CONFIG_SYS_CBSIZE 256
238#endif
239#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
240#define CONFIG_SYS_MAXARGS 16
241#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
242
243#define CONFIG_SYS_MEMTEST_START 0x00100000
244#define CONFIG_SYS_MEMTEST_END 0x00f00000
245
246#define CONFIG_SYS_LOAD_ADDR 0x00100000
247
Stefan Roese13b4f632012-08-14 15:04:19 +0200248/*
249 * Various low-level settings
250 */
251#define CONFIG_SYS_HID0_INIT (HID0_ICE | HID0_ICFI)
252#define CONFIG_SYS_HID0_FINAL HID0_ICE
253
254#define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE
255#define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
256#define CONFIG_SYS_CS0_START CONFIG_SYS_FLASH_BASE
257#define CONFIG_SYS_CS0_SIZE CONFIG_SYS_FLASH_SIZE
Stefan Roesed4451d32013-02-07 02:10:11 +0000258
259#ifdef CONFIG_A4M2K
260/* external MRAM */
261#define CONFIG_SYS_CS1_START 0xf1000000
262#define CONFIG_SYS_CS1_SIZE (512 << 10) /* 512KiB MRAM */
263#endif
264
Stefan Roese13b4f632012-08-14 15:04:19 +0200265#define CONFIG_SYS_CS2_START 0xe0000000
266#define CONFIG_SYS_CS2_SIZE 0x00100000
267
Stefan Roesed4451d32013-02-07 02:10:11 +0000268/* FPGA slave io (512kiB / 1MiB) - see ticket #66 */
Stefan Roese13b4f632012-08-14 15:04:19 +0200269#define CONFIG_SYS_CS3_START 0xE9000000
Stefan Roesed4451d32013-02-07 02:10:11 +0000270#ifdef CONFIG_A4M2K
271#define CONFIG_SYS_CS3_SIZE 0x00100000
272#else
Stefan Roese13b4f632012-08-14 15:04:19 +0200273#define CONFIG_SYS_CS3_SIZE 0x00080000
Stefan Roesed4451d32013-02-07 02:10:11 +0000274#endif
Stefan Roese13b4f632012-08-14 15:04:19 +0200275/* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */
276#define CONFIG_SYS_CS3_CFG 0x0032B900
277
Stefan Roesed4451d32013-02-07 02:10:11 +0000278#ifndef CONFIG_A4M2K
Stefan Roese13b4f632012-08-14 15:04:19 +0200279/* Diagnosis Interface - see ticket #63 */
280#define CONFIG_SYS_CS4_START 0xEA000000
281#define CONFIG_SYS_CS4_SIZE 0x00000001
282/* 00000000 00000010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0002B900 */
283#define CONFIG_SYS_CS4_CFG 0x0002B900
Stefan Roesed4451d32013-02-07 02:10:11 +0000284#endif
Stefan Roese13b4f632012-08-14 15:04:19 +0200285
Stefan Roesed4451d32013-02-07 02:10:11 +0000286/* FPGA master io (64kiB / 1MiB) - see ticket #66 */
Stefan Roese13b4f632012-08-14 15:04:19 +0200287#define CONFIG_SYS_CS5_START 0xE8000000
Stefan Roesed4451d32013-02-07 02:10:11 +0000288#ifdef CONFIG_A4M2K
289#define CONFIG_SYS_CS5_SIZE 0x00100000
290#else
Stefan Roese13b4f632012-08-14 15:04:19 +0200291#define CONFIG_SYS_CS5_SIZE 0x00010000
Stefan Roesed4451d32013-02-07 02:10:11 +0000292#endif
Stefan Roese13b4f632012-08-14 15:04:19 +0200293/* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */
294#define CONFIG_SYS_CS5_CFG 0x0032B900
295
296#ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 /* for pci_clk = 66 MHz */
297#define CONFIG_SYS_BOOTCS_CFG 0x0006F900
Stefan Roesed4451d32013-02-07 02:10:11 +0000298#define CONFIG_SYS_CS1_CFG 0x0008FD00
Stefan Roese13b4f632012-08-14 15:04:19 +0200299#define CONFIG_SYS_CS2_CFG 0x0006F90C
300#else /* for pci_clk = 33 MHz */
301#define CONFIG_SYS_BOOTCS_CFG 0x0002F900
302#define CONFIG_SYS_CS1_CFG 0x0001FB00
303#define CONFIG_SYS_CS2_CFG 0x0002F90C
304#endif
305
306#define CONFIG_SYS_CS_BURST 0x00000000
307/* set DC for FPGA CS5 and CS3 to 0 - see ticket #66 */
308/* R 7 R 6 R 5 R 4 R 3 R 2 R 1 R 0 */
309/* 00 11 00 11 00 00 00 11 00 00 00 00 00 00 00 00 */
310#define CONFIG_SYS_CS_DEADCYCLE 0x33030000
311
312#define CONFIG_SYS_RESET_ADDRESS 0xff000000
313
314/*
315 * Environment Configuration
316 */
317
Stefan Roese13b4f632012-08-14 15:04:19 +0200318#undef CONFIG_BOOTARGS
Stefan Roese13b4f632012-08-14 15:04:19 +0200319
Stefan Roese8aa34492013-04-25 23:20:23 +0000320#define CONFIG_SYS_AUTOLOAD "n"
321
Stefan Roese13b4f632012-08-14 15:04:19 +0200322#define CONFIG_PREBOOT "echo;" \
323 "echo Type \"run flash_mtd\" to boot from flash with mtd filesystem;" \
324 "echo Type \"run net_nfs\" to boot from tftp with nfs filesystem;" \
325 "echo"
326
327#undef CONFIG_BOOTARGS
328
Stefan Roese8aa34492013-04-25 23:20:23 +0000329#define CONFIG_SYS_FDT_BASE 0xfc1e0000
Mike Looijmans5aa79f22016-07-26 07:34:07 +0200330#define CONFIG_SYS_FDT_SIZE (16<<10)
Stefan Roese13b4f632012-08-14 15:04:19 +0200331
Stefan Roese13b4f632012-08-14 15:04:19 +0200332#define CONFIG_EXTRA_ENV_SETTINGS \
333 "netdev=eth0\0" \
334 "verify=no\0" \
Stefan Roesed4451d32013-02-07 02:10:11 +0000335 "loadaddr=200000\0" \
336 "kernel_addr=" __stringify(CONFIG_SYS_OS_BASE) "\0" \
337 "kernel_addr_r=1000000\0" \
338 "fdt_addr=" __stringify(CONFIG_SYS_FDT_BASE) "\0" \
339 "fdt_addr_r=1800000\0" \
340 "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \
341 "fdtfile=" __stringify(CONFIG_HOSTNAME) "/" \
342 __stringify(CONFIG_HOSTNAME) ".dtb\0" \
343 "rootpath=/opt/eldk-5.2.1/powerpc/" \
344 "core-image-minimal-mtdutils-dropbear-generic\0" \
Stefan Roese13b4f632012-08-14 15:04:19 +0200345 "consoledev=ttyPSC0\0" \
346 "nfsargs=setenv bootargs root=/dev/nfs rw " \
347 "nfsroot=${serverip}:${rootpath}\0" \
348 "ramargs=setenv bootargs root=/dev/ram rw\0" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200349 "mtdargs=setenv bootargs root=/dev/mtdblock8 " \
Stefan Roese8aa34492013-04-25 23:20:23 +0000350 "rootfstype=squashfs,jffs2\0" \
351 "addhost=setenv bootargs ${bootargs} " \
352 "hostname=${hostname}\0" \
Stefan Roese13b4f632012-08-14 15:04:19 +0200353 "addip=setenv bootargs ${bootargs} " \
354 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
355 ":${hostname}:${netdev}:off panic=1\0" \
356 "addtty=setenv bootargs ${bootargs} " \
357 "console=${consoledev},${baudrate}\0" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200358 "flash_nfs=run nfsargs addip addtty addmtd addhost;" \
Stefan Roese8aa34492013-04-25 23:20:23 +0000359 "bootm ${kernel_addr} - ${fdt_addr}\0" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200360 "flash_mtd=run mtdargs addip addtty addmtd addhost;" \
Stefan Roese8aa34492013-04-25 23:20:23 +0000361 "bootm ${kernel_addr} - ${fdt_addr}\0" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200362 "flash_self=run ramargs addip addtty addmtd addhost;" \
Stefan Roesed4451d32013-02-07 02:10:11 +0000363 "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
364 "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \
365 "tftp ${fdt_addr_r} ${fdtfile};" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200366 "run nfsargs addip addtty addmtd addhost;" \
Stefan Roesed4451d32013-02-07 02:10:11 +0000367 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
368 "load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \
369 "/u-boot-img.bin\0" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200370 "update=protect off fc000000 fc07ffff;" \
Stefan Roese8aa34492013-04-25 23:20:23 +0000371 "era fc000000 fc07ffff;" \
372 "cp.b ${loadaddr} fc000000 ${filesize}\0" \
Stefan Roese13b4f632012-08-14 15:04:19 +0200373 "upd=run load;run update\0" \
Stefan Roesed62a89b2013-06-22 16:16:25 +0200374 "upd_fdt=tftp 1800000 a3m071/a3m071.dtb;" \
375 "run mtdargs addip addtty addmtd addhost;" \
376 "fdt addr 1800000;fdt boardsetup;fdt chosen;" \
377 "erase fc1e0000 fc1fffff;cp.b 1800000 fc1e0000 20000" \
378 "upd_kernel=tftp 1000000 a3m071/uImage-uncompressed;" \
379 "erase fc200000 fc6fffff;" \
380 "cp.b 1000000 fc200000 ${filesize}" \
381 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
382 "mtdids=" MTDIDS_DEFAULT "\0" \
383 "mtdparts=" MTDPARTS_DEFAULT "\0" \
Stefan Roese13b4f632012-08-14 15:04:19 +0200384 ""
385
386#define CONFIG_BOOTCOMMAND "run flash_mtd"
387
388/*
389 * SPL related defines
390 */
Stefan Roese13b4f632012-08-14 15:04:19 +0200391#define CONFIG_SPL_FRAMEWORK
Stefan Roesed4451d32013-02-07 02:10:11 +0000392#define CONFIG_SPL_BOARD_INIT
Stefan Roese13b4f632012-08-14 15:04:19 +0200393#define CONFIG_SPL_TEXT_BASE 0xfc000000
Stefan Roese13b4f632012-08-14 15:04:19 +0200394
395/* Place BSS for SPL near end of SDRAM */
396#define CONFIG_SPL_BSS_START_ADDR ((128 - 1) << 20)
397#define CONFIG_SPL_BSS_MAX_SIZE (64 << 10)
398
Stefan Roese13b4f632012-08-14 15:04:19 +0200399/* Place patched DT blob (fdt) at this address */
400#define CONFIG_SYS_SPL_ARGS_ADDR 0x01800000
401
402/* Settings for real U-Boot to be loaded from NOR flash */
403#ifndef __ASSEMBLY__
404extern char __spl_flash_end[];
405#endif
406#define CONFIG_SYS_UBOOT_BASE __spl_flash_end
407#define CONFIG_SYS_SPL_MAX_LEN (32 << 10)
408#define CONFIG_SYS_UBOOT_START 0x1000100
409
410#endif /* __CONFIG_H */