blob: f0e1e8280c190ddae02ff23904552d966f993f21 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +02002/*
3 * Configuration settings for CompuLab CL-SOM-AM57x board
4 *
5 * (C) Copyright 2016 CompuLab, Ltd. http://compulab.co.il/
6 *
7 * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
Dmitry Lifshitz46650d52016-12-28 18:28:33 +02008 */
9
10#ifndef __CONFIG_CL_SOM_AM57X_H
11#define __CONFIG_CL_SOM_AM57X_H
12
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020013#define CONFIG_NR_DRAM_BANKS 2
14
15#define CONSOLEDEV "ttyO2"
16#define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020017
18#define CONFIG_SYS_OMAP_ABE_SYSCK
19
Sam Protsenkoc90a7602018-04-19 23:57:30 +030020#define PARTS_DEFAULT
21
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020022#include <configs/ti_omap5_common.h>
23
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020024/* misc */
25#define CONFIG_MISC_INIT_R
26#define CONFIG_REVISION_TAG
27
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020028/* PMIC I2C bus number */
29#define CONFIG_SYS_SPD_BUS_NUM 3
30
31/* SPI Flash support */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020032#define CONFIG_TI_SPI_MMAP
33#define CONFIG_SF_DEFAULT_SPEED 48000000
34#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
35
36/* SPI SPL defines */
37/* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
38#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
39#define CONFIG_SPL_SPI_SUPPORT
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020040
Uri Mashiach5c291be2017-05-17 17:29:25 +030041/* SD/MMC RAW/FS boot */
42#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
43#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020044
45/* Environment */
46#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020047
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020048#define CONFIG_ENV_SECT_SIZE (64 * 1024)
49#define CONFIG_ENV_OFFSET (768 * 1024)
50#define CONFIG_ENV_SPI_MAX_HZ 48000000
51
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020052/* EEPROM */
53#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
54#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
55#define CONFIG_SYS_I2C_EEPROM_BUS 3
56
Dmitry Lifshitz965c5092016-12-28 18:28:34 +020057#define CONFIG_ENV_EEPROM_IS_ON_I2C
58#define CONFIG_SYS_EEPROM_SIZE 256
59
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020060#ifndef CONFIG_SPL_BUILD
61/* SATA */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020062#define CONFIG_SCSI_AHCI_PLAT
63#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
64#define CONFIG_SYS_SCSI_MAX_LUN 1
65#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
66 CONFIG_SYS_SCSI_MAX_LUN)
67/* PCA9555 GPIO expander support */
68#define CONFIG_PCA953X
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020069#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20
70#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} }
71
Uri Mashiache6272902017-02-23 15:39:39 +020072#endif /* !CONFIG_SPL_BUILD */
73
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020074/* USB xHCI HOST */
75#define CONFIG_USB_XHCI_OMAP
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020076
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020077#define CONFIG_OMAP_USB3PHY1_HOST
78
79/* USB Networking options */
Dmitry Lifshitz46650d52016-12-28 18:28:33 +020080
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020081/* CPSW Ethernet */
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020082#define CONFIG_MII
83#define CONFIG_BOOTP_DEFAULT
84#define CONFIG_BOOTP_SEND_HOSTNAME
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020085#define CONFIG_PHY_ATHEROS
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020086#define CONFIG_SYS_RX_ETH_BUFFER 64
87#define PHY_ANEG_TIMEOUT 8000
88
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020089#define CONFIG_BOOTP_DNS2
Dmitry Lifshitzfc300e22016-12-28 18:28:35 +020090#define CONFIG_NET_RETRY_COUNT 10
91
Uri Mashiach99b02b42016-12-28 18:28:36 +020092/* Default environment */
93#undef CONFIG_EXTRA_ENV_SETTINGS
94#define CONFIG_EXTRA_ENV_SETTINGS \
95 DEFAULT_LINUX_BOOT_ENV \
96 "autoload=no\0" \
97 "baudrate=115200\0" \
98 "console=ttyO2,115200n8\0" \
99 "bootdelay=3\0" \
100 "fdtfile=am57xx-sbc-am57x.dtb\0" \
101 "kernel=zImage-cl-som-am57x\0" \
102 "bootscr=bootscr.img\0" \
103 "displaytype=hdmi\0" \
104 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
105 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
106 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
Uri Mashiachdbf05182017-05-17 17:29:28 +0300107 "emmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
108 "emmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
Uri Mashiach99b02b42016-12-28 18:28:36 +0200109 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
Uri Mashiachdbf05182017-05-17 17:29:28 +0300110 "run mmcloadkernel && run mmcloadfdt\0" \
Uri Mashiach99b02b42016-12-28 18:28:36 +0200111 "mmcroot=/dev/mmcblk1p2\0" \
112 "mmcrootfstype=ext4 rw rootwait\0" \
113 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
114 "rootfstype=${mmcrootfstype}\0" \
115 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
116 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
117 "echo Running bootscript from MMC/SD Card ... && " \
118 "source ${loadaddr}\0" \
119 "mmcboot=setenv mmcdev 0 && run load_mmc && " \
120 "run mmcargs && echo Booting from MMC/SD Card ... && " \
121 "run bootkernel\0" \
122 "emmcroot=/dev/mmcblk0p2\0" \
123 "emmcrootfstype=ext4 rw rootwait\0" \
124 "emmcargs=setenv bootargs console=${console} " \
125 "root=${emmcroot} " \
126 "rootfstype=${emmcrootfstype}\0" \
127 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
128 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
129 "echo Running bootscript from eMMC ... && " \
130 "source ${loadaddr}\0" \
131 "emmcboot=setenv mmcdev 1 && run load_mmc && " \
132 "run emmcargs && echo Booting from eMMC ... && " \
133 "run bootkernel\0" \
134 "sataroot=/dev/sda2\0" \
135 "satarootfstype=ext4 rw rootwait\0" \
136 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
137 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
138 "sataargs=setenv bootargs console=${console} " \
139 "root=${sataroot} " \
140 "rootfstype=${satarootfstype}\0" \
141 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
142 "echo Running bootscript from SATA ... && " \
143 "source ${loadaddr}\0" \
144 "sataboot=run load_sata && run sataargs && " \
145 "echo Booting from SATA ... && " \
Uri Mashiachdbf05182017-05-17 17:29:28 +0300146 "run bootkernel\0"
Uri Mashiach99b02b42016-12-28 18:28:36 +0200147
148#undef CONFIG_BOOTCOMMAND
149#define CONFIG_BOOTCOMMAND \
150 "run mmcbootscript || run mmcboot || " \
151 "run satabootscript || run sataboot || " \
152 "run emmcbootscript || run emmcboot"
153
154
Dmitry Lifshitz46650d52016-12-28 18:28:33 +0200155#endif /* __CONFIG_CL_SOM_AM57X_H */