1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * am3517_evm.h - Default configuration for AM3517 EVM board.
5 * Author: Vaibhav Hiremath <hvaibhav@ti.com>
7 * Based on omap3_evm_config.h
9 * Copyright (C) 2010 Texas Instruments Incorporated
15 #include <configs/ti_omap3_common.h>
18 #define CONFIG_NET_RETRY_COUNT 10
20 /* Board NAND Info. */
21 #ifdef CONFIG_MTD_RAW_NAND
22 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, 10, \
23 11, 12, 13, 14, 16, 17, 18, 19, 20, \
24 21, 22, 23, 24, 25, 26, 27, 28, 30, \
25 31, 32, 33, 34, 35, 36, 37, 38, 39, \
26 40, 41, 42, 44, 45, 46, 47, 48, 49, \
27 50, 51, 52, 53, 54, 55, 56 }
29 #define CONFIG_SYS_NAND_ECCSIZE 512
30 #define CONFIG_SYS_NAND_ECCBYTES 13
31 #define CONFIG_SYS_NAND_MAX_OOBFREE 2
32 #define CONFIG_SYS_NAND_MAX_ECCPOS 56
33 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
34 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x2a0000
35 /* NAND block size is 128 KiB. Synchronize these values with
36 * corresponding Device Tree entries in Linux:
37 * MLO(SPL) 4 * NAND_BLOCK_SIZE = 512 KiB @ 0x000000
38 * U-Boot 15 * NAND_BLOCK_SIZE = 1920 KiB @ 0x080000
39 * U-Boot environment 2 * NAND_BLOCK_SIZE = 256 KiB @ 0x260000
40 * Kernel 64 * NAND_BLOCK_SIZE = 8 MiB @ 0x2A0000
41 * DTB 4 * NAND_BLOCK_SIZE = 512 KiB @ 0xAA0000
42 * RootFS Remaining Flash Space @ 0xB20000
44 #endif /* CONFIG_MTD_RAW_NAND */
46 /* Environment information */
48 #define CONFIG_BOOTFILE "uImage"
50 #define CONFIG_EXTRA_ENV_SETTINGS \
51 "loadaddr=0x82000000\0" \
52 "console=ttyS2,115200n8\0" \
53 "fdtfile=am3517-evm.dtb\0" \
54 "fdtaddr=0x82C00000\0" \
56 "bootenv=uEnv.txt\0" \
59 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
60 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
63 "mmcroot=/dev/mmcblk0p2 rw\0" \
64 "mmcrootfstype=ext4 rootwait fixrtc\0" \
65 "mmcargs=setenv bootargs console=${console} " \
69 "rootfstype=${mmcrootfstype} " \
71 "nandargs=setenv bootargs console=${console} " \
74 "root=ubi0:rootfs rw ubi.mtd=rootfs " \
75 "rootfstype=ubifs rootwait " \
77 "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0"\
78 "importbootenv=echo Importing environment from mmc ...; " \
79 "env import -t ${loadaddr} ${filesize}\0" \
80 "bootscript=echo Running bootscript from mmc ...; " \
81 "source ${loadaddr}\0" \
82 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}\0" \
83 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
84 "mmcboot=echo Booting from mmc ...; " \
86 "bootz ${loadaddr} - ${fdtaddr}\0" \
87 "nandboot=echo Booting from nand ...; " \
89 "nand read ${loadaddr} 2a0000 800000; " \
90 "nand read ${fdtaddr} aa0000 80000; " \
91 "bootm ${loadaddr} - ${fdtaddr}\0" \
93 #define CONFIG_BOOTCOMMAND \
94 "mmc dev ${mmcdev}; if mmc rescan; then " \
95 "echo SD/MMC found on device $mmcdev; " \
96 "if run loadbootenv; then " \
97 "run importbootenv; " \
99 "echo Checking if uenvcmd is set ...; " \
100 "if test -n $uenvcmd; then " \
101 "echo Running uenvcmd ...; " \
104 "echo Running default loadimage ...; " \
105 "setenv bootfile zImage; " \
106 "if run loadimage; then " \
110 "else run nandboot; fi"
112 /* Miscellaneous configurable options */
114 /* We set the max number of command args high to avoid HUSH bugs. */
115 #define CONFIG_SYS_MAXARGS 64
117 /* Print Buffer Size */
118 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
119 + sizeof(CONFIG_SYS_PROMPT) + 16)
120 /* Boot Argument Buffer Size */
121 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
123 /* memtest works on */
125 /* Physical Memory Map */
126 #define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024)
128 /* FLASH and environment organization */
130 /* **** PISMO SUPPORT *** */
131 #define CONFIG_SYS_MAX_FLASH_SECT 520 /* max number of sectors */
133 #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of flash banks */
134 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
136 #if defined(CONFIG_MTD_RAW_NAND)
137 #define CONFIG_SYS_FLASH_BASE NAND_BASE
140 /* Monitor at start of flash */
141 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
143 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
145 /* Defines for SPL */
147 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
149 #endif /* __CONFIG_H */