Convert CONFIG_DRIVER_TI_EMAC_USE_RMII to Kconfig
[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 #define CONFIG_REVISION_TAG
18
19 /* Hardware drivers */
20
21 /*
22  * USB configuration
23  * Enable CONFIG_USB_MUSB_HOST for Host functionalities MSC, keyboard
24  * Enable CONFIG_USB_MUSB_GADGET for Device functionalities.
25  */
26 #ifdef CONFIG_SPL_BUILD
27 #undef CONFIG_USB_EHCI_OMAP
28 #else
29 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO        57
30 #endif
31
32 /* I2C */
33
34 /* Ethernet */
35 #define CONFIG_BOOTP_DEFAULT
36 #define CONFIG_BOOTP_SEND_HOSTNAME
37 #define CONFIG_NET_RETRY_COUNT          10
38
39 /* Board NAND Info. */
40 #ifdef CONFIG_MTD_RAW_NAND
41 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
42 #define CONFIG_SYS_NAND_PAGE_COUNT      64
43 #define CONFIG_SYS_NAND_PAGE_SIZE       2048
44 #define CONFIG_SYS_NAND_OOBSIZE         64
45 #define CONFIG_SYS_NAND_BLOCK_SIZE      (128 * 1024)
46 #define CONFIG_SYS_NAND_BAD_BLOCK_POS   NAND_LARGE_BADBLOCK_POS
47 #define CONFIG_SYS_NAND_ECCPOS          { 2,  3,  4,  5,  6,  7,  8,  9, 10, \
48                                          11, 12, 13, 14, 16, 17, 18, 19, 20, \
49                                          21, 22, 23, 24, 25, 26, 27, 28, 30, \
50                                          31, 32, 33, 34, 35, 36, 37, 38, 39, \
51                                          40, 41, 42, 44, 45, 46, 47, 48, 49, \
52                                          50, 51, 52, 53, 54, 55, 56 }
53
54 #define CONFIG_SYS_NAND_ECCSIZE         512
55 #define CONFIG_SYS_NAND_ECCBYTES        13
56 #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
57 #define CONFIG_SYS_NAND_MAX_OOBFREE     2
58 #define CONFIG_SYS_NAND_MAX_ECCPOS      56
59 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_TEXT_BASE
60 #define CONFIG_SYS_NAND_U_BOOT_OFFS     0x80000
61 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x2a0000
62 /* NAND block size is 128 KiB.  Synchronize these values with
63  * corresponding Device Tree entries in Linux:
64  *  MLO(SPL)             4 * NAND_BLOCK_SIZE = 512 KiB  @ 0x000000
65  *  U-Boot              15 * NAND_BLOCK_SIZE = 1920 KiB @ 0x080000
66  *  U-Boot environment   2 * NAND_BLOCK_SIZE = 256 KiB  @ 0x260000
67  *  Kernel              64 * NAND_BLOCK_SIZE = 8 MiB    @ 0x2A0000
68  *  DTB                  4 * NAND_BLOCK_SIZE = 512 KiB  @ 0xAA0000
69  *  RootFS              Remaining Flash Space           @ 0xB20000
70  */
71 #endif /* CONFIG_MTD_RAW_NAND */
72
73 /* Environment information */
74
75 #define CONFIG_BOOTFILE         "uImage"
76
77 #define CONFIG_EXTRA_ENV_SETTINGS \
78         "loadaddr=0x82000000\0" \
79         "console=ttyS2,115200n8\0" \
80         "fdtfile=am3517-evm.dtb\0" \
81         "fdtaddr=0x82C00000\0" \
82         "vram=16M\0" \
83         "bootenv=uEnv.txt\0" \
84         "cmdline=\0" \
85         "optargs=\0" \
86         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
87         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
88         "mmcdev=0\0" \
89         "mmcpart=1\0" \
90         "mmcroot=/dev/mmcblk0p2 rw\0" \
91         "mmcrootfstype=ext4 rootwait fixrtc\0" \
92         "mmcargs=setenv bootargs console=${console} " \
93                 "${mtdparts} " \
94                 "${optargs} " \
95                 "root=${mmcroot} " \
96                 "rootfstype=${mmcrootfstype} " \
97                 "${cmdline}\0" \
98         "nandargs=setenv bootargs console=${console} " \
99                 "${mtdparts} " \
100                 "${optargs} " \
101                 "root=ubi0:rootfs rw ubi.mtd=rootfs " \
102                 "rootfstype=ubifs rootwait " \
103                 "${cmdline}\0" \
104         "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0"\
105         "importbootenv=echo Importing environment from mmc ...; " \
106                 "env import -t ${loadaddr} ${filesize}\0" \
107         "bootscript=echo Running bootscript from mmc ...; " \
108                 "source ${loadaddr}\0" \
109         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}\0" \
110         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
111         "mmcboot=echo Booting from mmc ...; " \
112                 "run mmcargs; " \
113                 "bootz ${loadaddr} - ${fdtaddr}\0" \
114         "nandboot=echo Booting from nand ...; " \
115                 "run nandargs; " \
116                 "nand read ${loadaddr} 2a0000 800000; " \
117                 "nand read ${fdtaddr} aa0000 80000; " \
118                 "bootm ${loadaddr} - ${fdtaddr}\0" \
119
120 #define CONFIG_BOOTCOMMAND \
121         "mmc dev ${mmcdev}; if mmc rescan; then " \
122                 "echo SD/MMC found on device $mmcdev; " \
123                 "if run loadbootenv; then " \
124                         "run importbootenv; " \
125                 "fi; " \
126                 "echo Checking if uenvcmd is set ...; " \
127                 "if test -n $uenvcmd; then " \
128                         "echo Running uenvcmd ...; " \
129                         "run uenvcmd; " \
130                 "fi; " \
131                 "echo Running default loadimage ...; " \
132                 "setenv bootfile zImage; " \
133                 "if run loadimage; then " \
134                         "run loadfdt; " \
135                         "run mmcboot; " \
136                 "fi; " \
137         "else run nandboot; fi"
138
139 /* Miscellaneous configurable options */
140
141 /* We set the max number of command args high to avoid HUSH bugs. */
142 #define CONFIG_SYS_MAXARGS              64
143
144 /* Print Buffer Size */
145 #define CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE \
146                                         + sizeof(CONFIG_SYS_PROMPT) + 16)
147 /* Boot Argument Buffer Size */
148 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
149
150 /* memtest works on */
151
152 /* Physical Memory Map */
153 #define CONFIG_SYS_CS0_SIZE             (256 * 1024 * 1024)
154
155 /* FLASH and environment organization */
156
157 /* **** PISMO SUPPORT *** */
158 #define CONFIG_SYS_MAX_FLASH_SECT       520     /* max number of sectors */
159                                                 /* on one chip */
160 #define CONFIG_SYS_MAX_FLASH_BANKS      2       /* max number of flash banks */
161 #define CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 2 sectors */
162
163 #if defined(CONFIG_MTD_RAW_NAND)
164 #define CONFIG_SYS_FLASH_BASE           NAND_BASE
165 #endif
166
167 /* Monitor at start of flash */
168 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_FLASH_BASE
169
170 #define CONFIG_SYS_ENV_SECT_SIZE        (128 << 10)     /* 128 KiB */
171
172 /* Defines for SPL */
173
174 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION      1
175 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME         "u-boot.img"
176
177 #endif /* __CONFIG_H */