From 1d463d6735b8d9ec3342f52acbe9b0c49feeeca2 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Tue, 10 Mar 2020 11:56:38 +0200 Subject: board: atmel: sama7g5ek: add initial support for sama7g5ek Add initial support for sama7g5 evaluation kit board. Signed-off-by: Eugen Hristev --- include/configs/sama7g5ek.h | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 include/configs/sama7g5ek.h (limited to 'include') diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h new file mode 100644 index 0000000000..3b3432ba5e --- /dev/null +++ b/include/configs/sama7g5ek.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration file for the SAMA7G5EK Board. + * + * Copyright (C) 2020 Microchip Corporation + * Eugen Hristev + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 +#define CONFIG_SYS_AT91_MAIN_CLOCK 24000000 /* from 24 MHz crystal */ + +/* SDRAM */ +#define CONFIG_SYS_SDRAM_BASE 0x60000000 +#define CONFIG_SYS_SDRAM_SIZE 0x20000000 + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_INIT_SP_ADDR 0x218000 +#else +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) +#endif + +#define CONFIG_SYS_LOAD_ADDR 0x62000000 /* load address */ + +#undef CONFIG_BOOTCOMMAND +#ifdef CONFIG_SD_BOOT +/* u-boot env in sd/mmc card */ +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0" +#define FAT_ENV_FILE "uboot.env" +/* bootstrap + u-boot + env in sd card */ +#define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x61000000 at91-sama7g5ek.dtb; " \ + "fatload mmc 0:1 0x62000000 zImage; " \ + "bootz 0x62000000 - 0x61000000" +#undef CONFIG_BOOTARGS +#define CONFIG_BOOTARGS \ + "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait" +#endif + +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) + +#endif -- cgit From ac3740c9f2c8d75e5d57d852f85eee30fe16b2c0 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Tue, 2 Jun 2020 10:32:08 +0300 Subject: board: atmel: sama7g5ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR Heap base address is computed based on SYS_INIT_SP_ADDR by subtracting the SYS_MALLOC_F_LEN value in board_init_f_init_reserve(). Signed-off-by: Claudiu Beznea --- include/configs/sama7g5ek.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h index 3b3432ba5e..fbf0274b38 100644 --- a/include/configs/sama7g5ek.h +++ b/include/configs/sama7g5ek.h @@ -20,7 +20,8 @@ #define CONFIG_SYS_INIT_SP_ADDR 0x218000 #else #define CONFIG_SYS_INIT_SP_ADDR \ - (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) + (CONFIG_SYS_SDRAM_BASE + 16 * 1024 + CONFIG_SYS_MALLOC_F_LEN - \ + GENERATED_GBL_DATA_SIZE) #endif #define CONFIG_SYS_LOAD_ADDR 0x62000000 /* load address */ -- cgit From 6b2bcfcad39147c855c799785f802fe8a4e7d4aa Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Tue, 9 Jun 2020 13:58:21 +0300 Subject: board: atmel: sama7g5ek: increase arp timeout and retry count Increase ARP timeout and retry count as this will increase the speed of communication. Signed-off-by: Claudiu Beznea --- include/configs/sama7g5ek.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h index fbf0274b38..dc6cf4c700 100644 --- a/include/configs/sama7g5ek.h +++ b/include/configs/sama7g5ek.h @@ -44,4 +44,7 @@ /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) +#define CONFIG_ARP_TIMEOUT 200 +#define CONFIG_NET_RETRY_COUNT 50 + #endif -- cgit From d05223eb5a1383a484597f079a3905a98fcff44d Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Thu, 30 Jul 2020 16:21:46 +0300 Subject: board: atmel: sama7g5ek: clean-up header bootcommand Clean-up boot command to use the predefined device and part for FAT environment. According to this device and partition, select the proper boot media. Signed-off-by: Eugen Hristev --- include/configs/sama7g5ek.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/configs/sama7g5ek.h b/include/configs/sama7g5ek.h index dc6cf4c700..ef3bfa36fd 100644 --- a/include/configs/sama7g5ek.h +++ b/include/configs/sama7g5ek.h @@ -29,16 +29,11 @@ #undef CONFIG_BOOTCOMMAND #ifdef CONFIG_SD_BOOT /* u-boot env in sd/mmc card */ -#define FAT_ENV_INTERFACE "mmc" -#define FAT_ENV_DEVICE_AND_PART "0" -#define FAT_ENV_FILE "uboot.env" + /* bootstrap + u-boot + env in sd card */ -#define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x61000000 at91-sama7g5ek.dtb; " \ - "fatload mmc 0:1 0x62000000 zImage; " \ +#define CONFIG_BOOTCOMMAND "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x61000000 at91-sama7g5ek.dtb; " \ + "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x62000000 zImage; " \ "bootz 0x62000000 - 0x61000000" -#undef CONFIG_BOOTARGS -#define CONFIG_BOOTARGS \ - "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait" #endif /* Size of malloc() pool */ -- cgit