blob: 9c70cf0b37b5b180b73fcbd9813c74fd7c008fb7 [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
Dmitry Lifshitz46650d52016-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 */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020018
19#define CONFIG_SYS_OMAP_ABE_SYSCK
20
21#include <configs/ti_omap5_common.h>
22
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020023/* misc */
24#define CONFIG_MISC_INIT_R
25#define CONFIG_REVISION_TAG
26
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020027/* PMIC I2C bus number */
28#define CONFIG_SYS_SPD_BUS_NUM 3
29
30/* SPI Flash support */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020031#define CONFIG_TI_SPI_MMAP
32#define CONFIG_SF_DEFAULT_SPEED 48000000
33#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
34
35/* SPI SPL defines */
36/* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
37#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
38#define CONFIG_SPL_SPI_SUPPORT
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020039
Uri Mashiach5c291be2017-05-17 17:29:25 +030040/* SD/MMC RAW/FS boot */
41#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
42#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020043
44/* Environment */
45#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020046
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020047#define CONFIG_ENV_SECT_SIZE (64 * 1024)
48#define CONFIG_ENV_OFFSET (768 * 1024)
49#define CONFIG_ENV_SPI_MAX_HZ 48000000
50
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020051/* EEPROM */
52#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
53#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
54#define CONFIG_SYS_I2C_EEPROM_BUS 3
55
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020056#define CONFIG_ENV_EEPROM_IS_ON_I2C
57#define CONFIG_SYS_EEPROM_SIZE 256
58
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020059#ifndef CONFIG_SPL_BUILD
60/* SATA */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020061#define CONFIG_SCSI_AHCI_PLAT
62#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
63#define CONFIG_SYS_SCSI_MAX_LUN 1
64#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
65 CONFIG_SYS_SCSI_MAX_LUN)
66/* PCA9555 GPIO expander support */
67#define CONFIG_PCA953X
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020068#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20
69#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} }
70
Uri Mashiache6272902017-02-23 15:39:39 +020071#endif /* !CONFIG_SPL_BUILD */
72
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020073/* USB xHCI HOST */
74#define CONFIG_USB_XHCI_OMAP
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020075
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020076#define CONFIG_OMAP_USB3PHY1_HOST
77
78/* USB Networking options */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020079
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020080/* CPSW Ethernet */
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020081#define CONFIG_MII
82#define CONFIG_BOOTP_DEFAULT
83#define CONFIG_BOOTP_SEND_HOSTNAME
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020084#define CONFIG_PHY_ATHEROS
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020085#define CONFIG_SYS_RX_ETH_BUFFER 64
86#define PHY_ANEG_TIMEOUT 8000
87
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020088#define CONFIG_BOOTP_DNS2
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020089#define CONFIG_NET_RETRY_COUNT 10
90
Uri Mashiach99b02b42016-12-28 18:28:36 +020091/* Default environment */
92#undef CONFIG_EXTRA_ENV_SETTINGS
93#define CONFIG_EXTRA_ENV_SETTINGS \
94 DEFAULT_LINUX_BOOT_ENV \
95 "autoload=no\0" \
96 "baudrate=115200\0" \
97 "console=ttyO2,115200n8\0" \
98 "bootdelay=3\0" \
99 "fdtfile=am57xx-sbc-am57x.dtb\0" \
100 "kernel=zImage-cl-som-am57x\0" \
101 "bootscr=bootscr.img\0" \
102 "displaytype=hdmi\0" \
103 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
104 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
105 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
Uri Mashiachdbf05182017-05-17 17:29:28 +0300106 "emmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
107 "emmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
Uri Mashiach99b02b42016-12-28 18:28:36 +0200108 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
Uri Mashiachdbf05182017-05-17 17:29:28 +0300109 "run mmcloadkernel && run mmcloadfdt\0" \
Uri Mashiach99b02b42016-12-28 18:28:36 +0200110 "mmcroot=/dev/mmcblk1p2\0" \
111 "mmcrootfstype=ext4 rw rootwait\0" \
112 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
113 "rootfstype=${mmcrootfstype}\0" \
114 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
115 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
116 "echo Running bootscript from MMC/SD Card ... && " \
117 "source ${loadaddr}\0" \
118 "mmcboot=setenv mmcdev 0 && run load_mmc && " \
119 "run mmcargs && echo Booting from MMC/SD Card ... && " \
120 "run bootkernel\0" \
121 "emmcroot=/dev/mmcblk0p2\0" \
122 "emmcrootfstype=ext4 rw rootwait\0" \
123 "emmcargs=setenv bootargs console=${console} " \
124 "root=${emmcroot} " \
125 "rootfstype=${emmcrootfstype}\0" \
126 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
127 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
128 "echo Running bootscript from eMMC ... && " \
129 "source ${loadaddr}\0" \
130 "emmcboot=setenv mmcdev 1 && run load_mmc && " \
131 "run emmcargs && echo Booting from eMMC ... && " \
132 "run bootkernel\0" \
133 "sataroot=/dev/sda2\0" \
134 "satarootfstype=ext4 rw rootwait\0" \
135 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
136 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
137 "sataargs=setenv bootargs console=${console} " \
138 "root=${sataroot} " \
139 "rootfstype=${satarootfstype}\0" \
140 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
141 "echo Running bootscript from SATA ... && " \
142 "source ${loadaddr}\0" \
143 "sataboot=run load_sata && run sataargs && " \
144 "echo Booting from SATA ... && " \
Uri Mashiachdbf05182017-05-17 17:29:28 +0300145 "run bootkernel\0"
Uri Mashiach99b02b42016-12-28 18:28:36 +0200146
147#undef CONFIG_BOOTCOMMAND
148#define CONFIG_BOOTCOMMAND \
149 "run mmcbootscript || run mmcboot || " \
150 "run satabootscript || run sataboot || " \
151 "run emmcbootscript || run emmcboot"
152
153
Dmitry Lifshitz46650d52016-12-28 18:28:33 +0200154#endif /* __CONFIG_CL_SOM_AM57X_H */