blob: 4de495a15a253463a119b4fcdfec1033850c2f4e [file] [log] [blame]
Lokesh Vutla4c682f62013-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 Vutlab82e6e92013-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 Vutla4c682f62013-07-30 11:36:32 +053019
20#include <asm/arch/omap.h>
21
Lokesh Vutlab82e6e92013-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 Vutla4c682f62013-07-30 11:36:32 +053027
Sekhar Nori2ab3c492013-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 Vutlab82e6e92013-12-10 15:02:12 +053035/* SPL defines. */
36#define CONFIG_SPL_TEXT_BASE 0x40300350
37#define CONFIG_SPL_MAX_SIZE (0x40337C00 - CONFIG_SPL_TEXT_BASE)
38#define CONFIG_SPL_YMODEM_SUPPORT
Lokesh Vutla4c682f62013-07-30 11:36:32 +053039
Lokesh Vutlaa42eea92013-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 Vutlab82e6e92013-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 Vutla4c682f62013-07-30 11:36:32 +053052
Lokesh Vutlab82e6e92013-12-10 15:02:12 +053053/* Now bring in the rest of the common code. */
54#include <configs/ti_armv7_common.h>
Lokesh Vutla4c682f62013-07-30 11:36:32 +053055
Lokesh Vutlab82e6e92013-12-10 15:02:12 +053056/* Always 128 KiB env size */
57#define CONFIG_ENV_SIZE (128 << 10)
Lokesh Vutla4c682f62013-07-30 11:36:32 +053058
Lokesh Vutla4c682f62013-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 Vutla4c682f62013-07-30 11:36:32 +053065/* NS16550 Configuration */
Lokesh Vutla4c682f62013-07-30 11:36:32 +053066#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
67
Lokesh Vutla4c682f62013-07-30 11:36:32 +053068#define CONFIG_ENV_IS_NOWHERE
69
Lokesh Vutla4c682f62013-07-30 11:36:32 +053070#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
71
Dan Murphy6044db32013-10-11 12:28:18 -050072#define CONFIG_CMD_USB
73#define CONFIG_USB_HOST
74#define CONFIG_USB_XHCI
75#define CONFIG_USB_XHCI_OMAP
76#define CONFIG_USB_STORAGE
77#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
78
79#define CONFIG_OMAP_USB_PHY
80#define CONFIG_AM437X_USB2PHY2_HOST
81
Lokesh Vutla3985a012013-12-10 15:02:14 +053082#ifndef CONFIG_SPL_BUILD
83#define CONFIG_EXTRA_ENV_SETTINGS \
84 "loadaddr=0x80200000\0" \
85 "fdtaddr=0x80F80000\0" \
86 "fdt_high=0xffffffff\0" \
87 "rdaddr=0x81000000\0" \
88 "fdtfile=undefined\0" \
89 "bootpart=0:2\0" \
90 "bootdir=/boot\0" \
91 "bootfile=zImage\0" \
92 "console=ttyO0,115200n8\0" \
93 "optargs=\0" \
94 "mmcdev=0\0" \
95 "mmcroot=/dev/mmcblk0p2 rw\0" \
96 "mmcrootfstype=ext4 rootwait\0" \
97 "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
98 "ramrootfstype=ext2\0" \
99 "mmcargs=setenv bootargs console=${console} " \
100 "${optargs} " \
101 "root=${mmcroot} " \
102 "rootfstype=${mmcrootfstype}\0" \
103 "bootenv=uEnv.txt\0" \
104 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
105 "importbootenv=echo Importing environment from mmc ...; " \
106 "env import -t $loadaddr $filesize\0" \
107 "ramargs=setenv bootargs console=${console} " \
108 "${optargs} " \
109 "root=${ramroot} " \
110 "rootfstype=${ramrootfstype}\0" \
111 "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
112 "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
113 "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
114 "mmcboot=mmc dev ${mmcdev}; " \
115 "if mmc rescan; then " \
116 "echo SD/MMC found on device ${mmcdev};" \
117 "if run loadbootenv; then " \
118 "echo Loaded environment from ${bootenv};" \
119 "run importbootenv;" \
120 "fi;" \
121 "if test -n $uenvcmd; then " \
122 "echo Running uenvcmd ...;" \
123 "run uenvcmd;" \
124 "fi;" \
125 "if run loadimage; then " \
126 "run loadfdt; " \
127 "echo Booting from mmc${mmcdev} ...; " \
128 "run mmcargs; " \
129 "bootz ${loadaddr} - ${fdtaddr}; " \
130 "fi;" \
131 "fi;\0" \
132 "findfdt="\
133 "if test $board_name = AM43EPOS; then " \
134 "setenv fdtfile am43x-epos-evm.dtb; fi; " \
135 "if test $board_name = AM43__GP; then " \
136 "setenv fdtfile am437x-gp-evm.dtb; fi; " \
137 "if test $fdtfile = undefined; then " \
138 "echo WARNING: Could not determine device tree; fi; \0"
139
140#define CONFIG_BOOTCOMMAND \
141 "run findfdt; " \
142 "run mmcboot;"
143
144#endif
Lokesh Vutla4c682f62013-07-30 11:36:32 +0530145#endif /* __CONFIG_AM43XX_EVM_H */