2 * Config file for Compulab CM-T54 board
4 * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
6 * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
8 * SPDX-License-Identifier: GPL-2.0+
11 #ifndef __CONFIG_CM_T54_H
12 #define __CONFIG_CM_T54_H
15 #define CONFIG_DRAM_2G
17 #include <configs/ti_omap5_common.h>
19 #undef CONFIG_SPL_OS_BOOT
21 /* Enable Generic board */
22 #define CONFIG_SYS_GENERIC_BOARD
24 /* Device Tree defines */
25 #define CONFIG_OF_LIBFDT
26 #define CONFIG_OF_BOARD_SETUP
28 /* EEPROM related defines */
29 #define CONFIG_SYS_I2C_OMAP34XX
30 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
31 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
32 #define CONFIG_SYS_I2C_EEPROM_BUS 0
34 /* Enable SD/MMC CD and WP GPIOs */
35 #define OMAP_HSMMC_USE_GPIO
38 #define CONFIG_CONS_INDEX 4
39 #define CONFIG_SYS_NS16550_COM4 UART4_BASE
40 #define CONFIG_BAUDRATE 115200
43 #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
44 #undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS
46 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* 0x40000 - 256 KB */
47 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300 /* 384 KB */
49 /* MMC ENV related defines */
50 #undef CONFIG_ENV_OFFSET
51 #undef CONFIG_ENV_SIZE
53 #define CONFIG_ENV_IS_IN_MMC
54 #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
55 #define CONFIG_SYS_MMC_ENV_PART 0
56 #define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */
57 #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
58 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
59 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
61 /* Enhance our eMMC support / experience. */
62 #define CONFIG_HSMMC2_8BIT
63 #define CONFIG_SUPPORT_EMMC_BOOT
65 /* SATA Boot related defines */
66 #define CONFIG_SPL_SATA_SUPPORT
67 #define CONFIG_SPL_SATA_BOOT_DEVICE 0
68 #define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1
70 #define CONFIG_CMD_SCSI
72 #define CONFIG_SCSI_AHCI
73 #define CONFIG_SCSI_AHCI_PLAT
74 #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
75 #define CONFIG_SYS_SCSI_MAX_LUN 1
76 #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
77 CONFIG_SYS_SCSI_MAX_LUN)
78 /* USB UHH support options */
79 #define CONFIG_CMD_USB
80 #define CONFIG_USB_HOST
81 #define CONFIG_USB_EHCI
82 #define CONFIG_USB_EHCI_OMAP
83 #define CONFIG_USB_STORAGE
84 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
85 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
87 #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */
88 #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */
90 /* Enabled commands */
91 #define CONFIG_CMD_DHCP /* DHCP Support */
92 #define CONFIG_CMD_PING
94 /* USB Networking options */
95 #define CONFIG_USB_HOST_ETHER
96 #define CONFIG_USB_ETHER_SMSC95XX
97 #define CONFIG_USB_ETHER_RNDIS
98 #define CONFIG_USB_ETHER_ASIX
99 #define CONFIG_USB_ETHER_MCS7830
101 /* Max time to hold reset on this board, see doc/README.omap-reset-time */
102 #define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296
105 * Miscellaneous configurable options
107 #undef CONFIG_SYS_AUTOLOAD
108 #undef CONFIG_EXTRA_ENV_SETTINGS
109 #undef CONFIG_BOOTCOMMAND
110 #undef CONFIG_BOOTDELAY
112 #define CONFIG_BOOTDELAY 3
113 #define CONFIG_SYS_AUTOLOAD "no"
115 #define CONFIG_EXTRA_ENV_SETTINGS \
116 DEFAULT_LINUX_BOOT_ENV \
117 "baudrate=115200\0" \
120 "bootscr=bootscr.img\0" \
121 "fdtfile=omap5-sbc-t54.dtb\0" \
122 "kernel=zImage-cm-t54\0" \
123 "ramdisk=ramdisk-cm-t54.img\0" \
125 "ramdisksize=16384\0" \
127 "mmcroot=/dev/mmcblk1p2\0" \
128 "mmcargs=setenv bootargs console=${console} " \
129 "root=${mmcroot} rw rootwait\0" \
130 "ramroot=/dev/ram0\0" \
131 "ramargs=setenv bootargs console=${console} " \
132 "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
133 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
134 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
135 "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
136 "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
137 "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
138 "source ${loadaddr}\0" \
139 "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
140 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
141 "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
142 "if run mmcloadbootscript; " \
143 "then run mmcbootscript; " \
145 "if run mmcloadkernel; then " \
146 "if run mmcloadfdt; then " \
147 "if run mmcloadramdisk; then " \
149 "run mmcbootlinux; " \
152 "setenv rdaddr - ; " \
153 "run mmcbootlinux; " \
158 #define CONFIG_BOOTCOMMAND \
159 "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
161 #endif /* __CONFIG_CM_T54_H */