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