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