blob: 30004535632a16f527052e13efdb08de46182e09 [file] [log] [blame]
Dmitry Lifshitz10a59d02016-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
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020014#define CONFIG_NR_DRAM_BANKS 2
15
16#define CONSOLEDEV "ttyO2"
17#define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
18#define CONFIG_CONS_INDEX 3
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020019
20#define CONFIG_SYS_OMAP_ABE_SYSCK
21
22#include <configs/ti_omap5_common.h>
23
Dmitry Lifshitz39f9cf02016-12-28 18:28:34 +020024/* misc */
25#define CONFIG_MISC_INIT_R
26#define CONFIG_REVISION_TAG
27
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020028/* PMIC I2C bus number */
29#define CONFIG_SYS_SPD_BUS_NUM 3
30
31/* SPI Flash support */
32#undef CONFIG_OMAP3_SPI
33
34#define CONFIG_TI_SPI_MMAP
35#define CONFIG_SF_DEFAULT_SPEED 48000000
36#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
37
38/* SPI SPL defines */
39/* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
40#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
41#define CONFIG_SPL_SPI_SUPPORT
42#define CONFIG_SPL_SPI_FLASH_SUPPORT
43#define CONFIG_SPL_SPI_LOAD
44
45/* SD/MMC RAW boot */
46#undef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
47#undef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
48
49/* Environment */
50#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */
51#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
52
53#define CONFIG_ENV_IS_IN_SPI_FLASH
54#define CONFIG_ENV_SECT_SIZE (64 * 1024)
55#define CONFIG_ENV_OFFSET (768 * 1024)
56#define CONFIG_ENV_SPI_MAX_HZ 48000000
57
Dmitry Lifshitz39f9cf02016-12-28 18:28:34 +020058/* EEPROM */
59#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
60#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
61#define CONFIG_SYS_I2C_EEPROM_BUS 3
62
63#define CONFIG_CMD_EEPROM
64#define CONFIG_CMD_EEPROM_LAYOUT
65#define CONFIG_ENV_EEPROM_IS_ON_I2C
66#define CONFIG_SYS_EEPROM_SIZE 256
67
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020068#ifndef CONFIG_SPL_BUILD
69/* SATA */
70#define CONFIG_CMD_SCSI
71#define CONFIG_LIBATA
72#define CONFIG_SCSI_AHCI
73#define CONFIG_SCSI_AHCI_PLAT
74#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
75#define CONFIG_SYS_SCSI_MAX_LUN 1
76#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
77 CONFIG_SYS_SCSI_MAX_LUN)
78/* PCA9555 GPIO expander support */
79#define CONFIG_PCA953X
80#define CONFIG_CMD_PCA953X
81#define CONFIG_CMD_PCA953X_INFO
82#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20
83#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} }
84
Uri Mashiachdcb93a52017-02-23 15:39:39 +020085#endif /* !CONFIG_SPL_BUILD */
86
Dmitry Lifshitz10a59d02016-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
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +0200101/* CPSW Ethernet */
102#define CONFIG_DRIVER_TI_CPSW
103#define CONFIG_MII
104#define CONFIG_BOOTP_DEFAULT
105#define CONFIG_BOOTP_SEND_HOSTNAME
106#define CONFIG_BOOTP_GATEWAY
107#define CONFIG_PHY_GIGE
108#define CONFIG_PHY_ATHEROS
109#define CONFIG_PHYLIB
110#define CONFIG_SYS_RX_ETH_BUFFER 64
111#define PHY_ANEG_TIMEOUT 8000
112
113#define CONFIG_BOOTP_DNS
114#define CONFIG_BOOTP_DNS2
115#define CONFIG_BOOTP_SUBNETMASK
116#define CONFIG_NET_RETRY_COUNT 10
117
Uri Mashiach30a67122016-12-28 18:28:36 +0200118/* Default environment */
119#undef CONFIG_EXTRA_ENV_SETTINGS
120#define CONFIG_EXTRA_ENV_SETTINGS \
121 DEFAULT_LINUX_BOOT_ENV \
122 "autoload=no\0" \
123 "baudrate=115200\0" \
124 "console=ttyO2,115200n8\0" \
125 "bootdelay=3\0" \
126 "fdtfile=am57xx-sbc-am57x.dtb\0" \
127 "kernel=zImage-cl-som-am57x\0" \
128 "bootscr=bootscr.img\0" \
129 "displaytype=hdmi\0" \
130 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
131 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
132 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
133 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
134 "run mmcloadkernel run mmcloadfdt\0" \
135 "mmcroot=/dev/mmcblk1p2\0" \
136 "mmcrootfstype=ext4 rw rootwait\0" \
137 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
138 "rootfstype=${mmcrootfstype}\0" \
139 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
140 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
141 "echo Running bootscript from MMC/SD Card ... && " \
142 "source ${loadaddr}\0" \
143 "mmcboot=setenv mmcdev 0 && run load_mmc && " \
144 "run mmcargs && echo Booting from MMC/SD Card ... && " \
145 "run bootkernel\0" \
146 "emmcroot=/dev/mmcblk0p2\0" \
147 "emmcrootfstype=ext4 rw rootwait\0" \
148 "emmcargs=setenv bootargs console=${console} " \
149 "root=${emmcroot} " \
150 "rootfstype=${emmcrootfstype}\0" \
151 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
152 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
153 "echo Running bootscript from eMMC ... && " \
154 "source ${loadaddr}\0" \
155 "emmcboot=setenv mmcdev 1 && run load_mmc && " \
156 "run emmcargs && echo Booting from eMMC ... && " \
157 "run bootkernel\0" \
158 "sataroot=/dev/sda2\0" \
159 "satarootfstype=ext4 rw rootwait\0" \
160 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
161 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
162 "sataargs=setenv bootargs console=${console} " \
163 "root=${sataroot} " \
164 "rootfstype=${satarootfstype}\0" \
165 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
166 "echo Running bootscript from SATA ... && " \
167 "source ${loadaddr}\0" \
168 "sataboot=run load_sata && run sataargs && " \
169 "echo Booting from SATA ... && " \
170 "run bootkernel\0" \
171
172#undef CONFIG_BOOTCOMMAND
173#define CONFIG_BOOTCOMMAND \
174 "run mmcbootscript || run mmcboot || " \
175 "run satabootscript || run sataboot || " \
176 "run emmcbootscript || run emmcboot"
177
178
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +0200179#endif /* __CONFIG_CL_SOM_AM57X_H */