omap3_evm.h 4.4 KB
Newer Older
D
Dirk Behme 已提交
1
/*
2 3 4 5
 * Configuration settings for the TI OMAP3 EVM board.
 *
 * Copyright (C) 2006-2011 Texas Instruments Incorporated - http://www.ti.com/
 *
D
Dirk Behme 已提交
6 7 8 9 10 11 12 13
 * Author :
 *	Manikandan Pillai <mani.pillai@ti.com>
 * Derived from Beagle Board and 3430 SDP code by
 *	Richard Woodruff <r-woodruff2@ti.com>
 *	Syed Mohammed Khasim <khasim@ti.com>
 *
 * Manikandan Pillai <mani.pillai@ti.com>
 *
14
 * SPDX-License-Identifier:	GPL-2.0+
D
Dirk Behme 已提交
15 16
 */

17 18 19 20
#ifndef __OMAP3EVM_CONFIG_H
#define __OMAP3EVM_CONFIG_H

#include <asm/arch/cpu.h>
21
#include <asm/arch/omap.h>
22 23

/* ----------------------------------------------------------------------------
B
Bin Meng 已提交
24
 * Supported U-Boot commands
25 26
 * ----------------------------------------------------------------------------
 */
T
Tom Rini 已提交
27 28
#define CONFIG_CMD_ASKENV

29 30 31
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
#define CONFIG_CMD_JFFS2
32

33 34 35
#define CONFIG_CMD_I2C
#define CONFIG_CMD_MMC
#define CONFIG_CMD_NAND
36 37 38 39
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_PING

/* ----------------------------------------------------------------------------
B
Bin Meng 已提交
40
 * Supported U-Boot features
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 * ----------------------------------------------------------------------------
 */
#define CONFIG_SYS_LONGHELP

/* Display CPU and Board information */
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO

/* Allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE

/* Add auto-completion support */
#define CONFIG_AUTO_COMPLETE

/* ----------------------------------------------------------------------------
 * Supported hardware
 * ----------------------------------------------------------------------------
 */

/* MMC */
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_OMAP_HSMMC
T
Tom Rini 已提交
64 65 66 67 68 69

/* SPL */
#define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SPL_FAT_SUPPORT
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
70
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
71
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
T
Tom Rini 已提交
72 73

/* Partition tables */
74
#define CONFIG_EFI_PARTITION
T
Tom Rini 已提交
75
#define CONFIG_DOS_PARTITION
76 77 78

/* USB
 *
79 80
 * Enable CONFIG_USB_MUSB_HCD for Host functionalities MSC, keyboard
 * Enable CONFIG_USB_MUSB_UDD for Device functionalities.
81 82
 */
#define CONFIG_USB_OMAP3
83 84
#define CONFIG_USB_MUSB_HCD
/* #define CONFIG_USB_MUSB_UDC */
85

T
Tom Rini 已提交
86 87 88
/* NAND SPL */
#define CONFIG_SPL_NAND_SIMPLE
#define CONFIG_SPL_NAND_SUPPORT
89 90 91
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
T
Tom Rini 已提交
92 93 94 95 96 97 98 99 100 101
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT	64
#define CONFIG_SYS_NAND_PAGE_SIZE	2048
#define CONFIG_SYS_NAND_OOBSIZE		64
#define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
#define CONFIG_SYS_NAND_BAD_BLOCK_POS	0
#define CONFIG_SYS_NAND_ECCPOS		{2, 3, 4, 5, 6, 7, 8, 9,\
						10, 11, 12, 13}
#define CONFIG_SYS_NAND_ECCSIZE		512
#define CONFIG_SYS_NAND_ECCBYTES	3
102
#define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_HAM1_CODE_HW
T
Tom Rini 已提交
103 104 105
#define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x80000

106
/* -----------------------------------------------------------------------------
107
 * Include common board configuration
108
 * -----------------------------------------------------------------------------
D
Dirk Behme 已提交
109
 */
110
#include "omap3_evm_common.h"
D
Dirk Behme 已提交
111

112 113 114 115
/* -----------------------------------------------------------------------------
 * Default environment
 * -----------------------------------------------------------------------------
 */
T
Tom Rini 已提交
116
#define CONFIG_BOOTDELAY	3
S
Sanjeev Premi 已提交
117

D
Dirk Behme 已提交
118 119
#define CONFIG_EXTRA_ENV_SETTINGS \
	"loadaddr=0x82000000\0" \
A
Ajay Kumar Gupta 已提交
120
	"usbtty=cdc_acm\0" \
121
	"mmcdev=0\0" \
122
	"console=ttyO0,115200n8\0" \
D
Dirk Behme 已提交
123 124 125 126 127 128
	"mmcargs=setenv bootargs console=${console} " \
		"root=/dev/mmcblk0p2 rw " \
		"rootfstype=ext3 rootwait\0" \
	"nandargs=setenv bootargs console=${console} " \
		"root=/dev/mtdblock4 rw " \
		"rootfstype=jffs2\0" \
129
	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
D
Dirk Behme 已提交
130
	"bootscript=echo Running bootscript from mmc ...; " \
131
		"source ${loadaddr}\0" \
132
	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
D
Dirk Behme 已提交
133 134 135 136 137 138 139 140 141
	"mmcboot=echo Booting from mmc ...; " \
		"run mmcargs; " \
		"bootm ${loadaddr}\0" \
	"nandboot=echo Booting from nand ...; " \
		"run nandargs; " \
		"onenand read ${loadaddr} 280000 400000; " \
		"bootm ${loadaddr}\0" \

#define CONFIG_BOOTCOMMAND \
A
Andrew Bradford 已提交
142
	"mmc dev ${mmcdev}; if mmc rescan; then " \
D
Dirk Behme 已提交
143 144 145 146 147 148 149 150 151 152
		"if run loadbootscript; then " \
			"run bootscript; " \
		"else " \
			"if run loaduimage; then " \
				"run mmcboot; " \
			"else run nandboot; " \
			"fi; " \
		"fi; " \
	"else run nandboot; fi"

153
#endif /* __OMAP3EVM_CONFIG_H */