configs: Re-sync almost all of cmd/Kconfig
[platform/kernel/u-boot.git] / include / configs / omap3_evm.h
1 /*
2  * Configuration settings for the TI OMAP3 EVM board.
3  *
4  * Copyright (C) 2006-2011 Texas Instruments Incorporated - http://www.ti.com/
5  *
6  * Author :
7  *      Manikandan Pillai <mani.pillai@ti.com>
8  * Derived from Beagle Board and 3430 SDP code by
9  *      Richard Woodruff <r-woodruff2@ti.com>
10  *      Syed Mohammed Khasim <khasim@ti.com>
11  *
12  * Manikandan Pillai <mani.pillai@ti.com>
13  *
14  * SPDX-License-Identifier:     GPL-2.0+
15  */
16
17 #ifndef __OMAP3EVM_CONFIG_H
18 #define __OMAP3EVM_CONFIG_H
19
20 #include <asm/arch/cpu.h>
21 #include <asm/arch/omap.h>
22
23 /* ----------------------------------------------------------------------------
24  * Supported U-Boot commands
25  * ----------------------------------------------------------------------------
26  */
27 #define CONFIG_CMD_ASKENV
28
29 #define CONFIG_CMD_EXT2
30 #define CONFIG_CMD_FAT
31 #define CONFIG_CMD_JFFS2
32
33 #define CONFIG_CMD_MMC
34 #define CONFIG_CMD_NAND
35
36 /* ----------------------------------------------------------------------------
37  * Supported U-Boot features
38  * ----------------------------------------------------------------------------
39  */
40 #define CONFIG_SYS_LONGHELP
41
42 /* Display CPU and Board information */
43 #define CONFIG_DISPLAY_CPUINFO
44 #define CONFIG_DISPLAY_BOARDINFO
45
46 /* Allow to overwrite serial and ethaddr */
47 #define CONFIG_ENV_OVERWRITE
48
49 /* Add auto-completion support */
50 #define CONFIG_AUTO_COMPLETE
51
52 /* ----------------------------------------------------------------------------
53  * Supported hardware
54  * ----------------------------------------------------------------------------
55  */
56
57 /* MMC */
58 #define CONFIG_MMC
59 #define CONFIG_GENERIC_MMC
60 #define CONFIG_OMAP_HSMMC
61
62 /* SPL */
63 #define CONFIG_SPL_MMC_SUPPORT
64 #define CONFIG_SPL_FAT_SUPPORT
65 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
66 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
67 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION      1
68 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
69
70 /* Partition tables */
71 #define CONFIG_EFI_PARTITION
72 #define CONFIG_DOS_PARTITION
73
74 /* USB
75  *
76  * Enable CONFIG_USB_MUSB_HCD for Host functionalities MSC, keyboard
77  * Enable CONFIG_USB_MUSB_UDD for Device functionalities.
78  */
79 #define CONFIG_USB_OMAP3
80 #define CONFIG_USB_MUSB_HCD
81 /* #define CONFIG_USB_MUSB_UDC */
82
83 /* NAND SPL */
84 #define CONFIG_SPL_NAND_SIMPLE
85 #define CONFIG_SPL_NAND_SUPPORT
86 #define CONFIG_SPL_NAND_BASE
87 #define CONFIG_SPL_NAND_DRIVERS
88 #define CONFIG_SPL_NAND_ECC
89 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
90 #define CONFIG_SYS_NAND_PAGE_COUNT      64
91 #define CONFIG_SYS_NAND_PAGE_SIZE       2048
92 #define CONFIG_SYS_NAND_OOBSIZE         64
93 #define CONFIG_SYS_NAND_BLOCK_SIZE      (128*1024)
94 #define CONFIG_SYS_NAND_BAD_BLOCK_POS   0
95 #define CONFIG_SYS_NAND_ECCPOS          {2, 3, 4, 5, 6, 7, 8, 9,\
96                                                 10, 11, 12, 13}
97 #define CONFIG_SYS_NAND_ECCSIZE         512
98 #define CONFIG_SYS_NAND_ECCBYTES        3
99 #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_HAM1_CODE_HW
100 #define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_TEXT_BASE
101 #define CONFIG_SYS_NAND_U_BOOT_OFFS     0x80000
102
103 /* -----------------------------------------------------------------------------
104  * Include common board configuration
105  * -----------------------------------------------------------------------------
106  */
107 #include "omap3_evm_common.h"
108
109 /* -----------------------------------------------------------------------------
110  * Default environment
111  * -----------------------------------------------------------------------------
112  */
113 #define CONFIG_BOOTDELAY        3
114
115 #define CONFIG_EXTRA_ENV_SETTINGS \
116         "loadaddr=0x82000000\0" \
117         "usbtty=cdc_acm\0" \
118         "mmcdev=0\0" \
119         "console=ttyO0,115200n8\0" \
120         "mmcargs=setenv bootargs console=${console} " \
121                 "root=/dev/mmcblk0p2 rw " \
122                 "rootfstype=ext3 rootwait\0" \
123         "nandargs=setenv bootargs console=${console} " \
124                 "root=/dev/mtdblock4 rw " \
125                 "rootfstype=jffs2\0" \
126         "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
127         "bootscript=echo Running bootscript from mmc ...; " \
128                 "source ${loadaddr}\0" \
129         "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
130         "mmcboot=echo Booting from mmc ...; " \
131                 "run mmcargs; " \
132                 "bootm ${loadaddr}\0" \
133         "nandboot=echo Booting from nand ...; " \
134                 "run nandargs; " \
135                 "onenand read ${loadaddr} 280000 400000; " \
136                 "bootm ${loadaddr}\0" \
137
138 #define CONFIG_BOOTCOMMAND \
139         "mmc dev ${mmcdev}; if mmc rescan; then " \
140                 "if run loadbootscript; then " \
141                         "run bootscript; " \
142                 "else " \
143                         "if run loaduimage; then " \
144                                 "run mmcboot; " \
145                         "else run nandboot; " \
146                         "fi; " \
147                 "fi; " \
148         "else run nandboot; fi"
149
150 #endif /* __OMAP3EVM_CONFIG_H */