Merge branch '2022-03-03-Kconfig-migrations' into next
[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 #define CONFIG_EXTRA_ENV_SETTINGS \
48         "loadaddr=0x82000000\0" \
49         "console=ttyS2,115200n8\0" \
50         "fdtfile=am3517-evm.dtb\0" \
51         "fdtaddr=0x82C00000\0" \
52         "vram=16M\0" \
53         "bootenv=uEnv.txt\0" \
54         "cmdline=\0" \
55         "optargs=\0" \
56         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
57         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
58         "mmcdev=0\0" \
59         "mmcpart=1\0" \
60         "mmcroot=/dev/mmcblk0p2 rw\0" \
61         "mmcrootfstype=ext4 rootwait fixrtc\0" \
62         "mmcargs=setenv bootargs console=${console} " \
63                 "${mtdparts} " \
64                 "${optargs} " \
65                 "root=${mmcroot} " \
66                 "rootfstype=${mmcrootfstype} " \
67                 "${cmdline}\0" \
68         "nandargs=setenv bootargs console=${console} " \
69                 "${mtdparts} " \
70                 "${optargs} " \
71                 "root=ubi0:rootfs rw ubi.mtd=rootfs " \
72                 "rootfstype=ubifs rootwait " \
73                 "${cmdline}\0" \
74         "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0"\
75         "importbootenv=echo Importing environment from mmc ...; " \
76                 "env import -t ${loadaddr} ${filesize}\0" \
77         "bootscript=echo Running bootscript from mmc ...; " \
78                 "source ${loadaddr}\0" \
79         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}\0" \
80         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
81         "mmcboot=echo Booting from mmc ...; " \
82                 "run mmcargs; " \
83                 "bootz ${loadaddr} - ${fdtaddr}\0" \
84         "nandboot=echo Booting from nand ...; " \
85                 "run nandargs; " \
86                 "nand read ${loadaddr} 2a0000 800000; " \
87                 "nand read ${fdtaddr} aa0000 80000; " \
88                 "bootm ${loadaddr} - ${fdtaddr}\0" \
89
90 /* Miscellaneous configurable options */
91
92 /* We set the max number of command args high to avoid HUSH bugs. */
93 #define CONFIG_SYS_MAXARGS              64
94
95 /* Print Buffer Size */
96 #define CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE \
97                                         + sizeof(CONFIG_SYS_PROMPT) + 16)
98 /* Boot Argument Buffer Size */
99 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
100
101 /* memtest works on */
102
103 /* Physical Memory Map */
104 #define CONFIG_SYS_CS0_SIZE             (256 * 1024 * 1024)
105
106 /* FLASH and environment organization */
107
108 /* **** PISMO SUPPORT *** */
109 #define CONFIG_SYS_MAX_FLASH_SECT       520     /* max number of sectors */
110                                                 /* on one chip */
111 #define CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 2 sectors */
112
113 #if defined(CONFIG_MTD_RAW_NAND)
114 #define CONFIG_SYS_FLASH_BASE           NAND_BASE
115 #endif
116
117 /* Monitor at start of flash */
118 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_FLASH_BASE
119
120 #define CONFIG_SYS_ENV_SECT_SIZE        (128 << 10)     /* 128 KiB */
121
122 /* Defines for SPL */
123
124 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME         "u-boot.img"
125
126 #endif /* __CONFIG_H */