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_MISC_INIT_R
20 #undef CONFIG_SPL_OS_BOOT
22 /* Device Tree defines */
23 #define CONFIG_OF_LIBFDT
24 #define CONFIG_OF_BOARD_SETUP
26 /* EEPROM related defines */
27 #define CONFIG_SYS_I2C_OMAP34XX
28 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
29 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
31 /* Enable SD/MMC CD and WP GPIOs */
32 #define OMAP_HSMMC_USE_GPIO
35 #define CONFIG_CONS_INDEX 4
36 #define CONFIG_SYS_NS16550_COM4 UART4_BASE
37 #define CONFIG_BAUDRATE 115200
40 #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
41 #undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS
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 */
46 /* MMC ENV related defines */
47 #undef CONFIG_ENV_OFFSET
48 #undef CONFIG_ENV_SIZE
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 #define CONFIG_CMD_SAVEENV
59 /* Enhance our eMMC support / experience. */
60 #define CONFIG_HSMMC2_8BIT
61 #define CONFIG_SUPPORT_EMMC_BOOT
63 /* USB UHH support options */
64 #define CONFIG_CMD_USB
65 #define CONFIG_USB_HOST
66 #define CONFIG_USB_EHCI
67 #define CONFIG_USB_EHCI_OMAP
68 #define CONFIG_USB_STORAGE
69 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
70 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
72 #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */
73 #define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */
75 /* Enabled commands */
76 #define CONFIG_CMD_DHCP /* DHCP Support */
77 #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
78 #define CONFIG_CMD_PING
80 /* USB Networking options */
81 #define CONFIG_USB_HOST_ETHER
82 #define CONFIG_USB_ETHER_SMSC95XX
83 #define CONFIG_USB_ETHER_RNDIS
84 #define CONFIG_USB_ETHER_ASIX
85 #define CONFIG_USB_ETHER_MCS7830
87 /* Max time to hold reset on this board, see doc/README.omap-reset-time */
88 #define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296
91 * Miscellaneous configurable options
93 #undef CONFIG_SYS_AUTOLOAD
94 #undef CONFIG_SYS_PROMPT
95 #undef CONFIG_EXTRA_ENV_SETTINGS
96 #undef CONFIG_BOOTCOMMAND
97 #undef CONFIG_BOOTDELAY
99 #define CONFIG_BOOTDELAY 3
100 #define CONFIG_SYS_AUTOLOAD "no"
101 #define CONFIG_SYS_PROMPT "CM-T54 # "
103 #define CONFIG_EXTRA_ENV_SETTINGS \
104 DEFAULT_LINUX_BOOT_ENV \
105 "baudrate=115200\0" \
108 "bootscr=bootscr.img\0" \
109 "fdtfile=omap5-sbc-t54.dtb\0" \
110 "kernel=zImage-cm-t54\0" \
111 "ramdisk=ramdisk-cm-t54.img\0" \
113 "ramdisksize=16384\0" \
115 "mmcroot=/dev/mmcblk1p2\0" \
116 "mmcargs=setenv bootargs console=${console} " \
117 "root=${mmcroot} rw rootwait\0" \
118 "ramroot=/dev/ram0\0" \
119 "ramargs=setenv bootargs console=${console} " \
120 "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
121 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
122 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
123 "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
124 "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
125 "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
126 "source ${loadaddr}\0" \
127 "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
128 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
129 "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
130 "if run mmcloadbootscript; " \
131 "then run mmcbootscript; " \
133 "if run mmcloadkernel; then " \
134 "if run mmcloadfdt; then " \
135 "if run mmcloadramdisk; then " \
137 "run mmcbootlinux; " \
140 "setenv rdaddr - ; " \
141 "run mmcbootlinux; " \
146 #define CONFIG_BOOTCOMMAND \
147 "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
149 #endif /* __CONFIG_CM_T54_H */