xref: /openbmc/u-boot/include/configs/cm_t54.h (revision a9375f33)
1076446f1SDmitry Lifshitz /*
2076446f1SDmitry Lifshitz  * Config file for Compulab CM-T54 board
3076446f1SDmitry Lifshitz  *
4076446f1SDmitry Lifshitz  * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
5076446f1SDmitry Lifshitz  *
6076446f1SDmitry Lifshitz  * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
7076446f1SDmitry Lifshitz  *
8076446f1SDmitry Lifshitz  * SPDX-License-Identifier:	GPL-2.0+
9076446f1SDmitry Lifshitz  */
10076446f1SDmitry Lifshitz 
11076446f1SDmitry Lifshitz #ifndef __CONFIG_CM_T54_H
12076446f1SDmitry Lifshitz #define __CONFIG_CM_T54_H
13076446f1SDmitry Lifshitz 
14076446f1SDmitry Lifshitz #define CONFIG_CM_T54
15076446f1SDmitry Lifshitz #define CONFIG_DRAM_2G
16076446f1SDmitry Lifshitz 
17076446f1SDmitry Lifshitz #include <configs/ti_omap5_common.h>
18076446f1SDmitry Lifshitz 
19076446f1SDmitry Lifshitz #undef CONFIG_MISC_INIT_R
20076446f1SDmitry Lifshitz #undef CONFIG_SPL_OS_BOOT
21076446f1SDmitry Lifshitz 
22*a9375f33SDmitry Lifshitz /* Device Tree defines */
23*a9375f33SDmitry Lifshitz #define CONFIG_OF_LIBFDT
24*a9375f33SDmitry Lifshitz #define CONFIG_OF_BOARD_SETUP
25*a9375f33SDmitry Lifshitz 
26*a9375f33SDmitry Lifshitz /* EEPROM related defines */
27*a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_OMAP34XX
28*a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
29*a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
30*a9375f33SDmitry Lifshitz 
31076446f1SDmitry Lifshitz /* Enable SD/MMC CD and WP GPIOs */
32076446f1SDmitry Lifshitz #define OMAP_HSMMC_USE_GPIO
33076446f1SDmitry Lifshitz 
34076446f1SDmitry Lifshitz /* UART setup */
35076446f1SDmitry Lifshitz #define CONFIG_CONS_INDEX		4
36076446f1SDmitry Lifshitz #define CONFIG_SYS_NS16550_COM4		UART4_BASE
37076446f1SDmitry Lifshitz #define CONFIG_BAUDRATE			115200
38076446f1SDmitry Lifshitz 
39076446f1SDmitry Lifshitz /* SD/MMC RAW boot */
40076446f1SDmitry Lifshitz #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
41076446f1SDmitry Lifshitz #undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS
42076446f1SDmitry Lifshitz 
43076446f1SDmitry Lifshitz #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x200 /* 0x40000 - 256 KB */
44076446f1SDmitry Lifshitz #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x300 /* 384 KB */
45076446f1SDmitry Lifshitz 
46076446f1SDmitry Lifshitz /* MMC ENV related defines */
47076446f1SDmitry Lifshitz #undef CONFIG_ENV_OFFSET
48076446f1SDmitry Lifshitz #undef CONFIG_ENV_SIZE
49076446f1SDmitry Lifshitz 
50076446f1SDmitry Lifshitz #define CONFIG_ENV_IS_IN_MMC
51076446f1SDmitry Lifshitz #define CONFIG_SYS_MMC_ENV_DEV		1		/* SLOT2: eMMC(1) */
52076446f1SDmitry Lifshitz #define CONFIG_ENV_OFFSET		0xc0000		/* (in bytes) 768 KB */
53076446f1SDmitry Lifshitz #define CONFIG_ENV_SIZE			(16 << 10)	/* 16 KB */
54076446f1SDmitry Lifshitz #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
55076446f1SDmitry Lifshitz #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
56076446f1SDmitry Lifshitz #define CONFIG_CMD_SAVEENV
57076446f1SDmitry Lifshitz 
58076446f1SDmitry Lifshitz /* Enhance our eMMC support / experience. */
59076446f1SDmitry Lifshitz #define CONFIG_HSMMC2_8BIT
60076446f1SDmitry Lifshitz #define CONFIG_SUPPORT_EMMC_BOOT
61076446f1SDmitry Lifshitz 
62076446f1SDmitry Lifshitz /* USB UHH support options */
63076446f1SDmitry Lifshitz #define CONFIG_CMD_USB
64076446f1SDmitry Lifshitz #define CONFIG_USB_HOST
65076446f1SDmitry Lifshitz #define CONFIG_USB_EHCI
66076446f1SDmitry Lifshitz #define CONFIG_USB_EHCI_OMAP
67076446f1SDmitry Lifshitz #define CONFIG_USB_STORAGE
68076446f1SDmitry Lifshitz #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	3
69076446f1SDmitry Lifshitz #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
70076446f1SDmitry Lifshitz 
71076446f1SDmitry Lifshitz #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO	76 /* HSIC2 HUB #RESET */
72076446f1SDmitry Lifshitz #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO	83 /* HSIC3 ETH #RESET */
73076446f1SDmitry Lifshitz 
74076446f1SDmitry Lifshitz /* Enabled commands */
75076446f1SDmitry Lifshitz #define CONFIG_CMD_DHCP		/* DHCP Support			*/
76076446f1SDmitry Lifshitz #define CONFIG_CMD_NET		/* bootp, tftpboot, rarpboot	*/
77076446f1SDmitry Lifshitz #define CONFIG_CMD_PING
78076446f1SDmitry Lifshitz 
79076446f1SDmitry Lifshitz /* USB Networking options */
80076446f1SDmitry Lifshitz #define CONFIG_USB_HOST_ETHER
81076446f1SDmitry Lifshitz #define CONFIG_USB_ETHER_SMSC95XX
82076446f1SDmitry Lifshitz #define CONFIG_USB_ETHER_RNDIS
83076446f1SDmitry Lifshitz #define CONFIG_USB_ETHER_ASIX
84076446f1SDmitry Lifshitz #define CONFIG_USB_ETHER_MCS7830
85076446f1SDmitry Lifshitz 
86076446f1SDmitry Lifshitz /* Max time to hold reset on this board, see doc/README.omap-reset-time */
87076446f1SDmitry Lifshitz #define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC	16296
88076446f1SDmitry Lifshitz 
89076446f1SDmitry Lifshitz /*
90076446f1SDmitry Lifshitz  * Miscellaneous configurable options
91076446f1SDmitry Lifshitz  */
92076446f1SDmitry Lifshitz #undef CONFIG_SYS_AUTOLOAD
93076446f1SDmitry Lifshitz #undef CONFIG_SYS_PROMPT
94076446f1SDmitry Lifshitz #undef CONFIG_EXTRA_ENV_SETTINGS
95076446f1SDmitry Lifshitz #undef CONFIG_BOOTCOMMAND
96076446f1SDmitry Lifshitz #undef CONFIG_BOOTDELAY
97076446f1SDmitry Lifshitz 
98076446f1SDmitry Lifshitz #define CONFIG_BOOTDELAY		3
99076446f1SDmitry Lifshitz #define CONFIG_SYS_AUTOLOAD		"no"
100076446f1SDmitry Lifshitz #define CONFIG_SYS_PROMPT		"CM-T54 # "
101076446f1SDmitry Lifshitz 
102076446f1SDmitry Lifshitz #define CONFIG_EXTRA_ENV_SETTINGS \
103076446f1SDmitry Lifshitz 	DEFAULT_LINUX_BOOT_ENV \
104076446f1SDmitry Lifshitz 	"baudrate=115200\0" \
105076446f1SDmitry Lifshitz 	"bootdelay=3\0" \
106076446f1SDmitry Lifshitz 	"autoload=no\0" \
107076446f1SDmitry Lifshitz 	"bootscr=bootscr.img\0" \
108076446f1SDmitry Lifshitz 	"fdtfile=omap5-sbc-t54.dtb\0" \
109076446f1SDmitry Lifshitz 	"kernel=zImage-cm-t54\0" \
110076446f1SDmitry Lifshitz 	"ramdisk=ramdisk-cm-t54.img\0" \
111076446f1SDmitry Lifshitz 	"console=ttyO3\0" \
112076446f1SDmitry Lifshitz 	"ramdisksize=16384\0" \
113076446f1SDmitry Lifshitz 	"mmcdev=0\0" \
114076446f1SDmitry Lifshitz 	"mmcroot=/dev/mmcblk1p2\0" \
115076446f1SDmitry Lifshitz 	"mmcargs=setenv bootargs console=${console} " \
116076446f1SDmitry Lifshitz 		"root=${mmcroot} rw rootwait\0" \
117076446f1SDmitry Lifshitz 	"ramroot=/dev/ram0\0" \
118076446f1SDmitry Lifshitz 	"ramargs=setenv bootargs console=${console} " \
119076446f1SDmitry Lifshitz 		"root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
120076446f1SDmitry Lifshitz 	"mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
121076446f1SDmitry Lifshitz 	"mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
122076446f1SDmitry Lifshitz 	"mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
123076446f1SDmitry Lifshitz 	"mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
124076446f1SDmitry Lifshitz 	"mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
125076446f1SDmitry Lifshitz 			"source ${loadaddr}\0" \
126076446f1SDmitry Lifshitz 	"mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
127076446f1SDmitry Lifshitz 			"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
128076446f1SDmitry Lifshitz 	"mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
129076446f1SDmitry Lifshitz 			"if run mmcloadbootscript; " \
130076446f1SDmitry Lifshitz 				"then run mmcbootscript; " \
131076446f1SDmitry Lifshitz 			"fi; " \
132076446f1SDmitry Lifshitz 			"if run mmcloadkernel; then " \
133076446f1SDmitry Lifshitz 				"if run mmcloadfdt; then " \
134076446f1SDmitry Lifshitz 					"if run mmcloadramdisk; then " \
135076446f1SDmitry Lifshitz 						"run ramargs; " \
136076446f1SDmitry Lifshitz 						"run mmcbootlinux; " \
137076446f1SDmitry Lifshitz 					"fi; " \
138076446f1SDmitry Lifshitz 					"run mmcargs; " \
139076446f1SDmitry Lifshitz 					"setenv rdaddr - ; " \
140076446f1SDmitry Lifshitz 					"run mmcbootlinux; " \
141076446f1SDmitry Lifshitz 				"fi; " \
142076446f1SDmitry Lifshitz 			"fi; " \
143076446f1SDmitry Lifshitz 		"fi;\0"
144076446f1SDmitry Lifshitz 
145076446f1SDmitry Lifshitz #define CONFIG_BOOTCOMMAND \
146076446f1SDmitry Lifshitz 	"bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
147076446f1SDmitry Lifshitz 
148076446f1SDmitry Lifshitz #endif /* __CONFIG_CM_T54_H */
149