blob: 1d8eaa76dfe7cee4998e03e06306cb29c4307fc8 [file] [log] [blame]
Michal Simek04b7e622015-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 Paladugua38e81e2014-12-06 12:57:51 +053039#define CONFIG_SYS_CACHELINE_SIZE 64
Michal Simek04b7e622015-01-15 10:01:51 +010040
41#define CONFIG_IDENT_STRING " Xilinx ZynqMP"
42
43#define CONFIG_SYS_TEXT_BASE 0x8000000
44#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
45
46/* Flat Device Tree Definitions */
47#define CONFIG_OF_LIBFDT
48
49/* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */
50#define COUNTER_FREQUENCY 4000000
51
52/* Size of malloc() pool */
53#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x400000)
54
55/* Serial setup */
56#define CONFIG_ZYNQ_SERIAL_UART0
57#define CONFIG_ZYNQ_SERIAL
58
59#define CONFIG_CONS_INDEX 0
60#define CONFIG_BAUDRATE 115200
61#define CONFIG_SYS_BAUDRATE_TABLE \
62 { 4800, 9600, 19200, 38400, 57600, 115200 }
63
64/* Command line configuration */
65#define CONFIG_CMD_ENV
66#define CONFIG_CMD_EXT2
67#define CONFIG_CMD_EXT4
68#define CONFIG_CMD_FAT
69#define CONFIG_CMD_MEMORY
70#define CONFIG_DOS_PARTITION
Michal Simek58f865f2015-04-15 13:36:40 +020071#define CONFIG_CMD_ELF
72#define CONFIG_MP
Michal Simek04b7e622015-01-15 10:01:51 +010073
Siva Durga Prasad Paladugu32b7dba2015-04-15 11:48:48 +053074/* SPI */
75#ifdef CONFIG_ZYNQ_SPI
76# define CONFIG_SPI_FLASH
77# define CONFIG_SPI_FLASH_SST
78# define CONFIG_CMD_SF
79#endif
80
Michal Simek04b7e622015-01-15 10:01:51 +010081#if defined(CONFIG_ZYNQ_SDHCI0) || defined(CONFIG_ZYNQ_SDHCI1)
82# define CONFIG_MMC
83# define CONFIG_GENERIC_MMC
84# define CONFIG_SDHCI
85# define CONFIG_ZYNQ_SDHCI
86# define CONFIG_CMD_MMC
87#endif
88
89#if defined(CONFIG_ZYNQ_SDHCI)
90# define CONFIG_FAT_WRITE
91# define CONFIG_CMD_EXT4_WRITE
92#endif
93
94/* Miscellaneous configurable options */
95#define CONFIG_SYS_LOAD_ADDR 0x8000000
96
97/* Initial environment variables */
98#define CONFIG_EXTRA_ENV_SETTINGS \
99 "kernel_addr=0x80000\0" \
100 "fdt_addr=0x7000000\0" \
101 "fdt_high=0x10000000\0" \
102 "sdboot=mmcinfo && fatload mmc 0:0 $fdt_addr system.dtb && " \
103 "fatload mmc 0:0 $kernel_addr Image && booti $kernel_addr - $fdt_addr\0"
104
105#define CONFIG_BOOTARGS "setenv bootargs console=ttyPS0,${baudrate} " \
106 "earlycon=cdns,mmio,0xff000000,${baudrate}n8"
107#define CONFIG_PREBOOT "run bootargs"
108#define CONFIG_BOOTCOMMAND "run $modeboot"
109#define CONFIG_BOOTDELAY 5
110
111#define CONFIG_BOARD_LATE_INIT
112
113/* Do not preserve environment */
114#define CONFIG_ENV_IS_NOWHERE 1
115#define CONFIG_ENV_SIZE 0x1000
116
117/* Monitor Command Prompt */
118/* Console I/O Buffer Size */
119#define CONFIG_SYS_CBSIZE 2048
120#define CONFIG_SYS_PROMPT "ZynqMP> "
121#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
122 sizeof(CONFIG_SYS_PROMPT) + 16)
123#define CONFIG_SYS_HUSH_PARSER
124#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
125#define CONFIG_SYS_LONGHELP
126#define CONFIG_CMDLINE_EDITING
127#define CONFIG_SYS_MAXARGS 64
128
Siva Durga Prasad Paladugu055792a2015-03-03 15:01:44 +0530129#define CONFIG_ZYNQ_I2C0
130#define CONFIG_SYS_I2C_ZYNQ
131
132/* I2C */
133#if defined(CONFIG_SYS_I2C_ZYNQ)
134# define CONFIG_CMD_I2C
135# define CONFIG_SYS_I2C
136# define CONFIG_SYS_I2C_ZYNQ_SPEED 100000
137# define CONFIG_SYS_I2C_ZYNQ_SLAVE 0
138#endif
139
140#define CONFIG_ZYNQMP_EEPROM
141
142/* EEPROM */
143#ifdef CONFIG_ZYNQMP_EEPROM
144# define CONFIG_CMD_EEPROM
145# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
146# define CONFIG_SYS_I2C_EEPROM_ADDR 0x54
147# define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
148# define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
149# define CONFIG_SYS_EEPROM_SIZE (64 * 1024)
150#endif
151
Michal Simek04b7e622015-01-15 10:01:51 +0100152#define CONFIG_FIT
153#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */
154
155#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)
156
157#define CONFIG_CMD_BOOTI
158#define CONFIG_CMD_UNZIP
159
160#define CONFIG_BOARD_EARLY_INIT_R
161#define CONFIG_CLOCKS
162
163#endif /* __XILINX_ZYNQMP_H */