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