blob: a4950f39e3a803e2e4f513c8c3153e2294d3c961 [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
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020021
22#define CONFIG_SYS_OMAP_ABE_SYSCK
23
24#include <configs/ti_omap5_common.h>
25
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020026/* misc */
27#define CONFIG_MISC_INIT_R
28#define CONFIG_REVISION_TAG
29
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020030/* PMIC I2C bus number */
31#define CONFIG_SYS_SPD_BUS_NUM 3
32
33/* SPI Flash support */
34#undef CONFIG_OMAP3_SPI
35
36#define CONFIG_TI_SPI_MMAP
37#define CONFIG_SF_DEFAULT_SPEED 48000000
38#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
39
40/* SPI SPL defines */
41/* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
42#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
43#define CONFIG_SPL_SPI_SUPPORT
44#define CONFIG_SPL_SPI_FLASH_SUPPORT
45#define CONFIG_SPL_SPI_LOAD
46
47/* SD/MMC RAW boot */
48#undef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
49#undef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
50
51/* Environment */
52#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */
53#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
54
55#define CONFIG_ENV_IS_IN_SPI_FLASH
56#define CONFIG_ENV_SECT_SIZE (64 * 1024)
57#define CONFIG_ENV_OFFSET (768 * 1024)
58#define CONFIG_ENV_SPI_MAX_HZ 48000000
59
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020060/* EEPROM */
61#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
62#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
63#define CONFIG_SYS_I2C_EEPROM_BUS 3
64
65#define CONFIG_CMD_EEPROM
66#define CONFIG_CMD_EEPROM_LAYOUT
67#define CONFIG_ENV_EEPROM_IS_ON_I2C
68#define CONFIG_SYS_EEPROM_SIZE 256
69
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020070#ifndef CONFIG_SPL_BUILD
71/* SATA */
72#define CONFIG_CMD_SCSI
73#define CONFIG_LIBATA
74#define CONFIG_SCSI_AHCI
75#define CONFIG_SCSI_AHCI_PLAT
76#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
77#define CONFIG_SYS_SCSI_MAX_LUN 1
78#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
79 CONFIG_SYS_SCSI_MAX_LUN)
80/* PCA9555 GPIO expander support */
81#define CONFIG_PCA953X
82#define CONFIG_CMD_PCA953X
83#define CONFIG_CMD_PCA953X_INFO
84#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20
85#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} }
86
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020087/* USB xHCI HOST */
88#define CONFIG_USB_XHCI_OMAP
89#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
90
91#define CONFIG_OMAP_USB_PHY
92#define CONFIG_OMAP_USB3PHY1_HOST
93
94/* USB Networking options */
95#define CONFIG_USB_HOST_ETHER
96#define CONFIG_USB_ETHER_SMSC95XX
97#define CONFIG_USB_ETHER_RNDIS
98#define CONFIG_USB_ETHER_ASIX
99#define CONFIG_USB_ETHER_MCS7830
100
Uri Mashiach9b6ef522017-01-23 13:14:18 +0200101#endif /* !CONFIG_SPL_BUILD */
102
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +0200103/* CPSW Ethernet */
104#define CONFIG_DRIVER_TI_CPSW
105#define CONFIG_MII
106#define CONFIG_BOOTP_DEFAULT
107#define CONFIG_BOOTP_SEND_HOSTNAME
108#define CONFIG_BOOTP_GATEWAY
109#define CONFIG_PHY_GIGE
110#define CONFIG_PHY_ATHEROS
111#define CONFIG_PHYLIB
112#define CONFIG_SYS_RX_ETH_BUFFER 64
113#define PHY_ANEG_TIMEOUT 8000
114
115#define CONFIG_BOOTP_DNS
116#define CONFIG_BOOTP_DNS2
117#define CONFIG_BOOTP_SUBNETMASK
118#define CONFIG_NET_RETRY_COUNT 10
119
Uri Mashiach99b02b42016-12-28 18:28:36 +0200120/* Default environment */
121#undef CONFIG_EXTRA_ENV_SETTINGS
122#define CONFIG_EXTRA_ENV_SETTINGS \
123 DEFAULT_LINUX_BOOT_ENV \
124 "autoload=no\0" \
125 "baudrate=115200\0" \
126 "console=ttyO2,115200n8\0" \
127 "bootdelay=3\0" \
128 "fdtfile=am57xx-sbc-am57x.dtb\0" \
129 "kernel=zImage-cl-som-am57x\0" \
130 "bootscr=bootscr.img\0" \
131 "displaytype=hdmi\0" \
132 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
133 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
134 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
135 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
136 "run mmcloadkernel run mmcloadfdt\0" \
137 "mmcroot=/dev/mmcblk1p2\0" \
138 "mmcrootfstype=ext4 rw rootwait\0" \
139 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
140 "rootfstype=${mmcrootfstype}\0" \
141 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
142 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
143 "echo Running bootscript from MMC/SD Card ... && " \
144 "source ${loadaddr}\0" \
145 "mmcboot=setenv mmcdev 0 && run load_mmc && " \
146 "run mmcargs && echo Booting from MMC/SD Card ... && " \
147 "run bootkernel\0" \
148 "emmcroot=/dev/mmcblk0p2\0" \
149 "emmcrootfstype=ext4 rw rootwait\0" \
150 "emmcargs=setenv bootargs console=${console} " \
151 "root=${emmcroot} " \
152 "rootfstype=${emmcrootfstype}\0" \
153 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
154 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
155 "echo Running bootscript from eMMC ... && " \
156 "source ${loadaddr}\0" \
157 "emmcboot=setenv mmcdev 1 && run load_mmc && " \
158 "run emmcargs && echo Booting from eMMC ... && " \
159 "run bootkernel\0" \
160 "sataroot=/dev/sda2\0" \
161 "satarootfstype=ext4 rw rootwait\0" \
162 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
163 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
164 "sataargs=setenv bootargs console=${console} " \
165 "root=${sataroot} " \
166 "rootfstype=${satarootfstype}\0" \
167 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
168 "echo Running bootscript from SATA ... && " \
169 "source ${loadaddr}\0" \
170 "sataboot=run load_sata && run sataargs && " \
171 "echo Booting from SATA ... && " \
172 "run bootkernel\0" \
173
174#undef CONFIG_BOOTCOMMAND
175#define CONFIG_BOOTCOMMAND \
176 "run mmcbootscript || run mmcboot || " \
177 "run satabootscript || run sataboot || " \
178 "run emmcbootscript || run emmcboot"
179
180
Dmitry Lifshitz46650d52016-12-28 18:28:33 +0200181#endif /* __CONFIG_CL_SOM_AM57X_H */