blob: 0cd4aec7e2f89a6343e7d1e4b56d7126a8818cc8 [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
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030019#undef CONFIG_SPL_OS_BOOT
20
Dmitry Lifshitz0ff668f2014-07-31 14:30:41 +030021/* Enable Generic board */
22#define CONFIG_SYS_GENERIC_BOARD
23
Dmitry Lifshitz0cc0b242014-04-27 13:18:46 +030024/* Device Tree defines */
25#define CONFIG_OF_LIBFDT
26#define CONFIG_OF_BOARD_SETUP
27
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
Nikita Kiryanova8eeecb2014-08-20 15:08:52 +030032#define CONFIG_SYS_I2C_EEPROM_BUS 0
Dmitry Lifshitz0cc0b242014-04-27 13:18:46 +030033
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030034/* Enable SD/MMC CD and WP GPIOs */
35#define OMAP_HSMMC_USE_GPIO
36
37/* UART setup */
38#define CONFIG_CONS_INDEX 4
39#define CONFIG_SYS_NS16550_COM4 UART4_BASE
40#define CONFIG_BAUDRATE 115200
41
42/* SD/MMC RAW boot */
43#undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
44#undef CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS
45
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 */
48
49/* MMC ENV related defines */
50#undef CONFIG_ENV_OFFSET
51#undef CONFIG_ENV_SIZE
52
53#define CONFIG_ENV_IS_IN_MMC
54#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
Dmitry Lifshitzf0ead5d2014-04-27 13:18:48 +030055#define CONFIG_SYS_MMC_ENV_PART 0
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030056#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
60#define CONFIG_CMD_SAVEENV
61
62/* Enhance our eMMC support / experience. */
63#define CONFIG_HSMMC2_8BIT
64#define CONFIG_SUPPORT_EMMC_BOOT
65
Dmitry Lifshitz60f53fc2014-12-15 16:02:59 +020066/* SATA Boot related defines */
67#define CONFIG_SPL_SATA_SUPPORT
68#define CONFIG_SPL_SATA_BOOT_DEVICE 0
69#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1
70
71#define CONFIG_CMD_SCSI
72#define CONFIG_LIBATA
73#define CONFIG_SCSI_AHCI
74#define CONFIG_SCSI_AHCI_PLAT
75#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
76#define CONFIG_SYS_SCSI_MAX_LUN 1
77#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
78 CONFIG_SYS_SCSI_MAX_LUN)
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030079/* USB UHH support options */
80#define CONFIG_CMD_USB
81#define CONFIG_USB_HOST
82#define CONFIG_USB_EHCI
83#define CONFIG_USB_EHCI_OMAP
84#define CONFIG_USB_STORAGE
85#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
86#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
87
88#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */
89#define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */
90
91/* Enabled commands */
92#define CONFIG_CMD_DHCP /* DHCP Support */
93#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
94#define CONFIG_CMD_PING
95
96/* USB Networking options */
97#define CONFIG_USB_HOST_ETHER
98#define CONFIG_USB_ETHER_SMSC95XX
99#define CONFIG_USB_ETHER_RNDIS
100#define CONFIG_USB_ETHER_ASIX
101#define CONFIG_USB_ETHER_MCS7830
102
103/* Max time to hold reset on this board, see doc/README.omap-reset-time */
104#define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296
105
106/*
107 * Miscellaneous configurable options
108 */
109#undef CONFIG_SYS_AUTOLOAD
110#undef CONFIG_SYS_PROMPT
111#undef CONFIG_EXTRA_ENV_SETTINGS
112#undef CONFIG_BOOTCOMMAND
113#undef CONFIG_BOOTDELAY
114
115#define CONFIG_BOOTDELAY 3
116#define CONFIG_SYS_AUTOLOAD "no"
117#define CONFIG_SYS_PROMPT "CM-T54 # "
118
119#define CONFIG_EXTRA_ENV_SETTINGS \
120 DEFAULT_LINUX_BOOT_ENV \
121 "baudrate=115200\0" \
122 "bootdelay=3\0" \
123 "autoload=no\0" \
124 "bootscr=bootscr.img\0" \
125 "fdtfile=omap5-sbc-t54.dtb\0" \
126 "kernel=zImage-cm-t54\0" \
127 "ramdisk=ramdisk-cm-t54.img\0" \
128 "console=ttyO3\0" \
129 "ramdisksize=16384\0" \
130 "mmcdev=0\0" \
131 "mmcroot=/dev/mmcblk1p2\0" \
132 "mmcargs=setenv bootargs console=${console} " \
133 "root=${mmcroot} rw rootwait\0" \
134 "ramroot=/dev/ram0\0" \
135 "ramargs=setenv bootargs console=${console} " \
136 "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
137 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
138 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
139 "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
140 "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
141 "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
142 "source ${loadaddr}\0" \
143 "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
144 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
145 "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
146 "if run mmcloadbootscript; " \
147 "then run mmcbootscript; " \
148 "fi; " \
149 "if run mmcloadkernel; then " \
150 "if run mmcloadfdt; then " \
151 "if run mmcloadramdisk; then " \
152 "run ramargs; " \
153 "run mmcbootlinux; " \
154 "fi; " \
155 "run mmcargs; " \
156 "setenv rdaddr - ; " \
157 "run mmcbootlinux; " \
158 "fi; " \
159 "fi; " \
160 "fi;\0"
161
162#define CONFIG_BOOTCOMMAND \
163 "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
164
165#endif /* __CONFIG_CM_T54_H */