blob: 58bf0a6aa4750937e6538f01ef4398593772c0c9 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Dmitry Lifshitz10a59d02016-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 Lifshitz10a59d02016-12-28 18:28:33 +02008 */
9
10#ifndef __CONFIG_CL_SOM_AM57X_H
11#define __CONFIG_CL_SOM_AM57X_H
12
Dmitry Lifshitz10a59d02016-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 Lifshitz10a59d02016-12-28 18:28:33 +020017
18#define CONFIG_SYS_OMAP_ABE_SYSCK
19
20#include <configs/ti_omap5_common.h>
21
Dmitry Lifshitz39f9cf02016-12-28 18:28:34 +020022/* misc */
23#define CONFIG_MISC_INIT_R
24#define CONFIG_REVISION_TAG
25
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020026/* PMIC I2C bus number */
27#define CONFIG_SYS_SPD_BUS_NUM 3
28
29/* SPI Flash support */
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020030#define CONFIG_TI_SPI_MMAP
31#define CONFIG_SF_DEFAULT_SPEED 48000000
32#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
33
34/* SPI SPL defines */
35/* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
36#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
37#define CONFIG_SPL_SPI_SUPPORT
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020038
Uri Mashiachb72165b2017-05-17 17:29:25 +030039/* SD/MMC RAW/FS boot */
40#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
41#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020042
43/* Environment */
44#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB env size */
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020045
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020046#define CONFIG_ENV_SECT_SIZE (64 * 1024)
47#define CONFIG_ENV_OFFSET (768 * 1024)
48#define CONFIG_ENV_SPI_MAX_HZ 48000000
49
Dmitry Lifshitz39f9cf02016-12-28 18:28:34 +020050/* EEPROM */
51#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
52#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
53#define CONFIG_SYS_I2C_EEPROM_BUS 3
54
Dmitry Lifshitz39f9cf02016-12-28 18:28:34 +020055#define CONFIG_ENV_EEPROM_IS_ON_I2C
56#define CONFIG_SYS_EEPROM_SIZE 256
57
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020058#ifndef CONFIG_SPL_BUILD
59/* SATA */
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020060#define CONFIG_SCSI_AHCI_PLAT
61#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
62#define CONFIG_SYS_SCSI_MAX_LUN 1
63#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
64 CONFIG_SYS_SCSI_MAX_LUN)
65/* PCA9555 GPIO expander support */
66#define CONFIG_PCA953X
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020067#define CONFIG_SYS_I2C_PCA953X_ADDR 0x20
68#define CONFIG_SYS_I2C_PCA953X_WIDTH { {0x20, 16} }
69
Uri Mashiachdcb93a52017-02-23 15:39:39 +020070#endif /* !CONFIG_SPL_BUILD */
71
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020072/* USB xHCI HOST */
73#define CONFIG_USB_XHCI_OMAP
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020074
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020075#define CONFIG_OMAP_USB3PHY1_HOST
76
77/* USB Networking options */
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +020078
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +020079/* CPSW Ethernet */
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +020080#define CONFIG_MII
81#define CONFIG_BOOTP_DEFAULT
82#define CONFIG_BOOTP_SEND_HOSTNAME
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +020083#define CONFIG_PHY_ATHEROS
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +020084#define CONFIG_SYS_RX_ETH_BUFFER 64
85#define PHY_ANEG_TIMEOUT 8000
86
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +020087#define CONFIG_BOOTP_DNS2
Dmitry Lifshitz1f182e12016-12-28 18:28:35 +020088#define CONFIG_NET_RETRY_COUNT 10
89
Uri Mashiach30a67122016-12-28 18:28:36 +020090/* Default environment */
91#undef CONFIG_EXTRA_ENV_SETTINGS
92#define CONFIG_EXTRA_ENV_SETTINGS \
93 DEFAULT_LINUX_BOOT_ENV \
94 "autoload=no\0" \
95 "baudrate=115200\0" \
96 "console=ttyO2,115200n8\0" \
97 "bootdelay=3\0" \
98 "fdtfile=am57xx-sbc-am57x.dtb\0" \
99 "kernel=zImage-cl-som-am57x\0" \
100 "bootscr=bootscr.img\0" \
101 "displaytype=hdmi\0" \
102 "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
103 "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
104 "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
Uri Mashiach20a74f32017-05-17 17:29:28 +0300105 "emmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
106 "emmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
Uri Mashiach30a67122016-12-28 18:28:36 +0200107 "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
Uri Mashiach20a74f32017-05-17 17:29:28 +0300108 "run mmcloadkernel && run mmcloadfdt\0" \
Uri Mashiach30a67122016-12-28 18:28:36 +0200109 "mmcroot=/dev/mmcblk1p2\0" \
110 "mmcrootfstype=ext4 rw rootwait\0" \
111 "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
112 "rootfstype=${mmcrootfstype}\0" \
113 "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
114 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
115 "echo Running bootscript from MMC/SD Card ... && " \
116 "source ${loadaddr}\0" \
117 "mmcboot=setenv mmcdev 0 && run load_mmc && " \
118 "run mmcargs && echo Booting from MMC/SD Card ... && " \
119 "run bootkernel\0" \
120 "emmcroot=/dev/mmcblk0p2\0" \
121 "emmcrootfstype=ext4 rw rootwait\0" \
122 "emmcargs=setenv bootargs console=${console} " \
123 "root=${emmcroot} " \
124 "rootfstype=${emmcrootfstype}\0" \
125 "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
126 "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
127 "echo Running bootscript from eMMC ... && " \
128 "source ${loadaddr}\0" \
129 "emmcboot=setenv mmcdev 1 && run load_mmc && " \
130 "run emmcargs && echo Booting from eMMC ... && " \
131 "run bootkernel\0" \
132 "sataroot=/dev/sda2\0" \
133 "satarootfstype=ext4 rw rootwait\0" \
134 "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
135 "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
136 "sataargs=setenv bootargs console=${console} " \
137 "root=${sataroot} " \
138 "rootfstype=${satarootfstype}\0" \
139 "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
140 "echo Running bootscript from SATA ... && " \
141 "source ${loadaddr}\0" \
142 "sataboot=run load_sata && run sataargs && " \
143 "echo Booting from SATA ... && " \
Uri Mashiach20a74f32017-05-17 17:29:28 +0300144 "run bootkernel\0"
Uri Mashiach30a67122016-12-28 18:28:36 +0200145
146#undef CONFIG_BOOTCOMMAND
147#define CONFIG_BOOTCOMMAND \
148 "run mmcbootscript || run mmcboot || " \
149 "run satabootscript || run sataboot || " \
150 "run emmcbootscript || run emmcboot"
151
152
Dmitry Lifshitz10a59d02016-12-28 18:28:33 +0200153#endif /* __CONFIG_CL_SOM_AM57X_H */