]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/ma5d4evk.h
Merge git://www.denx.de/git/u-boot-marvell
[people/ms/u-boot.git] / include / configs / ma5d4evk.h
1 /*
2 * DENX MA5D4 configuration
3 * Copyright (C) 2015 Marek Vasut <marex@denx.de>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8 #ifndef __MA5D4EVK_CONFIG_H__
9 #define __MA5D4EVK_CONFIG_H__
10
11 #define CONFIG_SYS_NO_FLASH
12
13 #define CONFIG_TIMESTAMP /* Print image info with timestamp */
14
15 #include "at91-sama5_common.h"
16 #undef CONFIG_BOOTARGS
17 #define CONFIG_SYS_USE_SERIALFLASH 1
18
19 /*
20 * U-Boot Commands
21 */
22 #define CONFIG_FAT_WRITE
23
24 /*
25 * Memory configurations
26 */
27 #define CONFIG_NR_DRAM_BANKS 1
28 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS
29 #define CONFIG_SYS_SDRAM_SIZE 0x10000000
30
31 #ifdef CONFIG_SPL_BUILD
32 #define CONFIG_SYS_INIT_SP_ADDR 0x210000
33 #else
34 #define CONFIG_SYS_INIT_SP_ADDR \
35 (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
36 #endif
37
38 /*
39 * Environment
40 */
41 #define CONFIG_ENV_IS_IN_SPI_FLASH
42 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
43 #define CONFIG_ENV_OFFSET 0x8000
44 #define CONFIG_ENV_SIZE 0x4000
45 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
46 #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
47 #define CONFIG_ENV_SECT_SIZE 0x1000
48
49 /*
50 * U-Boot general configurations
51 */
52
53 /*
54 * Serial Driver
55 */
56 #define CONFIG_ATMEL_USART
57 #define CONFIG_USART_BASE ATMEL_BASE_USART0
58 #define CONFIG_USART_ID ATMEL_ID_USART0
59
60 /*
61 * Ethernet
62 */
63 #ifdef CONFIG_CMD_NET
64 #define CONFIG_MACB
65 #define CONFIG_RMII
66 #define CONFIG_NET_RETRY_COUNT 20
67 #define CONFIG_MACB_SEARCH_PHY
68 #define CONFIG_ARP_TIMEOUT 200UL
69 #define CONFIG_IP_DEFRAG
70 #endif
71
72 /*
73 * LCD
74 */
75 #ifdef CONFIG_LCD
76 #define CONFIG_CMD_BMP
77 #define CONFIG_BMP_16BPP
78 #define CONFIG_BMP_24BPP
79 #define CONFIG_BMP_32BPP
80 #define LCD_BPP LCD_COLOR16
81 #define LCD_OUTPUT_BPP 24
82 #define CONFIG_ATMEL_HLCD
83 #endif
84
85 /*
86 * SD/MMC
87 */
88 #ifdef CONFIG_CMD_MMC
89 #define CONFIG_GENERIC_ATMEL_MCI
90 #endif
91
92 /*
93 * SPI NOR (boot memory)
94 */
95 #ifdef CONFIG_CMD_SF
96 #define CONFIG_ATMEL_SPI
97 #define CONFIG_ATMEL_SPI0
98 #define CONFIG_SPI_FLASH_ATMEL
99 #define CONFIG_SF_DEFAULT_BUS 0
100 #define CONFIG_SF_DEFAULT_CS 0
101 #define CONFIG_SF_DEFAULT_SPEED 30000000
102 #endif
103
104 /*
105 * USB
106 */
107 #ifdef CONFIG_CMD_USB
108 #define CONFIG_USB_EHCI
109 #define CONFIG_USB_EHCI_ATMEL
110 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
111
112 /* USB device */
113 #define CONFIG_USB_ETHER
114 #define CONFIG_USB_ETH_RNDIS
115 #define CONFIG_USBNET_MANUFACTURER "DENX"
116 #endif
117
118 /*
119 * Boot Linux
120 */
121 #define CONFIG_CMDLINE_TAG
122 #define CONFIG_INITRD_TAG
123 #define CONFIG_SETUP_MEMORY_TAGS
124 #define CONFIG_BOOTFILE "fitImage"
125 #define CONFIG_BOOTARGS "console=ttyS3,115200"
126 #define CONFIG_LOADADDR 0x20800000
127 #define CONFIG_BOOTCOMMAND "run mmc_mmc"
128 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
129
130 /*
131 * Extra Environments
132 */
133 #define CONFIG_PREBOOT "run try_bootscript"
134 #define CONFIG_HOSTNAME ma5d4evk
135
136 #define CONFIG_EXTRA_ENV_SETTINGS \
137 "consdev=ttyS3\0" \
138 "baudrate=115200\0" \
139 "bootscript=boot.scr\0" \
140 "bootdev=/dev/mmcblk1p1\0" \
141 "bootpart=1:1\0" \
142 "rootdev=/dev/mmcblk1p2\0" \
143 "netdev=eth0\0" \
144 "kernel_addr_r=0x22000000\0" \
145 "update_spi_firmware_spl_addr=0x21000000\0" \
146 "update_spi_firmware_spl_filename=boot.bin\0" \
147 "update_spi_firmware_addr=0x22000000\0" \
148 "update_spi_firmware_filename=u-boot.img\0" \
149 "update_spi_firmware=" /* Update the SPI flash firmware */ \
150 "if sf probe ; then " \
151 "if tftp ${update_spi_firmware_spl_addr} " \
152 "${update_spi_firmware_spl_filename} ; then " \
153 "setenv update_spi_firmware_spl_filesize ${filesize} ; "\
154 "if tftp ${update_spi_firmware_addr} " \
155 "${update_spi_firmware_filename} ; then " \
156 "setenv update_spi_firmware_filesize ${filesize} ; " \
157 "sf update ${update_spi_firmware_spl_addr} 0x0 " \
158 "${update_spi_firmware_spl_filesize} ; " \
159 "sf update ${update_spi_firmware_addr} 0x10000 " \
160 "${update_spi_firmware_filesize} ; " \
161 "fi ; " \
162 "fi ; " \
163 "fi\0" \
164 "addcons=" \
165 "setenv bootargs ${bootargs} " \
166 "console=${consdev},${baudrate}\0" \
167 "addip=" \
168 "setenv bootargs ${bootargs} " \
169 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
170 "${netmask}:${hostname}:${netdev}:off\0" \
171 "addmisc=" \
172 "setenv bootargs ${bootargs} ${miscargs}\0" \
173 "addargs=run addcons addmisc\0" \
174 "mmcload=" \
175 "mmc rescan ; " \
176 "load mmc ${bootpart} ${kernel_addr_r} ${bootfile}\0" \
177 "netload=" \
178 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
179 "miscargs=nohlt panic=1\0" \
180 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
181 "nfsargs=" \
182 "setenv bootargs root=/dev/nfs rw " \
183 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
184 "mmc_mmc=" \
185 "run mmcload mmcargs addargs ; " \
186 "bootm ${kernel_addr_r}\0" \
187 "mmc_nfs=" \
188 "run mmcload nfsargs addip addargs ; " \
189 "bootm ${kernel_addr_r}\0" \
190 "net_mmc=" \
191 "run netload mmcargs addargs ; " \
192 "bootm ${kernel_addr_r}\0" \
193 "net_nfs=" \
194 "run netload nfsargs addip addargs ; " \
195 "bootm ${kernel_addr_r}\0" \
196 "try_bootscript=" \
197 "mmc rescan;" \
198 "if test -e mmc ${bootpart} ${bootscript} ; then " \
199 "if load mmc ${bootpart} ${kernel_addr_r} ${bootscript};"\
200 "then ; " \
201 "echo Running bootscript... ; " \
202 "source ${kernel_addr_r} ; " \
203 "fi ; " \
204 "fi\0"
205 /* SPL */
206 #define CONFIG_SPL_FRAMEWORK
207 #define CONFIG_SPL_TEXT_BASE 0x200000
208 #define CONFIG_SPL_MAX_SIZE 0x10000
209 #define CONFIG_SPL_BSS_START_ADDR 0x20000000
210 #define CONFIG_SPL_BSS_MAX_SIZE 0x80000
211 #define CONFIG_SYS_SPL_MALLOC_START 0x20080000
212 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000
213
214 #define CONFIG_SPL_BOARD_INIT
215 #define CONFIG_SYS_MONITOR_LEN (512 << 10)
216
217 #define CONFIG_SPL_SPI_LOAD
218 #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x10000
219
220 #endif /* __MA5D4EVK_CONFIG_H__ */