blob: 8297182a6c77352439af7dc3af22c8b6ffc9a680 [file] [log] [blame]
Dmitry Lifshitz46650d52016-12-28 18:28:33 +02001/*
2 * Configuration settings for CompuLab CL-SOM-AM57x board
3 *
4 * (C) Copyright 2016 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_CL_SOM_AM57X_H
12#define __CONFIG_CL_SOM_AM57X_H
13
14#define CONFIG_DRA7XX
15
16#define CONFIG_NR_DRAM_BANKS 2
17
18#define CONSOLEDEV "ttyO2"
19#define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
20#define CONFIG_CONS_INDEX 3
21#define CONFIG_BAUDRATE 115200
22
23#define CONFIG_SYS_OMAP_ABE_SYSCK
24
25#include <configs/ti_omap5_common.h>
26
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020027/* misc */
28#define CONFIG_MISC_INIT_R
29#define CONFIG_REVISION_TAG
30
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020031/* Status LED */
32#define CONFIG_STATUS_LED /* Status LED enabled */
33#define CONFIG_GPIO_LED
34#define CONFIG_BOARD_SPECIFIC_LED
35#define GREEN_LED_DEV 0
36 /* cl_som_am57x Green LED is GPIO2_5 */
37#define GREEN_LED_GPIO 37
38#define STATUS_LED_BIT GREEN_LED_GPIO
39#define STATUS_LED_STATE STATUS_LED_ON
40#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
41
42/* PMIC I2C bus number */
43#define CONFIG_SYS_SPD_BUS_NUM 3
44
45/* SPI Flash support */
46#undef CONFIG_OMAP3_SPI
47
48#define CONFIG_TI_SPI_MMAP
49#define CONFIG_SF_DEFAULT_SPEED 48000000
50#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
51
52/* SPI SPL defines */
53/* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
54#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
55#define CONFIG_SPL_SPI_SUPPORT
56#define CONFIG_SPL_SPI_FLASH_SUPPORT
57#define CONFIG_SPL_SPI_LOAD
58
59/* SD/MMC RAW boot */
60#undef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
61#undef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
62
63/* Environment */
64#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */
65#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
66
67#define CONFIG_ENV_IS_IN_SPI_FLASH
68#define CONFIG_ENV_SECT_SIZE (64 * 1024)
69#define CONFIG_ENV_OFFSET (768 * 1024)
70#define CONFIG_ENV_SPI_MAX_HZ 48000000
71
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020072/* EEPROM */
73#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
74#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
75#define CONFIG_SYS_I2C_EEPROM_BUS 3
76
77#define CONFIG_CMD_EEPROM
78#define CONFIG_CMD_EEPROM_LAYOUT
79#define CONFIG_ENV_EEPROM_IS_ON_I2C
80#define CONFIG_SYS_EEPROM_SIZE 256
81
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020082#ifndef CONFIG_SPL_BUILD
83/* SATA */
84#define CONFIG_CMD_SCSI
85#define CONFIG_LIBATA
86#define CONFIG_SCSI_AHCI
87#define CONFIG_SCSI_AHCI_PLAT
88#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
89#define CONFIG_SYS_SCSI_MAX_LUN 1
90#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
91 CONFIG_SYS_SCSI_MAX_LUN)
92/* PCA9555 GPIO expander support */
93#define CONFIG_PCA953X
94#define CONFIG_CMD_PCA953X
95#define CONFIG_CMD_PCA953X_INFO
96#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20
97#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} }
98
99/* GPT */
100#define CONFIG_CMD_GPT
101#define CONFIG_EFI_PARTITION
102
103/* USB xHCI HOST */
104#define CONFIG_USB_XHCI_OMAP
105#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
106
107#define CONFIG_OMAP_USB_PHY
108#define CONFIG_OMAP_USB3PHY1_HOST
109
110/* USB Networking options */
111#define CONFIG_USB_HOST_ETHER
112#define CONFIG_USB_ETHER_SMSC95XX
113#define CONFIG_USB_ETHER_RNDIS
114#define CONFIG_USB_ETHER_ASIX
115#define CONFIG_USB_ETHER_MCS7830
116
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +0200117/* CPSW Ethernet */
118#define CONFIG_DRIVER_TI_CPSW
119#define CONFIG_MII
120#define CONFIG_BOOTP_DEFAULT
121#define CONFIG_BOOTP_SEND_HOSTNAME
122#define CONFIG_BOOTP_GATEWAY
123#define CONFIG_PHY_GIGE
124#define CONFIG_PHY_ATHEROS
125#define CONFIG_PHYLIB
126#define CONFIG_SYS_RX_ETH_BUFFER 64
127#define PHY_ANEG_TIMEOUT 8000
128
129#define CONFIG_BOOTP_DNS
130#define CONFIG_BOOTP_DNS2
131#define CONFIG_BOOTP_SUBNETMASK
132#define CONFIG_NET_RETRY_COUNT 10
133
Dmitry Lifshitz46650d52016-12-28 18:28:33 +0200134#endif /* !CONFIG_SPL_BUILD */
135
Uri Mashiach99b02b42016-12-28 18:28:36 +0200136/* Default environment */
137#undef CONFIG_EXTRA_ENV_SETTINGS
138#define CONFIG_EXTRA_ENV_SETTINGS \
139 DEFAULT_LINUX_BOOT_ENV \
140 "autoload=no\0" \
141 "baudrate=115200\0" \
142 "console=ttyO2,115200n8\0" \
143 "bootdelay=3\0" \
144 "fdtfile=am57xx-sbc-am57x.dtb\0" \
145 "kernel=zImage-cl-som-am57x\0" \
146 "bootscr=bootscr.img\0" \
147 "displaytype=hdmi\0" \
148 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
149 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
150 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
151 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
152 "run mmcloadkernel run mmcloadfdt\0" \
153 "mmcroot=/dev/mmcblk1p2\0" \
154 "mmcrootfstype=ext4 rw rootwait\0" \
155 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
156 "rootfstype=${mmcrootfstype}\0" \
157 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
158 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
159 "echo Running bootscript from MMC/SD Card ... && " \
160 "source ${loadaddr}\0" \
161 "mmcboot=setenv mmcdev 0 && run load_mmc && " \
162 "run mmcargs && echo Booting from MMC/SD Card ... && " \
163 "run bootkernel\0" \
164 "emmcroot=/dev/mmcblk0p2\0" \
165 "emmcrootfstype=ext4 rw rootwait\0" \
166 "emmcargs=setenv bootargs console=${console} " \
167 "root=${emmcroot} " \
168 "rootfstype=${emmcrootfstype}\0" \
169 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
170 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
171 "echo Running bootscript from eMMC ... && " \
172 "source ${loadaddr}\0" \
173 "emmcboot=setenv mmcdev 1 && run load_mmc && " \
174 "run emmcargs && echo Booting from eMMC ... && " \
175 "run bootkernel\0" \
176 "sataroot=/dev/sda2\0" \
177 "satarootfstype=ext4 rw rootwait\0" \
178 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
179 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
180 "sataargs=setenv bootargs console=${console} " \
181 "root=${sataroot} " \
182 "rootfstype=${satarootfstype}\0" \
183 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
184 "echo Running bootscript from SATA ... && " \
185 "source ${loadaddr}\0" \
186 "sataboot=run load_sata && run sataargs && " \
187 "echo Booting from SATA ... && " \
188 "run bootkernel\0" \
189
190#undef CONFIG_BOOTCOMMAND
191#define CONFIG_BOOTCOMMAND \
192 "run mmcbootscript || run mmcboot || " \
193 "run satabootscript || run sataboot || " \
194 "run emmcbootscript || run emmcboot"
195
196
Dmitry Lifshitz46650d52016-12-28 18:28:33 +0200197#endif /* __CONFIG_CL_SOM_AM57X_H */