]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/configs/am43xx_evm.h
spl: common: Support for USB MSD FAT image loading
[people/ms/u-boot.git] / include / configs / am43xx_evm.h
CommitLineData
8d0afcd7
LV
1/*
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
8d0afcd7 13
369cbe1e
LV
14#define CONFIG_BOARD_LATE_INIT
15#define CONFIG_ARCH_CPU_INIT
16#define CONFIG_SYS_CACHELINE_SIZE 32
8d0afcd7 17#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
8d0afcd7 18#define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */
369cbe1e
LV
19
20#include <asm/arch/omap.h>
8d0afcd7
LV
21
22/* NS16550 Configuration */
23#define CONFIG_SYS_NS16550
24#define CONFIG_SYS_NS16550_SERIAL
25#define CONFIG_SYS_NS16550_REG_SIZE (-4)
369cbe1e 26#define CONFIG_SYS_NS16550_CLK 48000000
8d0afcd7 27
9f1a8cd3
SN
28/* 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
369cbe1e
LV
35/* 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
8d0afcd7 39
573b020e
LV
40/* Enabling L2 Cache */
41#define CONFIG_SYS_L2_PL310
42#define CONFIG_SYS_PL310_BASE 0x48242000
43#define CONFIG_SYS_CACHELINE_SIZE 32
44
8d0afcd7 45/*
369cbe1e
LV
46 * Since SPL did pll and ddr initialization for us,
47 * we don't need to do it twice.
8d0afcd7 48 */
369cbe1e 49#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_NOR_BOOT)
8d0afcd7
LV
50#define CONFIG_SKIP_LOWLEVEL_INIT
51#endif
52
369cbe1e
LV
53/* Now bring in the rest of the common code. */
54#include <configs/ti_armv7_common.h>
8d0afcd7 55
369cbe1e
LV
56/* Always 128 KiB env size */
57#define CONFIG_ENV_SIZE (128 << 10)
8d0afcd7 58
369cbe1e 59#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
8d0afcd7 60
369cbe1e
LV
61/* Clock Defines */
62#define V_OSCK 24000000 /* Clock output from T2 */
63#define V_SCLK (V_OSCK)
8d0afcd7 64
369cbe1e
LV
65/* NS16550 Configuration */
66#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
67
68#define CONFIG_ENV_IS_NOWHERE
69
70#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
8d0afcd7 71
3d799c7f
DM
72#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
1564dba7
LV
82#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
8d0afcd7 145#endif /* __CONFIG_AM43XX_EVM_H */