1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Configuration for Xilinx Versal
4 * (C) Copyright 2016 - 2018 Xilinx, Inc.
5 * Michal Simek <michal.simek@xilinx.com>
7 * Based on Configuration for Xilinx ZynqMP
10 #ifndef __XILINX_VERSAL_H
11 #define __XILINX_VERSAL_H
13 #define CONFIG_REMAKE_ELF
15 /* #define CONFIG_ARMV8_SWITCH_TO_EL1 */
17 /* Generic Interrupt Controller Definitions */
18 #define GICD_BASE 0xF9000000
19 #define GICR_BASE 0xF9080000
21 #define CONFIG_SYS_MEMTEST_SCRATCH 0xfffc0000
23 #define CONFIG_SYS_MEMTEST_START 0
24 #define CONFIG_SYS_MEMTEST_END 1000
26 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE
28 /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */
29 #if CONFIG_COUNTER_FREQUENCY
30 # define COUNTER_FREQUENCY CONFIG_COUNTER_FREQUENCY
34 #define CONFIG_ARM_DCC
35 #define CONFIG_CPU_ARMV8
37 #define CONFIG_SYS_BAUDRATE_TABLE \
38 { 4800, 9600, 19200, 38400, 57600, 115200 }
41 #define CONFIG_BOOTP_BOOTFILESIZE
42 #define CONFIG_BOOTP_MAY_FAIL
44 #define CONFIG_IP_DEFRAG
45 #define CONFIG_TFTP_BLOCKSIZE 4096
47 /* Miscellaneous configurable options */
48 #define CONFIG_SYS_LOAD_ADDR 0x8000000
50 /* Monitor Command Prompt */
51 /* Console I/O Buffer Size */
52 #define CONFIG_SYS_CBSIZE 2048
53 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
54 sizeof(CONFIG_SYS_PROMPT) + 16)
55 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
56 #define CONFIG_SYS_MAXARGS 64
59 #if defined(CONFIG_ZYNQ_GEM)
60 # define CONFIG_NET_MULTI
61 # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
62 # define PHY_ANEG_TIMEOUT 20000
65 #define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)
69 #define ENV_MEM_LAYOUT_SETTINGS \
70 "fdt_high=10000000\0" \
71 "initrd_high=10000000\0" \
72 "fdt_addr_r=0x40000000\0" \
73 "pxefile_addr_r=0x10000000\0" \
74 "kernel_addr_r=0x18000000\0" \
75 "scriptaddr=0x02000000\0" \
76 "ramdisk_addr_r=0x02100000\0" \
77 "script_offset_f=0x3f80000\0" \
78 "script_size_f=0x80000\0"
80 #if defined(CONFIG_MMC_SDHCI_ZYNQ)
81 # define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
83 # define BOOT_TARGET_DEVICES_MMC(func)
86 #if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL)
87 # define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0)
89 # define BOOT_TARGET_DEVICES_XSPI(func)
92 #define BOOTENV_DEV_XSPI(devtypeu, devtypel, instance) \
93 "bootcmd_xspi0=sf probe 0 0 0 && " \
94 "sf read $scriptaddr $script_offset_f $script_size_f && " \
95 "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
97 #define BOOTENV_DEV_NAME_XSPI(devtypeu, devtypel, instance) \
100 #define BOOT_TARGET_DEVICES(func) \
101 BOOT_TARGET_DEVICES_MMC(func) \
102 BOOT_TARGET_DEVICES_XSPI(func) \
106 #include <config_distro_bootcmd.h>
108 /* Initial environment variables */
109 #ifndef CONFIG_EXTRA_ENV_SETTINGS
110 #define CONFIG_EXTRA_ENV_SETTINGS \
111 ENV_MEM_LAYOUT_SETTINGS \
115 #endif /* __XILINX_VERSAL_H */