xref: /openbmc/u-boot/include/configs/cm_t54.h (revision 103e83a1)
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_OMAP34XX
21 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
22 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
23 #define CONFIG_SYS_I2C_EEPROM_BUS	0
24 
25 /* Enable SD/MMC CD and WP GPIOs */
26 #define OMAP_HSMMC_USE_GPIO
27 
28 /* UART setup */
29 #define CONFIG_CONS_INDEX		4
30 #define CONFIG_SYS_NS16550_COM4		UART4_BASE
31 #define CONFIG_BAUDRATE			115200
32 
33 /* MMC ENV related defines */
34 #undef CONFIG_ENV_OFFSET
35 #undef CONFIG_ENV_SIZE
36 
37 #define CONFIG_ENV_IS_IN_MMC
38 #define CONFIG_SYS_MMC_ENV_DEV		1		/* SLOT2: eMMC(1) */
39 #define CONFIG_SYS_MMC_ENV_PART		0
40 #define CONFIG_ENV_OFFSET		0xc0000		/* (in bytes) 768 KB */
41 #define CONFIG_ENV_SIZE			(16 << 10)	/* 16 KB */
42 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
43 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
44 
45 /* Enhance our eMMC support / experience. */
46 #define CONFIG_HSMMC2_8BIT
47 #define CONFIG_SUPPORT_EMMC_BOOT
48 
49 /* SATA Boot related defines */
50 #define CONFIG_SPL_SATA_BOOT_DEVICE		0
51 #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION	1
52 
53 #define CONFIG_SCSI
54 #define CONFIG_LIBATA
55 #define CONFIG_SCSI_AHCI
56 #define CONFIG_SCSI_AHCI_PLAT
57 #define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
58 #define CONFIG_SYS_SCSI_MAX_LUN		1
59 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
60 						CONFIG_SYS_SCSI_MAX_LUN)
61 /* USB UHH support options */
62 #define CONFIG_USB_EHCI
63 #define CONFIG_USB_EHCI_OMAP
64 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	3
65 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
66 
67 #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO	76 /* HSIC2 HUB #RESET */
68 #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO	83 /* HSIC3 ETH #RESET */
69 
70 /* Enabled commands */
71 
72 /* EEPROM */
73 #define CONFIG_CMD_EEPROM
74 #define CONFIG_ENV_EEPROM_IS_ON_I2C
75 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1
76 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4
77 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
78 #define CONFIG_SYS_EEPROM_SIZE			256
79 
80 #define CONFIG_CMD_EEPROM_LAYOUT
81 #define CONFIG_EEPROM_LAYOUT_HELP_STRING "v2, v3"
82 
83 /* USB Networking options */
84 #define CONFIG_USB_HOST_ETHER
85 #define CONFIG_USB_ETHER_SMSC95XX
86 #define CONFIG_USB_ETHER_RNDIS
87 #define CONFIG_USB_ETHER_ASIX
88 #define CONFIG_USB_ETHER_MCS7830
89 
90 /* Max time to hold reset on this board, see doc/README.omap-reset-time */
91 #define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC	16296
92 
93 /*
94  * Miscellaneous configurable options
95  */
96 #undef CONFIG_SYS_AUTOLOAD
97 #undef CONFIG_EXTRA_ENV_SETTINGS
98 #undef CONFIG_BOOTCOMMAND
99 
100 #define CONFIG_SYS_AUTOLOAD		"no"
101 
102 #define CONFIG_EXTRA_ENV_SETTINGS \
103 	DEFAULT_LINUX_BOOT_ENV \
104 	"baudrate=115200\0" \
105 	"bootdelay=3\0" \
106 	"autoload=no\0" \
107 	"bootscr=bootscr.img\0" \
108 	"fdtfile=omap5-sbc-t54.dtb\0" \
109 	"kernel=zImage-cm-t54\0" \
110 	"ramdisk=ramdisk-cm-t54.img\0" \
111 	"console=ttyO3\0" \
112 	"ramdisksize=16384\0" \
113 	"mmcdev=0\0" \
114 	"mmcroot=/dev/mmcblk1p2\0" \
115 	"mmcargs=setenv bootargs console=${console} " \
116 		"root=${mmcroot} rw rootwait\0" \
117 	"ramroot=/dev/ram0\0" \
118 	"ramargs=setenv bootargs console=${console} " \
119 		"root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
120 	"mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
121 	"mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
122 	"mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
123 	"mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
124 	"mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
125 			"source ${loadaddr}\0" \
126 	"mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
127 			"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
128 	"mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
129 			"if run mmcloadbootscript; " \
130 				"then run mmcbootscript; " \
131 			"fi; " \
132 			"if run mmcloadkernel; then " \
133 				"if run mmcloadfdt; then " \
134 					"if run mmcloadramdisk; then " \
135 						"run ramargs; " \
136 						"run mmcbootlinux; " \
137 					"fi; " \
138 					"run mmcargs; " \
139 					"setenv rdaddr - ; " \
140 					"run mmcbootlinux; " \
141 				"fi; " \
142 			"fi; " \
143 		"fi;\0"
144 
145 #define CONFIG_BOOTCOMMAND \
146 	"bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
147 
148 #endif /* __CONFIG_CM_T54_H */
149