]> Git Repo - J-u-boot.git/blame - include/configs/zynq-common.h
Convert CONFIG_SYS_TIMER_COUNTS_DOWN to Kconfig
[J-u-boot.git] / include / configs / zynq-common.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
f22651cf
MS
2/*
3 * (C) Copyright 2012 Michal Simek <[email protected]>
3e1b61de 4 * (C) Copyright 2013 - 2018 Xilinx, Inc.
06fe8dae
JT
5 *
6 * Common configuration options for all Zynq boards.
f22651cf
MS
7 */
8
06fe8dae
JT
9#ifndef __CONFIG_ZYNQ_COMMON_H
10#define __CONFIG_ZYNQ_COMMON_H
f22651cf 11
8cfac504 12/* Cache options */
8cfac504 13#ifndef CONFIG_SYS_L2CACHE_OFF
8cfac504
JT
14# define CONFIG_SYS_PL310_BASE 0xf8f02000
15#endif
16
a2ec7fb9
MS
17#define ZYNQ_SCUTIMER_BASEADDR 0xF8F00600
18#define CONFIG_SYS_TIMERBASE ZYNQ_SCUTIMER_BASEADDR
a2ec7fb9
MS
19#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMERBASE + 0x4)
20
741ef867
SG
21/* GUIDs for capsule updatable firmware images */
22#define XILINX_BOOT_IMAGE_GUID \
23 EFI_GUID(0x1ba29a15, 0x9969, 0x40aa, 0xb4, 0x24, \
24 0xe8, 0x61, 0x21, 0x61, 0x86, 0x64)
25
26#define XILINX_UBOOT_IMAGE_GUID \
27 EFI_GUID(0x1a5178f0, 0x87d3, 0x4f36, 0xac, 0x63, \
28 0x3b, 0x31, 0xa2, 0x3b, 0xe3, 0x05)
29
53e49f74 30/* Serial drivers */
f22651cf
MS
31/* The following table includes the supported baudrates */
32#define CONFIG_SYS_BAUDRATE_TABLE \
33 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
34
f22651cf 35/* Ethernet driver */
f22651cf 36
fe5eddbf 37/* NOR */
e856bdcf 38#ifdef CONFIG_MTD_NOR_FLASH
fe5eddbf 39# define CONFIG_FLASH_SHOW_PROGRESS 10
fe5eddbf
JT
40#endif
41
2cdc778b 42#ifdef CONFIG_USB_EHCI_ZYNQ
87f3dbdf 43# define DFU_DEFAULT_POLL_TIMEOUT 300
1e8d3830 44# define CONFIG_THOR_RESET_OFF
c6024c8e
SDPP
45#endif
46
4d1ed9c7 47/* enable preboot to be loaded before CONFIG_BOOTDELAY */
4d1ed9c7 48
61d8eeb0 49/* Boot configuration */
61d8eeb0 50
61d8eeb0
AG
51#ifdef CONFIG_SPL_BUILD
52#define BOOTENV
53#else
61d8eeb0
AG
54
55#ifdef CONFIG_CMD_MMC
7712fb1f 56#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
61d8eeb0
AG
57#else
58#define BOOT_TARGET_DEVICES_MMC(func)
59#endif
60
61#ifdef CONFIG_CMD_USB
559e5a68 62#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) func(USB, usb, 1)
61d8eeb0
AG
63#else
64#define BOOT_TARGET_DEVICES_USB(func)
65#endif
66
86271b3f 67#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
61d8eeb0
AG
68#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
69#else
70#define BOOT_TARGET_DEVICES_PXE(func)
71#endif
72
73#if defined(CONFIG_CMD_DHCP)
74#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
75#else
76#define BOOT_TARGET_DEVICES_DHCP(func)
77#endif
78
90e97ab3
SDPP
79#if defined(CONFIG_ZYNQ_QSPI)
80# define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na)
81#else
82# define BOOT_TARGET_DEVICES_QSPI(func)
83#endif
84
85#if defined(CONFIG_NAND_ZYNQ)
86# define BOOT_TARGET_DEVICES_NAND(func) func(NAND, nand, na)
87#else
88# define BOOT_TARGET_DEVICES_NAND(func)
89#endif
90
91#if defined(CONFIG_MTD_NOR_FLASH)
92# define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na)
93#else
94# define BOOT_TARGET_DEVICES_NOR(func)
95#endif
96
90e97ab3
SDPP
97#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
98 "bootcmd_qspi=sf probe 0 0 0 && " \
a542a937 99 "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
19d13045
MS
100 "echo QSPI: Trying to boot script at ${scriptaddr} && " \
101 "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0"
90e97ab3
SDPP
102
103#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
104 "qspi "
105
106#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
107 "bootcmd_nand=nand info && " \
a542a937 108 "nand read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
19d13045
MS
109 "echo NAND: Trying to boot script at ${scriptaddr} && " \
110 "source ${scriptaddr}; echo NAND: SCRIPT FAILED: continuing...;\0"
90e97ab3
SDPP
111
112#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
113 "nand "
114
115#define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \
90b9fcb9
MS
116 "script_offset_nor=0xE2FC0000\0" \
117 "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \
19d13045
MS
118 "echo NOR: Trying to boot script at ${scriptaddr} && " \
119 "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0"
90e97ab3
SDPP
120
121#define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
122 "nor "
123
c352f1e1
KR
124#define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na)
125
126#define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \
19d13045
MS
127 "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \
128 "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0"
c352f1e1
KR
129
130#define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
131 "jtag "
132
b8126ab2
KR
133#define BOOT_TARGET_DEVICES_USB_DFU(func) \
134 func(USB_DFU, usb_dfu, 0) func(USB_DFU, usb_dfu, 1)
135
136#define BOOTENV_DEV_USB_DFU(devtypeu, devtypel, instance) \
137 "bootcmd_" #devtypel #instance "=setenv dfu_alt_info boot.scr ram " \
138 "$scriptaddr $script_size_f && " \
139 "dfu " #instance " ram " #instance " 60 && " \
140 "echo DFU" #instance ": Trying to boot script at ${scriptaddr} && " \
141 "source ${scriptaddr}; " \
142 "echo DFU" #instance ": SCRIPT FAILED: continuing...;\0"
143
144#define BOOTENV_DEV_NAME_USB_DFU(devtypeu, devtypel, instance) \
145 ""
146
147#define BOOT_TARGET_DEVICES_USB_THOR(func) \
148 func(USB_THOR, usb_thor, 0) func(USB_THOR, usb_thor, 1)
149
150#define BOOTENV_DEV_USB_THOR(devtypeu, devtypel, instance) \
151 "bootcmd_" #devtypel #instance "=setenv dfu_alt_info boot.scr ram " \
152 "$scriptaddr $script_size_f && " \
153 "thordown " #instance " ram " #instance " && " \
154 "echo THOR" #instance ": Trying to boot script at ${scriptaddr} && " \
155 "source ${scriptaddr}; " \
156 "echo THOR" #instance ": SCRIPT FAILED: continuing...;\0"
157
158#define BOOTENV_DEV_NAME_USB_THOR(devtypeu, devtypel, instance) \
159 ""
160
61d8eeb0 161#define BOOT_TARGET_DEVICES(func) \
c352f1e1 162 BOOT_TARGET_DEVICES_JTAG(func) \
61d8eeb0 163 BOOT_TARGET_DEVICES_MMC(func) \
90e97ab3
SDPP
164 BOOT_TARGET_DEVICES_QSPI(func) \
165 BOOT_TARGET_DEVICES_NAND(func) \
166 BOOT_TARGET_DEVICES_NOR(func) \
b8126ab2
KR
167 BOOT_TARGET_DEVICES_USB_DFU(func) \
168 BOOT_TARGET_DEVICES_USB_THOR(func) \
61d8eeb0
AG
169 BOOT_TARGET_DEVICES_USB(func) \
170 BOOT_TARGET_DEVICES_PXE(func) \
83a0e805 171 BOOT_TARGET_DEVICES_DHCP(func)
61d8eeb0
AG
172
173#include <config_distro_bootcmd.h>
174#endif /* CONFIG_SPL_BUILD */
175
e83f61a6 176/* Default environment */
b7b3efe7 177#ifndef CONFIG_EXTRA_ENV_SETTINGS
e83f61a6 178#define CONFIG_EXTRA_ENV_SETTINGS \
90e97ab3 179 "scriptaddr=0x20000\0" \
90e97ab3 180 "script_size_f=0x40000\0" \
61d8eeb0
AG
181 "fdt_addr_r=0x1f00000\0" \
182 "pxefile_addr_r=0x2000000\0" \
183 "kernel_addr_r=0x2000000\0" \
184 "scriptaddr=0x3000000\0" \
185 "ramdisk_addr_r=0x3100000\0" \
83a0e805 186 BOOTENV
b7b3efe7 187#endif
c6024c8e 188
36e0e197 189/* Miscellaneous configurable options */
36e0e197 190
c1584e2a 191#define CONFIG_SYS_INIT_RAM_ADDR 0xFFFF0000
d6d82cb0 192#define CONFIG_SYS_INIT_RAM_SIZE 0x2000
53e49f74 193
53e49f74 194
ae9f4899 195/* Extend size of kernel image for uncompression */
ae9f4899 196
d7e269cf 197/* Address in RAM where the parameters must be copied by SPL. */
d7e269cf 198
d7e269cf 199/* Not using MMC raw mode - just for compilation purpose */
d7e269cf
MS
200
201/* qspi mode is working fine */
202#ifdef CONFIG_ZYNQ_QSPI
8e0e01d3
SDPP
203#define CONFIG_SYS_SPI_ARGS_OFFS 0x200000
204#define CONFIG_SYS_SPI_ARGS_SIZE 0x80000
205#define CONFIG_SYS_SPI_KERNEL_OFFS (CONFIG_SYS_SPI_ARGS_OFFS + \
206 CONFIG_SYS_SPI_ARGS_SIZE)
d7e269cf
MS
207#endif
208
d7e269cf 209/* SP location before relocation, must use scratch RAM */
d7e269cf
MS
210
211/* 3 * 64kB blocks of OCM - one is on the top because of bootrom */
d7e269cf 212
d7e269cf 213/* On the top of OCM space */
d7e269cf 214
83b6464d
MS
215/*
216 * SPL stack position - and stack goes down
217 * 0xfffffe00 is used for putting wfi loop.
218 * Set it up as limit for now.
219 */
83b6464d 220
06fe8dae 221#endif /* __CONFIG_ZYNQ_COMMON_H */
This page took 1.001298 seconds and 4 git commands to generate.