configs: meson64: add SCSI boot target
[platform/kernel/u-boot.git] / include / configs / am3517_evm.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * am3517_evm.h - Default configuration for AM3517 EVM board.
4  *
5  * Author: Vaibhav Hiremath <hvaibhav@ti.com>
6  *
7  * Based on omap3_evm_config.h
8  *
9  * Copyright (C) 2010 Texas Instruments Incorporated
10  */
11
12 #ifndef __CONFIG_H
13 #define __CONFIG_H
14
15 #include <configs/ti_omap3_common.h>
16
17 /* Ethernet */
18 #define CONFIG_NET_RETRY_COUNT          10
19
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 }
28
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
43  */
44 #endif /* CONFIG_MTD_RAW_NAND */
45
46 /* Environment information */
47
48 #define CONFIG_BOOTFILE         "uImage"
49
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" \
55         "vram=16M\0" \
56         "bootenv=uEnv.txt\0" \
57         "cmdline=\0" \
58         "optargs=\0" \
59         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
60         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
61         "mmcdev=0\0" \
62         "mmcpart=1\0" \
63         "mmcroot=/dev/mmcblk0p2 rw\0" \
64         "mmcrootfstype=ext4 rootwait fixrtc\0" \
65         "mmcargs=setenv bootargs console=${console} " \
66                 "${mtdparts} " \
67                 "${optargs} " \
68                 "root=${mmcroot} " \
69                 "rootfstype=${mmcrootfstype} " \
70                 "${cmdline}\0" \
71         "nandargs=setenv bootargs console=${console} " \
72                 "${mtdparts} " \
73                 "${optargs} " \
74                 "root=ubi0:rootfs rw ubi.mtd=rootfs " \
75                 "rootfstype=ubifs rootwait " \
76                 "${cmdline}\0" \
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 ...; " \
85                 "run mmcargs; " \
86                 "bootz ${loadaddr} - ${fdtaddr}\0" \
87         "nandboot=echo Booting from nand ...; " \
88                 "run nandargs; " \
89                 "nand read ${loadaddr} 2a0000 800000; " \
90                 "nand read ${fdtaddr} aa0000 80000; " \
91                 "bootm ${loadaddr} - ${fdtaddr}\0" \
92
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; " \
98                 "fi; " \
99                 "echo Checking if uenvcmd is set ...; " \
100                 "if test -n $uenvcmd; then " \
101                         "echo Running uenvcmd ...; " \
102                         "run uenvcmd; " \
103                 "fi; " \
104                 "echo Running default loadimage ...; " \
105                 "setenv bootfile zImage; " \
106                 "if run loadimage; then " \
107                         "run loadfdt; " \
108                         "run mmcboot; " \
109                 "fi; " \
110         "else run nandboot; fi"
111
112 /* Miscellaneous configurable options */
113
114 /* We set the max number of command args high to avoid HUSH bugs. */
115 #define CONFIG_SYS_MAXARGS              64
116
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
122
123 /* memtest works on */
124
125 /* Physical Memory Map */
126 #define CONFIG_SYS_CS0_SIZE             (256 * 1024 * 1024)
127
128 /* FLASH and environment organization */
129
130 /* **** PISMO SUPPORT *** */
131 #define CONFIG_SYS_MAX_FLASH_SECT       520     /* max number of sectors */
132                                                 /* on one chip */
133 #define CONFIG_SYS_MAX_FLASH_BANKS      2       /* max number of flash banks */
134 #define CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 2 sectors */
135
136 #if defined(CONFIG_MTD_RAW_NAND)
137 #define CONFIG_SYS_FLASH_BASE           NAND_BASE
138 #endif
139
140 /* Monitor at start of flash */
141 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_FLASH_BASE
142
143 #define CONFIG_SYS_ENV_SECT_SIZE        (128 << 10)     /* 128 KiB */
144
145 /* Defines for SPL */
146
147 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME         "u-boot.img"
148
149 #endif /* __CONFIG_H */