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