mmc: atmel_sdhci: Enable the quirk SDHCI_QUIRK_WAIT_SEND_CMD
[platform/kernel/u-boot.git] / include / configs / siemens-am33x-common.h
1 /*
2  * siemens am33x common board options
3  * (C) Copyright 2013 Siemens Schweiz AG
4  * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
5  *
6  * Based on:
7  * U-Boot file:/include/configs/am335x_evm.h
8  *
9  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
10  *
11  * SPDX-License-Identifier:     GPL-2.0+
12  */
13
14 #ifndef __CONFIG_SIEMENS_AM33X_COMMON_H
15 #define __CONFIG_SIEMENS_AM33X_COMMON_H
16
17 #define CONFIG_AM33XX
18 #define CONFIG_OMAP
19
20 #include <asm/arch/omap.h>
21
22 #define CONFIG_DMA_COHERENT
23 #define CONFIG_DMA_COHERENT_SIZE        (1 << 20)
24
25 #define CONFIG_ENV_SIZE                 (0x2000)
26 #define CONFIG_SYS_MALLOC_LEN           (16 * 1024 * 1024)
27 #define CONFIG_SYS_LONGHELP             /* undef to save memory */
28 #ifdef CONFIG_SIEMENS_MACH_TYPE
29 #define CONFIG_MACH_TYPE                CONFIG_SIEMENS_MACH_TYPE
30 #endif
31
32 #define CONFIG_CMDLINE_TAG              /* enable passing of ATAGs */
33 #define CONFIG_SETUP_MEMORY_TAGS
34 #define CONFIG_INITRD_TAG
35
36 /* commands to include */
37
38 #define CONFIG_ENV_VARS_UBOOT_CONFIG
39 #ifndef CONFIG_SPL_BUILD
40 #define CONFIG_ROOTPATH         "/opt/eldk"
41 #endif
42
43 #define CONFIG_ENV_OVERWRITE            1
44 #define CONFIG_ENV_IS_NOWHERE
45
46 #define CONFIG_SYS_LONGHELP
47 #define CONFIG_CMDLINE_EDITING
48 #define CONFIG_AUTO_COMPLETE
49 #define CONFIG_SYS_AUTOLOAD     "yes"
50
51 /* Clock Defines */
52 #define V_OSCK                          24000000  /* Clock output from T2 */
53 #define V_SCLK                          (V_OSCK)
54
55 /* We set the max number of command args high to avoid HUSH bugs. */
56 #define CONFIG_SYS_MAXARGS              32
57
58 /* Console I/O Buffer Size */
59 #define CONFIG_SYS_CBSIZE               1024
60
61 /* Print Buffer Size */
62 #define CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE \
63                                         + sizeof(CONFIG_SYS_PROMPT) + 16)
64
65 /* Boot Argument Buffer Size */
66 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
67
68 /*
69  * memtest works on 8 MB in DRAM after skipping 32MB from
70  * start addr of ram disk
71  */
72 #define CONFIG_SYS_MEMTEST_START        (PHYS_DRAM_1 + (64 * 1024 * 1024))
73 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START \
74                                         + (8 * 1024 * 1024))
75
76 #define CONFIG_SYS_LOAD_ADDR            0x81000000 /* Default load address */
77
78 #define CONFIG_SPI
79 #define CONFIG_OMAP3_SPI
80 #define CONFIG_MTD_DEVICE
81 #define CONFIG_SF_DEFAULT_SPEED         (75000000)
82
83  /* Physical Memory Map */
84 #define CONFIG_NR_DRAM_BANKS            1               /*  1 bank of DRAM */
85 #define PHYS_DRAM_1                     0x80000000      /* DRAM Bank #1 */
86
87 #define CONFIG_SYS_SDRAM_BASE           PHYS_DRAM_1
88 #define CONFIG_SYS_INIT_SP_ADDR         (NON_SECURE_SRAM_END - \
89                                                 GENERATED_GBL_DATA_SIZE)
90  /* Platform/Board specific defs */
91 #define CONFIG_SYS_TIMERBASE            0x48040000      /* Use Timer2 */
92 #define CONFIG_SYS_PTV                  2       /* Divisor: 2^(PTV+1) => 8 */
93
94 /* NS16550 Configuration */
95 #ifdef CONFIG_SPL_BUILD
96 #define CONFIG_SYS_NS16550_SERIAL
97 #define CONFIG_SYS_NS16550_REG_SIZE     (-4)
98 #endif
99 #define CONFIG_SYS_NS16550_CLK          (48000000)
100 #define CONFIG_SYS_NS16550_COM1         0x44e09000
101 #define CONFIG_SYS_NS16550_COM4         0x481a6000
102
103 #define CONFIG_SERIAL1                  1
104 #define CONFIG_CONS_INDEX               1
105
106 /* I2C Configuration */
107 #define CONFIG_I2C
108 #define CONFIG_SYS_I2C
109 #define CONFIG_SYS_OMAP24_I2C_SPEED     100000
110 #define CONFIG_SYS_OMAP24_I2C_SLAVE     1
111 #define CONFIG_SYS_I2C_OMAP24XX
112
113 /* Defines for SPL */
114 #define CONFIG_SPL_FRAMEWORK
115 #define CONFIG_SPL_TEXT_BASE            0x402F0400
116 #define CONFIG_SPL_MAX_SIZE             (SRAM_SCRATCH_SPACE_ADDR - \
117                                          CONFIG_SPL_TEXT_BASE)
118
119 #define CONFIG_SPL_BSS_START_ADDR       0x80000000
120 #define CONFIG_SPL_BSS_MAX_SIZE         0x80000         /* 512 KB */
121
122 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION      1
123 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
124 #define CONFIG_FS_FAT
125
126 #define CONFIG_SPL_SPI_LOAD
127 #define CONFIG_SYS_SPI_U_BOOT_OFFS      0x20000
128
129 #define CONFIG_SPL_LDSCRIPT             "arch/arm/mach-omap2/u-boot-spl.lds"
130
131 #define CONFIG_SPL_BOARD_INIT
132 #define CONFIG_SPL_NAND_AM33XX_BCH
133 #define CONFIG_SPL_NAND_BASE
134 #define CONFIG_SPL_NAND_DRIVERS
135 #define CONFIG_SPL_NAND_ECC
136 #define CONFIG_SYS_NAND_ONFI_DETECTION
137 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
138 #define CONFIG_SYS_NAND_PAGE_COUNT      (CONFIG_SYS_NAND_BLOCK_SIZE / \
139                                          CONFIG_SYS_NAND_PAGE_SIZE)
140 #define CONFIG_SYS_NAND_PAGE_SIZE       2048
141 #define CONFIG_SYS_NAND_OOBSIZE         64
142 #define CONFIG_SYS_NAND_BLOCK_SIZE      (128*1024)
143 #define CONFIG_SYS_NAND_BAD_BLOCK_POS   NAND_LARGE_BADBLOCK_POS
144 #define CONFIG_SYS_NAND_ECCPOS          { 2, 3, 4, 5, 6, 7, 8, 9, \
145                                          10, 11, 12, 13, 14, 15, 16, 17, \
146                                          18, 19, 20, 21, 22, 23, 24, 25, \
147                                          26, 27, 28, 29, 30, 31, 32, 33, \
148                                          34, 35, 36, 37, 38, 39, 40, 41, \
149                                          42, 43, 44, 45, 46, 47, 48, 49, \
150                                          50, 51, 52, 53, 54, 55, 56, 57, }
151
152 #define CONFIG_SYS_NAND_ECCSIZE         512
153 #define CONFIG_SYS_NAND_ECCBYTES        14
154 #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH8_CODE_HW
155
156 #define CONFIG_SYS_NAND_ECCSTEPS        4
157 #define CONFIG_SYS_NAND_ECCTOTAL        (CONFIG_SYS_NAND_ECCBYTES * \
158                                                 CONFIG_SYS_NAND_ECCSTEPS)
159
160 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_TEXT_BASE
161
162 #define CONFIG_SYS_NAND_U_BOOT_OFFS     0x80000
163
164 /*
165  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
166  * 64 bytes before this address should be set aside for u-boot.img's
167  * header. That is 0x800FFFC0--0x80100000 should not be used for any
168  * other needs.
169  */
170 #define CONFIG_SYS_TEXT_BASE            0x80100000
171 #define CONFIG_SYS_SPL_MALLOC_START     0x80208000
172 #define CONFIG_SYS_SPL_MALLOC_SIZE      0x100000
173
174 /*
175  * Since SPL did pll and ddr initialization for us,
176  * we don't need to do it twice.
177  */
178 #ifndef CONFIG_SPL_BUILD
179 #define CONFIG_SKIP_LOWLEVEL_INIT
180 #endif
181
182 #ifndef CONFIG_SPL_BUILD
183 /*
184  * USB configuration
185  */
186 #define CONFIG_USB_MUSB_DSPS
187 #define CONFIG_USB_MUSB_PIO_ONLY
188 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
189 #undef CONFIG_USB_GADGET_DUALSPEED
190
191 #define CONFIG_AM335X_USB0
192 #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
193 #define CONFIG_AM335X_USB1
194 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
195
196 #ifdef CONFIG_USB_MUSB_GADGET
197 #define CONFIG_USB_ETHER
198 #define CONFIG_USB_ETH_RNDIS
199 #define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
200 #endif /* CONFIG_USB_MUSB_GADGET */
201
202 /* USB DRACO ID as default */
203 #define CONFIG_USBD_HS
204
205 /* USB Device Firmware Update support */
206 #define CONFIG_SYS_DFU_DATA_BUF_SIZE    (1 << 20)
207 #define DFU_MANIFEST_POLL_TIMEOUT       25000
208
209 #endif /* CONFIG_SPL_BUILD */
210
211 /*
212  * Default to using SPI for environment, etc.  We have multiple copies
213  * of SPL as the ROM will check these locations.
214  * 0x0 - 0x20000 : First copy of SPL
215  * 0x20000 - 0x40000 : Second copy of SPL
216  * 0x40000 - 0x60000 : Third copy of SPL
217  * 0x60000 - 0x80000 : Fourth copy of SPL
218  * 0x80000 - 0xDF000 : U-Boot
219  * 0xDF000 - 0xE0000 : U-Boot Environment
220  * 0xE0000 - 0x442000 : Linux Kernel
221  * 0x442000 - 0x800000 : Userland
222  */
223 #if defined(CONFIG_SPI_BOOT)
224 # undef CONFIG_ENV_IS_NOWHERE
225 # define CONFIG_ENV_IS_IN_SPI_FLASH
226 # define CONFIG_ENV_SPI_MAX_HZ          CONFIG_SF_DEFAULT_SPEED
227 # define CONFIG_ENV_OFFSET              (892 << 10) /* 892 KiB in */
228 # define CONFIG_ENV_SECT_SIZE           (4 << 10) /* 4 KB sectors */
229 #endif /* SPI support */
230
231 #define CONFIG_DRIVER_TI_CPSW
232 #define CONFIG_MII
233 #define CONFIG_PHY_GIGE
234 #define CONFIG_PHYLIB
235 #define CONFIG_BOOTP_DEFAULT
236 #define CONFIG_BOOTP_DNS
237 #define CONFIG_BOOTP_DNS2
238 #define CONFIG_BOOTP_SEND_HOSTNAME
239 #define CONFIG_BOOTP_GATEWAY
240 #define CONFIG_BOOTP_SUBNETMASK
241 #define CONFIG_NET_RETRY_COUNT         10
242
243 #define CONFIG_NAND
244 /* NAND support */
245 #ifdef CONFIG_NAND
246 #define CONFIG_CMD_NAND
247
248 /* UBI Support */
249 #ifndef CONFIG_SPL_BUILD
250 #define CONFIG_CMD_MTDPARTS
251 #define CONFIG_MTD_PARTITIONS
252 #define CONFIG_MTD_DEVICE
253 #define CONFIG_RBTREE
254 #define CONFIG_LZO
255 #define CONFIG_CMD_UBIFS
256 #endif
257
258 /* Commen environment */
259 #define CONFIG_PREBOOT
260 #define COMMON_ENV_DFU_ARGS     "dfu_args=run bootargs_defaults;" \
261                                 "setenv bootargs ${bootargs};" \
262                                 "mtdparts default;" \
263                                 "draco_led 1;" \
264                                 "dfu 0 nand 0;" \
265                                 "draco_led 0;\0" \
266
267 #define COMMON_ENV_NAND_BOOT \
268                 "nand_boot=echo Booting from nand; " \
269                 "if test ${upgrade_available} -eq 1; then " \
270                         "if test ${bootcount} -gt ${bootlimit}; " \
271                                 "then " \
272                                 "setenv upgrade_available 0;" \
273                                 "setenv ${partitionset_active} true;" \
274                                 "if test -n ${A}; then " \
275                                         "setenv partitionset_active B; " \
276                                         "env delete A; " \
277                                 "fi;" \
278                                 "if test -n ${B}; then " \
279                                         "setenv partitionset_active A; " \
280                                         "env delete B; " \
281                                 "fi;" \
282                                 "saveenv; " \
283                         "fi;" \
284                 "fi;" \
285                 "echo set ${partitionset_active}...;" \
286                 "run nand_args; "
287
288 #define COMMON_ENV_NAND_CMDS    "flash_self=run nand_boot\0" \
289                                 "flash_self_test=setenv testargs test; " \
290                                         "run nand_boot\0" \
291                                 "dfu_start=echo Preparing for dfu mode ...; " \
292                                 "run dfu_args; \0"
293
294 #define COMMON_ENV_SETTINGS \
295         "verify=no \0" \
296         "project_dir=targetdir\0" \
297         "upgrade_available=0\0" \
298         "altbootcmd=run bootcmd\0" \
299         "bootlimit=3\0" \
300         "partitionset_active=A\0" \
301         "loadaddr=0x82000000\0" \
302         "kloadaddr=0x81000000\0" \
303         "script_addr=0x81900000\0" \
304         "console=console=ttyMTD,mtdoops console=ttyO0,115200n8 panic=5\0" \
305         "nfsopts=nolock rw\0" \
306         "ip_method=none\0" \
307         "bootenv=uEnv.txt\0" \
308         "bootargs_defaults=setenv bootargs " \
309                 "console=${console} " \
310                 "${testargs} " \
311                 "${optargs}\0" \
312         "siemens_help=echo; "\
313                 "echo Type 'run flash_self' to use kernel and root " \
314                 "filesystem on memory; echo Type 'run flash_self_test' to " \
315                 "use kernel and root filesystem on memory, boot in test " \
316                 "mode; echo Not ready yet: 'run flash_nfs' to use kernel " \
317                 "from memory and root filesystem over NFS; echo Type " \
318                 "'run net_nfs' to get Kernel over TFTP and mount root " \
319                 "filesystem over NFS; " \
320                 "echo Set partitionset_active variable to 'A' " \
321                 "or 'B' to select kernel and rootfs partition; " \
322                 "echo" \
323                 "\0"
324
325 /*
326  * Variant 1 partition layout
327  * chip-size = 256MiB
328  *|         name |        size |           address area |
329  *-------------------------------------------------------
330  *|          spl | 128.000 KiB | 0x       0..0x   1ffff |
331  *|  spl.backup1 | 128.000 KiB | 0x   20000..0x   3ffff |
332  *|  spl.backup2 | 128.000 KiB | 0x   40000..0x   5ffff |
333  *|  spl.backup3 | 128.000 KiB | 0x   60000..0x   7ffff |
334  *|       u-boot |   1.875 MiB | 0x   80000..0x  25ffff |
335  *|    uboot.env | 128.000 KiB | 0x  260000..0x  27ffff |
336  *|     kernel_a |   5.000 MiB | 0x  280000..0x  77ffff |
337  *|     kernel_b |   5.000 MiB | 0x  780000..0x  c7ffff |
338  *|      mtdoops |   8.000 MiB | 0x  c80000..0x 147ffff |
339  *|       rootfs | 235.500 MiB | 0x 1480000..0x fffffff |
340  *-------------------------------------------------------
341  */
342 #define MTDIDS_NAME_STR         "omap2-nand.0"
343 #define MTDIDS_DEFAULT          "nand0=" MTDIDS_NAME_STR
344 #define MTDPARTS_DEFAULT_V1     "mtdparts=" MTDIDS_NAME_STR ":" \
345                                         "128k(spl),"            \
346                                         "128k(spl.backup1),"    \
347                                         "128k(spl.backup2),"    \
348                                         "128k(spl.backup3),"    \
349                                         "1920k(u-boot),"        \
350                                         "128k(uboot.env),"      \
351                                         "5120k(kernel_a),"      \
352                                         "5120k(kernel_b),"      \
353                                         "8192k(mtdoops),"       \
354                                         "-(rootfs)"
355
356 #define DFU_ALT_INFO_NAND_V1 \
357         "spl part 0 1;" \
358         "spl.backup1 part 0 2;" \
359         "spl.backup2 part 0 3;" \
360         "spl.backup3 part 0 4;" \
361         "u-boot part 0 5;" \
362         "u-boot.env part 0 6;" \
363         "kernel_a part 0 7;" \
364         "kernel_b part 0 8;" \
365         "rootfs partubi 0 10"
366
367 #define CONFIG_ENV_SETTINGS_NAND_V1 \
368         "nand_active_ubi_vol=rootfs_a\0" \
369         "nand_active_ubi_vol_A=rootfs_a\0" \
370         "nand_active_ubi_vol_B=rootfs_b\0" \
371         "nand_root_fs_type=ubifs rootwait=1\0" \
372         "nand_src_addr=0x280000\0" \
373         "nand_src_addr_A=0x280000\0" \
374         "nand_src_addr_B=0x780000\0" \
375         "nand_args=run bootargs_defaults;" \
376                 "mtdparts default;" \
377                 "setenv ${partitionset_active} true;" \
378                 "if test -n ${A}; then " \
379                         "setenv nand_active_ubi_vol ${nand_active_ubi_vol_A};" \
380                         "setenv nand_src_addr ${nand_src_addr_A};" \
381                 "fi;" \
382                 "if test -n ${B}; then " \
383                         "setenv nand_active_ubi_vol ${nand_active_ubi_vol_B};" \
384                         "setenv nand_src_addr ${nand_src_addr_B};" \
385                 "fi;" \
386                 "setenv nand_root ubi0:${nand_active_ubi_vol} rw " \
387                 "ubi.mtd=9,${ubi_off};" \
388                 "setenv bootargs ${bootargs} " \
389                 "root=${nand_root} noinitrd ${mtdparts} " \
390                 "rootfstype=${nand_root_fs_type} ip=${ip_method} " \
391                 "console=ttyMTD,mtdoops console=ttyO0,115200n8 mtdoops.mtddev" \
392                 "=mtdoops\0" \
393         COMMON_ENV_DFU_ARGS \
394                 "dfu_alt_info=" DFU_ALT_INFO_NAND_V1 "\0" \
395         COMMON_ENV_NAND_BOOT \
396                 "nand read.i ${kloadaddr} ${nand_src_addr} " \
397                 "${nand_img_size}; bootm ${kloadaddr}\0" \
398         COMMON_ENV_NAND_CMDS
399
400 #define CONFIG_ENV_SETTINGS_V1 \
401                 COMMON_ENV_SETTINGS \
402         "net_args=run bootargs_defaults;" \
403                 "mtdparts default;" \
404                 "setenv bootfile ${project_dir}/kernel/uImage;" \
405                 "setenv rootpath /home/projects/${project_dir}/rootfs;" \
406                 "setenv bootargs ${bootargs} " \
407                 "root=/dev/nfs ${mtdparts} " \
408                 "nfsroot=${serverip}:${rootpath},${nfsopts} " \
409                 "ip=${ipaddr}:${serverip}:" \
410                 "${gatewayip}:${netmask}:${hostname}:eth0:off\0" \
411         "net_nfs=echo Booting from network ...; " \
412                 "run net_args; " \
413                 "tftpboot ${kloadaddr} ${serverip}:${bootfile}; " \
414                 "bootm ${kloadaddr}\0"
415
416 /*
417  * Variant 2 partition layout
418  * chip-size = 256MiB or 512 MiB
419  *|         name |        size |           address area |
420  *-------------------------------------------------------
421  *|          spl | 128.000 KiB | 0x       0..0x   1ffff |
422  *|  spl.backup1 | 128.000 KiB | 0x   20000..0x   3ffff |
423  *|  spl.backup2 | 128.000 KiB | 0x   40000..0x   5ffff |
424  *|  spl.backup3 | 128.000 KiB | 0x   60000..0x   7ffff |
425  *|       u-boot |   1.875 MiB | 0x   80000..0x  25ffff |
426  *|   uboot.env0 | 512.000 KiB | 0x  260000..0x  2Dffff |
427  *|   uboot.env1 | 512.000 KiB | 0x  2E0000..0x  35ffff |
428  *|      mtdoops | 512.000 KiB | 0x  360000..0x  3dffff |
429  *| (256) rootfs | 252.125 MiB | 0x  3E0000..0x fffffff |
430  *| (512) rootfs | 508.125 MiB | 0x  3E0000..0x1fffffff |
431  *-------------------------------------------------------
432  */
433
434 #define MTDPARTS_DEFAULT_V2     "mtdparts=" MTDIDS_NAME_STR ":" \
435                                         "128k(spl)," \
436                                         "128k(spl.backup1)," \
437                                         "128k(spl.backup2)," \
438                                         "128k(spl.backup3)," \
439                                         "1920k(u-boot)," \
440                                         "512k(u-boot.env0)," \
441                                         "512k(u-boot.env1)," \
442                                         "512k(mtdoops)," \
443                                         "-(rootfs)"
444
445 #define DFU_ALT_INFO_NAND_V2 \
446         "spl part 0 1;" \
447         "spl.backup1 part 0 2;" \
448         "spl.backup2 part 0 3;" \
449         "spl.backup3 part 0 4;" \
450         "u-boot part 0 5;" \
451         "u-boot.env0 part 0 6;" \
452         "u-boot.env1 part 0 7;" \
453         "rootfs partubi 0 9" \
454
455 #define CONFIG_ENV_SETTINGS_NAND_V2 \
456         "nand_active_ubi_vol=rootfs_a\0" \
457         "rootfs_name=rootfs\0" \
458         "kernel_name=uImage\0"\
459         "nand_root_fs_type=ubifs rootwait=1\0" \
460         "nand_args=run bootargs_defaults;" \
461                 "mtdparts default;" \
462                 "setenv ${partitionset_active} true;" \
463                 "if test -n ${A}; then " \
464                         "setenv nand_active_ubi_vol ${rootfs_name}_a;" \
465                 "fi;" \
466                 "if test -n ${B}; then " \
467                         "setenv nand_active_ubi_vol ${rootfs_name}_b;" \
468                 "fi;" \
469                 "setenv nand_root ubi0:${nand_active_ubi_vol} rw " \
470                 "ubi.mtd=rootfs,2048;" \
471                 "setenv bootargs ${bootargs} " \
472                 "root=${nand_root} noinitrd ${mtdparts} " \
473                 "rootfstype=${nand_root_fs_type} ip=${ip_method} " \
474                 "console=ttyMTD,mtdoops console=ttyO0,115200n8 mtdoops.mtddev" \
475                 "=mtdoops\0" \
476         COMMON_ENV_DFU_ARGS \
477                 "dfu_alt_info=" DFU_ALT_INFO_NAND_V2 "\0" \
478         COMMON_ENV_NAND_BOOT \
479                 "ubi part rootfs ${ubi_off};" \
480                 "ubifsmount ubi0:${nand_active_ubi_vol};" \
481                 "ubifsload ${kloadaddr} boot/${kernel_name};" \
482                 "ubifsload ${loadaddr} boot/${dtb_name}.dtb;" \
483                 "bootm ${kloadaddr} - ${loadaddr}\0" \
484         "nand_boot_backup=ubifsload ${loadaddr} boot/am335x-draco.dtb;" \
485                 "bootm ${kloadaddr} - ${loadaddr}\0" \
486         COMMON_ENV_NAND_CMDS
487
488 #define CONFIG_ENV_SETTINGS_V2 \
489                 COMMON_ENV_SETTINGS \
490         "net_args=run bootargs_defaults;" \
491                 "mtdparts default;" \
492                 "setenv bootfile ${project_dir}/kernel/uImage;" \
493                 "setenv bootdtb ${project_dir}/kernel/dtb;" \
494                 "setenv rootpath /home/projects/${project_dir}/rootfs;" \
495                 "setenv bootargs ${bootargs} " \
496                 "root=/dev/nfs ${mtdparts} " \
497                 "nfsroot=${serverip}:${rootpath},${nfsopts} " \
498                 "ip=${ipaddr}:${serverip}:" \
499                 "${gatewayip}:${netmask}:${hostname}:eth0:off\0" \
500         "net_nfs=echo Booting from network ...; " \
501                 "run net_args; " \
502                 "tftpboot ${kloadaddr} ${serverip}:${bootfile}; " \
503                 "tftpboot ${loadaddr} ${serverip}:${bootdtb}; " \
504                 "bootm ${kloadaddr} - ${loadaddr}\0"
505
506 /*
507  * Variant 3 partition layout
508  * chip-size = 512MiB
509  *|         name |        size |           address area |
510  *-------------------------------------------------------
511  *|          spl | 128.000 KiB | 0x       0..0x   1ffff |
512  *|  spl.backup1 | 128.000 KiB | 0x   20000..0x   3ffff |
513  *|  spl.backup2 | 128.000 KiB | 0x   40000..0x   5ffff |
514  *|  spl.backup3 | 128.000 KiB | 0x   60000..0x   7ffff |
515  *|       u-boot |   1.875 MiB | 0x   80000..0x  25ffff |
516  *|   uboot.env0 | 512.000 KiB | 0x  260000..0x  2Dffff |
517  *|   uboot.env1 | 512.000 KiB | 0x  2E0000..0x  35ffff |
518  *|       rootfs | 300.000 MiB | 0x  360000..0x12f5ffff |
519  *|      mtdoops | 512.000 KiB | 0x12f60000..0x12fdffff |
520  *|configuration | 104.125 MiB | 0x12fe0000..0x1fffffff |
521  *-------------------------------------------------------
522  */
523
524 #define MTDPARTS_DEFAULT_V3     "mtdparts=" MTDIDS_NAME_STR ":" \
525                                         "128k(spl),"            \
526                                         "128k(spl.backup1),"    \
527                                         "128k(spl.backup2),"    \
528                                         "128k(spl.backup3),"    \
529                                         "1920k(u-boot),"        \
530                                         "512k(u-boot.env0),"    \
531                                         "512k(u-boot.env1),"    \
532                                         "300m(rootfs),"         \
533                                         "512k(mtdoops),"        \
534                                         "-(configuration)"
535
536 #define CONFIG_NAND_OMAP_GPMC
537 #define CONFIG_NAND_OMAP_ELM
538 #define CONFIG_SYS_NAND_BASE            (0x08000000)    /* physical address */
539                                                         /* to access nand at */
540                                                         /* CS0 */
541 #define CONFIG_SYS_MAX_NAND_DEVICE      1               /* Max number of NAND
542                                                            devices */
543 #if !defined(CONFIG_SPI_BOOT)
544 #undef CONFIG_ENV_IS_NOWHERE
545 #define CONFIG_ENV_IS_IN_NAND
546 #define CONFIG_ENV_OFFSET               0x260000 /* environment starts here */
547 #define CONFIG_SYS_ENV_SECT_SIZE        (128 << 10)     /* 128 KiB */
548 #endif
549 #endif
550
551 #define CONFIG_OMAP_GPIO
552
553 /* Gpio cmd support */
554
555 /* Watchdog */
556 #define CONFIG_HW_WATCHDOG
557
558 /* Reboot after 60 sec if bootcmd fails */
559 #define CONFIG_RESET_TO_RETRY
560 #define CONFIG_BOOT_RETRY_TIME 60
561
562 #define CONFIG_BOOTCOUNT_LIMIT
563 #define CONFIG_BOOTCOUNT_ENV
564
565 #endif  /* ! __CONFIG_SIEMENS_AM33X_COMMON_H */