blob: feae29d145c0a3aa3a0d04e8a3232c3aa2e74daf [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 Lifshitza9375f32014-04-27 13:18:46 +030019/* EEPROM related defines */
Dmitry Lifshitza9375f32014-04-27 13:18:46 +030020#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
21#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
Nikita Kiryanov52658fd2014-08-20 15:08:52 +030022#define CONFIG_SYS_I2C_EEPROM_BUS 0
Dmitry Lifshitza9375f32014-04-27 13:18:46 +030023
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030024/* Enable SD/MMC CD and WP GPIOs */
25#define OMAP_HSMMC_USE_GPIO
26
27/* UART setup */
28#define CONFIG_CONS_INDEX 4
29#define CONFIG_SYS_NS16550_COM4 UART4_BASE
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030030
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030031/* MMC ENV related defines */
32#undef CONFIG_ENV_OFFSET
33#undef CONFIG_ENV_SIZE
34
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030035#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
Dmitry Lifshitz1c8c36f2014-04-27 13:18:48 +030036#define CONFIG_SYS_MMC_ENV_PART 0
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030037#define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */
38#define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
39#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
40#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030041
42/* Enhance our eMMC support / experience. */
43#define CONFIG_HSMMC2_8BIT
44#define CONFIG_SUPPORT_EMMC_BOOT
45
Dmitry Lifshitz96b5bf12014-12-15 16:02:59 +020046/* SATA Boot related defines */
Dmitry Lifshitz96b5bf12014-12-15 16:02:59 +020047#define CONFIG_SPL_SATA_BOOT_DEVICE 0
48#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1
49
Dmitry Lifshitz96b5bf12014-12-15 16:02:59 +020050#define CONFIG_LIBATA
51#define CONFIG_SCSI_AHCI
52#define CONFIG_SCSI_AHCI_PLAT
53#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
54#define CONFIG_SYS_SCSI_MAX_LUN 1
55#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
56 CONFIG_SYS_SCSI_MAX_LUN)
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030057/* USB UHH support options */
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030058#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
59
60#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 76 /* HSIC2 HUB #RESET */
61#define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 83 /* HSIC3 ETH #RESET */
62
63/* Enabled commands */
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030064
Nikita Kiryanov66b7e422016-04-16 17:55:07 +030065/* EEPROM */
Nikita Kiryanov66b7e422016-04-16 17:55:07 +030066#define CONFIG_ENV_EEPROM_IS_ON_I2C
67#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
68#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
69#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
70#define CONFIG_SYS_EEPROM_SIZE 256
71
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030072/* USB Networking options */
73#define CONFIG_USB_HOST_ETHER
74#define CONFIG_USB_ETHER_SMSC95XX
75#define CONFIG_USB_ETHER_RNDIS
76#define CONFIG_USB_ETHER_ASIX
77#define CONFIG_USB_ETHER_MCS7830
78
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030079/*
80 * Miscellaneous configurable options
81 */
82#undef CONFIG_SYS_AUTOLOAD
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030083#undef CONFIG_EXTRA_ENV_SETTINGS
84#undef CONFIG_BOOTCOMMAND
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030085
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030086#define CONFIG_SYS_AUTOLOAD "no"
Dmitry Lifshitz076446f2014-05-19 12:50:54 +030087
88#define CONFIG_EXTRA_ENV_SETTINGS \
89 DEFAULT_LINUX_BOOT_ENV \
90 "baudrate=115200\0" \
91 "bootdelay=3\0" \
92 "autoload=no\0" \
93 "bootscr=bootscr.img\0" \
94 "fdtfile=omap5-sbc-t54.dtb\0" \
95 "kernel=zImage-cm-t54\0" \
96 "ramdisk=ramdisk-cm-t54.img\0" \
97 "console=ttyO3\0" \
98 "ramdisksize=16384\0" \
99 "mmcdev=0\0" \
100 "mmcroot=/dev/mmcblk1p2\0" \
101 "mmcargs=setenv bootargs console=${console} " \
102 "root=${mmcroot} rw rootwait\0" \
103 "ramroot=/dev/ram0\0" \
104 "ramargs=setenv bootargs console=${console} " \
105 "root=${ramroot} ramdisk_size=${ramdisksize} rw\0" \
106 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
107 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
108 "mmcloadramdisk=load mmc ${mmcdev} ${rdaddr} ${ramdisk}\0" \
109 "mmcloadbootscript=load mmc ${mmcdev} ${loadaddr} ${bootsrc}\0" \
110 "mmcbootscript=echo Running bootscript from mmc${mmcdev}...; " \
111 "source ${loadaddr}\0" \
112 "mmcbootlinux=echo Booting from mmc${mmcdev} ...; " \
113 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
114 "mmcboot=if mmc dev ${mmcdev} && mmc rescan; then " \
115 "if run mmcloadbootscript; " \
116 "then run mmcbootscript; " \
117 "fi; " \
118 "if run mmcloadkernel; then " \
119 "if run mmcloadfdt; then " \
120 "if run mmcloadramdisk; then " \
121 "run ramargs; " \
122 "run mmcbootlinux; " \
123 "fi; " \
124 "run mmcargs; " \
125 "setenv rdaddr - ; " \
126 "run mmcbootlinux; " \
127 "fi; " \
128 "fi; " \
129 "fi;\0"
130
131#define CONFIG_BOOTCOMMAND \
132 "bootcmd=run mmcboot || setenv mmcdev 1; setenv mmcroot /dev/mmcblk0p2; run mmcboot;"
133
134#endif /* __CONFIG_CM_T54_H */