xref: /openbmc/u-boot/include/configs/cm_t54.h (revision 5d0c74e6)
1 /*
2  * Config file for Compulab CM-T54 board
3  *
4  * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
5  *
6  * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
7  *
8  * SPDX-License-Identifier:	GPL-2.0+
9  */
10 
11 #ifndef __CONFIG_CM_T54_H
12 #define __CONFIG_CM_T54_H
13 
14 #define CONFIG_CM_T54
15 #define CONFIG_DRAM_2G
16 
17 #include <configs/ti_omap5_common.h>
18 
19 /* EEPROM related defines */
20 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
21 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
22 #define CONFIG_SYS_I2C_EEPROM_BUS	0
23 
24 /* Enable SD/MMC CD and WP GPIOs */
25 #define OMAP_HSMMC_USE_GPIO
26 
27 /* UART setup */
28 #define CONFIG_SYS_NS16550_COM4		UART4_BASE
29 
30 /* MMC ENV related defines */
31 #undef CONFIG_ENV_OFFSET
32 #undef CONFIG_ENV_SIZE
33 
34 #define CONFIG_SYS_MMC_ENV_DEV		1		/* SLOT2: eMMC(1) */
35 #define CONFIG_SYS_MMC_ENV_PART		0
36 #define CONFIG_ENV_OFFSET		0xc0000		/* (in bytes) 768 KB */
37 #define CONFIG_ENV_SIZE			(16 << 10)	/* 16 KB */
38 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
39 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
40 
41 /* Enhance our eMMC support / experience. */
42 #define CONFIG_HSMMC2_8BIT
43 #define CONFIG_SUPPORT_EMMC_BOOT
44 
45 /* SATA Boot related defines */
46 #define CONFIG_SPL_SATA_BOOT_DEVICE		0
47 #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION	1
48 
49 #define CONFIG_SCSI_AHCI_PLAT
50 #define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
51 #define CONFIG_SYS_SCSI_MAX_LUN		1
52 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
53 						CONFIG_SYS_SCSI_MAX_LUN)
54 /* USB UHH support options */
55 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
56 
57 #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO	76 /* HSIC2 HUB #RESET */
58 #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO	83 /* HSIC3 ETH #RESET */
59 
60 /* Enabled commands */
61 
62 /* EEPROM */
63 #define CONFIG_ENV_EEPROM_IS_ON_I2C
64 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1
65 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4
66 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
67 #define CONFIG_SYS_EEPROM_SIZE			256
68 
69 /* USB Networking options */
70 
71 /*
72  * Miscellaneous configurable options
73  */
74 #undef CONFIG_SYS_AUTOLOAD
75 #undef CONFIG_EXTRA_ENV_SETTINGS
76 #undef CONFIG_BOOTCOMMAND
77 
78 #define CONFIG_SYS_AUTOLOAD		"no"
79 
80 #define CONFIG_EXTRA_ENV_SETTINGS \
81 	DEFAULT_LINUX_BOOT_ENV \
82 	"baudrate=115200\0" \
83 	"bootdelay=3\0" \
84 	"autoload=no\0" \
85 	"bootscr=bootscr.img\0" \
86 	"fdtfile=omap5-sbc-t54.dtb\0" \
87 	"kernel=zImage-cm-t54\0" \
88 	"ramdisk=ramdisk-cm-t54.img\0" \
89 	"console=ttyO3\0" \
90 	"ramdisksize=16384\0" \
91 	"mmcdev=0\0" \
92 	"mmcroot=/dev/mmcblk1p2\0" \
93 	"mmcargs=setenv bootargs console=${console} " \
94 		"root=${mmcroot} rw rootwait\0" \
95 	"ramroot=/dev/ram0\0" \
96 	"ramargs=setenv bootargs console=${console} " \
97 		"root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
98 	"mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
99 	"mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
100 	"mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
101 	"mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
102 	"mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
103 			"source ${loadaddr}\0" \
104 	"mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
105 			"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
106 	"mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
107 			"if run mmcloadbootscript; " \
108 				"then run mmcbootscript; " \
109 			"fi; " \
110 			"if run mmcloadkernel; then " \
111 				"if run mmcloadfdt; then " \
112 					"if run mmcloadramdisk; then " \
113 						"run ramargs; " \
114 						"run mmcbootlinux; " \
115 					"fi; " \
116 					"run mmcargs; " \
117 					"setenv rdaddr - ; " \
118 					"run mmcbootlinux; " \
119 				"fi; " \
120 			"fi; " \
121 		"fi;\0"
122 
123 #define CONFIG_BOOTCOMMAND \
124 	"bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
125 
126 #endif /* __CONFIG_CM_T54_H */
127