blob: 9ed8771ff50744e9f67efaa846012be34c2669ac [file] [log] [blame]
Michal Simek84c72042015-01-15 10:01:51 +01001/*
2 * Configuration for Xilinx ZynqMP
3 * (C) Copyright 2014 - 2015 Xilinx, Inc.
4 * Michal Simek <michal.simek@xilinx.com>
5 *
6 * Based on Configuration for Versatile Express
7 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11#ifndef __XILINX_ZYNQMP_H
12#define __XILINX_ZYNQMP_H
13
14#define CONFIG_REMAKE_ELF
15
16/* #define CONFIG_ARMV8_SWITCH_TO_EL1 */
17
18#define CONFIG_SYS_NO_FLASH
19
20#define CONFIG_SYS_GENERIC_BOARD
21
22/* Generic Interrupt Controller Definitions */
23#define CONFIG_GICV2
24#define GICD_BASE 0xF9010000
25#define GICC_BASE 0xF9020000
26
27/* Physical Memory Map */
28#define CONFIG_NR_DRAM_BANKS 1
29#define CONFIG_SYS_SDRAM_BASE 0
30#define CONFIG_SYS_SDRAM_SIZE 0x40000000
31
32#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
33#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_SDRAM_SIZE
34
35/* Have release address at the end of 256MB for now */
36#define CPU_RELEASE_ADDR 0xFFFFFF0
37
38/* Cache Definitions */
Siva Durga Prasad Paladugu222b2122014-12-06 12:57:51 +053039#define CONFIG_SYS_CACHELINE_SIZE 64
Michal Simek84c72042015-01-15 10:01:51 +010040
41#define CONFIG_IDENT_STRING " Xilinx ZynqMP"
42
Michal Simek84c72042015-01-15 10:01:51 +010043#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
44
45/* Flat Device Tree Definitions */
46#define CONFIG_OF_LIBFDT
47
48/* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */
49#define COUNTER_FREQUENCY 4000000
50
51/* Size of malloc() pool */
52#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x400000)
53
54/* Serial setup */
Siva Durga Prasad Paladugub0d18be2015-06-10 15:50:59 +053055#if defined(CONFIG_ZYNQMP_DCC)
56# define CONFIG_ARM_DCC
57# define CONFIG_CPU_ARMV8
58#else
59# if defined(CONFIG_ZYNQ_SERIAL_UART0) || defined(CONFIG_ZYNQ_SERIAL_UART1)
60# define CONFIG_ZYNQ_SERIAL
61# endif
62#endif
Michal Simek84c72042015-01-15 10:01:51 +010063
64#define CONFIG_CONS_INDEX 0
65#define CONFIG_BAUDRATE 115200
66#define CONFIG_SYS_BAUDRATE_TABLE \
67 { 4800, 9600, 19200, 38400, 57600, 115200 }
68
69/* Command line configuration */
70#define CONFIG_CMD_ENV
71#define CONFIG_CMD_EXT2
72#define CONFIG_CMD_EXT4
73#define CONFIG_CMD_FAT
Siva Durga Prasad Paladugu5af37bd2015-03-13 17:43:49 +053074#define CONFIG_CMD_FS_GENERIC
Michal Simek84c72042015-01-15 10:01:51 +010075#define CONFIG_DOS_PARTITION
Michal Simek5cb24202015-04-15 13:36:40 +020076#define CONFIG_CMD_ELF
77#define CONFIG_MP
Michal Simek84c72042015-01-15 10:01:51 +010078
Michal Simekcb7ea822015-07-23 12:03:55 +020079#define CONFIG_CMD_MII
80
81/* BOOTP options */
82#define CONFIG_BOOTP_BOOTFILESIZE
83#define CONFIG_BOOTP_BOOTPATH
84#define CONFIG_BOOTP_GATEWAY
85#define CONFIG_BOOTP_HOSTNAME
86#define CONFIG_BOOTP_MAY_FAIL
87#define CONFIG_BOOTP_SERVERIP
88
Siva Durga Prasad Paladugu48d72602015-04-15 11:48:48 +053089/* SPI */
90#ifdef CONFIG_ZYNQ_SPI
Siva Durga Prasad Paladugu48d72602015-04-15 11:48:48 +053091# define CONFIG_SPI_FLASH_SST
92# define CONFIG_CMD_SF
93#endif
94
Michal Simek84c72042015-01-15 10:01:51 +010095#if defined(CONFIG_ZYNQ_SDHCI0) || defined(CONFIG_ZYNQ_SDHCI1)
96# define CONFIG_MMC
97# define CONFIG_GENERIC_MMC
98# define CONFIG_SDHCI
99# define CONFIG_ZYNQ_SDHCI
100# define CONFIG_CMD_MMC
101#endif
102
103#if defined(CONFIG_ZYNQ_SDHCI)
104# define CONFIG_FAT_WRITE
105# define CONFIG_CMD_EXT4_WRITE
106#endif
107
108/* Miscellaneous configurable options */
109#define CONFIG_SYS_LOAD_ADDR 0x8000000
110
111/* Initial environment variables */
112#define CONFIG_EXTRA_ENV_SETTINGS \
113 "kernel_addr=0x80000\0" \
114 "fdt_addr=0x7000000\0" \
115 "fdt_high=0x10000000\0" \
Siva Durga Prasad Paladugu5af37bd2015-03-13 17:43:49 +0530116 "sdboot=mmcinfo && load mmc 0:0 $fdt_addr system.dtb && " \
117 "load mmc 0:0 $kernel_addr Image && booti $kernel_addr - $fdt_addr\0"
Michal Simek84c72042015-01-15 10:01:51 +0100118
119#define CONFIG_BOOTARGS "setenv bootargs console=ttyPS0,${baudrate} " \
120 "earlycon=cdns,mmio,0xff000000,${baudrate}n8"
121#define CONFIG_PREBOOT "run bootargs"
122#define CONFIG_BOOTCOMMAND "run $modeboot"
123#define CONFIG_BOOTDELAY 5
124
125#define CONFIG_BOARD_LATE_INIT
126
127/* Do not preserve environment */
128#define CONFIG_ENV_IS_NOWHERE 1
129#define CONFIG_ENV_SIZE 0x1000
130
131/* Monitor Command Prompt */
132/* Console I/O Buffer Size */
133#define CONFIG_SYS_CBSIZE 2048
134#define CONFIG_SYS_PROMPT "ZynqMP> "
135#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
136 sizeof(CONFIG_SYS_PROMPT) + 16)
137#define CONFIG_SYS_HUSH_PARSER
138#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
139#define CONFIG_SYS_LONGHELP
140#define CONFIG_CMDLINE_EDITING
141#define CONFIG_SYS_MAXARGS 64
142
Michal Simekcb7ea822015-07-23 12:03:55 +0200143/* Ethernet driver */
144#if defined(CONFIG_ZYNQ_GEM0) || defined(CONFIG_ZYNQ_GEM1) || \
145 defined(CONFIG_ZYNQ_GEM2) || defined(CONFIG_ZYNQ_GEM3)
146# define CONFIG_NET_MULTI
147# define CONFIG_ZYNQ_GEM
148# define CONFIG_MII
149# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
150# define CONFIG_PHYLIB
151# define CONFIG_PHY_MARVELL
152#endif
153
Siva Durga Prasad Paladugu2594e032015-03-03 15:01:44 +0530154/* I2C */
155#if defined(CONFIG_SYS_I2C_ZYNQ)
156# define CONFIG_CMD_I2C
157# define CONFIG_SYS_I2C
158# define CONFIG_SYS_I2C_ZYNQ_SPEED 100000
159# define CONFIG_SYS_I2C_ZYNQ_SLAVE 0
160#endif
161
Siva Durga Prasad Paladugu2594e032015-03-03 15:01:44 +0530162/* EEPROM */
163#ifdef CONFIG_ZYNQMP_EEPROM
164# define CONFIG_CMD_EEPROM
165# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
166# define CONFIG_SYS_I2C_EEPROM_ADDR 0x54
167# define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
168# define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
169# define CONFIG_SYS_EEPROM_SIZE (64 * 1024)
170#endif
171
Michal Simek84c72042015-01-15 10:01:51 +0100172#define CONFIG_FIT
173#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */
174
175#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)
176
177#define CONFIG_CMD_BOOTI
178#define CONFIG_CMD_UNZIP
179
180#define CONFIG_BOARD_EARLY_INIT_R
181#define CONFIG_CLOCKS
182
183#endif /* __XILINX_ZYNQMP_H */