summaryrefslogtreecommitdiff
path: root/include/configs/cm_t54.h
blob: 4dcac4004ec2c4505a153291fe38c45ffb6d397b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*
 * Config file for Compulab CM-T54 board
 *
 * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
 *
 * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __CONFIG_CM_T54_H
#define __CONFIG_CM_T54_H

#define CONFIG_CM_T54
#define CONFIG_DRAM_2G

#include <configs/ti_omap5_common.h>

#undef CONFIG_MISC_INIT_R
#undef CONFIG_SPL_OS_BOOT

/* Enable SD/MMC CD and WP GPIOs */
#define OMAP_HSMMC_USE_GPIO

/* UART setup */
#define CONFIG_CONS_INDEX		4
#define CONFIG_SYS_NS16550_COM4		UART4_BASE
#define CONFIG_BAUDRATE			115200

/* SD/MMC RAW boot */
#undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
#undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS

#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x200 /* 0x40000 - 256 KB */
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x300 /* 384 KB */

/* MMC ENV related defines */
#undef CONFIG_ENV_OFFSET
#undef CONFIG_ENV_SIZE

#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV		1		/* SLOT2: eMMC(1) */
#define CONFIG_ENV_OFFSET		0xc0000		/* (in bytes) 768 KB */
#define CONFIG_ENV_SIZE			(16 << 10)	/* 16 KB */
#define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
#define CONFIG_CMD_SAVEENV

/* Enhance our eMMC support / experience. */
#define CONFIG_HSMMC2_8BIT
#define CONFIG_SUPPORT_EMMC_BOOT

/* USB UHH support options */
#define CONFIG_CMD_USB
#define CONFIG_USB_HOST
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_USB_STORAGE
#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	3
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET

#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO	76 /* HSIC2 HUB #RESET */
#define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO	83 /* HSIC3 ETH #RESET */

/* Enabled commands */
#define CONFIG_CMD_DHCP		/* DHCP Support			*/
#define CONFIG_CMD_NET		/* bootp, tftpboot, rarpboot	*/
#define CONFIG_CMD_PING

/* USB Networking options */
#define CONFIG_USB_HOST_ETHER
#define CONFIG_USB_ETHER_SMSC95XX
#define CONFIG_USB_ETHER_RNDIS
#define CONFIG_USB_ETHER_ASIX
#define CONFIG_USB_ETHER_MCS7830

/* Max time to hold reset on this board, see doc/README.omap-reset-time */
#define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC	16296

/*
 * Miscellaneous configurable options
 */
#undef CONFIG_SYS_AUTOLOAD
#undef CONFIG_SYS_PROMPT
#undef CONFIG_EXTRA_ENV_SETTINGS
#undef CONFIG_BOOTCOMMAND
#undef CONFIG_BOOTDELAY

#define CONFIG_BOOTDELAY		3
#define CONFIG_SYS_AUTOLOAD		"no"
#define CONFIG_SYS_PROMPT		"CM-T54 # "

#define CONFIG_EXTRA_ENV_SETTINGS \
	DEFAULT_LINUX_BOOT_ENV \
	"baudrate=115200\0" \
	"bootdelay=3\0" \
	"autoload=no\0" \
	"bootscr=bootscr.img\0" \
	"fdtfile=omap5-sbc-t54.dtb\0" \
	"kernel=zImage-cm-t54\0" \
	"ramdisk=ramdisk-cm-t54.img\0" \
	"console=ttyO3\0" \
	"ramdisksize=16384\0" \
	"mmcdev=0\0" \
	"mmcroot=/dev/mmcblk1p2\0" \
	"mmcargs=setenv bootargs console=${console} " \
		"root=${mmcroot} rw rootwait\0" \
	"ramroot=/dev/ram0\0" \
	"ramargs=setenv bootargs console=${console} " \
		"root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
	"mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
	"mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
	"mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
	"mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
	"mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
			"source ${loadaddr}\0" \
	"mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
			"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
	"mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
			"if run mmcloadbootscript; " \
				"then run mmcbootscript; " \
			"fi; " \
			"if run mmcloadkernel; then " \
				"if run mmcloadfdt; then " \
					"if run mmcloadramdisk; then " \
						"run ramargs; " \
						"run mmcbootlinux; " \
					"fi; " \
					"run mmcargs; " \
					"setenv rdaddr - ; " \
					"run mmcbootlinux; " \
				"fi; " \
			"fi; " \
		"fi;\0"

#define CONFIG_BOOTCOMMAND \
	"bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"

#endif /* __CONFIG_CM_T54_H */