blob: 14042ada7d07373b5770ac0d3cdb8f9edae1783c [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 Lifshitz0cc0b242014-04-27 13:18:46 +030019/* EEPROM related defines */
20#define CONFIG_SYS_I2C_OMAP34XX
21#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
22#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
Nikita Kiryanova8eeecb2014-08-20 15:08:52 +030023#define CONFIG_SYS_I2C_EEPROM_BUS 0
Dmitry Lifshitz0cc0b242014-04-27 13:18:46 +030024
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030025/* Enable SD/MMC CD and WP GPIOs */
26#define OMAP_HSMMC_USE_GPIO
27
28/* UART setup */
29#define CONFIG_CONS_INDEX 4
30#define CONFIG_SYS_NS16550_COM4 UART4_BASE
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030031
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030032/* MMC ENV related defines */
33#undef CONFIG_ENV_OFFSET
34#undef CONFIG_ENV_SIZE
35
36#define CONFIG_ENV_IS_IN_MMC
37#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
Dmitry Lifshitzf0ead5d2014-04-27 13:18:48 +030038#define CONFIG_SYS_MMC_ENV_PART 0
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030039#define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */
40#define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
41#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
42#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030043
44/* Enhance our eMMC support / experience. */
45#define CONFIG_HSMMC2_8BIT
46#define CONFIG_SUPPORT_EMMC_BOOT
47
Dmitry Lifshitz60f53fc2014-12-15 16:02:59 +020048/* SATA Boot related defines */
Dmitry Lifshitz60f53fc2014-12-15 16:02:59 +020049#define CONFIG_SPL_SATA_BOOT_DEVICE 0
50#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1
51
Simon Glass8706b812016-05-01 11:36:02 -060052#define CONFIG_SCSI
Dmitry Lifshitz60f53fc2014-12-15 16:02:59 +020053#define CONFIG_LIBATA
54#define CONFIG_SCSI_AHCI
55#define CONFIG_SCSI_AHCI_PLAT
56#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
57#define CONFIG_SYS_SCSI_MAX_LUN 1
58#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
59 CONFIG_SYS_SCSI_MAX_LUN)
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030060/* USB UHH support options */
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030061#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
62#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
63
64#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */
65#define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */
66
67/* Enabled commands */
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030068
Nikita Kiryanov2ba4d142016-04-16 17:55:07 +030069/* EEPROM */
Nikita Kiryanov2ba4d142016-04-16 17:55:07 +030070#define CONFIG_ENV_EEPROM_IS_ON_I2C
71#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
72#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
73#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
74#define CONFIG_SYS_EEPROM_SIZE 256
75
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030076/* USB Networking options */
77#define CONFIG_USB_HOST_ETHER
78#define CONFIG_USB_ETHER_SMSC95XX
79#define CONFIG_USB_ETHER_RNDIS
80#define CONFIG_USB_ETHER_ASIX
81#define CONFIG_USB_ETHER_MCS7830
82
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030083/*
84 * Miscellaneous configurable options
85 */
86#undef CONFIG_SYS_AUTOLOAD
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030087#undef CONFIG_EXTRA_ENV_SETTINGS
88#undef CONFIG_BOOTCOMMAND
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030089
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030090#define CONFIG_SYS_AUTOLOAD "no"
Dmitry Lifshitzc3ad3a02014-05-19 12:50:54 +030091
92#define CONFIG_EXTRA_ENV_SETTINGS \
93 DEFAULT_LINUX_BOOT_ENV \
94 "baudrate=115200\0" \
95 "bootdelay=3\0" \
96 "autoload=no\0" \
97 "bootscr=bootscr.img\0" \
98 "fdtfile=omap5-sbc-t54.dtb\0" \
99 "kernel=zImage-cm-t54\0" \
100 "ramdisk=ramdisk-cm-t54.img\0" \
101 "console=ttyO3\0" \
102 "ramdisksize=16384\0" \
103 "mmcdev=0\0" \
104 "mmcroot=/dev/mmcblk1p2\0" \
105 "mmcargs=setenv bootargs console=${console} " \
106 "root=${mmcroot} rw rootwait\0" \
107 "ramroot=/dev/ram0\0" \
108 "ramargs=setenv bootargs console=${console} " \
109 "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
110 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
111 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
112 "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
113 "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
114 "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
115 "source ${loadaddr}\0" \
116 "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
117 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
118 "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
119 "if run mmcloadbootscript; " \
120 "then run mmcbootscript; " \
121 "fi; " \
122 "if run mmcloadkernel; then " \
123 "if run mmcloadfdt; then " \
124 "if run mmcloadramdisk; then " \
125 "run ramargs; " \
126 "run mmcbootlinux; " \
127 "fi; " \
128 "run mmcargs; " \
129 "setenv rdaddr - ; " \
130 "run mmcbootlinux; " \
131 "fi; " \
132 "fi; " \
133 "fi;\0"
134
135#define CONFIG_BOOTCOMMAND \
136 "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
137
138#endif /* __CONFIG_CM_T54_H */