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