blob: 3b3432ba5e666349071ff123f6b2cff8e8427d79 [file] [log] [blame]
Eugen Hristev1d463d62020-03-10 11:56:38 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Configuration file for the SAMA7G5EK Board.
4 *
5 * Copyright (C) 2020 Microchip Corporation
6 * Eugen Hristev <eugen.hristev@microchip.com>
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
13#define CONFIG_SYS_AT91_MAIN_CLOCK 24000000 /* from 24 MHz crystal */
14
15/* SDRAM */
16#define CONFIG_SYS_SDRAM_BASE 0x60000000
17#define CONFIG_SYS_SDRAM_SIZE 0x20000000
18
19#ifdef CONFIG_SPL_BUILD
20#define CONFIG_SYS_INIT_SP_ADDR 0x218000
21#else
22#define CONFIG_SYS_INIT_SP_ADDR \
23 (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
24#endif
25
26#define CONFIG_SYS_LOAD_ADDR 0x62000000 /* load address */
27
28#undef CONFIG_BOOTCOMMAND
29#ifdef CONFIG_SD_BOOT
30/* u-boot env in sd/mmc card */
31#define FAT_ENV_INTERFACE "mmc"
32#define FAT_ENV_DEVICE_AND_PART "0"
33#define FAT_ENV_FILE "uboot.env"
34/* bootstrap + u-boot + env in sd card */
35#define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x61000000 at91-sama7g5ek.dtb; " \
36 "fatload mmc 0:1 0x62000000 zImage; " \
37 "bootz 0x62000000 - 0x61000000"
38#undef CONFIG_BOOTARGS
39#define CONFIG_BOOTARGS \
40 "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"
41#endif
42
43/* Size of malloc() pool */
44#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)
45
46#endif