Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 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 |
Lokesh Vutla | b82e6e9 | 2013-12-10 15:02:12 +0530 | [diff] [blame] | 13 | |
| 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 Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 19 | |
| 20 | #include <asm/arch/omap.h> |
| 21 | |
Lokesh Vutla | b82e6e9 | 2013-12-10 15:02:12 +0530 | [diff] [blame] | 22 | /* 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 Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 27 | |
Lokesh Vutla | b82e6e9 | 2013-12-10 15:02:12 +0530 | [diff] [blame] | 28 | /* SPL defines. */ |
| 29 | #define CONFIG_SPL_TEXT_BASE 0x40300350 |
| 30 | #define CONFIG_SPL_MAX_SIZE (0x40337C00 - CONFIG_SPL_TEXT_BASE) |
| 31 | #define CONFIG_SPL_YMODEM_SUPPORT |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 32 | |
Lokesh Vutla | a42eea9 | 2013-12-10 15:02:13 +0530 | [diff] [blame] | 33 | /* Enabling L2 Cache */ |
| 34 | #define CONFIG_SYS_L2_PL310 |
| 35 | #define CONFIG_SYS_PL310_BASE 0x48242000 |
| 36 | #define CONFIG_SYS_CACHELINE_SIZE 32 |
| 37 | |
Lokesh Vutla | b82e6e9 | 2013-12-10 15:02:12 +0530 | [diff] [blame] | 38 | /* |
| 39 | * Since SPL did pll and ddr initialization for us, |
| 40 | * we don't need to do it twice. |
| 41 | */ |
| 42 | #if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_NOR_BOOT) |
| 43 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 44 | #endif |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 45 | |
Lokesh Vutla | b82e6e9 | 2013-12-10 15:02:12 +0530 | [diff] [blame] | 46 | /* Now bring in the rest of the common code. */ |
| 47 | #include <configs/ti_armv7_common.h> |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 48 | |
Lokesh Vutla | b82e6e9 | 2013-12-10 15:02:12 +0530 | [diff] [blame] | 49 | /* Always 128 KiB env size */ |
| 50 | #define CONFIG_ENV_SIZE (128 << 10) |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 51 | |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 52 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
| 53 | |
| 54 | /* Clock Defines */ |
| 55 | #define V_OSCK 24000000 /* Clock output from T2 */ |
| 56 | #define V_SCLK (V_OSCK) |
| 57 | |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 58 | /* NS16550 Configuration */ |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 59 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ |
| 60 | |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 61 | #define CONFIG_ENV_IS_NOWHERE |
| 62 | |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 63 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" |
| 64 | |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 65 | #define CONFIG_CMD_USB |
| 66 | #define CONFIG_USB_HOST |
| 67 | #define CONFIG_USB_XHCI |
| 68 | #define CONFIG_USB_XHCI_OMAP |
| 69 | #define CONFIG_USB_STORAGE |
| 70 | #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 |
| 71 | |
| 72 | #define CONFIG_OMAP_USB_PHY |
| 73 | #define CONFIG_AM437X_USB2PHY2_HOST |
| 74 | |
Lokesh Vutla | 3985a01 | 2013-12-10 15:02:14 +0530 | [diff] [blame^] | 75 | #ifndef CONFIG_SPL_BUILD |
| 76 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 77 | "loadaddr=0x80200000\0" \ |
| 78 | "fdtaddr=0x80F80000\0" \ |
| 79 | "fdt_high=0xffffffff\0" \ |
| 80 | "rdaddr=0x81000000\0" \ |
| 81 | "fdtfile=undefined\0" \ |
| 82 | "bootpart=0:2\0" \ |
| 83 | "bootdir=/boot\0" \ |
| 84 | "bootfile=zImage\0" \ |
| 85 | "console=ttyO0,115200n8\0" \ |
| 86 | "optargs=\0" \ |
| 87 | "mmcdev=0\0" \ |
| 88 | "mmcroot=/dev/mmcblk0p2 rw\0" \ |
| 89 | "mmcrootfstype=ext4 rootwait\0" \ |
| 90 | "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ |
| 91 | "ramrootfstype=ext2\0" \ |
| 92 | "mmcargs=setenv bootargs console=${console} " \ |
| 93 | "${optargs} " \ |
| 94 | "root=${mmcroot} " \ |
| 95 | "rootfstype=${mmcrootfstype}\0" \ |
| 96 | "bootenv=uEnv.txt\0" \ |
| 97 | "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
| 98 | "importbootenv=echo Importing environment from mmc ...; " \ |
| 99 | "env import -t $loadaddr $filesize\0" \ |
| 100 | "ramargs=setenv bootargs console=${console} " \ |
| 101 | "${optargs} " \ |
| 102 | "root=${ramroot} " \ |
| 103 | "rootfstype=${ramrootfstype}\0" \ |
| 104 | "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ |
| 105 | "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ |
| 106 | "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ |
| 107 | "mmcboot=mmc dev ${mmcdev}; " \ |
| 108 | "if mmc rescan; then " \ |
| 109 | "echo SD/MMC found on device ${mmcdev};" \ |
| 110 | "if run loadbootenv; then " \ |
| 111 | "echo Loaded environment from ${bootenv};" \ |
| 112 | "run importbootenv;" \ |
| 113 | "fi;" \ |
| 114 | "if test -n $uenvcmd; then " \ |
| 115 | "echo Running uenvcmd ...;" \ |
| 116 | "run uenvcmd;" \ |
| 117 | "fi;" \ |
| 118 | "if run loadimage; then " \ |
| 119 | "run loadfdt; " \ |
| 120 | "echo Booting from mmc${mmcdev} ...; " \ |
| 121 | "run mmcargs; " \ |
| 122 | "bootz ${loadaddr} - ${fdtaddr}; " \ |
| 123 | "fi;" \ |
| 124 | "fi;\0" \ |
| 125 | "findfdt="\ |
| 126 | "if test $board_name = AM43EPOS; then " \ |
| 127 | "setenv fdtfile am43x-epos-evm.dtb; fi; " \ |
| 128 | "if test $board_name = AM43__GP; then " \ |
| 129 | "setenv fdtfile am437x-gp-evm.dtb; fi; " \ |
| 130 | "if test $fdtfile = undefined; then " \ |
| 131 | "echo WARNING: Could not determine device tree; fi; \0" |
| 132 | |
| 133 | #define CONFIG_BOOTCOMMAND \ |
| 134 | "run findfdt; " \ |
| 135 | "run mmcboot;" |
| 136 | |
| 137 | #endif |
Lokesh Vutla | 4c682f6 | 2013-07-30 11:36:32 +0530 | [diff] [blame] | 138 | #endif /* __CONFIG_AM43XX_EVM_H */ |