blob: 614857dd25cde0119599bd0f9a76c1d0c9f0e606 [file] [log] [blame]
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +05301/*
2 * am43xx_evm.h
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __CONFIG_AM43XX_EVM_H
10#define __CONFIG_AM43XX_EVM_H
11
12#define CONFIG_AM43XX
Lokesh Vutla369cbe12013-12-10 15:02:12 +053013
14#define CONFIG_BOARD_LATE_INIT
15#define CONFIG_ARCH_CPU_INIT
16#define CONFIG_SYS_CACHELINE_SIZE 32
17#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
18#define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053019
20#include <asm/arch/omap.h>
21
Lokesh Vutla369cbe12013-12-10 15:02:12 +053022/* NS16550 Configuration */
23#define CONFIG_SYS_NS16550
24#define CONFIG_SYS_NS16550_SERIAL
25#define CONFIG_SYS_NS16550_REG_SIZE (-4)
26#define CONFIG_SYS_NS16550_CLK 48000000
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053027
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053028/* I2C Configuration */
29#define CONFIG_CMD_EEPROM
30#define CONFIG_ENV_EEPROM_IS_ON_I2C
31#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
32#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
33#define CONFIG_SYS_I2C_MULTI_EEPROMS
34
Lokesh Vutla369cbe12013-12-10 15:02:12 +053035/* SPL defines. */
36#define CONFIG_SPL_TEXT_BASE 0x40300350
Tom Rinib1cde7e2014-01-20 08:40:07 -050037#define CONFIG_SPL_MAX_SIZE (220 << 10) /* 220KB */
Lokesh Vutla369cbe12013-12-10 15:02:12 +053038#define CONFIG_SPL_YMODEM_SUPPORT
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053039
Lokesh Vutla573b0202013-12-10 15:02:13 +053040/* Enabling L2 Cache */
41#define CONFIG_SYS_L2_PL310
42#define CONFIG_SYS_PL310_BASE 0x48242000
43#define CONFIG_SYS_CACHELINE_SIZE 32
44
Lokesh Vutla369cbe12013-12-10 15:02:12 +053045/*
46 * Since SPL did pll and ddr initialization for us,
47 * we don't need to do it twice.
48 */
49#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_NOR_BOOT)
50#define CONFIG_SKIP_LOWLEVEL_INIT
51#endif
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053052
Lokesh Vutla369cbe12013-12-10 15:02:12 +053053/* Now bring in the rest of the common code. */
54#include <configs/ti_armv7_common.h>
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053055
Lokesh Vutla369cbe12013-12-10 15:02:12 +053056/* Always 128 KiB env size */
57#define CONFIG_ENV_SIZE (128 << 10)
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053058
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053059#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
60
61/* Clock Defines */
62#define V_OSCK 24000000 /* Clock output from T2 */
63#define V_SCLK (V_OSCK)
64
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053065/* NS16550 Configuration */
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053066#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
67
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053068#define CONFIG_ENV_IS_NOWHERE
69
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +053070#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
71
Dan Murphy2b36fe52014-01-16 11:23:31 -060072/* SPL USB Support */
73#define CONFIG_SPL_USB_SUPPORT
74#define CONFIG_SPL_USB_HOST_SUPPORT
75#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
76
Dan Murphy3d799c72013-10-11 12:28:18 -050077#define CONFIG_CMD_USB
78#define CONFIG_USB_HOST
79#define CONFIG_USB_XHCI
80#define CONFIG_USB_XHCI_OMAP
81#define CONFIG_USB_STORAGE
82#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
83
84#define CONFIG_OMAP_USB_PHY
85#define CONFIG_AM437X_USB2PHY2_HOST
86
Sourav Poddarea4c7a82013-12-21 12:50:08 +053087/* SPI */
88#undef CONFIG_OMAP3_SPI
89#define CONFIG_TI_QSPI
90#define CONFIG_SPI_FLASH
91#define CONFIG_SPI_FLASH_MACRONIX
92#define CONFIG_CMD_SF
93#define CONFIG_CMD_SPI
94#define CONFIG_TI_SPI_MMAP
95#define CONFIG_QSPI_SEL_GPIO 48
96#define CONFIG_SF_DEFAULT_SPEED 48000000
97#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
98
99/* SPI SPL */
100#define CONFIG_SPL_SPI_SUPPORT
101#define CONFIG_SPL_SPI_LOAD
102#define CONFIG_SPL_SPI_FLASH_SUPPORT
103#define CONFIG_SPL_SPI_BUS 0
104#define CONFIG_SPL_SPI_CS 0
105#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
106
Tom Rini0f1b0442014-01-21 17:15:07 -0500107/* Enhance our eMMC support / experience. */
108#define CONFIG_CMD_GPT
109#define CONFIG_EFI_PARTITION
110#define CONFIG_PARTITION_UUIDS
111#define CONFIG_CMD_PART
112
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530113#ifndef CONFIG_SPL_BUILD
114#define CONFIG_EXTRA_ENV_SETTINGS \
115 "loadaddr=0x80200000\0" \
116 "fdtaddr=0x80F80000\0" \
117 "fdt_high=0xffffffff\0" \
118 "rdaddr=0x81000000\0" \
119 "fdtfile=undefined\0" \
120 "bootpart=0:2\0" \
121 "bootdir=/boot\0" \
122 "bootfile=zImage\0" \
123 "console=ttyO0,115200n8\0" \
Tom Rini0f1b0442014-01-21 17:15:07 -0500124 "partitions=" \
125 "uuid_disk=${uuid_gpt_disk};" \
126 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530127 "optargs=\0" \
128 "mmcdev=0\0" \
129 "mmcroot=/dev/mmcblk0p2 rw\0" \
130 "mmcrootfstype=ext4 rootwait\0" \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600131 "usbroot=/dev/sda2 rw\0" \
132 "usbrootfstype=ext4 rootwait\0" \
133 "usbdev=0\0" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530134 "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
135 "ramrootfstype=ext2\0" \
136 "mmcargs=setenv bootargs console=${console} " \
137 "${optargs} " \
138 "root=${mmcroot} " \
139 "rootfstype=${mmcrootfstype}\0" \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600140 "usbargs=setenv bootargs console=${console} " \
141 "${optargs} " \
142 "root=${usbroot} " \
143 "rootfstype=${usbrootfstype}\0" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530144 "bootenv=uEnv.txt\0" \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600145 "loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530146 "importbootenv=echo Importing environment from mmc ...; " \
147 "env import -t $loadaddr $filesize\0" \
148 "ramargs=setenv bootargs console=${console} " \
149 "${optargs} " \
150 "root=${ramroot} " \
151 "rootfstype=${ramrootfstype}\0" \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600152 "loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" \
153 "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
154 "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530155 "mmcboot=mmc dev ${mmcdev}; " \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600156 "setenv devnum ${mmcdev}; " \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530157 "if mmc rescan; then " \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600158 "echo SD/MMC found on device ${devnum};" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530159 "if run loadbootenv; then " \
160 "echo Loaded environment from ${bootenv};" \
161 "run importbootenv;" \
162 "fi;" \
163 "if test -n $uenvcmd; then " \
164 "echo Running uenvcmd ...;" \
165 "run uenvcmd;" \
166 "fi;" \
167 "if run loadimage; then " \
168 "run loadfdt; " \
169 "echo Booting from mmc${mmcdev} ...; " \
170 "run mmcargs; " \
171 "bootz ${loadaddr} - ${fdtaddr}; " \
172 "fi;" \
173 "fi;\0" \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600174 "usbboot=" \
175 "setenv devnum ${usbdev}; " \
176 "setenv devtype usb; " \
177 "usb start ${usbdev}; " \
178 "if usb dev ${usbdev}; then " \
179 "if run loadbootenv; then " \
180 "echo Loaded environment from ${bootenv};" \
181 "run importbootenv;" \
182 "fi;" \
183 "if test -n $uenvcmd; then " \
184 "echo Running uenvcmd ...;" \
185 "run uenvcmd;" \
186 "fi;" \
187 "if run loadimage; then " \
188 "run loadfdt; " \
189 "echo Booting from usb ${usbdev}...; " \
190 "run usbargs;" \
191 "bootz ${loadaddr} - ${fdtaddr}; " \
192 "fi;" \
193 "fi\0" \
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530194 "findfdt="\
195 "if test $board_name = AM43EPOS; then " \
196 "setenv fdtfile am43x-epos-evm.dtb; fi; " \
197 "if test $board_name = AM43__GP; then " \
198 "setenv fdtfile am437x-gp-evm.dtb; fi; " \
199 "if test $fdtfile = undefined; then " \
200 "echo WARNING: Could not determine device tree; fi; \0"
201
202#define CONFIG_BOOTCOMMAND \
203 "run findfdt; " \
Dan Murphy2b36fe52014-01-16 11:23:31 -0600204 "run mmcboot;" \
205 "run usbboot;"
Lokesh Vutla1564dba2013-12-10 15:02:14 +0530206
Mugunthan V N3a3939b2014-02-18 07:31:58 -0500207#endif
208
Mugunthan V N4cdd7fd2014-02-18 07:31:54 -0500209/* CPSW Ethernet */
210#define CONFIG_CMD_NET
211#define CONFIG_CMD_DHCP
212#define CONFIG_CMD_PING
213#define CONFIG_CMD_MII
214#define CONFIG_DRIVER_TI_CPSW
215#define CONFIG_MII
216#define CONFIG_BOOTP_DEFAULT
217#define CONFIG_BOOTP_DNS
218#define CONFIG_BOOTP_DNS2
219#define CONFIG_BOOTP_SEND_HOSTNAME
220#define CONFIG_BOOTP_GATEWAY
221#define CONFIG_BOOTP_SUBNETMASK
222#define CONFIG_NET_RETRY_COUNT 10
223#define CONFIG_NET_MULTI
224#define CONFIG_PHY_GIGE
225#define CONFIG_PHYLIB
Mugunthan V N4cdd7fd2014-02-18 07:31:54 -0500226
Mugunthan V N3a3939b2014-02-18 07:31:58 -0500227#define CONFIG_SPL_ENV_SUPPORT
228#define CONFIG_SPL_NET_VCI_STRING "AM43xx U-Boot SPL"
229
230#define CONFIG_SPL_ETH_SUPPORT
231#define CONFIG_SPL_NET_SUPPORT
232#define CONFIG_SYS_RX_ETH_BUFFER 64
233
Lokesh Vutla8d0afcd2013-07-30 11:36:32 +0530234#endif /* __CONFIG_AM43XX_EVM_H */