xref: /rk3399_rockchip-uboot/include/configs/cm_t54.h (revision f58ad98a621ce5059d9608a9b41cfabac277094a)
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 
19a9375f33SDmitry Lifshitz /* EEPROM related defines */
20a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
21a9375f33SDmitry Lifshitz #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
2252658fdaSNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_BUS	0
23a9375f33SDmitry Lifshitz 
24076446f1SDmitry Lifshitz /* Enable SD/MMC CD and WP GPIOs */
25076446f1SDmitry Lifshitz #define OMAP_HSMMC_USE_GPIO
26076446f1SDmitry Lifshitz 
27076446f1SDmitry Lifshitz /* UART setup */
28076446f1SDmitry Lifshitz #define CONFIG_CONS_INDEX		4
29076446f1SDmitry Lifshitz #define CONFIG_SYS_NS16550_COM4		UART4_BASE
30076446f1SDmitry Lifshitz 
31076446f1SDmitry Lifshitz /* MMC ENV related defines */
32076446f1SDmitry Lifshitz #undef CONFIG_ENV_OFFSET
33076446f1SDmitry Lifshitz #undef CONFIG_ENV_SIZE
34076446f1SDmitry Lifshitz 
35076446f1SDmitry Lifshitz #define CONFIG_SYS_MMC_ENV_DEV		1		/* SLOT2: eMMC(1) */
361c8c36f5SDmitry Lifshitz #define CONFIG_SYS_MMC_ENV_PART		0
37076446f1SDmitry Lifshitz #define CONFIG_ENV_OFFSET		0xc0000		/* (in bytes) 768 KB */
38076446f1SDmitry Lifshitz #define CONFIG_ENV_SIZE			(16 << 10)	/* 16 KB */
39076446f1SDmitry Lifshitz #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
40076446f1SDmitry Lifshitz #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
41076446f1SDmitry Lifshitz 
42076446f1SDmitry Lifshitz /* Enhance our eMMC support / experience. */
43076446f1SDmitry Lifshitz #define CONFIG_HSMMC2_8BIT
44076446f1SDmitry Lifshitz #define CONFIG_SUPPORT_EMMC_BOOT
45076446f1SDmitry Lifshitz 
4696b5bf11SDmitry Lifshitz /* SATA Boot related defines */
4796b5bf11SDmitry Lifshitz #define CONFIG_SPL_SATA_BOOT_DEVICE		0
4896b5bf11SDmitry Lifshitz #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION	1
4996b5bf11SDmitry Lifshitz 
5096b5bf11SDmitry Lifshitz #define CONFIG_LIBATA
5196b5bf11SDmitry Lifshitz #define CONFIG_SCSI_AHCI
5296b5bf11SDmitry Lifshitz #define CONFIG_SCSI_AHCI_PLAT
5396b5bf11SDmitry Lifshitz #define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
5496b5bf11SDmitry Lifshitz #define CONFIG_SYS_SCSI_MAX_LUN		1
5596b5bf11SDmitry Lifshitz #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
5696b5bf11SDmitry Lifshitz 						CONFIG_SYS_SCSI_MAX_LUN)
57076446f1SDmitry Lifshitz /* USB UHH support options */
58076446f1SDmitry Lifshitz #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
59076446f1SDmitry Lifshitz 
60076446f1SDmitry Lifshitz #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO	76 /* HSIC2 HUB #RESET */
61076446f1SDmitry Lifshitz #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO	83 /* HSIC3 ETH #RESET */
62076446f1SDmitry Lifshitz 
63076446f1SDmitry Lifshitz /* Enabled commands */
64076446f1SDmitry Lifshitz 
65*66b7e420SNikita Kiryanov /* EEPROM */
66*66b7e420SNikita Kiryanov #define CONFIG_ENV_EEPROM_IS_ON_I2C
67*66b7e420SNikita Kiryanov #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1
68*66b7e420SNikita Kiryanov #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4
69*66b7e420SNikita Kiryanov #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
70*66b7e420SNikita Kiryanov #define CONFIG_SYS_EEPROM_SIZE			256
71*66b7e420SNikita Kiryanov 
72076446f1SDmitry Lifshitz /* USB Networking options */
73076446f1SDmitry Lifshitz 
74076446f1SDmitry Lifshitz /*
75076446f1SDmitry Lifshitz  * Miscellaneous configurable options
76076446f1SDmitry Lifshitz  */
77076446f1SDmitry Lifshitz #undef CONFIG_SYS_AUTOLOAD
78076446f1SDmitry Lifshitz #undef CONFIG_EXTRA_ENV_SETTINGS
79076446f1SDmitry Lifshitz #undef CONFIG_BOOTCOMMAND
80076446f1SDmitry Lifshitz 
81076446f1SDmitry Lifshitz #define CONFIG_SYS_AUTOLOAD		"no"
82076446f1SDmitry Lifshitz 
83076446f1SDmitry Lifshitz #define CONFIG_EXTRA_ENV_SETTINGS \
84076446f1SDmitry Lifshitz 	DEFAULT_LINUX_BOOT_ENV \
85076446f1SDmitry Lifshitz 	"baudrate=115200\0" \
86076446f1SDmitry Lifshitz 	"bootdelay=3\0" \
87076446f1SDmitry Lifshitz 	"autoload=no\0" \
88076446f1SDmitry Lifshitz 	"bootscr=bootscr.img\0" \
89076446f1SDmitry Lifshitz 	"fdtfile=omap5-sbc-t54.dtb\0" \
90076446f1SDmitry Lifshitz 	"kernel=zImage-cm-t54\0" \
91076446f1SDmitry Lifshitz 	"ramdisk=ramdisk-cm-t54.img\0" \
92076446f1SDmitry Lifshitz 	"console=ttyO3\0" \
93076446f1SDmitry Lifshitz 	"ramdisksize=16384\0" \
94076446f1SDmitry Lifshitz 	"mmcdev=0\0" \
95076446f1SDmitry Lifshitz 	"mmcroot=/dev/mmcblk1p2\0" \
96076446f1SDmitry Lifshitz 	"mmcargs=setenv bootargs console=${console} " \
97076446f1SDmitry Lifshitz 		"root=${mmcroot} rw rootwait\0" \
98076446f1SDmitry Lifshitz 	"ramroot=/dev/ram0\0" \
99076446f1SDmitry Lifshitz 	"ramargs=setenv bootargs console=${console} " \
100076446f1SDmitry Lifshitz 		"root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
101076446f1SDmitry Lifshitz 	"mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
102076446f1SDmitry Lifshitz 	"mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
103076446f1SDmitry Lifshitz 	"mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
104076446f1SDmitry Lifshitz 	"mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
105076446f1SDmitry Lifshitz 	"mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
106076446f1SDmitry Lifshitz 			"source ${loadaddr}\0" \
107076446f1SDmitry Lifshitz 	"mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
108076446f1SDmitry Lifshitz 			"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
109076446f1SDmitry Lifshitz 	"mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
110076446f1SDmitry Lifshitz 			"if run mmcloadbootscript; " \
111076446f1SDmitry Lifshitz 				"then run mmcbootscript; " \
112076446f1SDmitry Lifshitz 			"fi; " \
113076446f1SDmitry Lifshitz 			"if run mmcloadkernel; then " \
114076446f1SDmitry Lifshitz 				"if run mmcloadfdt; then " \
115076446f1SDmitry Lifshitz 					"if run mmcloadramdisk; then " \
116076446f1SDmitry Lifshitz 						"run ramargs; " \
117076446f1SDmitry Lifshitz 						"run mmcbootlinux; " \
118076446f1SDmitry Lifshitz 					"fi; " \
119076446f1SDmitry Lifshitz 					"run mmcargs; " \
120076446f1SDmitry Lifshitz 					"setenv rdaddr - ; " \
121076446f1SDmitry Lifshitz 					"run mmcbootlinux; " \
122076446f1SDmitry Lifshitz 				"fi; " \
123076446f1SDmitry Lifshitz 			"fi; " \
124076446f1SDmitry Lifshitz 		"fi;\0"
125076446f1SDmitry Lifshitz 
126076446f1SDmitry Lifshitz #define CONFIG_BOOTCOMMAND \
127076446f1SDmitry Lifshitz 	"bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
128076446f1SDmitry Lifshitz 
129076446f1SDmitry Lifshitz #endif /* __CONFIG_CM_T54_H */
130